|
|
@@ -2722,9 +2722,10 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
+ getStoreGroupTask,
|
|
|
getPhotoTypeList,
|
|
|
addCollectionAnswer,
|
|
|
- getStoreGroupTask,
|
|
|
+ getCollectionInfos,
|
|
|
editDwellTime,
|
|
|
deleteTaskAnswer,
|
|
|
getCollectionShowHistory,
|
|
|
@@ -3294,77 +3295,82 @@ export default {
|
|
|
insert = true;
|
|
|
}
|
|
|
this.insert = insert;
|
|
|
- if (this.$route.query.type == 'edit') {
|
|
|
- var params = {
|
|
|
- storeId: this.$route.query.storeId,
|
|
|
- storeCode: this.$route.query.storeCode,
|
|
|
- visitEntry: '0',
|
|
|
- lat: '',
|
|
|
- lon: '',
|
|
|
- visitModel: this.visitModel,
|
|
|
- routeDetailsId: '',
|
|
|
- storeGroupId: this.$route.query.storeGroupId,
|
|
|
- visitSource: '1',
|
|
|
- insert: insert,
|
|
|
- locationCity: '',
|
|
|
- locationRemark: '',
|
|
|
- locationAccuracy: '',
|
|
|
- };
|
|
|
- } else {
|
|
|
- var params = {
|
|
|
- storeId: this.storeId,
|
|
|
- storeCode: this.$route.query.storeCode,
|
|
|
- visitEntry: '0',
|
|
|
- lat: this.$route.query.lat,
|
|
|
- lon: this.$route.query.lon,
|
|
|
- visitModel: this.$route.query.visitModel,
|
|
|
- routeDetailsId: this.$route.query.taskId,
|
|
|
- locationCity: this.$route.query.locationCity,
|
|
|
- insert: insert,
|
|
|
- locationRemark: this.$route.query.locationRemark,
|
|
|
- locationAccuracy: this.$route.query.locationAccuracy,
|
|
|
- visitSource: this.$route.query.visitSource,
|
|
|
- };
|
|
|
- }
|
|
|
+ let params = {
|
|
|
+ storeCode: this.$route.query.storeCode, // string 门店编码
|
|
|
+ insert: insert, // boolean 是否为拜访时进入,true-拜访时进入,false-编辑时进入
|
|
|
+ id: '', // Long 拜访id
|
|
|
+ taskId: this.$route.query.taskId, // Long 任务id
|
|
|
+ };
|
|
|
+ // if (this.$route.query.type == 'edit') {
|
|
|
+ // var params = {
|
|
|
+ // storeId: this.$route.query.storeId,
|
|
|
+ // storeCode: this.$route.query.storeCode,
|
|
|
+ // visitEntry: '0',
|
|
|
+ // lat: '',
|
|
|
+ // lon: '',
|
|
|
+ // visitModel: this.visitModel,
|
|
|
+ // routeDetailsId: '',
|
|
|
+ // storeGroupId: this.$route.query.storeGroupId,
|
|
|
+ // visitSource: '1',
|
|
|
+ // insert: insert,
|
|
|
+ // locationCity: '',
|
|
|
+ // locationRemark: '',
|
|
|
+ // locationAccuracy: '',
|
|
|
+ // };
|
|
|
+ // } else {
|
|
|
+ // var params = {
|
|
|
+ // storeId: this.storeId,
|
|
|
+ // storeCode: this.$route.query.storeCode,
|
|
|
+ // visitEntry: '0',
|
|
|
+ // lat: this.$route.query.lat,
|
|
|
+ // lon: this.$route.query.lon,
|
|
|
+ // visitModel: this.$route.query.visitModel,
|
|
|
+ // routeDetailsId: this.$route.query.taskId,
|
|
|
+ // locationCity: this.$route.query.locationCity,
|
|
|
+ // insert: insert,
|
|
|
+ // locationRemark: this.$route.query.locationRemark,
|
|
|
+ // locationAccuracy: this.$route.query.locationAccuracy,
|
|
|
+ // visitSource: this.$route.query.visitSource,
|
|
|
+ // };
|
|
|
+ // }
|
|
|
if (this.$route.query.visitId != null) {
|
|
|
params.id = this.$route.query.visitId;
|
|
|
}
|
|
|
- getStoreGroupTask(params).then((res) => {
|
|
|
+ getCollectionInfos(params).then((res) => {
|
|
|
loading1.clear();
|
|
|
this.deviceCode = '';
|
|
|
this.putInCode = '';
|
|
|
// 竞品调查-table动态化数据
|
|
|
- this.productTitles = res.data.sfaTaskList[this.$route.query.ids].productTitles; //产品类型表头数据
|
|
|
+ this.productTitles = res.data.productTitles; //产品类型表头数据
|
|
|
// this.equipmentCode = res.data.equipmentCode;
|
|
|
- var checkUnManage = res.data.sfaTaskList[this.$route.query.ids];
|
|
|
- var collectionItemLists = res.data.sfaTaskList[this.$route.query.ids].collectionItemList;
|
|
|
+ var checkUnManage = res.data;
|
|
|
+ var collectionItemLists = res.data.collectionItemList;
|
|
|
if (checkUnManage.checkUnManage != null && checkUnManage.checkUnManage != 'N') {
|
|
|
this.checked = true;
|
|
|
} else {
|
|
|
this.checked = false;
|
|
|
}
|
|
|
- this.unManage = res.data.sfaTaskList[this.$route.query.ids].unManage;
|
|
|
- this.deviceCode = res.data.sfaTaskList[this.$route.query.ids].deviceCode || ''; // 设备编号
|
|
|
- this.putInCode = res.data.sfaTaskList[this.$route.query.ids].putInCode || ''; // 投放编号
|
|
|
+ this.unManage = res.data.unManage;
|
|
|
+ this.deviceCode = res.data.deviceCode || ''; // 设备编号
|
|
|
+ this.putInCode = res.data.putInCode || ''; // 投放编号
|
|
|
// 调色机类型:buy-购买类调色机,place-放置类调色机 不显示设备编号和投放编号
|
|
|
- let inspectionType = res.data.sfaTaskList[this.$route.query.ids].inspectionType;
|
|
|
+ let inspectionType = res.data.inspectionType;
|
|
|
if (inspectionType == 'buy') {
|
|
|
- this.equipmentCode = res.data.sfaTaskList[this.$route.query.ids].putInCode || '';
|
|
|
+ this.equipmentCode = res.data.putInCode || '';
|
|
|
this.showCode = true;
|
|
|
} else if (inspectionType == 'place') {
|
|
|
- this.equipmentCode = res.data.sfaTaskList[this.$route.query.ids].equipmentCode || '';
|
|
|
+ this.equipmentCode = res.data.equipmentCode || '';
|
|
|
this.showCode = false;
|
|
|
}
|
|
|
if (
|
|
|
- (res.data.sfaTaskList[this.$route.query.ids].processStatus == 3 &&
|
|
|
- this.$route.query.types == 'edit') ||
|
|
|
- res.data.sfaTaskList[this.$route.query.ids].processStatus == undefined
|
|
|
+ (res.data.processStatus == 3 && this.$route.query.types == 'edit') ||
|
|
|
+ res.data.processStatus == undefined
|
|
|
) {
|
|
|
this.processKey = true;
|
|
|
} else {
|
|
|
this.processKey = false;
|
|
|
}
|
|
|
- this.infoShow = res.data.sfaTaskList[this.$route.query.ids].isMust;
|
|
|
+ this.infoShow = res.data.isMust;
|
|
|
if (this.$route.query.taskType == 1) {
|
|
|
for (var q = 0; q < collectionItemLists.length; q++) {
|
|
|
if (
|