采购合同审核

This commit is contained in:
Vergil
2020-03-11 09:26:23 +08:00
parent b6c062607f
commit dc3a5256a4
2 changed files with 57 additions and 12 deletions

View File

@@ -38,16 +38,7 @@
<!-- </el-card>--> <!-- </el-card>-->
<el-card> <el-card>
<el-table <el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 60%; max-height: 500px" height="150px" highlight-current-row @row-click="searchTable2">
v-loading="loading1"
:data="tableData1"
size="mini"
border
stripe
style="width: 60%; max-height: 500px"
height="150px"
highlight-current-row
@row-click="searchTable2">
<el-table-column type="expand" label="详情"> <el-table-column type="expand" label="详情">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form id="table" label-position="left" inline class="demo-table-expand"> <el-form id="table" label-position="left" inline class="demo-table-expand">
@@ -106,7 +97,9 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="100" fixed="right"> <el-table-column label="操作" align="center" min-width="100" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-edit-outline" @click="Open(scope.row)">审核</el-button> <el-button type="text" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
<el-button type="text" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
<!--<el-button type="text" size="mini" icon="el-icon-edit-outline" @click="Open(scope.row)">审核</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -299,6 +292,57 @@ export default {
this.total1 = response.data.total this.total1 = response.data.total
}) })
}, },
// 通过审核
yesApproval(row) {
this.$confirm('确定审核通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
submitApproval(this.ProcurementContractNum, 1, '').then(response => {
if (response.data[0].result === '1') {
this.$message.success('审核成功')
this.dialogVisible3 = false
this.fetchData() // 重新初始化
this.contractNumValue = ''
this.personValue = ''
this.supplierName = ''
this.searchTable1()
this.returns = ''
} else { this.$message.error('审核失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
// 不通过审核
noApproval(row) {
this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
submitApproval(this.ProcurementContractNum, 2, '').then(response => {
if (response.data[0].result === '1') {
this.$message.success('审核成功')
this.dialogVisible3 = false
this.fetchData() // 重新初始化
this.contractNumValue = ''
this.personValue = ''
this.supplierName = ''
this.searchTable1()
this.returns = ''
} else { this.$message.error('审核失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
Open(row) { Open(row) {
this.dialogVisible3 = true this.dialogVisible3 = true
this.ProcurementContractNum = row.采购合同流水号 this.ProcurementContractNum = row.采购合同流水号

View File

@@ -140,7 +140,8 @@ export default {
}) })
}) })
}, },
noApproval(row) { // 不通过审核 // 不通过审核
noApproval(row) {
this.$prompt('请输入不通过原因', '提示', { this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消' cancelButtonText: '取消'