新增
+
批量导入
@@ -25,7 +26,8 @@
重置
-
+
+
@@ -33,7 +35,6 @@
- 查看
删除配置
@@ -60,6 +61,7 @@ export default {
dialog:{
show:false,
},
+ selection:[],
list:{
apiObj: this.$API.setup.material.list,
column:[]
@@ -110,6 +112,11 @@ export default {
this.$refs.table.refresh()
},
+ //表格选择后回调事件
+ selectionChange(selection){
+ this.selection = selection;
+ },
+
add(){
this.dialog.save = true
this.$nextTick(() => {
@@ -121,11 +128,29 @@ export default {
this.$refs.table.refresh();
},
- table_see(){
-
+ all_delete(){
+ this.$confirm(`确定删除所选配置吗?`, '提示', {
+ type: 'warning'
+ }).then(async () => {
+ const reqData = {ids: this.selection.map(em=> em.id)};
+ const res = await this.$API.setup.material.delete.post(reqData);
+ if(res.code == 200){
+ this.$refs.table.refresh()
+ this.$message.success("删除成功")
+ }
+ }).catch(()=>{})
},
- table_del(){
-
+ table_del(row){
+ this.$confirm(`确定删除 ${row.m_mpn} 吗?`, '提示', {
+ type: 'warning'
+ }).then(async () => {
+ const reqData = {ids: [row.id]};
+ const res = await this.$API.setup.material.delete.post(reqData);
+ if(res.code == 200){
+ this.$refs.table.refresh()
+ this.$message.success("删除成功")
+ }
+ }).catch(()=>{})
},
upSearch(){
diff --git a/src/views/setting/company/index.vue b/src/views/setting/company/index.vue
index 8bfac1f..eb1c015 100644
--- a/src/views/setting/company/index.vue
+++ b/src/views/setting/company/index.vue
@@ -2,7 +2,7 @@
-
新增公司
+
新增公司
批量导入
@@ -41,7 +41,7 @@
-
+
@@ -50,7 +50,7 @@
查看详情
-