|
@@ -3,7 +3,7 @@
|
|
|
<van-nav-bar class="navBar" left-arrow title="生动化陈列" @click-left="onClickLeft">
|
|
<van-nav-bar class="navBar" left-arrow title="生动化陈列" @click-left="onClickLeft">
|
|
|
<template #right v-if="formData">
|
|
<template #right v-if="formData">
|
|
|
<span
|
|
<span
|
|
|
- v-if="isEdit && insert == 'true' && formData.processStatus != 1"
|
|
|
|
|
|
|
+ v-if="formData.processStatus != 1 || formData.displayRewardTaskEditable"
|
|
|
@click="onSubmit"
|
|
@click="onSubmit"
|
|
|
style="
|
|
style="
|
|
|
color: white;
|
|
color: white;
|
|
@@ -126,9 +126,15 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
-import { getCollectionInfosBatch, addCollectionAnswerBatch, getVisitsDetail } from '@/api/index';
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ getCollectionInfosBatch,
|
|
|
|
|
+ addCollectionAnswerBatch,
|
|
|
|
|
+ getVisitsDetail,
|
|
|
|
|
+ selectUserDistanceTheStore,
|
|
|
|
|
+} from '@/api/index';
|
|
|
import taskTips from './taskTips';
|
|
import taskTips from './taskTips';
|
|
|
import deleteUploadImgTaskPhoto from '@/components/deleteUploadImgTaskPhoto';
|
|
import deleteUploadImgTaskPhoto from '@/components/deleteUploadImgTaskPhoto';
|
|
|
|
|
+import { getPosition, getTicketFun } from '@/utils/TXApiFun';
|
|
|
import { mapState } from 'vuex';
|
|
import { mapState } from 'vuex';
|
|
|
export default {
|
|
export default {
|
|
|
name: 'abnortaskPhotoTakingmalVisit',
|
|
name: 'abnortaskPhotoTakingmalVisit',
|
|
@@ -140,7 +146,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- isEdit: true,
|
|
|
|
|
formData: null,
|
|
formData: null,
|
|
|
dataList: null,
|
|
dataList: null,
|
|
|
taskIds: [],
|
|
taskIds: [],
|
|
@@ -163,6 +168,7 @@ export default {
|
|
|
this.insert = this.$route.query.insert;
|
|
this.insert = this.$route.query.insert;
|
|
|
if (this.$route.query.source == 'historicalDetails') {
|
|
if (this.$route.query.source == 'historicalDetails') {
|
|
|
this.getVisitsDetailFun();
|
|
this.getVisitsDetailFun();
|
|
|
|
|
+ this.getTicketFunfun();
|
|
|
} else {
|
|
} else {
|
|
|
this.getDetaile();
|
|
this.getDetaile();
|
|
|
}
|
|
}
|
|
@@ -175,6 +181,36 @@ export default {
|
|
|
},
|
|
},
|
|
|
watch: {},
|
|
watch: {},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ // 授权
|
|
|
|
|
+ getTicketFunfun() {
|
|
|
|
|
+ getTicketFun()
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ getPosition()
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ let { TXisBD } = res;
|
|
|
|
|
+ // this.lat = TXisBD.lat;
|
|
|
|
|
+ // this.lon = TXisBD.lon;
|
|
|
|
|
+ this.selectUserDistanceTheStoreFun(TXisBD);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((error) => {
|
|
|
|
|
+ this.$dialog.alert({
|
|
|
|
|
+ message: error,
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ },
|
|
|
|
|
+ selectUserDistanceTheStoreFun(TXisBD) {
|
|
|
|
|
+ selectUserDistanceTheStore({
|
|
|
|
|
+ visitsId: this.visitsId, // Long 拜访id
|
|
|
|
|
+ lon: TXisBD.lon, // String 经度
|
|
|
|
|
+ lat: TXisBD.lat, // String 纬度
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.data) {
|
|
|
|
|
+ this.$toast(`您距离门店还有${res.data}米`);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
taskObjectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
taskObjectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
const cellValue = row[column.property];
|
|
const cellValue = row[column.property];
|
|
|
if (cellValue && ['conditionIdentifyNum'].includes(column.property)) {
|
|
if (cellValue && ['conditionIdentifyNum'].includes(column.property)) {
|
|
@@ -268,7 +304,7 @@ export default {
|
|
|
storeGroupId: this.$route.query.storeGroupId,
|
|
storeGroupId: this.$route.query.storeGroupId,
|
|
|
visitsId: this.visitsId,
|
|
visitsId: this.visitsId,
|
|
|
taskList: this.taskIds.split(',').map((val) => Number(val)),
|
|
taskList: this.taskIds.split(',').map((val) => Number(val)),
|
|
|
- insert: true,
|
|
|
|
|
|
|
+ insert: this.insert,
|
|
|
collectionAnswers: [],
|
|
collectionAnswers: [],
|
|
|
checkUnManage: 'N',
|
|
checkUnManage: 'N',
|
|
|
deviceCode: '',
|
|
deviceCode: '',
|