|
@@ -256,12 +256,12 @@
|
|
|
},
|
|
|
defaultExpandAll: true,
|
|
|
label: 'name',
|
|
|
- resType: 'data'
|
|
|
+ // resType: 'data'
|
|
|
},
|
|
|
- request: {
|
|
|
- url: '/maindata/maindataMaterialCategory/treeUseList',
|
|
|
- method: 'GET'
|
|
|
- }
|
|
|
+ // request: {
|
|
|
+ // url: '/maindata/maindataMaterialCategory/treeUseList',
|
|
|
+ // method: 'GET'
|
|
|
+ // }
|
|
|
}
|
|
|
singleTable : any = {
|
|
|
attr: {
|
|
@@ -659,12 +659,12 @@
|
|
|
},
|
|
|
columns: [
|
|
|
{
|
|
|
- width: '170px',
|
|
|
+ // width: '170px',
|
|
|
title: '标题',
|
|
|
field: 'title',
|
|
|
},
|
|
|
{
|
|
|
- width: '170px',
|
|
|
+ // width: '170px',
|
|
|
title: '副标题',
|
|
|
field: 'subtitle',
|
|
|
},
|
|
@@ -1087,6 +1087,18 @@
|
|
|
this.tableSearchForm.stime = '2020-01-01';
|
|
|
this.tableSearchForm.etime = y+'-'+m+'-'+d;
|
|
|
this.getFinancialCode()
|
|
|
+ this.getTreeList();
|
|
|
+ }
|
|
|
+ getTreeList(){
|
|
|
+ api.treeList('maindataMaterialCategory').then((res : any) => {
|
|
|
+ console.log(res);
|
|
|
+ var data:any = [{
|
|
|
+ id: 0,
|
|
|
+ name: '物料分类',
|
|
|
+ children: res.data
|
|
|
+ }];
|
|
|
+ (this as any).$refs.sideTree.setData(data);
|
|
|
+ })
|
|
|
}
|
|
|
// 确定商品新增
|
|
|
confirmProduct(e : any) {
|
|
@@ -1250,7 +1262,8 @@
|
|
|
loading.close()
|
|
|
if (res.code === 200) {
|
|
|
this.isShow = 'home';
|
|
|
- (this as any).$refs.sideTree.request();
|
|
|
+ // (this as any).$refs.sideTree.request();
|
|
|
+ (this as any).$refs.sideTree.setData(data);
|
|
|
this.getDataList();
|
|
|
this.$message.success('保存成功');
|
|
|
}
|
|
@@ -1260,7 +1273,8 @@
|
|
|
loading.close()
|
|
|
if (res.code === 200) {
|
|
|
this.isShow = 'home';
|
|
|
- (this as any).$refs.sideTree.request();
|
|
|
+ // (this as any).$refs.sideTree.request();
|
|
|
+ (this as any).$refs.sideTree.setData(data);
|
|
|
this.getDataList();
|
|
|
this.$message.success('保存成功');
|
|
|
}
|
|
@@ -1941,7 +1955,8 @@
|
|
|
if (res.code === 200) {
|
|
|
this.$message.success('删除成功');
|
|
|
this.isShow = 'home';
|
|
|
- (this as any).$refs.sideTree.request();
|
|
|
+ // (this as any).$refs.sideTree.request();
|
|
|
+ (this as any).$refs.sideTree.setData(data);
|
|
|
this.getDataList();
|
|
|
} else this.$message.error(res.msg);
|
|
|
}).catch(() => {});
|
|
@@ -1965,7 +1980,8 @@
|
|
|
}).then(() => {
|
|
|
other.deleteSpuAndSku({ ids: ids }, 'maindataMaterial').then((res : any) => {
|
|
|
if (res.code === 200) {
|
|
|
- (this as any).$refs.sideTree.request();
|
|
|
+ // (this as any).$refs.sideTree.request();
|
|
|
+ (this as any).$refs.sideTree.setData(data);
|
|
|
this.getDataList();
|
|
|
this.$message.success('删除成功');
|
|
|
} else this.$message.error(res.msg);
|
|
@@ -1982,7 +1998,8 @@
|
|
|
}).then(() => {
|
|
|
other.deleteSpuAndSku({ ids: item.id }, 'maindataMaterial').then((res : any) => {
|
|
|
if (res.code === 200) {
|
|
|
- (this as any).$refs.sideTree.request();
|
|
|
+ // (this as any).$refs.sideTree.request();
|
|
|
+ (this as any).$refs.sideTree.setData(data);
|
|
|
this.getDataList();
|
|
|
this.$message.success('删除成功');
|
|
|
} else this.$message.error(res.msg);
|
|
@@ -1992,7 +2009,8 @@
|
|
|
// 刷新
|
|
|
onRefresh() {
|
|
|
(this as any).$refs.moduleView.clearSearch();
|
|
|
- (this as any).$refs.sideTree.request();
|
|
|
+ // (this as any).$refs.sideTree.request();
|
|
|
+ (this as any).$refs.sideTree.setData(data);
|
|
|
this.categoryIds = '';
|
|
|
this.getDataList();
|
|
|
}
|