| xqd
@@ -170,7 +170,7 @@
|
|
|
>
|
|
|
<template slot-scope="scope"> {{ scope.row.interest }}% </template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
+
|
|
|
<el-table-column align="center" label="审核状态" prop="statusText">
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="时间" prop="createdAt" width="200">
|
| xqd
@@ -191,15 +191,14 @@
|
|
|
v-if="scope.row.status != 2"
|
|
|
@click="fail(scope.row.id)"
|
|
|
v-permission="['admin', 'salesman']"
|
|
|
-
|
|
|
+
|
|
|
>审核失败
|
|
|
</el-tag>
|
|
|
<el-tag
|
|
|
type="primary"
|
|
|
style="cursor: pointer; margin-right: 15px"
|
|
|
@click="Resubmit(scope.row.supplierId, scope.row.acceptorId)"
|
|
|
- v-permission="['supplier']"
|
|
|
- v-if="scope.row.status === 2"
|
|
|
+ v-if="scope.row.status === 2&&roleId===999"
|
|
|
>重新提交
|
|
|
</el-tag>
|
|
|
<el-tag
|
| xqd
@@ -539,12 +538,101 @@ export default {
|
|
|
// 批量删除
|
|
|
deleteStatuses() {
|
|
|
let ids = Array.from(this.multipleSelection, ({ id }) => id);
|
|
|
- if (ids == "") {
|
|
|
- this.$message({
|
|
|
- type: "error",
|
|
|
- message: "请选择数据",
|
|
|
- });
|
|
|
- } else {
|
|
|
+ let status=Array.from(this.multipleSelection,({status})=>status)
|
|
|
+ console.log(status)
|
|
|
+ if(this.roleId===999){
|
|
|
+ if (ids == "") {
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
+ message: "请选择数据",
|
|
|
+ });
|
|
|
+ } else if(status.includes(1)){
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
+ message: "供应商不能删除审核状态为成功的承兑人",
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ this.$confirm("您确定要删除吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$request({
|
|
|
+ url: "/api/SupplierAcceptor/delete",
|
|
|
+ method: "post",
|
|
|
+ data: ids,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "删除成功",
|
|
|
+ });
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
|
+ this.multipleSelection = "";
|
|
|
+ this.getAllList();
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "danger",
|
|
|
+ message: "删除失败",
|
|
|
+ });
|
|
|
+ this.getAllList();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "info",
|
|
|
+ message: "已取消删除",
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ // 单个删除
|
|
|
+ deleteStatus(id,status) {
|
|
|
+ if(this.roleId===999){
|
|
|
+ if(status===1){
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
+ message: "供应商不能删除审核状态为成功的承兑人",
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ this.$confirm("您确定要删除吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$request({
|
|
|
+ url: "/api/SupplierAcceptor/delete",
|
|
|
+ method: "post",
|
|
|
+ data: [id],
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "删除成功",
|
|
|
+ });
|
|
|
+ this.getAllList();
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "danger",
|
|
|
+ message: "删除失败",
|
|
|
+ });
|
|
|
+ this.getAllList();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "info",
|
|
|
+ message: "已取消删除",
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }else{
|
|
|
this.$confirm("您确定要删除吗?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
| xqd
@@ -554,15 +642,13 @@ export default {
|
|
|
this.$request({
|
|
|
url: "/api/SupplierAcceptor/delete",
|
|
|
method: "post",
|
|
|
- data: ids,
|
|
|
+ data: [id],
|
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: "删除成功",
|
|
|
});
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
- this.multipleSelection = "";
|
|
|
this.getAllList();
|
|
|
} else {
|
|
|
this.$message({
|
| xqd
@@ -580,41 +666,7 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
- },
|
|
|
- // 单个删除
|
|
|
- deleteStatus(id) {
|
|
|
- this.$confirm("您确定要删除吗?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.$request({
|
|
|
- url: "/api/SupplierAcceptor/delete",
|
|
|
- method: "post",
|
|
|
- data: [id],
|
|
|
- }).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "删除成功",
|
|
|
- });
|
|
|
- this.getAllList();
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: "danger",
|
|
|
- message: "删除失败",
|
|
|
- });
|
|
|
- this.getAllList();
|
|
|
- }
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.$message({
|
|
|
- type: "info",
|
|
|
- message: "已取消删除",
|
|
|
- });
|
|
|
- });
|
|
|
+
|
|
|
},
|
|
|
/* 输入承兑人状态查询 */
|
|
|
handleCommand(command) {
|
| xqd
@@ -756,7 +808,7 @@ export default {
|
|
|
item.statusText,
|
|
|
]);
|
|
|
});
|
|
|
- dataConversionUtil.dataToExcel("承兑人列表", tableHeader, dataList);
|
|
|
+ dataConversionUtil.dataToExcel("供应商承兑人列表", tableHeader, dataList);
|
|
|
this.$message.success("导出成功!");
|
|
|
});
|
|
|
},
|