|
|
@@ -526,7 +526,7 @@ export default {
|
|
|
localStorage.setItem('visitId', res.data.visitId);
|
|
|
that.notes = res.data.notes;
|
|
|
that.visitId = res.data.visitId;
|
|
|
- that.list = res.data.sfaTaskList;
|
|
|
+ that.list = that.filterSfaTaskList(res.data.sfaTaskList);
|
|
|
that.storeGroupId = res.data.storeGroupId;
|
|
|
that.showOrderButton = res.data.showOrderButton;
|
|
|
that.startTime = res.data.startTime;
|
|
|
@@ -579,7 +579,7 @@ export default {
|
|
|
localStorage.setItem('visitId', res.data.visitId);
|
|
|
that.notes = res.data.notes;
|
|
|
that.visitId = res.data.visitId;
|
|
|
- that.list = res.data.sfaTaskList;
|
|
|
+ that.list = that.filterSfaTaskList(res.data.sfaTaskList);
|
|
|
that.storeGroupId = res.data.storeGroupId;
|
|
|
that.showOrderButton = res.data.showOrderButton;
|
|
|
that.startTime = res.data.startTime;
|
|
|
@@ -603,34 +603,55 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
+ filterSfaTaskList(list) {
|
|
|
+ let taskTypeArr = list.filter((val) => val.taskType !== '5');
|
|
|
+ let taskType5Index = list.findIndex((val) => val.taskType == '5');
|
|
|
+ if (taskType5Index != -1) {
|
|
|
+ let taskType5 = {
|
|
|
+ ...list[taskType5Index],
|
|
|
+ };
|
|
|
+ taskType5.taskName = '生动化陈列任务拍照';
|
|
|
+ taskTypeArr.splice(taskType5Index, 0, taskType5);
|
|
|
+ }
|
|
|
+ console.log(taskTypeArr);
|
|
|
+ return taskTypeArr;
|
|
|
+ },
|
|
|
addStoreVisit(val, index) {
|
|
|
localStorage.setItem('getRequestFlage', 'false');
|
|
|
console.log(this.visitId);
|
|
|
- this.$router.push({
|
|
|
- path: '/addStoreVisit',
|
|
|
- query: {
|
|
|
- storeId: this.storeId,
|
|
|
- storeCode: this.urlParameter.storeCode,
|
|
|
- visitId: this.visitId,
|
|
|
- ids: index,
|
|
|
- taskId: val.taskId,
|
|
|
- storeGroupId: this.storeGroupId,
|
|
|
- taskType: val.taskType,
|
|
|
- photoType: val.photoType,
|
|
|
- lat: this.lat,
|
|
|
- lon: this.lon,
|
|
|
- visitSource: '1',
|
|
|
- visitModel: this.visitModel,
|
|
|
- locationCity: this.city,
|
|
|
- locationRemark: this.address,
|
|
|
- locationAccuracy: this.locationAccuracy,
|
|
|
- photoIdentifyType: val.photoIdentifyType,
|
|
|
- deviceCode: val.deviceCode,
|
|
|
- putInCode: val.putInCode,
|
|
|
- equipmentCode: val.equipmentCode,
|
|
|
- inspectionType: val.inspectionType,
|
|
|
- },
|
|
|
- });
|
|
|
+ if (val.taskType == '5') {
|
|
|
+ // if (val.taskType == '5') {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/taskPhotoTaking',
|
|
|
+ query: {},
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/addStoreVisit',
|
|
|
+ query: {
|
|
|
+ storeId: this.storeId,
|
|
|
+ storeCode: this.urlParameter.storeCode,
|
|
|
+ visitId: this.visitId,
|
|
|
+ ids: index,
|
|
|
+ taskId: val.taskId,
|
|
|
+ storeGroupId: this.storeGroupId,
|
|
|
+ taskType: val.taskType,
|
|
|
+ photoType: val.photoType,
|
|
|
+ lat: this.lat,
|
|
|
+ lon: this.lon,
|
|
|
+ visitSource: '1',
|
|
|
+ visitModel: this.visitModel,
|
|
|
+ locationCity: this.city,
|
|
|
+ locationRemark: this.address,
|
|
|
+ locationAccuracy: this.locationAccuracy,
|
|
|
+ photoIdentifyType: val.photoIdentifyType,
|
|
|
+ deviceCode: val.deviceCode,
|
|
|
+ putInCode: val.putInCode,
|
|
|
+ equipmentCode: val.equipmentCode,
|
|
|
+ inspectionType: val.inspectionType,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
onClickLeft() {
|
|
|
localStorage.setItem('getRequestFlage', 'true');
|