This commit is contained in:
liushuai
2020-03-19 17:53:05 +08:00
parent 97bb2dcd3d
commit 3c9e0cb1b5
11 changed files with 474 additions and 374 deletions

View File

@@ -23,9 +23,10 @@
end-placeholder="结束日期"/>
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
<el-button type="warning" size="small" icon="el-icon-goods" plain style="" @click="requestFund">请款</el-button>
<el-button type="success" size="small" icon="el-icon-download" plain style="float: right; margin-right: 20px;" @click="exportExcel">导出</el-button>
</div>
<!--<h3>请款表</h3>-->
<el-table v-loading="" :data="tableData1" border size="mini" height="300" stripe highlight-current-row @row-click="searchTable02">
<el-table v-loading="" :data="tableData1" border size="mini" height="200" stripe highlight-current-row @row-click="searchTable02">
<el-table-column label="供应商" prop="供应商名称" align="center" width="220" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
@@ -36,7 +37,7 @@
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" width="150" prop="请款金额">
<el-table-column label="请款金额(元)" align="center" width="150" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
@@ -84,7 +85,9 @@
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button :disabled="Number(id)!==Number(scope.row.请款人) || !((Number(scope.row.审核情况流水号) !== 1) || (Number(scope.row.审批情况流水号)===2) || (Number(scope.row.付款情况流水号)===2))" type="text" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)"/>
<el-tooltip v-show="true" :open-delay="100" content="删除请款信息" placement="right">
<el-button :disabled="Number(id)!==Number(scope.row.请款人) || !((Number(scope.row.审核情况流水号) !== 1) || (Number(scope.row.审批情况流水号)===2) || (Number(scope.row.付款情况流水号)===2))" type="text" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)"/>
</el-tooltip>
</template>
</el-table-column>
</el-table>
@@ -104,82 +107,87 @@
<!--<h3 style="margin-top: 0">合同明细</h3>-->
<el-row>
<el-col :span="10">
<el-table :data="gridData" :summary-method="getSummaries2" border highlight-current-row size="mini" show-summary @row-click="searchContract">
<el-table-column min-width="150" align="center" label="合同编号">
<template slot-scope="scope">
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column width="120" align="center" label="合同总额(元)" prop="合同总额">
<template slot-scope="scope">
{{ scope.row.合同总额 ? parseFloat(scope.row.合同总额).toFixed(2) : 0 }}
</template>
</el-table-column>
<el-table-column width="120" align="center" label="到货金额(元)" prop="到货金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.到货金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column width="120" align="center" label="已付金额(元)" prop="已付金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.已付金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column width="120" align="center" label="请款金额(元)" prop="请款金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.请款金额).toFixed(2) }}
</template>
</el-table-column>
</el-table>
<el-card>
<el-table :data="gridData" :summary-method="getSummaries2" border highlight-current-row size="mini" show-summary @row-click="searchContract">
<el-table-column width="100" align="center" label="合同编号">
<template slot-scope="scope">
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column width="110" align="center" label="合同总额(元)" prop="合同总额">
<template slot-scope="scope">
<span v-if="scope.row.合同总额">{{ scope.row.合同总额 ? parseFloat(scope.row.合同总额).toFixed(2) : 0 }}</span>
<span v-if="scope.row.离线合同总额">{{ scope.row.离线合同总额 ? parseFloat(scope.row.离线合同总额).toFixed(2) : 0 }}</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="到货金额(元)" prop="到货金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.到货金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column width="110" align="center" label="已付金额(元)" prop="已付金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.已付金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column width="110" align="center" label="请款金额(元)" prop="请款金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.请款金额).toFixed(2) }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-col :span="14">
<el-table :data="tableData2" :summary-method="getSummaries" border height="500px" size="mini" stripe show-summary>
<el-table-column label="物料名称" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="260">
<template slot-scope="scope">
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="采购数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="到货数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.合同类型 === 1 ? scope.row.已到货数量 : scope.row.到货数量 }}
</template>
</el-table-column>
<!--<el-table-column label="合计" align="center" min-width="100" prop="合计">-->
<!--<template slot-scope="scope">-->
<!--{{ (parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0)).toFixed(2) }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="单价" align="center" min-width="100" prop="单价">-->
<!--<template slot-scope="scope">-->
<!--{{ parseFloat(scope.row.单价||0).toFixed(2) }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
<template slot-scope="scope">
{{ scope.row.合同类型 === 1 ? scope.row.交货期.split(' ')[0] === '1900-01-01' ? '-' : scope.row.交货期.split(' ')[0] : scope.row.交货期要求 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="150" prop="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
<el-card>
<el-table :data="tableData2" :summary-method="getSummaries" border height="450px" size="mini" stripe show-summary>
<el-table-column label="物料名称" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="130" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" width="130" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="采购数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="到货数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.合同类型 === 1 ? scope.row.已到货数量 : scope.row.到货数量 }}
</template>
</el-table-column>
<!--<el-table-column label="合计" align="center" min-width="100" prop="合计">-->
<!--<template slot-scope="scope">-->
<!--{{ (parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0)).toFixed(2) }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="单价" align="center" min-width="100" prop="单价">-->
<!--<template slot-scope="scope">-->
<!--{{ parseFloat(scope.row.单价||0).toFixed(2) }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
<template slot-scope="scope">
{{ scope.row.合同类型 === 1 ? scope.row.交货期.split(' ')[0] === '1900-01-01' ? '-' : scope.row.交货期.split(' ')[0] : scope.row.交货期要求 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="120" prop="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
@@ -329,6 +337,20 @@ export default {
// this.searchTable1()
},
methods: {
exportExcel() { // 合同请款导出
let check1, check2
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
this.supplierValue ? check2 = 1 : check2 = 0
var param = []
param[0] = ['时间段_check', check1]
param[1] = ['开始时间', this.dateRange[0]]
param[2] = ['结束时间', this.dateRange[1]]
param[3] = ['供应商流水号_check', check2]
param[4] = ['供应商流水号', this.supplierValue]
console.log(param, 'param')
var Data = this.CreateData('2001', '报表_合同请款', param)
this.exportExcel_NPOI(Data)
},
timeToStamp(param) { // 转时间戳
return timeToStamp(param)
},