This commit is contained in:
Vergil
2020-02-14 15:18:43 +08:00
parent e8eeade817
commit 1895977eb2
25 changed files with 1304 additions and 738 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-card>
<el-card style="">
<el-col>
<span>请款时间段:</span>
<el-date-picker
@@ -9,14 +9,14 @@
size="small"
type="daterange"
align="center"
style="width: 300px;margin: 3px 0"
style="width: 240px;margin: 3px 0"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<span style="margin-left: 10px">供应商:</span>
<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>
<el-input v-model="supplierName0" placeholder="供应商" style="width: 220px" size="small" clearable/>
<el-tooltip :open-delay="1000" effect="dark" content="查询外购备料清款信息" placement="top">
<el-button
type="primary"
@@ -27,39 +27,20 @@
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
</el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="对选择的请款任务创建请款申请" placement="top">
<el-button type="distribution" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
<el-button class="button111" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
</el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="对选择的请款任务创建请款申请" placement="top">
<el-button type="primary" plain class="el-icon-download" size="small" style="margin: 10px 0 0 130px" @click="exportExcel">导出</el-button>
</el-tooltip>
</el-col>
</el-card>
<el-card style="margin-left: 0px;width: 68%;float: left">
<!--@expand-change="searchTable02"-->
<!--<el-table-column type="expand" label="详情">-->
<!--<template slot-scope="scope">-->
<!--<el-table :data="gridData" class="subTableHeader" stripe size="mini" show-summary style="width: 40%">-->
<!--<el-table-column width="50" align="center" type="index" label="序号"/>-->
<!--<el-table-column min-width="150" align="center" label="发票号">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.发票号 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column min-width="150" align="center" label="供应商">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.供应商名称 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column min-width="150" align="center" label="开票金额" prop="开票金额">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.开票金额 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--</el-table>-->
<!--</template>-->
<!--</el-table-column>-->
<el-card style="margin-left: 0px;width: 67%;float: left" >
<el-table
v-loading=""
:data="tableData1"
:row-key="getRowKeys"
:expand-row-keys="expands"
:header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}"
border
stripe
style="margin-top: 3px;"
@@ -88,14 +69,14 @@
{{ parseFloat(scope.row.请款金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="审批情况内容" width="100" align="center">
<el-table-column label="审批进程" width="80" align="center">
<template slot-scope="scope">
<span v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="mini">未审批</span>
<span v-if="Number(scope.row.审批情况流水号)===1" type="success" size="mini">已通过</span>
<span v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="mini">不通过</span>
</template>
</el-table-column>
<el-table-column label="未通过审批原因" width="110" align="center">
<el-table-column label="未通过审批原因" width="120" align="center">
<template slot-scope="scope">
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
</template>
@@ -134,27 +115,25 @@
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-card style="margin-left: 0px;width: 32%;float: left">
<el-table-column type="expand" label="详情">
<el-table :data="gridData" class="subTableHeader" size="mini" show-summary style="width: 100%">
<el-table-column width="50" align="center" type="index" label="号"/>
<el-table-column min-width="150" align="center" label="发票号">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column min-width="150" align="center" label="供应商">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column min-width="150" align="center" label="开票金额" prop="开票金额">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
</el-table-column>
</el-table>
</el-table-column>
<el-card style="margin-left: 0px;width:31%; float: left">
<el-table :data="gridData" :header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}" :summary-method="getSummaries" border class="subTableHeader" size="mini" show-summary style="">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="120" align="center" label="发票号">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column min-width="170" align="center" label="供应商" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票金额" width="100px" prop="开票金额">
<template slot-scope="scope">
{{ scope.row.开票金额.toFixed(2) }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="外购备料请款" center style="min-height: 300px" width="800px">
<span>供应商:</span>
@@ -263,6 +242,43 @@ export default {
this.searchTable1()
},
methods: {
getSummaries(param) { // 合计
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
} else if (index === 3) {
const values = data.map(item => Number(parseFloat(item['开票金额'])))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = sums[index].toFixed(2) + ' 元'
} else {
sums[index] = 'N/A'
}
}
})
return sums
},
exportExcel() {
this.dateRange ? this.check1 = 1 : (this.check1 = 0, this.dateRange = '')
this.supplierName0 ? this.check2 = 1 : (this.check2 = 0, this.supplierName0 = '')
var param = []
param[0] = ['时间段_check', this.check1]
param[1] = ['开始时间', this.dateRange[0]]
param[2] = ['结束时间', this.dateRange[1]]
param[3] = ['供应商名称_check', this.check2]
param[4] = ['供应商名称', this.supplierName0]
var Data = this.CreateData('03', '报表_备料管理_请款_查询数据', param)
this.exportExcel_NPOI(Data)
},
// dateFormat(row, column) {
// var date = row[column.property]
// console.log(date)
@@ -411,8 +427,8 @@ export default {
<style lang="scss">
.subTableHeader {
th {
background: #8ff4ea !important;
color: black;
background: #7eaced !important;
color: #FFFFFF;
}
tr.el-table__row td {
@@ -424,3 +440,21 @@ export default {
}
}
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>