|
@@ -38,18 +38,21 @@
|
|
type="primary"
|
|
type="primary"
|
|
size="small"
|
|
size="small"
|
|
@click="addFn"
|
|
@click="addFn"
|
|
|
|
+ class="add-right"
|
|
|
|
+ icon="el-icon-plus"
|
|
>新增</el-button
|
|
>新增</el-button
|
|
>
|
|
>
|
|
-
|
|
|
|
<el-popconfirm
|
|
<el-popconfirm
|
|
v-if="$checkBtnRole('del', $route.meta.roles)"
|
|
v-if="$checkBtnRole('del', $route.meta.roles)"
|
|
@onConfirm="deleFn"
|
|
@onConfirm="deleFn"
|
|
title="这是一段内容确定删除吗?"
|
|
title="这是一段内容确定删除吗?"
|
|
>
|
|
>
|
|
<el-button
|
|
<el-button
|
|
- type="primary"
|
|
|
|
|
|
+ :disabled="ids.length < 1"
|
|
|
|
+ type="danger"
|
|
size="small"
|
|
size="small"
|
|
class="textColor"
|
|
class="textColor"
|
|
|
|
+ icon="el-icon-minus"
|
|
slot="reference"
|
|
slot="reference"
|
|
>批量删除</el-button
|
|
>批量删除</el-button
|
|
>
|
|
>
|
|
@@ -138,6 +141,7 @@
|
|
prop="caozuo"
|
|
prop="caozuo"
|
|
min-width="160"
|
|
min-width="160"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
|
|
+ fixed="right"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
<el-button
|
|
@@ -323,6 +327,7 @@ import { getDealerList } from "@/api/basic_data/dealer";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ isDisabled: true,
|
|
title: "",
|
|
title: "",
|
|
dialogForm: false,
|
|
dialogForm: false,
|
|
addForm: {
|
|
addForm: {
|
|
@@ -489,7 +494,8 @@ export default {
|
|
// this.ids = selection.map((k) => {
|
|
// this.ids = selection.map((k) => {
|
|
// return k.id;
|
|
// return k.id;
|
|
// });
|
|
// });
|
|
- console.log(selection);
|
|
|
|
|
|
+
|
|
|
|
+ // console.log(selection);
|
|
this.ids = selection.map((v) => v.id);
|
|
this.ids = selection.map((v) => v.id);
|
|
},
|
|
},
|
|
// //存货分类
|
|
// //存货分类
|
|
@@ -500,11 +506,20 @@ export default {
|
|
// },
|
|
// },
|
|
//删除
|
|
//删除
|
|
async deleFn(id) {
|
|
async deleFn(id) {
|
|
- this.ids.push(id);
|
|
|
|
- let res = this.ids.toString();
|
|
|
|
- await deleDealerStockList({ ids: res });
|
|
|
|
|
|
+ if (id) {
|
|
|
|
+ let arr = [];
|
|
|
|
+ arr.push(id);
|
|
|
|
+ let res2 = arr.toString();
|
|
|
|
+ await deleDealerStockList({ ids: res2 });
|
|
|
|
+ } else {
|
|
|
|
+ let res = this.ids.toString();
|
|
|
|
+ await deleDealerStockList({ ids: res });
|
|
|
|
+ }
|
|
|
|
+
|
|
this.getList({ pageNum: 1, pageSize: 10 });
|
|
this.getList({ pageNum: 1, pageSize: 10 });
|
|
|
|
+
|
|
this.$message.success("删除成功");
|
|
this.$message.success("删除成功");
|
|
|
|
+ this.ids = [];
|
|
},
|
|
},
|
|
addFn() {
|
|
addFn() {
|
|
this.title = "经销商业务关系管理";
|
|
this.title = "经销商业务关系管理";
|
|
@@ -612,8 +627,8 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
-::v-deep .el-popover__reference {
|
|
|
|
- margin-left: 10px;
|
|
|
|
|
|
+.add-right {
|
|
|
|
+ margin-right: 10px;
|
|
}
|
|
}
|
|
// ::v-deep .selectStyle .el-input--suffix {
|
|
// ::v-deep .selectStyle .el-input--suffix {
|
|
// width: 200%;
|
|
// width: 200%;
|