This commit is contained in:
liushuai
2019-09-18 09:06:49 +08:00
parent 53a9f57fe1
commit 4a39ba8190
11 changed files with 260 additions and 137 deletions

View File

@@ -157,6 +157,13 @@
{{ scope.row.审批时间 ? scope.row.审核时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="处理" align="center" min-width="130">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否未通过)===1&&Number(scope.row.不通过处理)===1" type="success" size="small">处理完成</el-tag>
<el-button v-else-if="Number(scope.row.是否未通过)===1&&Number(scope.row.不通过处理)===0" type="primary" size="mini" @click="done(scope.row)">点击处理完成</el-button>
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.姓名 }}
@@ -195,7 +202,7 @@
</template>
<script>
import { initContract, initBuyer, searchTable1, searchTable2, deleteContract } from '@/api/PurchasingCenter/PurchaseContractSearch'
import { initContract, initBuyer, searchTable1, searchTable2, deleteContract, handleDone } from '@/api/PurchasingCenter/PurchaseContractSearch'
import QRCode from 'qrcode'
import $ from 'jquery'
// import { exportExcelMethod } from './exportExcel'
@@ -270,6 +277,26 @@ export default {
this.searchTable1()
},
methods: {
// 处理完成
done(row) {
this.$confirm('确定处理完成?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
handleDone(row.采购合同流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable1()
} else { this.$message.error('操作失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
deleteContract(row) { // 删除合同
this.$confirm('此操作将永久删除合同所有内容,确定删除?', '提示', {
confirmButtonText: '确定',