|
|
@@ -177,6 +177,12 @@
|
|
|
<el-button type="danger" plain size="small"
|
|
|
:disabled="editDisabled || selectionList.length == 0"
|
|
|
@click="allClick('批量删除')">批量删除</el-button>
|
|
|
+ <el-button type="success" plain size="small"
|
|
|
+ :disabled="editDisabled || selectionList.length == 0"
|
|
|
+ @click="allClick('批量禁用')">批量禁用</el-button>
|
|
|
+ <el-button type="danger" plain size="small"
|
|
|
+ :disabled="editDisabled || selectionList.length == 0"
|
|
|
+ @click="allClick('批量撤销禁用')">批量撤销禁用</el-button>
|
|
|
</template>
|
|
|
<template slot="indexHeader" slot-scope="{row,index}">
|
|
|
<el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled"
|
|
|
@@ -687,7 +693,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { submit, submitItemList, submitFeeList, getDetail, removeItem, feeRemove, checkAgent, revokeCheckAgent, copyAgent, topList, getBcorpsList } from "@/api/iosBasicData/costcenter/soc";
|
|
|
+import { submit, submitItemList, submitFeeList, getDetail, removeItem, feeRemove, checkAgent, revokeCheckAgent, copyAgent, topList, getBcorpsList, batchDisable, batchRevokeDisable } from "@/api/iosBasicData/costcenter/soc";
|
|
|
import { getListTemplate, getListTemplatelist } from "@/api/iosBasicData/losbfeestemplate";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
import checkSchedule from "@/components/checkH/checkSchedule.vue";
|
|
|
@@ -2626,6 +2632,32 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ if (name == '批量禁用') {
|
|
|
+ let ids = []
|
|
|
+ for (let item of this.selectionList) {
|
|
|
+ if (item.disable == 1) {
|
|
|
+ return this.$message.error("请选择未禁用的明细");
|
|
|
+ }
|
|
|
+ ids.push(item.id)
|
|
|
+ }
|
|
|
+ batchDisable({ ids: ids.join(',') }).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == '批量撤销禁用') {
|
|
|
+ let ids = []
|
|
|
+ for (let item of this.selectionList) {
|
|
|
+ if (item.disable != 1) {
|
|
|
+ return this.$message.error("请选择已禁用的明细");
|
|
|
+ }
|
|
|
+ ids.push(item.id)
|
|
|
+ }
|
|
|
+ batchRevokeDisable({ ids: ids.join(',') }).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ })
|
|
|
+ }
|
|
|
if (name == 'POL一键保存') {
|
|
|
if (!this.polFeeList.length) {
|
|
|
return this.$message.error("请添加数据");
|