|
@@ -480,7 +480,7 @@ export default {
|
|
|
localStorage.setItem('visitId', res.data.visitId);
|
|
localStorage.setItem('visitId', res.data.visitId);
|
|
|
that.visitId = res.data.visitId;
|
|
that.visitId = res.data.visitId;
|
|
|
}
|
|
}
|
|
|
- that.list = res.data.sfaTaskList;
|
|
|
|
|
|
|
+ that.list = that.filterSfaTaskList(res.data.sfaTaskList);
|
|
|
that.storeGroupId = res.data.storeGroupId;
|
|
that.storeGroupId = res.data.storeGroupId;
|
|
|
that.showOrderButton = res.data.showOrderButton;
|
|
that.showOrderButton = res.data.showOrderButton;
|
|
|
that.startTime = res.data.startTime;
|
|
that.startTime = res.data.startTime;
|
|
@@ -538,7 +538,7 @@ export default {
|
|
|
localStorage.setItem('visitId', res.data.visitId);
|
|
localStorage.setItem('visitId', res.data.visitId);
|
|
|
that.visitId = res.data.visitId;
|
|
that.visitId = res.data.visitId;
|
|
|
}
|
|
}
|
|
|
- that.list = res.data.sfaTaskList;
|
|
|
|
|
|
|
+ that.list = that.filterSfaTaskList(res.data.sfaTaskList);
|
|
|
that.storeGroupId = res.data.storeGroupId;
|
|
that.storeGroupId = res.data.storeGroupId;
|
|
|
that.showOrderButton = res.data.showOrderButton;
|
|
that.showOrderButton = res.data.showOrderButton;
|
|
|
that.startTime = res.data.startTime;
|
|
that.startTime = res.data.startTime;
|
|
@@ -598,7 +598,7 @@ export default {
|
|
|
localStorage.setItem('visitId', res.data.visitId);
|
|
localStorage.setItem('visitId', res.data.visitId);
|
|
|
that.visitId = res.data.visitId;
|
|
that.visitId = res.data.visitId;
|
|
|
}
|
|
}
|
|
|
- that.list = res.data.sfaTaskList;
|
|
|
|
|
|
|
+ that.list = that.filterSfaTaskList(res.data.sfaTaskList);
|
|
|
that.storeGroupId = res.data.storeGroupId;
|
|
that.storeGroupId = res.data.storeGroupId;
|
|
|
that.showOrderButton = res.data.showOrderButton;
|
|
that.showOrderButton = res.data.showOrderButton;
|
|
|
that.startTime = res.data.startTime;
|
|
that.startTime = res.data.startTime;
|
|
@@ -655,7 +655,7 @@ export default {
|
|
|
localStorage.setItem('visitId', res.data.visitId);
|
|
localStorage.setItem('visitId', res.data.visitId);
|
|
|
that.visitId = res.data.visitId;
|
|
that.visitId = res.data.visitId;
|
|
|
}
|
|
}
|
|
|
- that.list = res.data.sfaTaskList;
|
|
|
|
|
|
|
+ that.list = that.filterSfaTaskList(res.data.sfaTaskList);
|
|
|
that.storeGroupId = res.data.storeGroupId;
|
|
that.storeGroupId = res.data.storeGroupId;
|
|
|
that.showOrderButton = res.data.showOrderButton;
|
|
that.showOrderButton = res.data.showOrderButton;
|
|
|
that.startTime = res.data.startTime;
|
|
that.startTime = res.data.startTime;
|
|
@@ -762,6 +762,25 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ filterSfaTaskList(list) {
|
|
|
|
|
+ let taskTypeArr = list.filter((val) => val.taskType !== '5');
|
|
|
|
|
+ let taskType5Index = list.findIndex((val) => val.taskType == '5');
|
|
|
|
|
+ if (taskType5Index != -1) {
|
|
|
|
|
+ let taskType5Arr = list.filter((val) => val.taskType == '5');
|
|
|
|
|
+ let taskIds = [];
|
|
|
|
|
+ taskType5Arr.forEach((val) => {
|
|
|
|
|
+ taskIds.push(val.taskId);
|
|
|
|
|
+ });
|
|
|
|
|
+ let taskType5 = {
|
|
|
|
|
+ ...list[taskType5Index],
|
|
|
|
|
+ taskIds: taskIds,
|
|
|
|
|
+ };
|
|
|
|
|
+ taskType5.taskName = '生动化陈列任务拍照';
|
|
|
|
|
+ taskTypeArr.splice(taskType5Index, 0, taskType5);
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(taskTypeArr);
|
|
|
|
|
+ return taskTypeArr;
|
|
|
|
|
+ },
|
|
|
addStoreVisit(val, index) {
|
|
addStoreVisit(val, index) {
|
|
|
if (this.flag) {
|
|
if (this.flag) {
|
|
|
this.flag = false;
|
|
this.flag = false;
|
|
@@ -770,34 +789,48 @@ export default {
|
|
|
this.flag = true;
|
|
this.flag = true;
|
|
|
}, 2000);
|
|
}, 2000);
|
|
|
localStorage.setItem('getRequestFlage', 'false');
|
|
localStorage.setItem('getRequestFlage', 'false');
|
|
|
- this.$router.push({
|
|
|
|
|
- path: '/addStoreVisit',
|
|
|
|
|
- query: {
|
|
|
|
|
- visitSource: '1',
|
|
|
|
|
- storeId: this.storeId,
|
|
|
|
|
- storeCode: this.urlParameter.storeCode,
|
|
|
|
|
- visitId: this.visitId,
|
|
|
|
|
- ids: index,
|
|
|
|
|
- taskId: val.taskId,
|
|
|
|
|
- type: this.urlParameter.type,
|
|
|
|
|
- storeGroupId: this.storeGroupId,
|
|
|
|
|
- taskType: val.taskType,
|
|
|
|
|
- photoType: val.photoType,
|
|
|
|
|
- lat: this.lat,
|
|
|
|
|
- lon: this.lon,
|
|
|
|
|
- visitModel: this.visitModel,
|
|
|
|
|
- locationCity: this.city,
|
|
|
|
|
- locationRemark: this.address,
|
|
|
|
|
- types: this.$route.query.type,
|
|
|
|
|
- locationAccuracy: this.locationAccuracy,
|
|
|
|
|
- insert: this.insert,
|
|
|
|
|
- photoIdentifyType: val.photoIdentifyType,
|
|
|
|
|
- deviceCode: val.deviceCode,
|
|
|
|
|
- putInCode: val.putInCode,
|
|
|
|
|
- equipmentCode: val.equipmentCode,
|
|
|
|
|
- inspectionType: val.inspectionType,
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (val.taskType == '5') {
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: '/taskPhotoTaking',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ storeCode: this.urlParameter.storeCode,
|
|
|
|
|
+ visitsId: this.visitId,
|
|
|
|
|
+ taskIds: val.taskIds.join(','),
|
|
|
|
|
+ storeGroupId: this.storeGroupId,
|
|
|
|
|
+ photoType: val.photoType,
|
|
|
|
|
+ insert: 1,
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: '/addStoreVisit',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ visitSource: '1',
|
|
|
|
|
+ storeId: this.storeId,
|
|
|
|
|
+ storeCode: this.urlParameter.storeCode,
|
|
|
|
|
+ visitId: this.visitId,
|
|
|
|
|
+ ids: index,
|
|
|
|
|
+ taskId: val.taskId,
|
|
|
|
|
+ type: this.urlParameter.type,
|
|
|
|
|
+ storeGroupId: this.storeGroupId,
|
|
|
|
|
+ taskType: val.taskType,
|
|
|
|
|
+ photoType: val.photoType,
|
|
|
|
|
+ lat: this.lat,
|
|
|
|
|
+ lon: this.lon,
|
|
|
|
|
+ visitModel: this.visitModel,
|
|
|
|
|
+ locationCity: this.city,
|
|
|
|
|
+ locationRemark: this.address,
|
|
|
|
|
+ types: this.$route.query.type,
|
|
|
|
|
+ locationAccuracy: this.locationAccuracy,
|
|
|
|
|
+ insert: this.insert,
|
|
|
|
|
+ photoIdentifyType: val.photoIdentifyType,
|
|
|
|
|
+ deviceCode: val.deviceCode,
|
|
|
|
|
+ putInCode: val.putInCode,
|
|
|
|
|
+ equipmentCode: val.equipmentCode,
|
|
|
|
|
+ inspectionType: val.inspectionType,
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
// this.$router.push({path: "/addStoreVisit", query:
|
|
// this.$router.push({path: "/addStoreVisit", query:
|
|
|
// {storeId:this.storeId,storeCode:that.urlParameter.storeCode,visitId:this.visitId,ids:index,taskId:val.taskId,storeGroupId:this.storeGroupId,taskType:val.taskType,photoType:val.photoType}})
|
|
// {storeId:this.storeId,storeCode:that.urlParameter.storeCode,visitId:this.visitId,ids:index,taskId:val.taskId,storeGroupId:this.storeGroupId,taskType:val.taskType,photoType:val.photoType}})
|