| xqd
@@ -107,15 +107,16 @@
|
|
|
@click="recoverContract"
|
|
|
>恢复
|
|
|
</el-button>
|
|
|
+
|
|
|
<el-button
|
|
|
- v-if="role === 1"
|
|
|
+ v-permission="['salesman', 'admin']"
|
|
|
type="warning"
|
|
|
style="float: right"
|
|
|
@click="failed"
|
|
|
>审核失败
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- v-if="role === 1"
|
|
|
+ v-permission="['salesman', 'admin']"
|
|
|
type="success"
|
|
|
style="float: right"
|
|
|
@click="success"
|
| xqd
@@ -169,12 +170,21 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag
|
|
|
+ v-permission="['salesman', 'admin']"
|
|
|
+ v-show="contract.status !== 0"
|
|
|
type="primary"
|
|
|
style="cursor: pointer; margin-right: 15px"
|
|
|
@click="tapDetail(scope.row.id)"
|
|
|
>查看详情</el-tag>
|
|
|
<el-tag
|
|
|
- v-if="scope.row.status == 2"
|
|
|
+ v-permission="['supplier']"
|
|
|
+ type="primary"
|
|
|
+ style="cursor: pointer; margin-right: 15px"
|
|
|
+ @click="tapDetail(scope.row.id)"
|
|
|
+ >查看详情</el-tag>
|
|
|
+ <el-tag
|
|
|
+ v-permission="['supplier']"
|
|
|
+ v-show="scope.row.status == 2"
|
|
|
type="success"
|
|
|
style="cursor: pointer; margin-right: 15px"
|
|
|
@click="addNewBill(scope.row.id)"
|
| xqd
@@ -196,6 +206,20 @@
|
|
|
</el-table>
|
|
|
|
|
|
<div class="pagesip">
|
|
|
+ <el-button
|
|
|
+ v-permission="['salesman', 'admin']"
|
|
|
+ v-show="contract.status !== 0"
|
|
|
+ type="primary"
|
|
|
+ @click="batSuccessed"
|
|
|
+ >审核成功</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ v-permission="['salesman', 'admin']"
|
|
|
+ v-show="contract.status !== 0"
|
|
|
+ type="primary"
|
|
|
+ @click="batFailed"
|
|
|
+ >审核失败</el-button
|
|
|
+ >
|
|
|
<el-button v-if="role === 2" type="primary" @click="addNewBill('')">
|
|
|
新增汇票</el-button>
|
|
|
<el-button
|
| xqd
@@ -277,6 +301,58 @@ export default {
|
|
|
this.getData()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 批量审核汇票 成功
|
|
|
+ batSuccessed() {
|
|
|
+ const ids = Array.from(this.multipleSelection, ({ id }) => id);
|
|
|
+ this.$request({
|
|
|
+ url: "/api/Contract/contractDraft/manager",
|
|
|
+ method: "post",
|
|
|
+ data: {
|
|
|
+ ids: ids,
|
|
|
+ operateType: 3,
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: res.msg,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "danger",
|
|
|
+ message: res.msg,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ this.getData();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 批量审核汇票失败
|
|
|
+ batFailed() {
|
|
|
+ const ids = Array.from(this.multipleSelection, ({ id }) => id);
|
|
|
+ this.$request({
|
|
|
+ url: "/api/Contract/contractDraft/manager",
|
|
|
+ method: "post",
|
|
|
+ data: {
|
|
|
+ ids: ids,
|
|
|
+ operateType: 4,
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: res.msg,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "danger",
|
|
|
+ message: res.msg,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ this.getData();
|
|
|
+ });
|
|
|
+ },
|
|
|
getData() {
|
|
|
const id = this.$route.query.id
|
|
|
this.$request({
|