|
|
@@ -577,7 +577,7 @@ export default {
|
|
|
// }
|
|
|
// }
|
|
|
if (answerValue) {
|
|
|
- let findCompany = this.regionList.find((item) => item.deptCode == answerValue);
|
|
|
+ let findCompany = this.companyList.find((item) => item.deptCode == answerValue);
|
|
|
this.onSalesRegionConfirm(findCompany);
|
|
|
} else {
|
|
|
this.onSalesRegionConfirm(this.regionList[0]);
|
|
|
@@ -587,7 +587,7 @@ export default {
|
|
|
if (res.data.dept != null) {
|
|
|
this.deptList = res.data.dept;
|
|
|
if (answerValue) {
|
|
|
- let findCompany = this.deptList.find((item) => item.deptCode == answerValue);
|
|
|
+ let findCompany = this.regionList.find((item) => item.deptCode == answerValue);
|
|
|
this.onSalesDepartmentConfirm(findCompany);
|
|
|
} else {
|
|
|
this.onSalesDepartmentConfirm(this.deptList[0]);
|
|
|
@@ -666,24 +666,29 @@ export default {
|
|
|
onSalesRegionConfirm(val) {
|
|
|
this.SalesRegionShow = false;
|
|
|
this.regionCode = val.deptId;
|
|
|
- if (this.index != '') {
|
|
|
- this.collectionItemList[this.index].answerName = val.deptName;
|
|
|
- this.collectionItemList[this.index].answerValue = val.deptCode;
|
|
|
- } else {
|
|
|
- for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
|
|
|
- if (this.collectionItemList[k1].answerType == 'xsb') {
|
|
|
- this.collectionItemList[k1].answerName = '';
|
|
|
- this.collectionItemList[k1].answerValue = '';
|
|
|
- }
|
|
|
- if (this.collectionItemList[k1].answerType == 'dq') {
|
|
|
- this.collectionItemList[k1].answerName = val.deptName;
|
|
|
- this.collectionItemList[k1].answerValue = val.deptCode;
|
|
|
- }
|
|
|
- if (this.collectionItemList[k1].answerType == 'xsb' && val.deptId != '') {
|
|
|
- this.getDeptInfo('dept', 'xsb', this.collectionItemList[k1].answerValue);
|
|
|
- }
|
|
|
+ // if (this.index !== '') {
|
|
|
+ // this.collectionItemList[this.index].answerName = val.deptName;
|
|
|
+ // this.collectionItemList[this.index].answerValue = val.deptCode;
|
|
|
+ // for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
|
|
|
+ // if (this.collectionItemList[k1].answerType == 'xsb' && val.deptId != '') {
|
|
|
+ // this.getDeptInfo('dept', 'xsb');
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
|
|
|
+ if (this.collectionItemList[k1].answerType == 'xsb') {
|
|
|
+ this.collectionItemList[k1].answerName = '';
|
|
|
+ this.collectionItemList[k1].answerValue = '';
|
|
|
+ }
|
|
|
+ if (this.collectionItemList[k1].answerType == 'dq') {
|
|
|
+ this.collectionItemList[k1].answerName = val.deptName;
|
|
|
+ this.collectionItemList[k1].answerValue = val.deptCode;
|
|
|
+ }
|
|
|
+ if (this.collectionItemList[k1].answerType == 'xsb' && val.deptId != '') {
|
|
|
+ this.getDeptInfo('dept', 'xsb');
|
|
|
}
|
|
|
}
|
|
|
+ // }
|
|
|
// if (val.deptId != '') {
|
|
|
// this.getDeptInfo('dept', 'xsb');
|
|
|
// }
|
|
|
@@ -691,41 +696,47 @@ export default {
|
|
|
onregionConfirm(val) {
|
|
|
this.RegionShow = false;
|
|
|
this.companyCode = val.deptId;
|
|
|
- if (this.index != '') {
|
|
|
- this.collectionItemList[this.index].answerName = val.deptName;
|
|
|
- this.collectionItemList[this.index].answerValue = val.deptCode;
|
|
|
- } else {
|
|
|
- for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
|
|
|
- if (
|
|
|
- this.collectionItemList[k1].answerType == 'xsb' ||
|
|
|
- this.collectionItemList[k1].answerType == 'dq'
|
|
|
- ) {
|
|
|
- this.collectionItemList[k1].answerName = '';
|
|
|
- this.collectionItemList[k1].answerValue = '';
|
|
|
- }
|
|
|
- if (this.collectionItemList[k1].answerType == 'gs') {
|
|
|
- this.collectionItemList[k1].answerName = val.deptName;
|
|
|
- this.collectionItemList[k1].answerValue = val.deptCode;
|
|
|
- }
|
|
|
- if (this.collectionItemList[k1].answerType == 'dq') {
|
|
|
- this.getDeptInfo('dept', 'dq', this.collectionItemList[k1].answerValue);
|
|
|
- }
|
|
|
+ // if (this.index !== '') {
|
|
|
+ // this.collectionItemList[this.index].answerName = val.deptName;
|
|
|
+ // this.collectionItemList[this.index].answerValue = val.deptCode;
|
|
|
+ // for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
|
|
|
+ // if (this.collectionItemList[k1].answerType == 'dq') {
|
|
|
+ // this.getDeptInfo('dept', 'dq');
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
|
|
|
+ if (this.collectionItemList[k1].answerType == 'xsb') {
|
|
|
+ this.collectionItemList[k1].answerName = '';
|
|
|
+ this.collectionItemList[k1].answerValue = '';
|
|
|
+ }
|
|
|
+ if (this.collectionItemList[k1].answerType == 'xsb') {
|
|
|
+ this.collectionItemList[k1].answerName = '';
|
|
|
+ this.collectionItemList[k1].answerValue = '';
|
|
|
+ }
|
|
|
+ if (this.collectionItemList[k1].answerType == 'gs') {
|
|
|
+ this.collectionItemList[k1].answerName = val.deptName;
|
|
|
+ this.collectionItemList[k1].answerValue = val.deptCode;
|
|
|
+ }
|
|
|
+ if (this.collectionItemList[k1].answerType == 'dq') {
|
|
|
+ this.getDeptInfo('dept', 'dq');
|
|
|
}
|
|
|
}
|
|
|
+ // }
|
|
|
},
|
|
|
onSalesDepartmentConfirm(val) {
|
|
|
this.SalesDepartmentShow = false;
|
|
|
- if (this.index != '') {
|
|
|
- this.collectionItemList[this.index].answerName = val.deptName;
|
|
|
- this.collectionItemList[this.index].answerValue = val.deptCode;
|
|
|
- } else {
|
|
|
- for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
|
|
|
- if (this.collectionItemList[k1].answerType == 'xsb') {
|
|
|
- this.collectionItemList[k1].answerName = val.deptName;
|
|
|
- this.collectionItemList[k1].answerValue = val.deptCode;
|
|
|
- }
|
|
|
+ // if (this.index !== '') {
|
|
|
+ // this.collectionItemList[this.index].answerName = val.deptName;
|
|
|
+ // this.collectionItemList[this.index].answerValue = val.deptCode;
|
|
|
+ // } else {
|
|
|
+ for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
|
|
|
+ if (this.collectionItemList[k1].answerType == 'xsb') {
|
|
|
+ this.collectionItemList[k1].answerName = val.deptName;
|
|
|
+ this.collectionItemList[k1].answerValue = val.deptCode;
|
|
|
}
|
|
|
}
|
|
|
+ // }
|
|
|
},
|
|
|
onStartTimeConfirm(val) {
|
|
|
this.formData.startTime = this.parseTime(new Date(val), '{y}-{m}-{d}') + '';
|