Forráskód Böngészése

feature_20260108_陈列奖励案任务合并

zhujindu 2 hete
szülő
commit
a926076467

+ 5 - 1
src/router/index.js

@@ -305,7 +305,11 @@ const router = new VueRouter({
           name: 'addStoreVisit',
           component: () => import('@/views/deviceWithin/addStoreVisit.vue'),
         },
-
+        {
+          path: '/taskPhotoTaking',
+          name: 'taskPhotoTaking',
+          component: () => import('@/views/deviceWithin/taskPhotoTaking.vue'),
+        },
         {
           path: '/addStoreVisitd',
           name: 'addStoreVisitd',

+ 48 - 27
src/views/deviceOutside/suishenbangOutstoreVisit.vue

@@ -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');

+ 82 - 0
src/views/deviceWithin/taskPhotoTaking.vue

@@ -0,0 +1,82 @@
+<template>
+  <div class="taskPhotoTaking">
+    <van-nav-bar class="navBar" left-arrow title="拜访任务" @click-left="onClickLeft">
+      <template #right>
+        <span
+          v-if="isEdit"
+          @click="onSubmit"
+          style="
+            color: white;
+            background: rgb(0, 87, 186);
+            display: block;
+            padding: 6px 10px;
+            border-radius: 6px;
+          "
+          >保存</span
+        >
+      </template>
+    </van-nav-bar>
+    <div class="content" v-if="formData">
+      <div
+        class="container"
+        style="width: 94%; margin: 0 auto; border-radius: 6px; padding: 10px 10px 10px 0">
+        <van-form ref="tabstoreVal">
+          <div class="formLabel z-cell">
+            <van-cell>
+              <template #title>
+                <span v-if="formData.isMust == 0" class="van-f-red">*</span>
+                <span>1.</span>
+                {{ formData.collectionName }}
+                <!-- 操作说明图片和电话 -->
+                <taskTips
+                  v-if="formData.contactPhone || formData.examplePhoto"
+                  :contactPhone="formData.contactPhone"
+                  :examplePhoto="formData.examplePhoto">
+                </taskTips>
+              </template>
+              <!-- <template #right-icon>
+                <template v-if="isEdit">
+                  <span v-if="formData.isMustPicture == '0'" class="van-f-red">*</span>
+                  <van-icon
+                    v-if="formData.isPicture == 0"
+                    color="#666"
+                    name="photograph"
+                    size="24"
+                    @click="imgClick(formData, 'A', index)" />
+                </template>
+              </template> -->
+            </van-cell>
+            <!-- <delete-upload-img
+              :photoIdentifyType="photoIdentifyType"
+              :types="$route.query.types"
+              :imgs="formData.fileInfoList"></delete-upload-img> -->
+          </div>
+        </van-form>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import taskTips from './taskTips';
+export default {
+  name: 'abnortaskPhotoTakingmalVisit',
+  components: { taskTips },
+  data() {
+    return {
+      isEdit: true,
+      formData: null,
+    };
+  },
+  activated() {},
+  methods: {
+    onSubmit() {},
+    onClickLeft() {
+      this.$router.go(-1);
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.taskPhotoTaking {
+}
+</style>