|
@@ -215,7 +215,6 @@ export default {
|
|
},
|
|
},
|
|
// 修改
|
|
// 修改
|
|
handleEdit() {
|
|
handleEdit() {
|
|
- console.log(this.checkedList, 'this.checkedList');
|
|
|
|
if (this.checkedList.length == 1) {
|
|
if (this.checkedList.length == 1) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: `/material/basicFile/detail/${this.checkedList[0].id}`,
|
|
path: `/material/basicFile/detail/${this.checkedList[0].id}`,
|
|
@@ -258,8 +257,6 @@ export default {
|
|
},
|
|
},
|
|
//查询
|
|
//查询
|
|
handleQuery() {
|
|
handleQuery() {
|
|
-
|
|
|
|
- console.log('查询');
|
|
|
|
this.getMaterialList('material');
|
|
this.getMaterialList('material');
|
|
},
|
|
},
|
|
// 重置查询条件
|
|
// 重置查询条件
|
|
@@ -271,7 +268,6 @@ export default {
|
|
},
|
|
},
|
|
// 刷新
|
|
// 刷新
|
|
handleRefresh() {
|
|
handleRefresh() {
|
|
- console.log('刷新');
|
|
|
|
this.getMaterialList('material');
|
|
this.getMaterialList('material');
|
|
for (const key in this.queryForm) {
|
|
for (const key in this.queryForm) {
|
|
this.queryForm[key] = '';
|
|
this.queryForm[key] = '';
|
|
@@ -295,7 +291,6 @@ export default {
|
|
id: this.checkedList[0].id
|
|
id: this.checkedList[0].id
|
|
};
|
|
};
|
|
materialApi.updateEnableMaterial(param).then(res => {
|
|
materialApi.updateEnableMaterial(param).then(res => {
|
|
- console.log(res, '启用/停用');
|
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.handleRefresh();
|
|
this.handleRefresh();
|
|
// 清空选中数据
|
|
// 清空选中数据
|
|
@@ -314,7 +309,6 @@ export default {
|
|
},
|
|
},
|
|
// 批量导入
|
|
// 批量导入
|
|
handleImport() {
|
|
handleImport() {
|
|
- console.log('批量导入');
|
|
|
|
this.importData.show = true
|
|
this.importData.show = true
|
|
},
|
|
},
|
|
// 导入弹窗关闭前
|
|
// 导入弹窗关闭前
|
|
@@ -324,7 +318,6 @@ export default {
|
|
},
|
|
},
|
|
// 导入弹窗操作
|
|
// 导入弹窗操作
|
|
handleImportData(type) {
|
|
handleImportData(type) {
|
|
- console.log('导入弹窗操作');
|
|
|
|
switch (type) {
|
|
switch (type) {
|
|
// 取消
|
|
// 取消
|
|
case 'cancal':
|
|
case 'cancal':
|
|
@@ -333,7 +326,6 @@ export default {
|
|
break;
|
|
break;
|
|
// 确认
|
|
// 确认
|
|
case 'confirm':
|
|
case 'confirm':
|
|
- console.log(this.importData.list, 'this.fileList');
|
|
|
|
if (this.importData.list.length) {
|
|
if (this.importData.list.length) {
|
|
|
|
|
|
let formData = new FormData();
|
|
let formData = new FormData();
|
|
@@ -367,11 +359,9 @@ export default {
|
|
// 文件发生改变
|
|
// 文件发生改变
|
|
handleChangeFile(file, fileList) {
|
|
handleChangeFile(file, fileList) {
|
|
this.importData.list = fileList;
|
|
this.importData.list = fileList;
|
|
- console.log(this.importData.list, '文件发生改变');
|
|
|
|
},
|
|
},
|
|
// 批量导出
|
|
// 批量导出
|
|
handleExport() {
|
|
handleExport() {
|
|
- console.log('批量导出', this.checkedList);
|
|
|
|
|
|
|
|
let ids = this.checkedList.length ? this.checkedList.map(i => i.id) : [];
|
|
let ids = this.checkedList.length ? this.checkedList.map(i => i.id) : [];
|
|
|
|
|
|
@@ -392,7 +382,6 @@ export default {
|
|
},
|
|
},
|
|
// 下载模板
|
|
// 下载模板
|
|
handleDownTemplate() {
|
|
handleDownTemplate() {
|
|
- console.log('下载模板');
|
|
|
|
this.download('/system/material/download', {}, `物料基本信息模板.xlsx`)
|
|
this.download('/system/material/download', {}, `物料基本信息模板.xlsx`)
|
|
},
|
|
},
|
|
|
|
|
|
@@ -418,7 +407,6 @@ export default {
|
|
|
|
|
|
// 双击行
|
|
// 双击行
|
|
handledbClick(e) {
|
|
handledbClick(e) {
|
|
- console.log(e, '双击行');
|
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: `/material/basicFile/detail/${e.id}`,
|
|
path: `/material/basicFile/detail/${e.id}`,
|
|
});
|
|
});
|
|
@@ -436,7 +424,6 @@ export default {
|
|
// 选中数据改变
|
|
// 选中数据改变
|
|
handleSelectionChange(list) {
|
|
handleSelectionChange(list) {
|
|
// this.checkedList = this.handleUnique([...this.checkedList, ...list], 'id');
|
|
// this.checkedList = this.handleUnique([...this.checkedList, ...list], 'id');
|
|
- // console.log(this.checkedList, '选中数据改变');
|
|
|
|
// this.$emit('headerOption', JSON.stringify({ checkedList: [... this.checkedList] }))
|
|
// this.$emit('headerOption', JSON.stringify({ checkedList: [... this.checkedList] }))
|
|
},
|
|
},
|
|
// 行数据勾选操作
|
|
// 行数据勾选操作
|
|
@@ -448,7 +435,6 @@ export default {
|
|
},
|
|
},
|
|
//手动勾选全选
|
|
//手动勾选全选
|
|
handleSelectAll(selection) {
|
|
handleSelectAll(selection) {
|
|
- // console.log(selection, '手动勾选全选--------------');
|
|
|
|
this.checkedList = selection;
|
|
this.checkedList = selection;
|
|
},
|
|
},
|
|
// 获取物料列表信息
|
|
// 获取物料列表信息
|
|
@@ -497,7 +483,6 @@ export default {
|
|
// this.getTagList('material');
|
|
// this.getTagList('material');
|
|
},
|
|
},
|
|
beforeRouteEnter(to, from, next) {
|
|
beforeRouteEnter(to, from, next) {
|
|
- console.log(to, 'to', from, 'beforeRouteEnter');
|
|
|
|
|
|
|
|
next((vm) => {
|
|
next((vm) => {
|
|
if (from.name == 'materialDetail') {
|
|
if (from.name == 'materialDetail') {
|
|
@@ -514,7 +499,6 @@ export default {
|
|
},
|
|
},
|
|
// 进入详情,保留查询条件
|
|
// 进入详情,保留查询条件
|
|
beforeRouteLeave(to, from, next) {
|
|
beforeRouteLeave(to, from, next) {
|
|
- console.log(to, 'to', from, 'beforeRouteLeave');
|
|
|
|
if (to.name == 'materialDetail') {
|
|
if (to.name == 'materialDetail') {
|
|
this.$store.commit('SET_QUERY', this.queryForm);
|
|
this.$store.commit('SET_QUERY', this.queryForm);
|
|
} else {
|
|
} else {
|