Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-operator-master
Commits
7fcbd165
Commit
7fcbd165
authored
Sep 02, 2022
by
吴滔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑/新增收款单联调/详情微调/开票税价计算
parent
41b58be7
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
640 additions
and
353 deletions
+640
-353
financial.js
src/api/ecw/financial.js
+12
-12
index.vue
src/components/DictSelector/index.vue
+1
-1
creatCollection.vue
src/views/ecw/financial/creatCollection.vue
+290
-181
openInvoice.vue
src/views/ecw/financial/openInvoice.vue
+122
-13
printVoucher.vue
src/views/ecw/financial/printVoucher.vue
+10
-9
receiptDetail.vue
src/views/ecw/financial/receiptDetail.vue
+193
-126
voucher.vue
src/views/ecw/financial/voucher.vue
+12
-11
No files found.
src/api/ecw/financial.js
View file @
7fcbd165
...
@@ -46,20 +46,20 @@ export function getReceiptList(query) {
...
@@ -46,20 +46,20 @@ export function getReceiptList(query) {
}
}
// 核销收款单
// 核销收款单
export
function
receiptVerification
(
id
)
{
//
export function receiptVerification(id) {
return
request
({
//
return request({
url
:
'
/ecw/receipt/verification/
'
+
id
,
//
url: '/ecw/receipt/verification/' + id,
method
:
'
GET
'
//
method: 'GET'
})
//
})
}
//
}
// 反核销收款单
// 反核销收款单
export
function
receiptVerificationCancel
(
id
)
{
//
export function receiptVerificationCancel(id) {
return
request
({
//
return request({
url
:
'
/ecw/receipt/verificationCancel/
'
+
id
,
//
url: '/ecw/receipt/verificationCancel/' + id,
method
:
'
GET
'
//
method: 'GET'
})
//
})
}
//
}
// 获取收款单详情
// 获取收款单详情
export
function
getReceiptInfoByIds
(
query
)
{
export
function
getReceiptInfoByIds
(
query
)
{
...
...
src/components/DictSelector/index.vue
View file @
7fcbd165
<
template
>
<
template
>
<div
class=
"dict-selector"
>
<div
class=
"dict-selector"
>
<el-select
v-if=
"formType == 'select'"
v-model=
"valueSync"
:placeholder=
"placeholder"
clearable
:multiple=
"multiple"
:disabled=
"disabled"
>
<el-select
v-if=
"formType == 'select'"
v-model=
"valueSync"
:placeholder=
"placeholder"
clearable
:multiple=
"multiple"
:disabled=
"disabled"
@
change=
"val => $emit('change', val)"
>
<el-option
v-for=
"dict in formattedList"
<el-option
v-for=
"dict in formattedList"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-select>
...
...
src/views/ecw/financial/creatCollection.vue
View file @
7fcbd165
This diff is collapsed.
Click to expand it.
src/views/ecw/financial/openInvoice.vue
View file @
7fcbd165
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<el-descriptions-item
label=
"纳税人识别号"
>
{{
invoiceData
.
taxpayer
}}
</el-descriptions-item>
<el-descriptions-item
label=
"纳税人识别号"
>
{{
invoiceData
.
taxpayer
}}
</el-descriptions-item>
<el-descriptions-item
label=
"地址"
>
{{
invoiceData
.
addressPhone
}}
</el-descriptions-item>
<el-descriptions-item
label=
"地址"
>
{{
invoiceData
.
addressPhone
}}
</el-descriptions-item>
<el-descriptions-item
label=
"开户行"
>
{{
invoiceData
.
accountBank
}}
</el-descriptions-item>
<el-descriptions-item
label=
"开户行"
>
{{
invoiceData
.
accountBank
}}
</el-descriptions-item>
<el-descriptions-item
label=
"税率"
>
<el-descriptions-item
label=
"税率
%
"
>
<el-form-item
label=
""
>
<el-form-item
label=
""
>
<el-input
v-model=
"invoiceData.taxRate"
></el-input>
<el-input
v-model=
"invoiceData.taxRate"
></el-input>
</el-form-item>
</el-form-item>
...
@@ -57,24 +57,36 @@
...
@@ -57,24 +57,36 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"箱数"
align=
"center"
prop=
"num"
/>
<el-table-column
label=
"箱数"
align=
"center"
prop=
"num"
/>
<el-table-column
label=
"体积/重量"
align=
"center"
prop=
"weight"
></el-table-column>
<el-table-column
label=
"体积/重量"
align=
"center"
prop=
"weight"
></el-table-column>
<el-table-column
label=
"
费用
类型"
align=
"center"
prop=
"feeType"
>
<el-table-column
label=
"
收入
类型"
align=
"center"
prop=
"feeType"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<dict-tag
<dict-tag
:type=
"DICT_TYPE.
ECW_TRANSPORT
_TYPE"
:type=
"DICT_TYPE.
FEE
_TYPE"
:value=
"scope.row.feeType"
:value=
"scope.row.feeType"
></dict-tag>
></dict-tag>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"单价"
align=
"center"
prop=
"unitPrice"
/>
<el-table-column
label=
"单价金额"
align=
"center"
prop=
"unitPrice"
>
<el-table-column
label=
"总金额"
align=
"center"
prop=
"totalAmount"
/>
<el-table-column
label=
"税额"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
无
<span>
{{
scope
.
row
.
unitPrice
}}
</span>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"价税合计"
align=
"center
"
>
<el-table-column
label=
"总金额"
align=
"center"
prop=
"totalAmount
"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
无
<span>
{{
scope
.
row
.
totalAmount
}}
</span>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"税额"
align=
"center"
prop=
"tax"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
tax
}}
</span>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"价税合计"
align=
"center"
prop=
"taxAndTotalAmount"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
taxAndTotalAmount
}}
</span>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -99,6 +111,7 @@
...
@@ -99,6 +111,7 @@
<
script
>
<
script
>
import
{
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
{
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
{
getReceiptInvoicing
,
getInvoicingItem
,
updateReceiptInvoicing
}
from
"
@/api/ecw/financial
"
;
import
{
getReceiptInvoicing
,
getInvoicingItem
,
updateReceiptInvoicing
}
from
"
@/api/ecw/financial
"
;
import
NP
from
'
number-precision
'
export
default
{
export
default
{
name
:
"
OpenInvoice
"
,
name
:
"
OpenInvoice
"
,
...
@@ -118,9 +131,9 @@ export default {
...
@@ -118,9 +131,9 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
getData
()
{
async
getData
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
getReceiptInvoicing
(
this
.
id
).
then
((
res
)
=>
{
await
getReceiptInvoicing
(
this
.
id
).
then
((
res
)
=>
{
this
.
invoiceData
=
res
.
data
;
this
.
invoiceData
=
res
.
data
;
this
.
invoiceData
.
invoicingTypeId
=
this
.
invoiceData
.
invoicingTypeId
||
''
this
.
invoiceData
.
invoicingTypeId
=
this
.
invoiceData
.
invoicingTypeId
||
''
// if (!this.invoiceData.info || this.invoiceData.info.length == 0) {
// if (!this.invoiceData.info || this.invoiceData.info.length == 0) {
...
@@ -129,9 +142,15 @@ export default {
...
@@ -129,9 +142,15 @@ export default {
this
.
loading
=
false
;
this
.
loading
=
false
;
});
});
getInvoicingItem
({
id
:
this
.
id
}).
then
(
res
=>
{
getInvoicingItem
({
id
:
this
.
id
}).
then
(
res
=>
{
res
.
data
.
map
(
v
=>
{
v
.
tax
=
NP
.
times
(
v
.
totalAmount
,
this
.
invoiceData
.
taxRate
/
100
)
v
.
taxAndTotalAmount
=
NP
.
plus
(
v
.
totalAmount
,
NP
.
times
(
v
.
totalAmount
,
this
.
invoiceData
.
taxRate
/
100
))
})
const
t
=
{
const
t
=
{
orderNo
:
'
合计
'
,
orderNo
:
'
合计
'
,
totalAmount
:
res
.
data
.
reduce
((
total
,
curr
)
=>
total
+
curr
.
totalAmount
,
0
)
totalAmount
:
res
.
data
.
reduce
((
total
,
curr
)
=>
NP
.
plus
(
total
,
curr
.
totalAmount
),
0
),
tax
:
res
.
data
.
reduce
((
total
,
curr
)
=>
NP
.
plus
(
total
,
curr
.
tax
),
0
),
taxAndTotalAmount
:
res
.
data
.
reduce
((
total
,
curr
)
=>
NP
.
plus
(
total
,
curr
.
taxAndTotalAmount
),
0
)
}
}
this
.
list
=
[...
res
.
data
,
t
]
this
.
list
=
[...
res
.
data
,
t
]
})
})
...
@@ -148,8 +167,98 @@ export default {
...
@@ -148,8 +167,98 @@ export default {
})
})
},
},
getSummaries
(
param
)
{
getSummaries
(
param
)
{
return
[
'
收款人
'
,
this
.
invoiceData
.
payeeName
,
'
核销人
'
,
this
.
invoiceData
.
writeOffName
,
'
开票人
'
,
this
.
invoiceData
.
issuerName
,
''
,
'
价税合计大写
'
,
444
];
const
t
=
this
.
list
[
this
.
list
.
length
-
1
].
taxAndTotalAmount
return
[
'
收款人
'
,
this
.
invoiceData
.
payeeName
,
'
核销人
'
,
this
.
invoiceData
.
writeOffName
,
'
开票人
'
,
this
.
invoiceData
.
issuerName
,
''
,
'
价税合计大写
'
,
this
.
convertCurrency
(
t
)];
},
},
convertCurrency
(
money
)
{
//汉字的数字
var
cnNums
=
new
Array
(
'
零
'
,
'
壹
'
,
'
贰
'
,
'
叁
'
,
'
肆
'
,
'
伍
'
,
'
陆
'
,
'
柒
'
,
'
捌
'
,
'
玖
'
);
//基本单位
var
cnIntRadice
=
new
Array
(
''
,
'
拾
'
,
'
佰
'
,
'
仟
'
);
//对应整数部分扩展单位
var
cnIntUnits
=
new
Array
(
''
,
'
万
'
,
'
亿
'
,
'
兆
'
);
//对应小数部分单位
var
cnDecUnits
=
new
Array
(
'
角
'
,
'
分
'
,
'
毫
'
,
'
厘
'
);
//整数金额时后面跟的字符
var
cnInteger
=
'
整
'
;
//整型完以后的单位
var
cnIntLast
=
'
元
'
;
//最大处理的数字
var
maxNum
=
999999999999999.9999
;
//金额整数部分
var
integerNum
;
//金额小数部分
var
decimalNum
;
//输出的中文金额字符串
var
chineseStr
=
''
;
//分离金额后用的数组,预定义
var
parts
;
// 传入的参数为空情况
if
(
money
===
''
)
{
return
''
;
}
money
=
parseFloat
(
money
)
if
(
money
>=
maxNum
){
return
''
}
// 传入的参数为0情况
if
(
money
===
0
)
{
chineseStr
=
cnNums
[
0
]
+
cnIntLast
+
cnInteger
;
return
chineseStr
}
// 转为字符串
money
=
money
.
toString
();
// indexOf 检测某字符在字符串中首次出现的位置 返回索引值(从0 开始) -1 代表无
if
(
money
.
indexOf
(
'
.
'
)
==
-
1
)
{
integerNum
=
money
;
decimalNum
=
''
}
else
{
parts
=
money
.
split
(
'
.
'
);
integerNum
=
parts
[
0
];
decimalNum
=
parts
[
1
].
substr
(
0
,
4
);
}
//转换整数部分
if
(
parseInt
(
integerNum
,
10
)
>
0
){
let
zeroCount
=
0
;
let
IntLen
=
integerNum
.
length
for
(
let
i
=
0
;
i
<
IntLen
;
i
++
){
let
n
=
integerNum
.
substr
(
i
,
1
);
let
p
=
IntLen
-
i
-
1
;
let
q
=
p
/
4
;
let
m
=
p
%
4
;
if
(
n
==
'
0
'
){
zeroCount
++
;
}
else
{
if
(
zeroCount
>
0
){
chineseStr
+=
cnNums
[
0
]
}
zeroCount
=
0
;
chineseStr
+=
cnNums
[
parseInt
(
n
)]
+
cnIntRadice
[
m
];
}
if
(
m
==
0
&&
zeroCount
<
4
){
chineseStr
+=
cnIntUnits
[
q
];
}
}
// 最后+ 元
chineseStr
+=
cnIntLast
;
}
// 转换小数部分
if
(
decimalNum
!=
''
){
let
decLen
=
decimalNum
.
length
;
for
(
let
i
=
0
;
i
<
decLen
;
i
++
){
let
n
=
decimalNum
.
substr
(
i
,
1
);
if
(
n
!=
'
0
'
){
chineseStr
+=
cnNums
[
Number
(
n
)]
+
cnDecUnits
[
i
]
}
}
}
if
(
chineseStr
==
''
){
chineseStr
+=
cnNums
[
0
]
+
cnIntLast
+
cnInteger
;
}
else
if
(
decimalNum
==
''
){
chineseStr
+=
cnInteger
;
}
return
chineseStr
}
},
},
};
};
</
script
>
</
script
>
...
...
src/views/ecw/financial/printVoucher.vue
View file @
7fcbd165
...
@@ -100,18 +100,11 @@
...
@@ -100,18 +100,11 @@
id
:
0
id
:
0
}
}
},
},
created
()
{
async
created
()
{
let
that
=
this
let
that
=
this
if
(
that
.
$route
.
query
.
id
){
that
.
id
=
that
.
$route
.
query
.
id
that
.
getCollectionData
()
getInvoicingItem
({
id
:
this
.
id
}).
then
(
res
=>
{
this
.
list
=
res
.
data
})
}
listSimpleUsers
().
then
(
res
=>
that
.
creatorData
=
res
.
data
)
listSimpleUsers
().
then
(
res
=>
that
.
creatorData
=
res
.
data
)
getBankAccountPage
(
that
.
params
).
then
(
res
=>
that
.
bankData
=
res
.
data
.
list
)
getBankAccountPage
(
that
.
params
).
then
(
res
=>
that
.
bankData
=
res
.
data
.
list
)
listSimpleDepts
().
then
(
res
=>
{
await
listSimpleDepts
().
then
(
res
=>
{
res
.
data
.
forEach
((
item
)
=>
{
res
.
data
.
forEach
((
item
)
=>
{
if
(
item
.
parentId
==
0
){
if
(
item
.
parentId
==
0
){
...
@@ -130,12 +123,20 @@
...
@@ -130,12 +123,20 @@
})
})
})
})
if
(
that
.
$route
.
query
.
id
){
that
.
id
=
that
.
$route
.
query
.
id
that
.
getCollectionData
()
getInvoicingItem
({
id
:
this
.
id
}).
then
(
res
=>
{
this
.
list
=
res
.
data
})
}
},
},
methods
:
{
methods
:
{
getCollectionData
(){
getCollectionData
(){
let
that
=
this
let
that
=
this
getReceiptInfoByIds
({
id
:
that
.
id
}).
then
(
res
=>
{
getReceiptInfoByIds
({
id
:
that
.
id
}).
then
(
res
=>
{
that
.
form
=
res
.
data
that
.
form
=
res
.
data
that
.
form
.
departmentName
=
that
.
deptData
.
find
(
v
=>
v
.
id
==
that
.
form
.
departmentId
).
name
})
})
},
},
print
(){
print
(){
...
...
src/views/ecw/financial/receiptDetail.vue
View file @
7fcbd165
This diff is collapsed.
Click to expand it.
src/views/ecw/financial/voucher.vue
View file @
7fcbd165
...
@@ -154,43 +154,44 @@
...
@@ -154,43 +154,44 @@
>
>
<
template
slot
-
scope
=
"
scope
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
<
el
-
button
v
-
if
=
"
scope.row.state === 0 || scope.row.state == 1 || scope.row.state ==
5
"
v
-
if
=
"
scope.row.state === 0 || scope.row.state == 1 || scope.row.state ==
2 || scope.row.state == 3
"
size
=
"
mini
"
size
=
"
mini
"
type
=
"
text
"
type
=
"
text
"
@
click
=
"
handleAdd(scope.row.id)
"
@
click
=
"
handleAdd(scope.row.id)
"
>
编辑
<
/el-butto
n
>
编辑
<
/el-butto
n
>
>
<
el
-
button
<
!--
<
el
-
button
v
-
if
=
"
scope.row.state ==
1
"
v
-
if
=
"
scope.row.state ==
"
size
=
"
mini
"
size
=
"
mini
"
type
=
"
text
"
type
=
"
text
"
@
click
=
"
verificationClick(scope.row)
"
@
click
=
"
verificationClick(scope.row)
"
>
核销
<
/el-butto
n
>
核销
<
/el-butto
n
>
>
-->
<
el
-
button
<
el
-
button
v
-
if
=
"
scope.row.state
!= 1 && scope.row.state != 5
"
v
-
if
=
"
scope.row.state
== 4 || scope.row.state == 5 || scope.row.state == 6
"
size
=
"
mini
"
size
=
"
mini
"
type
=
"
text
"
type
=
"
text
"
@
click
=
"
verificationCancelClick(scope.row)
"
@
click
=
"
verificationCancelClick(scope.row)
"
>
反核销
<
/el-butto
n
>
反核销
<
/el-butto
n
>
>
<
el
-
button
<
el
-
button
v
-
if
=
"
scope.row.state ==
3
"
v
-
if
=
"
scope.row.state ==
5
"
size
=
"
mini
"
size
=
"
mini
"
type
=
"
text
"
type
=
"
text
"
@
click
=
"
openInvoice(scope.row.id)
"
@
click
=
"
openInvoice(scope.row.id)
"
>
开票
<
/el-butto
n
>
开票
<
/el-butto
n
>
>
<
el
-
button
v
-
if
=
"
scope.row.state === 0
"
size
=
"
mini
"
type
=
"
text
"
@
click
=
"
deleteClick(scope.row)
"
>
删除
<
/el-button
>
<
el
-
button
v
-
if
=
"
scope.row.state == 1 || scope.row.state == 2 || scope.row.state == 3
"
size
=
"
mini
"
type
=
"
text
"
@
click
=
"
verificationCancelClick(scope.row)
"
>
收款
<
/el-button
>
<
el
-
button
v
-
if
=
"
scope.row.state == 0 || scope.row.state == 1
"
size
=
"
mini
"
type
=
"
text
"
@
click
=
"
deleteClick(scope.row)
"
>
删除
<
/el-button
>
<
el
-
button
<
el
-
button
v
-
if
=
"
scope.row.state !=
5
"
v
-
if
=
"
scope.row.state !=
0
"
size
=
"
mini
"
size
=
"
mini
"
type
=
"
text
"
type
=
"
text
"
@
click
=
"
toprint(scope.row.id)
"
@
click
=
"
toprint(scope.row.id)
"
>
打印
<
/el-butto
n
>
打印
<
/el-butto
n
>
>
<
el
-
button
<
el
-
button
v
-
if
=
"
scope.row.state !=
5
"
v
-
if
=
"
scope.row.state !=
0
"
size
=
"
mini
"
size
=
"
mini
"
type
=
"
text
"
type
=
"
text
"
@
click
=
"
exportReceipt(scope.row.id)
"
@
click
=
"
exportReceipt(scope.row.id)
"
...
@@ -241,8 +242,8 @@ import { DICT_TYPE } from "@/utils/dict";
...
@@ -241,8 +242,8 @@ import { DICT_TYPE } from "@/utils/dict";
import
CustomerSelector
from
"
@/components/CustomerSelector
"
;
import
CustomerSelector
from
"
@/components/CustomerSelector
"
;
import
{
import
{
getReceiptList
,
getReceiptList
,
receiptVerification
,
//
receiptVerification,
receiptVerificationCancel
,
//
receiptVerificationCancel,
receiptExportExcel
,
receiptExportExcel
,
deleteReceipt
deleteReceipt
}
from
"
@/api/ecw/financial
"
;
}
from
"
@/api/ecw/financial
"
;
...
...
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