|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
- <div class="perfectStoreTask">
|
|
|
- <van-nav-bar class="navBar" left-arrow title="生动化陈列" @click-left="onClickLeft">
|
|
|
+ <div class="perfectStoreTask" v-if="formData">
|
|
|
+ <van-nav-bar class="navBar" left-arrow :title="formData.taskName" @click-left="onClickLeft">
|
|
|
<template #right>
|
|
|
<!-- <span
|
|
|
v-if="isEdit && insert == '1'"
|
|
|
@@ -26,7 +26,7 @@
|
|
|
<!-- <span v-if="item.isMust == 0" class="van-f-red">*</span> -->
|
|
|
<div class="headline">
|
|
|
<span class="headlineIcon"></span>
|
|
|
- <span class="headlineTitle">{{ item.taskName }}</span>
|
|
|
+ <span class="headlineTitle">{{ item.collectionName }}</span>
|
|
|
</div>
|
|
|
<!-- 操作说明图片和电话 -->
|
|
|
<taskTips
|
|
|
@@ -44,7 +44,6 @@
|
|
|
:collectionItemId="item.collectionId"
|
|
|
:putInCode="formData.putInCode"
|
|
|
:photoIdentifyType="formData.photoIdentifyType"
|
|
|
- @upDataDetail="getDetaile"
|
|
|
:pictureSource="item.pictureSource"
|
|
|
:continuousShoot="item.continuousShoot"
|
|
|
:insert="insert"
|
|
|
@@ -58,28 +57,31 @@
|
|
|
<div class="skuDeatil">
|
|
|
<div class="headline" style="margin-top: 10px">
|
|
|
<span class="headlineIcon"></span>
|
|
|
- <span class="headlineTitle">SKU图像识别结果:个</span>
|
|
|
+ <span class="headlineTitle"
|
|
|
+ >SKU图像识别结果:{{ formData.taskPhotoRecognitionResult.length }} 个</span
|
|
|
+ >
|
|
|
</div>
|
|
|
<el-table
|
|
|
- :data="taskPhotoRecognitionResult"
|
|
|
+ :data="formData.taskPhotoRecognitionResult"
|
|
|
border
|
|
|
class="table-headermd1"
|
|
|
style="width: 100%">
|
|
|
- <el-table-column label="" type="index" width="50px" align="center" />
|
|
|
- <el-table-column label="产品" prop="skuProductName" align="center" />
|
|
|
- <el-table-column label="要求" prop="conditionIdentifyNum" align="center" width="60px">
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column label="序号" type="index" align="center" width="40"> </el-table-column>
|
|
|
<el-table-column
|
|
|
- label="排面数"
|
|
|
- prop="identifyTheNumberOfCards"
|
|
|
- width="70px"
|
|
|
- align="center">
|
|
|
+ label="品类"
|
|
|
+ prop="skuProductType"
|
|
|
+ align="center"
|
|
|
+ width="60"></el-table-column>
|
|
|
+ <el-table-column label="SKU名称" prop="skuProductName" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span :style="{ color: scope.row.meetTheStandard == 1 ? '#07c160' : 'red' }">
|
|
|
- {{ scope.row.identifyTheNumberOfCards }}
|
|
|
- </span>
|
|
|
+ <span class="tipTitle">{{ scope.row.skuProductName }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="排面数"
|
|
|
+ prop="identifyTheNumberOfCards"
|
|
|
+ align="center"
|
|
|
+ width="50"></el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<div class="dataList" v-if="dataList">
|
|
|
@@ -96,7 +98,7 @@
|
|
|
</div>
|
|
|
<div class="itemBottom" v-if="insert == '0'">
|
|
|
<img
|
|
|
- @click="openDialog(item)"
|
|
|
+ @click="openDialog"
|
|
|
:src="
|
|
|
item.taskPhotoConditionPassed == 1
|
|
|
? require('@/assets/taskPhotoSu.png')
|
|
|
@@ -115,10 +117,13 @@
|
|
|
@close="vanPopup == false"
|
|
|
custom-class="identifyResultdialog">
|
|
|
<!-- 识别结果 -->
|
|
|
- <div class="identifyResult" v-if="taskPhotoRecognitionResult" style="padding: 0 10px">
|
|
|
+ <div
|
|
|
+ class="identifyResult"
|
|
|
+ v-if="formData.taskPhotoRecognitionResult"
|
|
|
+ style="padding: 0 10px">
|
|
|
<div class="resultContent">
|
|
|
<el-table
|
|
|
- :data="taskPhotoRecognitionResult"
|
|
|
+ :data="formData.taskPhotoRecognitionResult"
|
|
|
:span-method="taskObjectSpanMethod"
|
|
|
border
|
|
|
class="table-headermd1"
|
|
|
@@ -145,7 +150,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { getCollectionInfosBatch, addCollectionAnswerBatch, getVisitsDetail } from '@/api/index';
|
|
|
+import { addCollectionAnswerBatch, getVisitsDetailPerfectStore } from '@/api/index';
|
|
|
import taskTips from '@/views/deviceWithin/taskTips';
|
|
|
import deleteUploadImg from '@/components/deleteUploadImgTaskPhoto';
|
|
|
export default {
|
|
|
@@ -163,6 +168,7 @@ export default {
|
|
|
insert: '',
|
|
|
vanPopup: false,
|
|
|
taskPhotoRecognitionResult: null,
|
|
|
+ spanArr: [],
|
|
|
};
|
|
|
},
|
|
|
activated() {
|
|
|
@@ -171,11 +177,8 @@ export default {
|
|
|
this.storeGroupId = this.$route.query.storeGroupId || '';
|
|
|
this.objectType = this.$route.query.photoType || '';
|
|
|
this.insert = this.$route.query.insert;
|
|
|
- if (this.$route.query.source == 'historicalDetails') {
|
|
|
- this.getVisitsDetailFun();
|
|
|
- } else {
|
|
|
- this.getDetaile();
|
|
|
- }
|
|
|
+ this.formData = null;
|
|
|
+ this.getVisitsDetailFun();
|
|
|
},
|
|
|
methods: {
|
|
|
taskObjectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
@@ -189,29 +192,37 @@ export default {
|
|
|
};
|
|
|
}
|
|
|
},
|
|
|
+ getSpanArr(data) {
|
|
|
+ if (!data) return;
|
|
|
+ this.spanArr = []; // tip: 后台获取完成数据后,一定要重置spanArr=[],避免出现合并混乱!!!!!
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
+ // 当为第一行时
|
|
|
+ if (i === 0) {
|
|
|
+ this.spanArr.push(1);
|
|
|
+ this.pos = 0;
|
|
|
+ } else {
|
|
|
+ // 判断当前值是否与上一行的【名称】相等,相等则进行合并
|
|
|
+ if (data[i].conditionIdentifyNum === data[i - 1].conditionIdentifyNum) {
|
|
|
+ this.spanArr[this.pos] += 1; // 合并单元格:合并的行数 +1
|
|
|
+ this.spanArr.push(0); // 0代表单元格是不需要显示, 已经被合并的单元格
|
|
|
+ } else {
|
|
|
+ this.spanArr.push(1); // 1代表当前这行的数据需要被显示
|
|
|
+ this.pos = i;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
getVisitsDetailFun() {
|
|
|
this.toastLoading(0, '加载中...', true);
|
|
|
- getVisitsDetail({ visitsId: this.visitsId }).then((res) => {
|
|
|
+ getVisitsDetailPerfectStore({ visitsId: this.visitsId }).then((res) => {
|
|
|
this.toastLoading().clear();
|
|
|
if (res.data.sfaTaskList) {
|
|
|
- this.dataList = res.data.sfaTaskList.filter((val) => val.taskType == '5');
|
|
|
+ this.dataList = res.data.sfaTaskList.filter(
|
|
|
+ (val) => val.taskId == this.$route.query.taskId,
|
|
|
+ );
|
|
|
this.formData = this.dataList[0];
|
|
|
- } else {
|
|
|
- this.formData = null;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- getDetaile() {
|
|
|
- console.log(this.$route.query);
|
|
|
- getCollectionInfosBatch({
|
|
|
- storeCode: this.$route.query.storeCode,
|
|
|
- insert: this.insert == '1' ? true : false,
|
|
|
- id: this.visitsId,
|
|
|
- taskIds: this.taskIds.split(','),
|
|
|
- }).then((res) => {
|
|
|
- if (res.data && res.data.length) {
|
|
|
- this.dataList = res.data;
|
|
|
- this.formData = res.data[0];
|
|
|
+ this.getSpanArr(this.formData.taskPhotoRecognitionResult);
|
|
|
+ console.log(this.formData);
|
|
|
} else {
|
|
|
this.formData = null;
|
|
|
}
|
|
|
@@ -219,7 +230,6 @@ export default {
|
|
|
},
|
|
|
openDialog(item) {
|
|
|
this.vanPopup = true;
|
|
|
- this.taskPhotoRecognitionResult = item.taskPhotoRecognitionResult;
|
|
|
},
|
|
|
onSubmit() {
|
|
|
let formData = {
|