This commit is contained in:
liushuai
2020-03-24 17:40:29 +08:00
parent b52efdee42
commit 95c0bcf29b
9 changed files with 547 additions and 185 deletions

View File

@@ -52,9 +52,9 @@
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column width="110" align="center" label="合同总额(元)" prop="合同总额">
<el-table-column width="110" align="center" label="合同总额(元)" prop="合同总额">
<template slot-scope="scope">
{{ parseFloat(scope.row.合同总额).toFixed(2) }}
{{ parseFloat(scope.row.合同总).toFixed(2) }}
</template>
</el-table-column>
<el-table-column width="110" align="center" label="到货金额(元)" prop="到货金额">
@@ -231,7 +231,7 @@ export default {
if (index === 0) {
sums[index] = '总价'
return
} else if (index === 2 || index === 3) {
} else if (index === 1 || index === 2 || index === 3 || index === 4) {
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {

View File

@@ -10,7 +10,7 @@
<el-button type="warning" size="small" icon="el-icon-circle-plus-outline" plain style="margin-left:10px" @click="createOrder()">结算申请</el-button>
<el-button :disabled="disabled" type="warning" size="small" icon="el-icon-circle-plus-outline" plain style="margin-left:10px" @click="addInStoreRecord()">追加入库记录</el-button>
</div>
<h4 style="margin-top: 5px;margin-bottom: 0px">票结算申请单</h4>
<h4 style="margin-top: 5px;margin-bottom: 0px">票结算申请单</h4>
<el-table id="expandTable" :data="tableData1" border stripe highlight-current-row style="width: 100%;max-height: 350px" size="mini" @row-click="searchTable2">
<!-- <el-table-column type="expand">
<template slot-scope="scope">

View File

@@ -35,11 +35,12 @@
@click="back">打回</el-button>
</div>
</el-tooltip>
<el-button type="success" size="small" icon="el-icon-download" plain style="float: right; margin-right: 130px;" @click="exportExcel">导出</el-button>
</el-row>
</div>
</el-card>
<el-row>
<el-card style="width: 42%; float: left">
<el-card style="width: 50%; float: left">
<el-table
v-loading="loading1"
id="expandTable"
@@ -62,7 +63,7 @@
<!-- {{ scope.row.离线合同名称 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="离线合同编号" align="center" prop="离线合同编号" min-width="120" sortable="custom" show-overflow-tooltip>
<el-table-column label="离线合同编号" align="center" prop="离线合同编号" min-width="130" sortable="custom" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
</template>
@@ -72,12 +73,27 @@
<!-- {{ scope.row.采购员 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="总金额(元)" align="center" min-width="90">
<el-table-column label="总金额(元)" align="center" min-width="110">
<template slot-scope="scope">
{{ Number(scope.row.合同总额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" min-width="80">
<el-table-column label="到货金额(元)" align="center" min-width="110">
<template slot-scope="scope">
{{ Number(scope.row.到货金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="已付金额(元)" align="center" min-width="110">
<template slot-scope="scope">
{{ Number(scope.row.已付金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="未付金额(元)" align="center" min-width="110">
<template slot-scope="scope">
{{ (Number(scope.row.合同总额) - Number(scope.row.已付金额)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" min-width="90">
<template slot-scope="scope">
{{ scope.row.创建日期.split(' ')[0] }}
</template>
@@ -95,9 +111,9 @@
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-card style="width: 58%">
<el-card style="width: 50%">
<!-- <div id="offlineContract" style="background-color:white;min-height:500px;margin: 0 auto;width: 800px;border:1px solid black">-->
<table v-show="contractDetail.length > 0" class="offlineContract" cellspacing="0px" align="center" border="1 solid black" width="700px">
<table v-show="contractDetail.length > 0" class="offlineContract" cellspacing="0px" align="center" border="1 solid black" width="500px">
<tr>
<th colspan="14"><h1>离线合同</h1></th>
</tr>
@@ -219,6 +235,23 @@ export default {
this.loading1 = false
})
},
exportExcel() { // 离线合同导出
let check1, check2, check3
this.contractNumber ? check1 = 1 : check1 = 0
this.supplierName ? check2 = 1 : check2 = 0
this.dateRange ? check3 = 1 : (check3 = 0, this.dateRange = '')
var param = []
param[0] = ['离线合同编号_check', check1]
param[1] = ['离线合同编号', this.contractNumber]
param[2] = ['供应商名称_check', check2]
param[3] = ['供应商名称', this.supplierName]
param[4] = ['时间_check', check3]
param[5] = ['开始时间', this.dateRange[0]]
param[6] = ['结束时间', this.dateRange[1]]
param[7] = ['是否不包含编辑中', 1]
var Data = this.CreateData('2001', '报表_离线采购合同信息', param)
this.exportExcel_NPOI(Data)
},
// 离线合同列表分页
handleSizeChange1(val) {
this.pageSize1 = val