刘璐珈
This commit is contained in:
@@ -2,7 +2,12 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<!--<h3>采购合同</h3>-->
|
||||
<el-table v-loading="" :data="tableData" border stripe style="width: 100%;max-height: 500px;" height="300px" size="mini">
|
||||
<el-table v-loading="" :data="tableData" border stripe style="width: 100%;" height="600px" size="mini">
|
||||
<el-table-column label="类别" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
@@ -26,7 +31,7 @@
|
||||
<el-table-column label="审核" align="center" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData2" stripe size="mini" show-summary>
|
||||
<el-table v-show="scope.row.类别==='采购'" :data="gridData2" stripe size="mini" show-summary>
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="采购合同编号">
|
||||
<template slot-scope="scope">
|
||||
@@ -39,6 +44,24 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-show="scope.row.类别==='备料'" :data="gridData1" stripe size="mini" show-summary>
|
||||
<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="100" align="center" label="开票金额" prop="开票金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="text" size="mini" icon="el-icon-search" style="margin-right: 10px" plain @click="searchTable01(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button type="text" size="mini" icon="el-icon-check" plain @click="yesApproval(scope.row)">通过</el-button>
|
||||
@@ -59,6 +82,69 @@
|
||||
</div>
|
||||
</el-card>
|
||||
<!--<el-card>-->
|
||||
<!--<!–<h3>备料合同</h3>–>-->
|
||||
<!--<el-table v-loading="" :data="tableData3" border style="width: 100%;max-height: 300px;" height="300px" size="mini">-->
|
||||
<!--<el-table-column label="供应商" align="center" min-width="170">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.供应商名称 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="请款时间" align="center" min-width="150">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.请款时间 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="请款人" align="center" min-width="100">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.姓名 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.请款金额 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="审核" align="center" width="320">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-popover placement="right" width="500" trigger="click">-->
|
||||
<!--<el-table :data="gridData1" stripe size="mini" show-summary>-->
|
||||
<!--<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="100" align="center" label="开票金额" prop="开票金额">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.开票金额 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--</el-table>-->
|
||||
<!--<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-right: 10px" plain @click="searchTable03(scope.row)">查看详情</el-button>-->
|
||||
<!--</el-popover>-->
|
||||
<!--<el-button type="primary" size="mini" icon="el-icon-check" plain @click="yesMaterials(scope.row)">通过</el-button>-->
|
||||
<!--<el-button type="danger" size="mini" icon="el-icon-close" plain @click="noMaterials(scope.row)">不通过</el-button>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--</el-table>-->
|
||||
<!--<div class="block" style="margin-top: 10px;">-->
|
||||
<!--<el-pagination-->
|
||||
<!--:current-page="pageCurrent3"-->
|
||||
<!--:page-sizes="[10, 20, 30, 40]"-->
|
||||
<!--:page-size="pageSize3"-->
|
||||
<!--:total="total3"-->
|
||||
<!--style="display:inline-block;width:50%"-->
|
||||
<!--layout="total, sizes, prev, pager, next, jumper"-->
|
||||
<!--@size-change="handleSizeChange3"-->
|
||||
<!--@current-change="handleCurrentChange3"/>-->
|
||||
<!--</div>-->
|
||||
<!--</el-card>-->
|
||||
<!--<el-card>-->
|
||||
<!--<h3>离线合同</h3>-->
|
||||
<!--<el-table v-loading="" :data="tableData2" border style="width: 100%;max-height: 300px;" height="300px" size="mini">-->
|
||||
<!--<el-table-column label="供应商" align="center" min-width="170">-->
|
||||
@@ -116,69 +202,6 @@
|
||||
<!--@current-change="handleCurrentChange2"/>-->
|
||||
<!--</div>-->
|
||||
<!--</el-card>-->
|
||||
<el-card>
|
||||
<!--<h3>备料合同</h3>-->
|
||||
<el-table v-loading="" :data="tableData3" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
|
||||
<el-table-column label="供应商" align="center" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款人" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核" align="center" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData1" stripe size="mini" show-summary>
|
||||
<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="100" align="center" label="开票金额" prop="开票金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-right: 10px" plain @click="searchTable03(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button type="primary" size="mini" icon="el-icon-check" plain @click="yesMaterials(scope.row)">通过</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-close" plain @click="noMaterials(scope.row)">不通过</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent3"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize3"
|
||||
:total="total3"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -221,23 +244,53 @@ export default {
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.searchTable()
|
||||
this.searchTable2()
|
||||
this.searchTable3()
|
||||
},
|
||||
searchTable() {
|
||||
initApproval1(this.pageCurrent, this.pageSize, 1).then(response => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
response.data.rows[j].含税总金额 = parseInt(response.data.rows[j].含税总金额 * 100) / 100
|
||||
response.data.rows[j].欠款金额 = parseInt(response.data.rows[j].欠款金额 * 100) / 100
|
||||
if (response.data.rows.length !== 0) {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
response.data.rows[i].含税总金额 = parseInt(response.data.rows[i].含税总金额 * 100) / 100
|
||||
response.data.rows[i].欠款金额 = parseInt(response.data.rows[i].欠款金额 * 100) / 100
|
||||
this.tableData.push({
|
||||
采购合同请款流水号: response.data.rows[i].采购合同请款流水号,
|
||||
供应商名称: response.data.rows[i].供应商名称,
|
||||
请款金额: response.data.rows[i].请款金额,
|
||||
姓名: response.data.rows[i].姓名,
|
||||
请款时间: response.data.rows[i].请款时间,
|
||||
类别: '采购'
|
||||
})
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
initApprovalMaterials(this.pageCurrent3, this.pageSize3, 1).then(response1 => {
|
||||
if (response1.data.rows.length !== 0) {
|
||||
for (let i = 0; i < response1.data.rows.length; i++) {
|
||||
this.tableData.push({
|
||||
采购计划请款流水号: response1.data.rows[i].采购计划请款流水号,
|
||||
供应商名称: response1.data.rows[i].供应商名称,
|
||||
请款金额: response1.data.rows[i].请款金额,
|
||||
姓名: response1.data.rows[i].姓名,
|
||||
请款时间: response1.data.rows[i].请款时间,
|
||||
类别: '备料'
|
||||
})
|
||||
}
|
||||
}
|
||||
this.total = response.data.total + response1.data.total
|
||||
})
|
||||
})
|
||||
},
|
||||
searchTable01(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail3(row.采购合同请款流水号).then(response => {
|
||||
this.gridData2 = response.data
|
||||
})
|
||||
// 查看详情(请款信息包含的合同)
|
||||
searchTable01(row) {
|
||||
this.gridData1 = []
|
||||
this.gridData2 = []
|
||||
if (row.类别 === '采购') {
|
||||
searchRequsetFundDetail3(row.采购合同请款流水号).then(response => {
|
||||
this.gridData2 = response.data
|
||||
})
|
||||
} else {
|
||||
searchRequsetFundDetail1(row.采购计划请款流水号).then(response => {
|
||||
this.gridData1 = response.data
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
@@ -250,7 +303,6 @@ export default {
|
||||
},
|
||||
searchTable2() {
|
||||
initApprovalOffline(this.pageCurrent2, this.pageSize2, 1).then(response => {
|
||||
console.log(response.data.rows)
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
@@ -271,7 +323,6 @@ export default {
|
||||
},
|
||||
searchTable3() {
|
||||
initApprovalMaterials(this.pageCurrent3, this.pageSize3, 1).then(response => {
|
||||
console.log(response.data.rows)
|
||||
this.tableData3 = response.data.rows
|
||||
this.total3 = response.data.total
|
||||
})
|
||||
@@ -296,12 +347,21 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
execApproval(row.采购合同请款流水号, 1, '通过', this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
if (row.类别 === '采购') {
|
||||
execApproval(row.采购合同请款流水号, 1, '通过', this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
} else {
|
||||
execMaterials(row.采购计划请款流水号, 1, '通过', this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable3()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
@@ -314,12 +374,21 @@ export default {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
execApproval(row.采购合同请款流水号, 2, value, this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
if (row.类别 === '采购') {
|
||||
execApproval(row.采购合同请款流水号, 2, value, this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
} else {
|
||||
execMaterials(row.采购计划请款流水号, 2, value, this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable3()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
|
||||
Reference in New Issue
Block a user