|
|
@@ -614,6 +614,30 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ getDeptsBy(answerValue) {
|
|
|
+ getDeptsByUser().then((res) => {
|
|
|
+ if (res.data && res.code == 200) {
|
|
|
+ let arr = [];
|
|
|
+ res.data.forEach((val) => {
|
|
|
+ arr.push({
|
|
|
+ ancestors: val.ancestors || '',
|
|
|
+ deptCode: val.deptCode || '',
|
|
|
+ deptId: val.deptId || '',
|
|
|
+ deptLevel: val.deptLevel || '',
|
|
|
+ deptName: val.deptName || '',
|
|
|
+ parentId: val.parentId || '',
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.deptList = arr;
|
|
|
+ if (answerValue) {
|
|
|
+ let findCompany = this.regionList.find((item) => item.deptCode == answerValue);
|
|
|
+ // this.onSalesDepartmentConfirm(findCompany);
|
|
|
+ } else {
|
|
|
+ this.onSalesDepartmentConfirm(this.deptList[0]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
dailyFn(row) {
|
|
|
if (row.status != '0') {
|
|
|
if (row.status == -1) {
|