|
@@ -10,6 +10,7 @@
|
|
|
ref="crud"
|
|
ref="crud"
|
|
|
@row-update="rowUpdate"
|
|
@row-update="rowUpdate"
|
|
|
@row-save="rowSave"
|
|
@row-save="rowSave"
|
|
|
|
|
+ @row-del="rowDel"
|
|
|
@search-change="searchChange"
|
|
@search-change="searchChange"
|
|
|
@search-reset="searchReset"
|
|
@search-reset="searchReset"
|
|
|
@selection-change="selectionChange"
|
|
@selection-change="selectionChange"
|
|
@@ -56,7 +57,7 @@
|
|
|
<template slot="menu" slot-scope="{row, index}">
|
|
<template slot="menu" slot-scope="{row, index}">
|
|
|
<el-button size="small" class="el-button--text" v-if="permission.postchange_view" @click="handleView(row, index)"><i class="el-icon-view"></i> 查 看</el-button>
|
|
<el-button size="small" class="el-button--text" v-if="permission.postchange_view" @click="handleView(row, index)"><i class="el-icon-view"></i> 查 看</el-button>
|
|
|
<el-button size="small" class="el-button--text" v-if="permission.postchange_edit && userInfo.user_id == row.createUser && row.process != 3" @click="$refs.crud.rowEdit(row, index)"><i class="el-icon-edit"></i> 編 輯</el-button>
|
|
<el-button size="small" class="el-button--text" v-if="permission.postchange_edit && userInfo.user_id == row.createUser && row.process != 3" @click="$refs.crud.rowEdit(row, index)"><i class="el-icon-edit"></i> 編 輯</el-button>
|
|
|
- <el-button size="small" class="el-button--text" v-if="permission.postchange_delete && userInfo.user_id == row.createUser && row.process != 3" @click="$refs.crud.rowDel(row, index)"><i class="el-icon-delete"></i> 刪 除</el-button>
|
|
|
|
|
|
|
+ <el-button size="small" class="el-button--text" v-if="permission.postchange_delete && userInfo.user_id == row.createUser && row.process != 3" @click="$refs.crud.rowDel(row)"><i class="el-icon-delete"></i> 刪 除</el-button>
|
|
|
<el-button size="small" class="el-button--text" v-if="permission.postchange_approve && row.process == 2 && row.personNo == userInfo.user_ehr" @click="approve(row, index)"><i class="el-icon-check"></i> 審 批</el-button>
|
|
<el-button size="small" class="el-button--text" v-if="permission.postchange_approve && row.process == 2 && row.personNo == userInfo.user_ehr" @click="approve(row, index)"><i class="el-icon-check"></i> 審 批</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -337,7 +338,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import {getList, getDetail, add, update, approve, settingSave, getDictByCode, getSetting, getLastRecord, transfer} from "@/api/bank/postchange";
|
|
|
|
|
|
|
+ import {getList, getDetail, add, update, remove, approve, settingSave, getDictByCode, getSetting, getLastRecord, transfer} from "@/api/bank/postchange";
|
|
|
import {mapGetters} from "vuex";
|
|
import {mapGetters} from "vuex";
|
|
|
import { getCurrentDept } from "@/api/system/dept";
|
|
import { getCurrentDept } from "@/api/system/dept";
|
|
|
import {dateFormat} from "../../util/date";
|
|
import {dateFormat} from "../../util/date";
|
|
@@ -1184,7 +1185,45 @@
|
|
|
console.log(error);
|
|
console.log(error);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ rowDel(row) {
|
|
|
|
|
+ this.$confirm("確定將選擇數據刪除?", {
|
|
|
|
|
+ confirmButtonText: "確定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning"
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ return remove(row.id);
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.onLoad(this.page);
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ message: "操作成功!"
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ handleDelete() {
|
|
|
|
|
+ if (this.selectionList.length === 0) {
|
|
|
|
|
+ this.$message.warning("請選擇至少一條數據");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$confirm("確定將選擇數據刪除?", {
|
|
|
|
|
+ confirmButtonText: "確定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning"
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ return remove(this.ids);
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.onLoad(this.page);
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ message: "操作成功!"
|
|
|
|
|
+ });
|
|
|
|
|
+ this.$refs.crud.toggleSelection();
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
handleEdit(){
|
|
handleEdit(){
|
|
|
// this.form = this.data[0];
|
|
// this.form = this.data[0];
|