|
@@ -289,8 +289,8 @@ export default {
|
|
|
name: 'createStore',
|
|
name: 'createStore',
|
|
|
},
|
|
},
|
|
|
];
|
|
];
|
|
|
- // 2销售部主管显示色卡
|
|
|
|
|
- if (this.userInfo.empLevel == '2') {
|
|
|
|
|
|
|
+ // 2销售部主管和大区主管显示色卡
|
|
|
|
|
+ if (this.userInfo.empLevel == '2' || this.userInfo.empLevel == '1') {
|
|
|
this.tabsItem.push({
|
|
this.tabsItem.push({
|
|
|
title: '色卡',
|
|
title: '色卡',
|
|
|
name: 'pantone',
|
|
name: 'pantone',
|
|
@@ -321,8 +321,8 @@ export default {
|
|
|
} else if (this.fromType == 'pantone') {
|
|
} else if (this.fromType == 'pantone') {
|
|
|
// 色卡
|
|
// 色卡
|
|
|
this.firstProp = 'warehouseName';
|
|
this.firstProp = 'warehouseName';
|
|
|
- let empLevel = tree ? tree.empLevel : null;
|
|
|
|
|
- this.getPantoneData(resolve, empLevel);
|
|
|
|
|
|
|
+ let deptId = tree ? tree.onlyId : null;
|
|
|
|
|
+ this.getPantoneData(resolve, deptId);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
tabChange(val) {
|
|
tabChange(val) {
|
|
@@ -372,6 +372,7 @@ export default {
|
|
|
selectPendingCasesInfo({ deptId: this.deptId }).then((res) => {
|
|
selectPendingCasesInfo({ deptId: this.deptId }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
res.data.forEach((val) => {
|
|
res.data.forEach((val) => {
|
|
|
|
|
+ // 是否还有子级
|
|
|
if (val.empLevel < 3) val.hasChildren = true;
|
|
if (val.empLevel < 3) val.hasChildren = true;
|
|
|
});
|
|
});
|
|
|
// 是否是子级
|
|
// 是否是子级
|
|
@@ -391,10 +392,9 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
// 色卡tab
|
|
// 色卡tab
|
|
|
- getPantoneData(resolve, empLevel) {
|
|
|
|
|
|
|
+ getPantoneData(resolve, deptId) {
|
|
|
if (JSON.stringify(this.tabsItemPantone) != '{}') {
|
|
if (JSON.stringify(this.tabsItemPantone) != '{}') {
|
|
|
- // this.tabsItemPantone != {} 不是初次获取tab数据不需要在赋值
|
|
|
|
|
- this.getReportMaterialTypeFun(resolve, empLevel);
|
|
|
|
|
|
|
+ this.getReportMaterialTypeFun(resolve, deptId);
|
|
|
} else {
|
|
} else {
|
|
|
getReportMaterial().then((res) => {
|
|
getReportMaterial().then((res) => {
|
|
|
this.tabsItemPantone = res.data;
|
|
this.tabsItemPantone = res.data;
|
|
@@ -410,9 +410,9 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 色卡详情
|
|
// 色卡详情
|
|
|
- getReportMaterialTypeFun(resolve, empLevel) {
|
|
|
|
|
- // empLevel 第一次传 null
|
|
|
|
|
- getReportMaterialType({ materialCode: this.materialCode, empLevel: empLevel }).then((res) => {
|
|
|
|
|
|
|
+ getReportMaterialTypeFun(resolve, deptId) {
|
|
|
|
|
+ // deptId 第一次传 null 获取当前等级下的数据(不需要当前层级)
|
|
|
|
|
+ getReportMaterialType({ materialCode: this.materialCode, deptId: deptId }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
res.data.colorCardList.forEach((val) => {
|
|
res.data.colorCardList.forEach((val) => {
|
|
|
if (val.empLevel < 3) val.hasChildren = true;
|
|
if (val.empLevel < 3) val.hasChildren = true;
|