|
@@ -4,37 +4,42 @@
|
|
|
<!-- 顶部条 -->
|
|
<!-- 顶部条 -->
|
|
|
<van-nav-bar class="navBar" title="客户详情" left-arrow @click-left="onClickLeft">
|
|
<van-nav-bar class="navBar" title="客户详情" left-arrow @click-left="onClickLeft">
|
|
|
<template #right>
|
|
<template #right>
|
|
|
- <!-- updatable 当前操作人是否可以编辑 -->
|
|
|
|
|
- <template v-if="list.updatable">
|
|
|
|
|
- <!-- 未结案状态下 -->
|
|
|
|
|
- <template v-if="list.approvalStatus == 0">
|
|
|
|
|
- <!-- validFlag 正常门店 -->
|
|
|
|
|
- <template v-if="list.validFlag == 0">
|
|
|
|
|
- <!-- 未提交 -->
|
|
|
|
|
- <template v-if="list.processApprovalStatus == 0">
|
|
|
|
|
- <span style="color: #0057ba" v-if="type != 'address'" @click="editorFn"
|
|
|
|
|
- >编辑
|
|
|
|
|
- </span>
|
|
|
|
|
- </template>
|
|
|
|
|
- <!--下首单专用接口,只有在未结案、没有订单调用 -->
|
|
|
|
|
- <!-- <span
|
|
|
|
|
|
|
+ <template v-if="type == 'chainMaintain'">
|
|
|
|
|
+ <span style="color: #0057ba" @click="chainMaintain">维护经销商</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <!-- updatable 当前操作人是否可以编辑 -->
|
|
|
|
|
+ <template v-if="list.updatable">
|
|
|
|
|
+ <!-- 未结案状态下 -->
|
|
|
|
|
+ <template v-if="list.approvalStatus == 0">
|
|
|
|
|
+ <!-- validFlag 正常门店 -->
|
|
|
|
|
+ <template v-if="list.validFlag == 0">
|
|
|
|
|
+ <!-- 未提交 -->
|
|
|
|
|
+ <template v-if="list.processApprovalStatus == 0">
|
|
|
|
|
+ <span style="color: #0057ba" v-if="type != 'address'" @click="editorFn"
|
|
|
|
|
+ >编辑
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!--下首单专用接口,只有在未结案、没有订单调用 -->
|
|
|
|
|
+ <!-- <span
|
|
|
v-if="!orderList.length"
|
|
v-if="!orderList.length"
|
|
|
style="color: #0057ba; margin-left: 10px"
|
|
style="color: #0057ba; margin-left: 10px"
|
|
|
@click="placeOrderFn"
|
|
@click="placeOrderFn"
|
|
|
>去下单
|
|
>去下单
|
|
|
</span> -->
|
|
</span> -->
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <span style="color: #0057ba" v-if="list.validFlag == 2" @click="placeOrderFn"
|
|
|
|
|
+ >去下单
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span
|
|
|
|
|
+ style="color: #0057ba"
|
|
|
|
|
+ v-if="list.validFlag != 2 && type != 'address'"
|
|
|
|
|
+ @click="editorFn"
|
|
|
|
|
+ >编辑
|
|
|
|
|
+ </span>
|
|
|
</template>
|
|
</template>
|
|
|
- </template>
|
|
|
|
|
- <template v-else>
|
|
|
|
|
- <span style="color: #0057ba" v-if="list.validFlag == 2" @click="placeOrderFn"
|
|
|
|
|
- >去下单
|
|
|
|
|
- </span>
|
|
|
|
|
- <span
|
|
|
|
|
- style="color: #0057ba"
|
|
|
|
|
- v-if="list.validFlag != 2 && type != 'address'"
|
|
|
|
|
- @click="editorFn"
|
|
|
|
|
- >编辑
|
|
|
|
|
- </span>
|
|
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
@@ -385,6 +390,7 @@
|
|
|
<br />
|
|
<br />
|
|
|
<!-- type:address 拜访时位置偏差过大,可以修改地址(只能修改地址) -->
|
|
<!-- type:address 拜访时位置偏差过大,可以修改地址(只能修改地址) -->
|
|
|
<div
|
|
<div
|
|
|
|
|
+ v-if="type != 'chainMaintain'"
|
|
|
style="
|
|
style="
|
|
|
position: fixed;
|
|
position: fixed;
|
|
|
bottom: 0;
|
|
bottom: 0;
|
|
@@ -568,6 +574,7 @@ import { updateStoreAddress, valid } from '@/api/visitstore';
|
|
|
import uploadImg from '@/components/viewaddreddUploadImg.vue';
|
|
import uploadImg from '@/components/viewaddreddUploadImg.vue';
|
|
|
import helpPage from './helpPage.vue';
|
|
import helpPage from './helpPage.vue';
|
|
|
import { getPosition, getMapPoi, getkeywordPoi, getTicketFun } from '@/utils/TXApiFun';
|
|
import { getPosition, getMapPoi, getkeywordPoi, getTicketFun } from '@/utils/TXApiFun';
|
|
|
|
|
+import { getOrderUrlByStoreId } from '@/api/inventory';
|
|
|
export default {
|
|
export default {
|
|
|
components: { uploadImg, mapmarker, viewUploadImg, helpPage },
|
|
components: { uploadImg, mapmarker, viewUploadImg, helpPage },
|
|
|
data() {
|
|
data() {
|
|
@@ -611,7 +618,7 @@ export default {
|
|
|
address: '地址',
|
|
address: '地址',
|
|
|
storeTypePOP: false,
|
|
storeTypePOP: false,
|
|
|
GZAttributeFormShow: false,
|
|
GZAttributeFormShow: false,
|
|
|
- type: '',
|
|
|
|
|
|
|
+ type: '', //chainMaintain:维护经销商;address:修改地址
|
|
|
towntShow: false,
|
|
towntShow: false,
|
|
|
districtShow: false,
|
|
districtShow: false,
|
|
|
cityShow: false,
|
|
cityShow: false,
|
|
@@ -1541,80 +1548,18 @@ export default {
|
|
|
message: '加载中...',
|
|
message: '加载中...',
|
|
|
forbidClick: true,
|
|
forbidClick: true,
|
|
|
});
|
|
});
|
|
|
- addStore(this.list).then((res) => {
|
|
|
|
|
|
|
+ getOrderUrlByStoreId({
|
|
|
|
|
+ storeId: this.$route.query.id,
|
|
|
|
|
+ from: 'storeDetail',
|
|
|
|
|
+ }).then((res) => {
|
|
|
loading1.clear();
|
|
loading1.clear();
|
|
|
- if (res.code == 200) {
|
|
|
|
|
- if (res.data.serverCode) {
|
|
|
|
|
- if (
|
|
|
|
|
- res.data.orderUrl != null &&
|
|
|
|
|
- (res.data.orderUrl != '') & (res.data.orderUrl != undefined)
|
|
|
|
|
- ) {
|
|
|
|
|
- window.location.replace(res.data.orderUrl);
|
|
|
|
|
- } else {
|
|
|
|
|
- checkVisit({ storeId: res.data.sfaStore.storeId }).then((response) => {
|
|
|
|
|
- localStorage.setItem('startTime', new Date());
|
|
|
|
|
- localStorage.setItem('ORGName', this.list.deptName);
|
|
|
|
|
- localStorage.setItem('chainNameR', this.list.storeName);
|
|
|
|
|
- if (response.code == 200) {
|
|
|
|
|
- that.$dialog
|
|
|
|
|
- .confirm({
|
|
|
|
|
- title: '系统提示',
|
|
|
|
|
- message: '建店成功,是否立即拜访?',
|
|
|
|
|
- confirmButtonText: '立即拜访',
|
|
|
|
|
- cancelButtonText: '返回上一页',
|
|
|
|
|
- })
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- localStorage.setItem('startTime', new Date());
|
|
|
|
|
- localStorage.setItem('ORGName', res.data.sfaStore.deptName);
|
|
|
|
|
- localStorage.setItem('chainNameR', res.data.sfaStore.storeName);
|
|
|
|
|
- window.location.replace(
|
|
|
|
|
- window.location.origin +
|
|
|
|
|
- '/mobile/suishenbangOutstoreVisit?PointSum=0&visitModel=1&tabVal=1&hisTime=null&pageType=out&visitId=null&rdId=null&storeId=' +
|
|
|
|
|
- res.data.sfaStore.storeId +
|
|
|
|
|
- '&lat=' +
|
|
|
|
|
- that.list.lat +
|
|
|
|
|
- '&lon=' +
|
|
|
|
|
- that.list.lon +
|
|
|
|
|
- '&addressLine=' +
|
|
|
|
|
- that.list.addressLine +
|
|
|
|
|
- '&storeCategory=' +
|
|
|
|
|
- res.data.sfaStore.storeCategory +
|
|
|
|
|
- '&storeName=' +
|
|
|
|
|
- that.list.storeName +
|
|
|
|
|
- '&contactName=' +
|
|
|
|
|
- that.list.contactName +
|
|
|
|
|
- '&storeCode=' +
|
|
|
|
|
- res.data.sfaStore.storeCode +
|
|
|
|
|
- '&latNew=' +
|
|
|
|
|
- that.list.lat +
|
|
|
|
|
- '&lonNew=' +
|
|
|
|
|
- that.list.lon
|
|
|
|
|
- );
|
|
|
|
|
- })
|
|
|
|
|
- .catch(() => {
|
|
|
|
|
- that.$router.go(-2);
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- that.$dialog
|
|
|
|
|
- .alert({
|
|
|
|
|
- title: '系统提示',
|
|
|
|
|
- message: response.msg,
|
|
|
|
|
- })
|
|
|
|
|
- .then((res) => {});
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- this.list.storeCode = res.data.sfaStore.storeCode;
|
|
|
|
|
- this.list.storeId = res.data.sfaStore.storeId;
|
|
|
|
|
- this.$dialog.alert({
|
|
|
|
|
- title: '系统提示',
|
|
|
|
|
- message: res.data.serverMsg,
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (res.code == 200 && res.data) {
|
|
|
|
|
+ window.location.href = res.data;
|
|
|
} else {
|
|
} else {
|
|
|
- this.msgList = res.msg;
|
|
|
|
|
- this.showDialog = true;
|
|
|
|
|
|
|
+ this.Toast({
|
|
|
|
|
+ message: res.msg,
|
|
|
|
|
+ duration: 5000,
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -1670,6 +1615,13 @@ export default {
|
|
|
startPosition: index,
|
|
startPosition: index,
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ // 维护经销商
|
|
|
|
|
+ chainMaintain() {
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: '/chainMaintain',
|
|
|
|
|
+ query: { id: this.$route.query.id },
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|