开票记录查询功能

This commit is contained in:
caoxinyu
2018-12-11 19:45:46 +08:00
parent 1ec333a0e7
commit 807333efe8
6 changed files with 379 additions and 25 deletions

View File

@@ -149,14 +149,14 @@ export function editMarketingManager(MarketingManagerId, AdressID) {
}
})
}
export function addCustomer(AdressID, CustomerName, CallNumber, Fax, Adress, People, Email, BankAccount, DutyParagraph, Assessment, Remark) {
export function addCustomer(AdressID, CustomerName, CallNumber, Fax, Adress, People, Email, BankAccount, DutyParagraph, Assessment, Remark, OpeningBank) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '客户关系管理系统_客户_增加数据_MESWORK',
param: '省份流水号=' + AdressID + '&客户名称=' + CustomerName + '&电话=' + CallNumber + '&传真=' + Fax + '&地址=' + Adress + '&联系人=' + People + '&电子邮箱=' + Email + '&银行账号=' + BankAccount + '&税号=' + DutyParagraph + '&价值评估流水号=' + Assessment + '&备注=' + Remark
param: '省份流水号=' + AdressID + '&客户名称=' + CustomerName + '&电话=' + CallNumber + '&传真=' + Fax + '&地址=' + Adress + '&联系人=' + People + '&电子邮箱=' + Email + '&银行账号=' + BankAccount + '&税号=' + DutyParagraph + '&价值评估流水号=' + Assessment + '&备注=' + Remark + '&开户行=' + OpeningBank
}
})
}
@@ -171,14 +171,14 @@ export function selectAdressOfID(AdressID) {
}
})
}
export function editCustomer(AdressID, CustomerName, CallNumber, Fax, Adress, People, Email, BankAccount, DutyParagraph, Assessment, Remark, ID) {
export function editCustomer(AdressID, CustomerName, CallNumber, Fax, Adress, People, Email, BankAccount, DutyParagraph, Assessment, Remark, ID, OpeningBank) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '客户关系管理系统_客户_修改数据_MESWORK',
param: '省份流水号=' + AdressID + '&客户名称=' + CustomerName + '&电话=' + CallNumber + '&传真=' + Fax + '&地址=' + Adress + '&联系人=' + People + '&电子邮箱=' + Email + '&银行账号=' + BankAccount + '&税号=' + DutyParagraph + '&价值评估流水号=' + Assessment + '&备注=' + Remark + '&客户流水号=' + ID
param: '省份流水号=' + AdressID + '&客户名称=' + CustomerName + '&电话=' + CallNumber + '&传真=' + Fax + '&地址=' + Adress + '&联系人=' + People + '&电子邮箱=' + Email + '&银行账号=' + BankAccount + '&税号=' + DutyParagraph + '&价值评估流水号=' + Assessment + '&备注=' + Remark + '&客户流水号=' + ID + '&开户行=' + OpeningBank
}
})
}

View File

@@ -0,0 +1,35 @@
import request from '@/utils/request'
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '合同信息管理_项目名称_总_查询'
}
})
}
export function searchTableData1(pageCurrent, pageSize, num1, num2, num3, num4, num5, num6, num7, num8) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '合同资金管理_开票记录_合同信息统计_查询',
param: '合同ID=' + num1 + '=int&人员ID=' + num2 + '=int&项目流水号_check=' + num3 + '=int&营销经理流水号_check=' + num4 + '=int&开始日期_check=' + num5 + '=int&结束日期_check=' + num6 + '=int&开始日期=' + num7 + '=date&结束日期=' + num8 + '=date',
Pagination: pageCurrent + '&' + pageSize
}
})
}
export function searchTableData2(num1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '合同信息管理_开票记录_查询',
param: '项目流水号=' + num1 + '=int'
}
})
}

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Svg Vector Icons : http://www.sfont.cn -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
<metadata> Svg Vector Icons : http://www.sfont.cn </metadata>
<g><path d="M288.3,732.6l54.7,60.6c-96.1,59-192.8,114.6-290.2,167c-11.3-19.9-25.5-43.1-42.7-69.6C116.7,840.9,209.4,788.2,288.3,732.6z M25.9,649.1H990v61.6H554.7v131.2c0,78.2-38.8,117.6-116.3,118.3c-35.1,0-78.5-0.3-130.2-1c-2.7-21.9-7-48-12.9-78.5c50.4,4.6,90.8,7,121.3,7c41.7,0,62.6-20.5,62.6-61.6V710.7H25.9V649.1z M96.5,193.9h248.5v-92.4H43.8V39.8h926.3v61.6H667v92.4h249.5v276.3h-69.6v-31.8l-680.8,0v31.8H96.5L96.5,193.9L96.5,193.9z M97.5,512.9h821v61.6h-821V512.9z M166,378.7h178.9V253.5H166V378.7z M416.5,193.9h178.9v-92.4H416.5V193.9z M416.5,378.7h178.9V253.5H416.5V378.7z M648.1,799.2l41.7-61.6C783.3,782.6,881.3,832,984,885.6l-46.7,73.5C833.3,898.2,736.9,844.9,648.1,799.2z M846.9,253.5H667v125.2h179.9L846.9,253.5L846.9,253.5z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -118,7 +118,7 @@
{{ scope.row.电话 }}
</template>
</el-table-column>
<el-table-column label="传真" align="center" width="140px">
<el-table-column label="开票电话" align="center" width="140px">
<template slot-scope="scope">
{{ scope.row.传真 }}
</template>
@@ -138,6 +138,11 @@
{{ scope.row.税号 }}
</template>
</el-table-column>
<el-table-column label="开户行" align="center" width="200px">
<template slot-scope="scope">
{{ scope.row.开户行 }}
</template>
</el-table-column>
<el-table-column label="银行账号" align="center" width="200px">
<template slot-scope="scope">
{{ scope.row.银行账号 }}
@@ -260,8 +265,8 @@
</el-form>
</el-col>
<el-col :span="12">
<el-form-item label="传真:" prop="传真">
<el-input v-model="form2.传真" clearable size="small" style="width:200px" placeholder="请输入传真"/>
<el-form-item label="开票电话:" prop="传真">
<el-input v-model="form2.传真" clearable size="small" style="width:200px" placeholder="请输入开票电话"/>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -295,9 +300,14 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-col :span="12">
<el-form-item label="开户行:" prop="开户行">
<el-input v-model="form2.开户行" clearable size="small" style="width:200px" placeholder="请输入开户行"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注:" prop="备注">
<el-input v-model="form2.备注" clearable size="small" style="width:530px" placeholder="请输入备注"/>
<el-input v-model="form2.备注" clearable size="small" style="width:200px" placeholder="请输入备注"/>
</el-form-item>
</el-col>
</el-row>
@@ -363,7 +373,8 @@ export default {
税号: '',
银行账号: '',
信用等级: 1,
备注: ''
备注: '',
开户行: ''
},
rules1: { // 表单验证规则
营销经理: [{ required: true, message: '请选择营销经理', trigger: 'change' }]
@@ -548,6 +559,7 @@ export default {
this.form2.信用等级 = parseInt(row.价值评估流水号)
this.form2.备注 = row.备注
this.c = row.客户流水号
this.form2.开户行 = row.开户行
},
submit2() {
function a() {
@@ -555,9 +567,9 @@ export default {
this.getTable(selectCustomer, [this.AdressID, this.pageCurrent, this.pageSize], ['tableData2', 'total', 'loading2'])
}
if (this.flag1 === 1) {
this.addTable(addCustomer, [this.AdressID, this.form2.客户名称, this.form2.联系电话, this.form2.传真, this.form2.联系地址, this.form2.联系人, this.form2.电子邮箱, this.form2.银行账号, this.form2.税号, this.form2.信用等级, this.form2.备注], 'form2', a)
this.addTable(addCustomer, [this.AdressID, this.form2.客户名称, this.form2.联系电话, this.form2.传真, this.form2.联系地址, this.form2.联系人, this.form2.电子邮箱, this.form2.银行账号, this.form2.税号, this.form2.信用等级, this.form2.备注, this.form2.开户行], 'form2', a)
} else {
this.editTable(editCustomer, [this.AdressID, this.form2.客户名称, this.form2.联系电话, this.form2.传真, this.form2.联系地址, this.form2.联系人, this.form2.电子邮箱, this.form2.银行账号, this.form2.税号, this.form2.信用等级, this.form2.备注, this.c], 'form2', a)
this.editTable(editCustomer, [this.AdressID, this.form2.客户名称, this.form2.联系电话, this.form2.传真, this.form2.联系地址, this.form2.联系人, this.form2.电子邮箱, this.form2.银行账号, this.form2.税号, this.form2.信用等级, this.form2.备注, this.c, this.form2.开户行], 'form2', a)
}
}
}

View File

@@ -53,7 +53,7 @@
</el-table-column>
<el-table-column align="center" label="合同编号" width="150">
<template slot-scope="scope">
{{ scope.row.合同编号 }}
<el-tag type="primary">{{ scope.row.合同编号 }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" width="200">
@@ -249,7 +249,7 @@
<div v-show="scope.row.计划付款时间">
<h4>{{ scope.row.执行进度名 }}{{ scope.row.节点日期 }}完成计划于{{ scope.row.计划付款时间 }}进行收款距离计划日期还剩{{ parseInt(scope.row.剩余天数) > 0 ? scope.row.剩余天数 : 0 }}</h4>
</div>
<el-tag v-if="scope.row.计划付款时间===''||scope.row.计划付款时间===null" slot="reference" size="small" style="width: 66px">无计划</el-tag>
<el-tag v-if="scope.row.计划付款时间===''||scope.row.计划付款时间===null" slot="reference" size="small" style="width: 66px">进度未完</el-tag>
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&parseInt(scope.row.未收金额)===0" slot="reference" type="success" size="small" style="width: 66px">已完成</el-tag>
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&scope.row.状态==='未开始'" slot="reference" type="primary" size="small" style="width: 66px">未开始</el-tag>
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&scope.row.状态==='即将拖期'" slot="reference" type="warning" size="small" style="width: 66px">即将拖期</el-tag>
@@ -689,7 +689,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -746,7 +746,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -919,7 +919,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -994,7 +994,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -1065,7 +1065,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -1179,7 +1179,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -1261,7 +1261,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -1331,7 +1331,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -1412,7 +1412,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -1477,7 +1477,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false
@@ -1555,7 +1555,7 @@ export default {
}
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
data[i].是否禁用收款 = true
data[i].状态 = '无计划'
data[i].状态 = '进度未完'
} else {
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 8)
data[i].是否禁用收款 = false

View File

@@ -0,0 +1,300 @@
<template>
<div>
<!--查询条件-->
<el-card>
<span>项目名称</span>
<el-select v-model="entryNameValue" filterable placeholder="项目名称" style="margin-right: 10px" size="small" clearable>
<el-option
v-for="item in entryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 10px">销售经理</span>
<el-input v-model="MarketingManagerValue" readonly clearable size="small" style="width:200px" placeholder="请双击选择营销经理" @dblclick.native="dialogFormVisiblePeople = true" @clear="clear()"/>
<span style="margin-left: 10px">开始日期</span>
<el-date-picker
v-model="startTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择开始日期"/>
<span style="margin-left: 10px">结束日期</span>
<el-date-picker
v-model="endTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择结束日期"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
</el-card>
<!--项目表格-->
<el-card>
<el-table
v-loading="listLoading1"
:data="tableData1"
highlight-current-row
style="width: 100%"
height="300"
border
size="mini"
@row-click="fetchTableData2">
<el-table-column align="center" label="合同编号" width="200">
<template slot-scope="scope">
<el-tag type="primary">{{ scope.row.合同编号 }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" width="200">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="付款方式" width="120">
<template slot-scope="scope">
{{ scope.row.付款方式 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同签订日期" width="120">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="销售经理" width="80">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同总金额(含税)" width="150">
<template slot-scope="scope">
<el-tag v-if="scope.row.合同总金额===''||scope.row.合同总金额===null" slot="reference" size="small" style="width: 80px" type="warning">无收款计划</el-tag>
<el-tag v-else slot="reference" type="success" size="small" style="width: 80px"> {{ scope.row.合同总金额 }} </el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="已到账金额" width="150">
<template slot-scope="scope">
<el-tag v-if="scope.row.已支付===''||scope.row.已支付===null" slot="reference" size="small" style="width: 80px" type="warning">无收款计划</el-tag>
<el-tag v-else slot="reference" type="success" size="small" style="width: 80px"> {{ scope.row.已支付 }} </el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="税率" width="100">
<template slot-scope="scope">
{{ scope.row.税率 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同信息备注">
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="150px">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-circle-plus-outline"
@click.stop="addInvoiceRecord(scope.row)">增加记录</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<!--开票记录-->
<el-card>
<el-table
v-loading="listLoading2"
:data="tableData2"
:summary-method="getSummaries"
show-summary
style="width: 100%"
height="320"
border
size="mini">
<el-table-column
align="center"
label="序号"
type="index"
width="50"/>
<el-table-column align="center" label="发票抬头" width="180">
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="纳税人识别号" width="180">
<template slot-scope="scope">
{{ scope.row.税号 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票电话" width="120">
<template slot-scope="scope">
{{ scope.row.传真 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票地址" width="200">
<template slot-scope="scope">
{{ scope.row.地址 }}
</template>
</el-table-column>
<el-table-column align="center" label="开户行" width="120">
<template slot-scope="scope">
{{ scope.row.开户行 }}
</template>
</el-table-column>
<el-table-column align="center" label="银行账号" width="160">
<template slot-scope="scope">
{{ scope.row.银行账号 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票金额(含税)" width="150">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票时间" width="150">
<template slot-scope="scope">
{{ scope.row.开票时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注">
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200">
<template slot-scope="scope">
<el-button
size="mini"
type="warning"
icon="el-icon-plus"
@click.stop="addInvoiceRecord(scope.row)">编辑</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click.stop="addInvoiceRecord(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import elInput from 'element-ui/packages/input'
import { initProject, searchTableData1, searchTableData2 } from '@/api/MarketingCenter/InvoiceRecord'
export default {
components: {
elInput
},
data() {
return {
entryName: [], // 项目名称数组
entryNameValue_check: '', // 项目名称check
entryNameValue: '', // 项目名称
peopleid_check: '', // 销售经理check
MarketingManagerValue: '', // 销售经理
peopleid: '', // 营销经理中间变量
startTime_check: '', // 开始时间check
startTime: '', // 开始时间
endTime_check: '', // 结束时间check
endTime: '', // 结束时间
listLoading1: false, // 合同信息表格加载动画
tableData1: [], // 合同信息表格数据
PageCurrent: 1,
PageSize: 10,
total: null,
tableData2: [], // 开票记录表格数据
listLoading2: false, // 开票记录表格加载动画
taxRate: '' // 税率
}
},
created() {
this.init()
},
methods: {
init() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
},
// 查询项目信息表格
fetchTableData1() {
if (this.entryNameValue === '' || this.entryNameValue === null) { this.entryNameValue_check = 0 } else { this.entryNameValue_check = 1 }
if (this.MarketingManagerValue === '' || this.MarketingManagerValue === null) { this.peopleid_check = 0 } else { this.peopleid_check = 1 }
if (this.startTime === '' || this.startTime === null) { this.startTime_check = 0 } else { this.startTime_check = 1 }
if (this.endTime === '' || this.endTime === null) { this.endTime_check = 0 } else { this.endTime_check = 1 }
this.listLoading1 = true
this.getTable(searchTableData1, [this.PageCurrent, this.PageSize, this.entryNameValue, this.peopleid, this.entryNameValue_check, this.peopleid_check, this.startTime_check, this.endTime_check, this.startTime, this.endTime], ['tableData1', 'total', 'listLoading1'])
},
// 项目信息表格改变每页显示条数
handleSizeChange(val) {
this.PageCurrent = 1
this.PageSize = val
this.fetchTableData1()
},
// 项目信息表格翻页
handleCurrentChange(val) {
this.PageCurrent = val
this.fetchTableData1()
},
// 查询开票记录表格
fetchTableData2(row) {
this.taxRate = row.税率
searchTableData2(row.项目流水号).then(response => {
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].开票时间 = data[i].开票时间.substring(0, data[i].开票时间.length - 8)
}
this.tableData2 = data
})
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 6) {
sums[index] = '项目开票合计'
return
} else if (index === 7) {
const values = data.map(item => Number(item['开票金额']))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Number(prev) + Number(curr)
} else {
return Number(prev)
}
}, 0)
sums[index] += ' 元(含税)'
} else {
sums[index] = 'N/A'
}
} else if (index === 8) {
sums[index] = this.taxRate * 100 + '% (税率)'
return
} else if (index === 9) {
sums[index] = parseFloat(sums[7]) * this.taxRate + ' 元(税额)'
return
} else if (index === 10) {
sums[index] = parseFloat(sums[7]) - parseFloat(sums[9]) + ' 元(未税)'
return
}
})
return sums
}
}
}
</script>
<style scoped>
</style>