|
|
@@ -89,7 +89,7 @@
|
|
|
></template
|
|
|
>
|
|
|
</van-cell>
|
|
|
- <p class="mg0">{{ item.answerValue }}</p>
|
|
|
+ <p class="mg0">{{ item.answerName }}</p>
|
|
|
</div>
|
|
|
<div v-if="item.answerType == 'duox'" class="formLabel z-cell">
|
|
|
<van-cell>
|
|
|
@@ -298,7 +298,7 @@ export default {
|
|
|
},
|
|
|
onConfirm(date) {
|
|
|
this.showCalendar = false;
|
|
|
- this.collectionItemList[this.dateIndex].answerValue = this.formatDate(date);
|
|
|
+ this.collectionItemList[this.dateIndex].answerName = this.formatDate(date);
|
|
|
},
|
|
|
formatter(value) {
|
|
|
return value.replace(
|
|
|
@@ -307,13 +307,13 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
numberFn(val, index) {
|
|
|
- if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(this.collectionItemList[index].answerValue)) {
|
|
|
- this.collectionItemList[index].answerValue = this.collectionItemList[
|
|
|
+ if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(this.collectionItemList[index].answerName)) {
|
|
|
+ this.collectionItemList[index].answerName = this.collectionItemList[
|
|
|
index
|
|
|
- ].answerValue.replace(
|
|
|
+ ].answerName.replace(
|
|
|
/\.\d{2,}$/,
|
|
|
- this.collectionItemList[index].answerValue.substr(
|
|
|
- this.collectionItemList[index].answerValue.indexOf('.'),
|
|
|
+ this.collectionItemList[index].answerName.substr(
|
|
|
+ this.collectionItemList[index].answerName.indexOf('.'),
|
|
|
3
|
|
|
)
|
|
|
);
|
|
|
@@ -386,7 +386,7 @@ export default {
|
|
|
this.collectionAnswerlisd = [];
|
|
|
this.collectionItemList = JSON.parse(JSON.stringify(this.collectionItemLists));
|
|
|
for (var q = 0; q < this.collectionItemList.length; q++) {
|
|
|
- this.collectionItemList[q].answerName = undefined;
|
|
|
+ // this.collectionItemList[q].answerName = undefined;
|
|
|
// 公司
|
|
|
// if (
|
|
|
// (this.collectionItemList[q].answerType == 'gs' ||
|
|
|
@@ -506,7 +506,7 @@ export default {
|
|
|
var days = (endData - stratDate) / (1000 * 60 * 60 * 24);
|
|
|
return days;
|
|
|
},
|
|
|
- getDeptInfo(type, grade, answerValue) {
|
|
|
+ getDeptInfo(type, grade, answerName) {
|
|
|
this.deptForm.type = type;
|
|
|
if (grade == 'dq') {
|
|
|
this.deptForm.parentId = this.companyCode;
|
|
|
@@ -520,8 +520,8 @@ export default {
|
|
|
if (grade == 'dq') {
|
|
|
if (res.data.region != null) {
|
|
|
this.regionList = res.data.region;
|
|
|
- if (answerValue) {
|
|
|
- let findCompany = this.companyList.find((item) => item.deptName == answerValue);
|
|
|
+ if (answerName) {
|
|
|
+ let findCompany = this.companyList.find((item) => item.deptName == answerName);
|
|
|
// this.onSalesRegionConfirm(findCompany);
|
|
|
} else {
|
|
|
this.onSalesRegionConfirm(this.regionList[0]);
|
|
|
@@ -530,8 +530,8 @@ export default {
|
|
|
} else if (grade == 'xsb') {
|
|
|
if (res.data.dept != null) {
|
|
|
this.deptList = res.data.dept;
|
|
|
- if (answerValue) {
|
|
|
- let findCompany = this.regionList.find((item) => item.deptName == answerValue);
|
|
|
+ if (answerName) {
|
|
|
+ let findCompany = this.regionList.find((item) => item.deptName == answerName);
|
|
|
// this.onSalesDepartmentConfirm(findCompany);
|
|
|
} else {
|
|
|
this.onSalesDepartmentConfirm(this.deptList[0]);
|
|
|
@@ -539,8 +539,8 @@ export default {
|
|
|
}
|
|
|
} else if (grade == 'gs') {
|
|
|
this.companyList = res.data.company;
|
|
|
- if (answerValue) {
|
|
|
- let findCompany = this.companyList.find((item) => item.deptName == answerValue);
|
|
|
+ if (answerName) {
|
|
|
+ let findCompany = this.companyList.find((item) => item.deptName == answerName);
|
|
|
// this.onregionConfirm(findCompany);
|
|
|
} else {
|
|
|
this.onregionConfirm(this.companyList[0]);
|
|
|
@@ -554,7 +554,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- getDeptsBy(answerValue) {
|
|
|
+ getDeptsBy(answerName) {
|
|
|
getDeptsByUser().then((res) => {
|
|
|
if (res.data && res.code == 200) {
|
|
|
let arr = [];
|
|
|
@@ -569,8 +569,8 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
this.deptList = arr;
|
|
|
- if (answerValue) {
|
|
|
- let findCompany = this.regionList.find((item) => item.deptCode == answerValue);
|
|
|
+ if (answerName) {
|
|
|
+ let findCompany = this.regionList.find((item) => item.deptCode == answerName);
|
|
|
// this.onSalesDepartmentConfirm(findCompany);
|
|
|
} else {
|
|
|
this.onSalesDepartmentConfirm(this.deptList[0]);
|
|
|
@@ -637,8 +637,8 @@ export default {
|
|
|
this.collectionItemList[k1].answerValue = '';
|
|
|
}
|
|
|
if (this.collectionItemList[k1].answerType == 'dq') {
|
|
|
- this.collectionItemList[k1].answerName = val.deptCode;
|
|
|
- this.collectionItemList[k1].answerValue = val.deptName;
|
|
|
+ this.collectionItemList[k1].answerName = val.deptName;
|
|
|
+ this.collectionItemList[k1].answerValue = val.deptCode;
|
|
|
}
|
|
|
if (this.collectionItemList[k1].answerType == 'xsb' && val.deptId != '') {
|
|
|
this.getDeptInfo('dept', 'xsb');
|
|
|
@@ -658,8 +658,8 @@ export default {
|
|
|
this.collectionItemList[k1].answerValue = '';
|
|
|
}
|
|
|
if (this.collectionItemList[k1].answerType == 'gs') {
|
|
|
- this.collectionItemList[k1].answerName = val.deptCode;
|
|
|
- this.collectionItemList[k1].answerValue = val.deptName;
|
|
|
+ this.collectionItemList[k1].answerName = val.deptName;
|
|
|
+ this.collectionItemList[k1].answerValue = val.deptCode;
|
|
|
}
|
|
|
if (this.collectionItemList[k1].answerType == 'dq') {
|
|
|
this.getDeptInfo('dept', 'dq');
|
|
|
@@ -670,8 +670,8 @@ export default {
|
|
|
this.SalesDepartmentShow = false;
|
|
|
for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
|
|
|
if (this.collectionItemList[k1].answerType == 'xsb') {
|
|
|
- this.collectionItemList[k1].answerName = val.deptCode;
|
|
|
- this.collectionItemList[k1].answerValue = val.deptName;
|
|
|
+ this.collectionItemList[k1].answerName = val.deptName;
|
|
|
+ this.collectionItemList[k1].answerValue = val.deptCode;
|
|
|
}
|
|
|
}
|
|
|
},
|