|
@@ -2754,7 +2754,7 @@ import jianjie from '@/assets/icon/jianjie.jpg';
|
|
|
import { ImagePreview } from 'vant';
|
|
import { ImagePreview } from 'vant';
|
|
|
import taskTips from '@/components/taskTips';
|
|
import taskTips from '@/components/taskTips';
|
|
|
import store from '@/store';
|
|
import store from '@/store';
|
|
|
-import { getChainsGroupTask } from '@/api/agentList';
|
|
|
|
|
|
|
+import { getChainsGroupTask, getCollectionInfos } from '@/api/agentList';
|
|
|
export default {
|
|
export default {
|
|
|
name: 'visitTask',
|
|
name: 'visitTask',
|
|
|
components: { zRadio, zCheckbox, uploadImg, storeCode, deleteUploadImg, taskTips },
|
|
components: { zRadio, zCheckbox, uploadImg, storeCode, deleteUploadImg, taskTips },
|
|
@@ -2842,6 +2842,8 @@ export default {
|
|
|
examplePhotoImg: '', //示例-操作说明图标地址
|
|
examplePhotoImg: '', //示例-操作说明图标地址
|
|
|
photoIdentifyType: null, //图片识别类型
|
|
photoIdentifyType: null, //图片识别类型
|
|
|
pictureSource: '0',
|
|
pictureSource: '0',
|
|
|
|
|
+ inspectionType: '',
|
|
|
|
|
+ competitortableData: [],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -2852,7 +2854,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
- created() {
|
|
|
|
|
|
|
+ activated() {
|
|
|
this.flag = false;
|
|
this.flag = false;
|
|
|
this.link = '3';
|
|
this.link = '3';
|
|
|
this.wuliaoMust = true;
|
|
this.wuliaoMust = true;
|
|
@@ -2862,9 +2864,13 @@ export default {
|
|
|
this.visitId = this.$route.query.visitId + '';
|
|
this.visitId = this.$route.query.visitId + '';
|
|
|
this.taskId = this.$route.query.taskId + '';
|
|
this.taskId = this.$route.query.taskId + '';
|
|
|
this.chainId = this.$route.query.chainId + '';
|
|
this.chainId = this.$route.query.chainId + '';
|
|
|
- this.isMust == this.$route.query.isMust + '';
|
|
|
|
|
|
|
+ this.isMust = this.$route.query.isMust + '';
|
|
|
this.photoIdentifyType = this.$route.query.photoIdentifyType;
|
|
this.photoIdentifyType = this.$route.query.photoIdentifyType;
|
|
|
|
|
+ this.inspectionType = this.$route.query.inspectionType;
|
|
|
this.storeGroupId = this.$route.query.storeGroupId + '';
|
|
this.storeGroupId = this.$route.query.storeGroupId + '';
|
|
|
|
|
+ this.deviceCode = this.$route.query.deviceCode;
|
|
|
|
|
+ this.putInCode = this.$route.query.putInCode;
|
|
|
|
|
+ this.equipmentCode = this.$route.query.equipmentCode;
|
|
|
if (this.$route.query.photoType != null) {
|
|
if (this.$route.query.photoType != null) {
|
|
|
this.indexselect = 0;
|
|
this.indexselect = 0;
|
|
|
} else {
|
|
} else {
|
|
@@ -3189,6 +3195,7 @@ export default {
|
|
|
taskId: that.$route.query.taskId,
|
|
taskId: that.$route.query.taskId,
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
|
|
+ localStorage.setItem('getRequestFlage', 'true');
|
|
|
that.$dialog
|
|
that.$dialog
|
|
|
.alert({
|
|
.alert({
|
|
|
title: '系统提示',
|
|
title: '系统提示',
|
|
@@ -3273,77 +3280,78 @@ export default {
|
|
|
insert = true;
|
|
insert = true;
|
|
|
}
|
|
}
|
|
|
this.insert = insert;
|
|
this.insert = insert;
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ chainCode: this.$route.query.chainCode, // string 门店编码
|
|
|
|
|
+ insert: insert, // boolean 是否为拜访时进入,true-拜访时进入,false-编辑时进入
|
|
|
|
|
+ id: '', // Long 拜访id
|
|
|
|
|
+ taskId: this.$route.query.taskId, // Long 任务id
|
|
|
|
|
+ };
|
|
|
if (this.$route.query.type == 'edit') {
|
|
if (this.$route.query.type == 'edit') {
|
|
|
- var params = {
|
|
|
|
|
- chainId: this.$route.query.chainId,
|
|
|
|
|
- chainCode: this.$route.query.chainCode,
|
|
|
|
|
- visitEntry: '0',
|
|
|
|
|
- lat: '',
|
|
|
|
|
- lon: '',
|
|
|
|
|
- visitModel: this.visitModel,
|
|
|
|
|
- routeDetailsId: '',
|
|
|
|
|
- storeGroupId: this.$route.query.storeGroupId,
|
|
|
|
|
- visitSource: '1',
|
|
|
|
|
- insert: insert,
|
|
|
|
|
- locationCity: '',
|
|
|
|
|
- locationRemark: '',
|
|
|
|
|
- locationAccuracy: '',
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ // var params = {
|
|
|
|
|
+ // chainId: this.$route.query.chainId,
|
|
|
|
|
+ // chainCode: this.$route.query.chainCode,
|
|
|
|
|
+ // visitEntry: '0',
|
|
|
|
|
+ // lat: '',
|
|
|
|
|
+ // lon: '',
|
|
|
|
|
+ // visitModel: this.visitModel,
|
|
|
|
|
+ // routeDetailsId: '',
|
|
|
|
|
+ // storeGroupId: this.$route.query.storeGroupId,
|
|
|
|
|
+ // visitSource: '1',
|
|
|
|
|
+ // insert: insert,
|
|
|
|
|
+ // locationCity: '',
|
|
|
|
|
+ // locationRemark: '',
|
|
|
|
|
+ // locationAccuracy: '',
|
|
|
|
|
+ // };
|
|
|
} else {
|
|
} else {
|
|
|
- var params = {
|
|
|
|
|
- chainId: this.chainId,
|
|
|
|
|
- chainCode: this.$route.query.chainCode,
|
|
|
|
|
- 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,
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ // var params = {
|
|
|
|
|
+ // chainId: this.chainId,
|
|
|
|
|
+ // chainCode: this.$route.query.chainCode,
|
|
|
|
|
+ // 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,
|
|
|
|
|
+ // };
|
|
|
|
|
+ params.taskId = this.$route.query.taskId; // Long 任务id
|
|
|
}
|
|
}
|
|
|
if (this.$route.query.visitId != null) {
|
|
if (this.$route.query.visitId != null) {
|
|
|
params.id = this.$route.query.visitId;
|
|
params.id = this.$route.query.visitId;
|
|
|
}
|
|
}
|
|
|
- getChainsGroupTask(params).then((res) => {
|
|
|
|
|
|
|
+ getCollectionInfos(params).then((res) => {
|
|
|
loading1.clear();
|
|
loading1.clear();
|
|
|
- this.deviceCode = '';
|
|
|
|
|
- this.putInCode = '';
|
|
|
|
|
// 竞品调查-table动态化数据
|
|
// 竞品调查-table动态化数据
|
|
|
- this.productTitles = res.data.sfaTaskList[this.$route.query.ids].productTitles; //产品类型表头数据
|
|
|
|
|
|
|
+ this.productTitles = res.data.productTitles; //产品类型表头数据
|
|
|
// this.equipmentCode = res.data.equipmentCode;
|
|
// 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') {
|
|
if (checkUnManage.checkUnManage != null && checkUnManage.checkUnManage != 'N') {
|
|
|
this.checked = true;
|
|
this.checked = true;
|
|
|
} else {
|
|
} else {
|
|
|
this.checked = false;
|
|
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;
|
|
|
// 调色机类型:buy-购买类调色机,place-放置类调色机 不显示设备编号和投放编号
|
|
// 调色机类型:buy-购买类调色机,place-放置类调色机 不显示设备编号和投放编号
|
|
|
- let inspectionType = res.data.sfaTaskList[this.$route.query.ids].inspectionType;
|
|
|
|
|
- if (inspectionType == 'buy') {
|
|
|
|
|
- this.equipmentCode = res.data.sfaTaskList[this.$route.query.ids].putInCode || '';
|
|
|
|
|
|
|
+ if (this.inspectionType == 'buy') {
|
|
|
|
|
+ this.equipmentCode = this.putInCode || '';
|
|
|
this.showCode = true;
|
|
this.showCode = true;
|
|
|
- } else if (inspectionType == 'place') {
|
|
|
|
|
- this.equipmentCode = res.data.sfaTaskList[this.$route.query.ids].equipmentCode || '';
|
|
|
|
|
|
|
+ } else if (this.inspectionType == 'place') {
|
|
|
|
|
+ this.equipmentCode = this.equipmentCode || '';
|
|
|
this.showCode = false;
|
|
this.showCode = false;
|
|
|
}
|
|
}
|
|
|
if (
|
|
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;
|
|
this.processKey = true;
|
|
|
} else {
|
|
} else {
|
|
|
this.processKey = false;
|
|
this.processKey = false;
|
|
|
}
|
|
}
|
|
|
- this.infoShow = res.data.sfaTaskList[this.$route.query.ids].isMust;
|
|
|
|
|
|
|
+ this.infoShow = res.data.isMust;
|
|
|
if (this.$route.query.taskType == 1) {
|
|
if (this.$route.query.taskType == 1) {
|
|
|
for (var q = 0; q < collectionItemLists.length; q++) {
|
|
for (var q = 0; q < collectionItemLists.length; q++) {
|
|
|
if (
|
|
if (
|
|
@@ -4661,6 +4669,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
addCollectionAnswer(formData).then((res) => {
|
|
addCollectionAnswer(formData).then((res) => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
|
|
+ localStorage.setItem('getRequestFlage', 'true');
|
|
|
this.$router.go(-1);
|
|
this.$router.go(-1);
|
|
|
} else {
|
|
} else {
|
|
|
this.$dialog.alert({
|
|
this.$dialog.alert({
|