|
|
@@ -234,6 +234,7 @@ import {
|
|
|
getSummaryDetailById,
|
|
|
getDeptInfo,
|
|
|
getSummaryMobileDeptInfo,
|
|
|
+ getDeptsByUser,
|
|
|
} from '@/api/index';
|
|
|
import zRadio from '@/components/zRadio2';
|
|
|
import zCheckbox from '@/components/zCheckbox2';
|
|
|
@@ -460,11 +461,20 @@ export default {
|
|
|
this.activaFlag
|
|
|
) {
|
|
|
this.activaFlag = false;
|
|
|
- this.getDeptInfo(
|
|
|
- 'dept',
|
|
|
- collectionItemLists[q].answerType,
|
|
|
- collectionItemLists[q].answerValue
|
|
|
- );
|
|
|
+ if (collectionItemLists[q].answerType == 'xsb') {
|
|
|
+ this.getDeptsBy(collectionItemLists[q].answerValue);
|
|
|
+ this.getDeptInfo(
|
|
|
+ 'dept',
|
|
|
+ collectionItemLists[q].answerType,
|
|
|
+ collectionItemLists[q].answerValue
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ this.getDeptInfo(
|
|
|
+ 'dept',
|
|
|
+ collectionItemLists[q].answerType,
|
|
|
+ collectionItemLists[q].answerValue
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
// 单选
|
|
|
if (
|
|
|
@@ -622,6 +632,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) {
|