|
|
@@ -398,6 +398,7 @@ export default {
|
|
|
this.toastLoading().clear();
|
|
|
if (res.code == 200) {
|
|
|
this.list = res.data;
|
|
|
+ this.list.sfaTaskList = this.filterSfaTaskList(this.list.sfaTaskList);
|
|
|
if (res.data.visitSource != 2) {
|
|
|
this.getListHistoryList(res.data.instanceId);
|
|
|
}
|
|
|
@@ -438,11 +439,43 @@ 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;
|
|
|
+ },
|
|
|
historiStoreVisit(val, index) {
|
|
|
- this.$router.push({
|
|
|
- path: '/historiStoreVisit',
|
|
|
- query: { visitId: this.visitsId, ids: index, taskType: val.taskType },
|
|
|
- });
|
|
|
+ if (val.taskType == '5') {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/taskPhotoTaking',
|
|
|
+ query: {
|
|
|
+ storeCode: this.$route.query.storeCode || this.list.storeCode,
|
|
|
+ visitsId: this.visitsId,
|
|
|
+ taskIds: val.taskIds.join(','),
|
|
|
+ storeGroupId: this.list.storeGroupId,
|
|
|
+ insert: 0,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/historiStoreVisit',
|
|
|
+ query: { visitId: this.visitsId, ids: index, taskType: val.taskType },
|
|
|
+ });
|
|
|
+ }
|
|
|
sessionStorage.setItem('collectionItemList', JSON.stringify(val.collectionItemList));
|
|
|
},
|
|
|
toSkuRecognize() {
|