更新
This commit is contained in:
@@ -2,21 +2,23 @@
|
||||
<div class="app-container">
|
||||
<div style="width: 100%;overflow:auto">
|
||||
<div style="white-space: nowrap">
|
||||
<el-card style="width: 1545px">
|
||||
<el-card style="width: 1663px">
|
||||
<el-col>
|
||||
<el-input v-model="supplierName0" placeholder="供应商" style="width: 220px" size="small" clearable/>
|
||||
<span>请款时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
:picker-options="pickerOptions"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
style="width: 240px;margin-left: 10px"
|
||||
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="供应商" style="width: 220px" size="small" clearable/>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="查询外购备料清款信息" placement="top">
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -30,7 +32,7 @@
|
||||
<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="success" plain class="el-icon-download" size="small" style="margin: 10px 0 10px 130px" @click="exportExcel">导出</el-button>
|
||||
<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>
|
||||
@@ -40,14 +42,13 @@
|
||||
:data="tableData1"
|
||||
:row-key="getRowKeys"
|
||||
:expand-row-keys="expands"
|
||||
:summary-method="getSummaries1"
|
||||
:header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}"
|
||||
show-summary
|
||||
border
|
||||
stripe
|
||||
style="margin-top: 3px;"
|
||||
height="600px"
|
||||
size="mini"
|
||||
show-summary
|
||||
highlight-current-row
|
||||
@row-click="searchTable02">
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="180" width="350" show-overflow-tooltip>
|
||||
@@ -65,7 +66,7 @@
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额(元)" align="center" min-width="90" width="90" prop="请款金额">
|
||||
<el-table-column label="请款金额" align="center" min-width="90" width="90" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.请款金额).toFixed(2) }}
|
||||
</template>
|
||||
@@ -74,10 +75,10 @@
|
||||
<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>
|
||||
<span v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="mini">不通过</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过原因" width="120" align="center">
|
||||
<el-table-column label="未通过审批原因" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
|
||||
</template>
|
||||
@@ -85,8 +86,8 @@
|
||||
<el-table-column label="付款情况" width="100" 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>
|
||||
<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="100" align="center">
|
||||
@@ -116,27 +117,22 @@
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="margin-left: 0px;width:405px; margin-left: 1px; display: inline-block;vertical-align: top">
|
||||
<el-card style="margin-left: 0px;width:524px; margin-left: 1px; display: inline-block;vertical-align: top">
|
||||
<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 width="120" align="center" label="发票号">
|
||||
<el-table-column min-width="120" align="center" label="发票号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column 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="120px" prop="到票金额">
|
||||
<el-table-column min-width="170" align="center" label="供应商" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票金额.toFixed(2) }}
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到票时间" align="center" width="90">
|
||||
<el-table-column align="center" label="开票金额" width="100px" prop="开票金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票时间 | formatTime }}
|
||||
{{ scope.row.开票金额.toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -162,12 +158,12 @@
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到票金额(元)" align="center" min-width="90">
|
||||
<el-table-column label="开票金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票金额 }}
|
||||
{{ Number(scope.row.开票金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到票时间" align="center" min-width="70">
|
||||
<el-table-column label="开票时间" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票时间 | formatTime }}
|
||||
</template>
|
||||
@@ -251,38 +247,13 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getSummaries(param) { // 合计
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计'
|
||||
} else if (index === 2) {
|
||||
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
|
||||
},
|
||||
getSummaries1(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['请款金额'])))
|
||||
const values = data.map(item => Number(parseFloat(item['开票金额'])))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
@@ -309,7 +280,7 @@ export default {
|
||||
param[2] = ['结束时间', this.dateRange[1]]
|
||||
param[3] = ['供应商名称_check', this.check2]
|
||||
param[4] = ['供应商名称', this.supplierName0]
|
||||
var Data = this.CreateData('2001', '报表_备料管理_请款_查询数据', param)
|
||||
var Data = this.CreateData('03', '报表_备料管理_请款_查询数据', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
},
|
||||
// dateFormat(row, column) {
|
||||
@@ -357,14 +328,17 @@ export default {
|
||||
this.tableData01 = []
|
||||
},
|
||||
searchTable01() { // 查询待请款
|
||||
this.contractGroup = []
|
||||
this.supplierValue ? this.check = 1 : this.check = 0
|
||||
searchOfflineContract1(this.check, this.supplierValue).then(response => {
|
||||
this.tableData01 = response.data
|
||||
})
|
||||
if (this.supplierValue !== null) {
|
||||
this.contractGroup = []
|
||||
this.supplierValue ? this.check = 1 : this.check = 0
|
||||
searchOfflineContract1(this.check, this.supplierValue).then(response => {
|
||||
this.tableData01 = response.data
|
||||
})
|
||||
} else {
|
||||
this.tableData01 = []
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.SUM = 0
|
||||
this.contractGroup = []
|
||||
this.sumGroup = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
@@ -372,6 +346,7 @@ export default {
|
||||
this.contractGroup.push(val[i].发票流水号)
|
||||
this.sumGroup.push(val[i].开票金额)
|
||||
}
|
||||
this.SUM = Number(this.SUM).toFixed(2)
|
||||
},
|
||||
submitRequestFund() { // 确认请款
|
||||
if (this.supplierValue && this.contractGroup.length !== 0) {
|
||||
|
||||
Reference in New Issue
Block a user