|
|
@@ -4,30 +4,24 @@
|
|
|
<!-- 顶部条 -->
|
|
|
<van-nav-bar class="navBar" title="客户详情" left-arrow @click-left="onClickLeft">
|
|
|
<template #right>
|
|
|
- <!-- 未结案状态下 已提交/未提交 -->
|
|
|
- <template v-if="list.storeType == '未结案'">
|
|
|
- <!-- 已提交状态禁止操作 -->
|
|
|
- <template v-if="list.submit"></template>
|
|
|
- <!-- 未提交 -->
|
|
|
- <template v-if="!list.submit">
|
|
|
- <span
|
|
|
- style="color: #0057ba"
|
|
|
- v-if="list.updatable && list.validFlag != 2 && type != 'address'"
|
|
|
- @click="editorFn"
|
|
|
- >编辑
|
|
|
- </span>
|
|
|
+ <!-- 未结案状态下 -->
|
|
|
+ <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 style="color: #0057ba; margin-left: 10px" @click="placeOrderFn">去下单 </span>
|
|
|
</template>
|
|
|
</template>
|
|
|
- <template v-else>
|
|
|
- <span
|
|
|
- style="color: #0057ba"
|
|
|
- v-if="list.updatable && list.validFlag == 2"
|
|
|
- @click="placeOrderFn"
|
|
|
+ <template v-else-if="list.updatable">
|
|
|
+ <span style="color: #0057ba" v-if="list.validFlag == 2" @click="placeOrderFn"
|
|
|
>去下单
|
|
|
</span>
|
|
|
<span
|
|
|
style="color: #0057ba"
|
|
|
- v-if="list.updatable && list.validFlag != 2 && type != 'address'"
|
|
|
+ v-if="list.validFlag != 2 && type != 'address'"
|
|
|
@click="editorFn"
|
|
|
>编辑
|
|
|
</span>
|
|
|
@@ -280,11 +274,7 @@
|
|
|
<br />
|
|
|
<br />
|
|
|
<br />
|
|
|
- <!-- 未结案 未提交状态下可关闭门店、提交审核 -->
|
|
|
- <div class="bottomBtn">
|
|
|
- <van-button color="red" round @click="valid">撤销建店</van-button>
|
|
|
- <van-button type="primary" round @click="updateStoreAddress">提交审核</van-button>
|
|
|
- </div>
|
|
|
+ <!-- type:address 拜访时位置偏差过大,可以修改地址(只能修改地址) -->
|
|
|
<div
|
|
|
style="
|
|
|
position: fixed;
|
|
|
@@ -293,58 +283,66 @@
|
|
|
padding: 14px;
|
|
|
background-color: white;
|
|
|
border-top: 1px solid #eee;
|
|
|
- "
|
|
|
- v-if="type">
|
|
|
- <van-row gutter="20">
|
|
|
- <van-col
|
|
|
- span="12"
|
|
|
- v-if="
|
|
|
- list.storeCategory != '35' &&
|
|
|
- list.storeCategory != '36' &&
|
|
|
- list.storeCategory != '37' &&
|
|
|
- list.storeCategory != '38' &&
|
|
|
- list.storeCategory != '91'
|
|
|
- "
|
|
|
- ><van-button round type="default" style="width: 100%" @click="valid"
|
|
|
- >无效关店</van-button
|
|
|
- ></van-col
|
|
|
- >
|
|
|
- <van-col
|
|
|
- span="12"
|
|
|
- v-if="
|
|
|
- list.storeCategory != '35' &&
|
|
|
- list.storeCategory != '36' &&
|
|
|
- list.storeCategory != '37' &&
|
|
|
- list.storeCategory != '38' &&
|
|
|
- list.storeCategory != '91'
|
|
|
- "
|
|
|
+ ">
|
|
|
+ <van-row gutter="20" v-if="type">
|
|
|
+ <van-col span="12"
|
|
|
><van-button
|
|
|
round
|
|
|
type="info"
|
|
|
style="width: 100%; background-color: #0057ba"
|
|
|
@click="updateStoreAddress"
|
|
|
>提交</van-button
|
|
|
- ></van-col
|
|
|
- >
|
|
|
- <van-col
|
|
|
- span="24"
|
|
|
+ >
|
|
|
+ </van-col>
|
|
|
+ <!-- storeCategory:35、36、37、38、91:金牌店铺只显示提交按钮,不支持无效关店 -->
|
|
|
+ <template
|
|
|
v-if="
|
|
|
- list.storeCategory == '35' ||
|
|
|
- list.storeCategory == '36' ||
|
|
|
- list.storeCategory == '37' ||
|
|
|
- list.storeCategory == '38' ||
|
|
|
- list.storeCategory == '91'
|
|
|
- "
|
|
|
+ list.storeCategory != '35' &&
|
|
|
+ list.storeCategory != '36' &&
|
|
|
+ list.storeCategory != '37' &&
|
|
|
+ list.storeCategory != '38' &&
|
|
|
+ list.storeCategory != '91'
|
|
|
+ ">
|
|
|
+ <!-- 未结案并且未提交的同城店铺,拜访时显示 撤销建店 -->
|
|
|
+ <!-- 未结案并且已提交的同城店铺,拜访时不显示 撤销建店和无效关店 -->
|
|
|
+ <template v-if="list.processApprovalStatus == 0">
|
|
|
+ <van-col span="12" v-if="list.processApprovalStatus == 0">
|
|
|
+ <van-button round type="default" style="width: 100%" @click="valid"
|
|
|
+ >撤销建店</van-button
|
|
|
+ >
|
|
|
+ </van-col>
|
|
|
+ </template>
|
|
|
+ <van-col span="12" v-else>
|
|
|
+ <van-button round type="default" style="width: 100%" @click="valid"
|
|
|
+ >无效关店</van-button
|
|
|
+ >
|
|
|
+ </van-col>
|
|
|
+ </template>
|
|
|
+ </van-row>
|
|
|
+ <!-- 正常查看详情状态 未结案并且未提交状态下可关闭门店、提交审核 -->
|
|
|
+ <van-row
|
|
|
+ gutter="20"
|
|
|
+ v-else-if="this.list.approvalStatus == 0 && list.processApprovalStatus == 0">
|
|
|
+ <van-col span="12">
|
|
|
+ <van-button round type="default" style="width: 100%" @click="valid"
|
|
|
+ >撤销建店</van-button
|
|
|
+ >
|
|
|
+ </van-col>
|
|
|
+ <van-col span="12"
|
|
|
><van-button
|
|
|
round
|
|
|
type="info"
|
|
|
style="width: 100%; background-color: #0057ba"
|
|
|
- @click="updateStoreAddress"
|
|
|
- >提交</van-button
|
|
|
- ></van-col
|
|
|
- >
|
|
|
+ @click="submitApprovalFun"
|
|
|
+ >提交审核</van-button
|
|
|
+ >
|
|
|
+ </van-col>
|
|
|
</van-row>
|
|
|
</div>
|
|
|
+ <!-- <div class="bottomBtn" v-else>
|
|
|
+ <van-button color="red" round @click="valid"></van-button>
|
|
|
+ <van-button type="primary" round @click="submitApprovalFun">提交审核</van-button>
|
|
|
+ </div> -->
|
|
|
<van-dialog
|
|
|
v-model="showDialog"
|
|
|
title="系统提示"
|
|
|
@@ -465,6 +463,8 @@ import {
|
|
|
getpotentialCustomerTypeList,
|
|
|
streetQuery,
|
|
|
getOrderByStoreCode,
|
|
|
+ submitApproval,
|
|
|
+ storeApprovaHistory,
|
|
|
} from '@/api/index';
|
|
|
import mapmarker from '@/components/mapMarker';
|
|
|
import viewUploadImg from '@/components/viewUploadImg';
|
|
|
@@ -546,50 +546,16 @@ export default {
|
|
|
helpPageFlag: false, //提交修改 不通过 点击帮助弹出框
|
|
|
rejectMsgShow: false,
|
|
|
//退回原因
|
|
|
- rejectMsg: [
|
|
|
- {
|
|
|
- approver: '测试111',
|
|
|
- approvalTime: '2020-08-06 15:08:08',
|
|
|
- rejectCause: '测试222',
|
|
|
- },
|
|
|
- {
|
|
|
- approver: '测试111',
|
|
|
- approvalTime: '2020-08-06 15:08:08',
|
|
|
- rejectCause: '测试222',
|
|
|
- },
|
|
|
- {
|
|
|
- approver: '测试111',
|
|
|
- approvalTime: '2020-08-06 15:08:08',
|
|
|
- rejectCause: '测试222',
|
|
|
- },
|
|
|
- {
|
|
|
- approver: '测试111',
|
|
|
- approvalTime: '2020-08-06 15:08:08',
|
|
|
- rejectCause: '测试222',
|
|
|
- },
|
|
|
- ],
|
|
|
+ rejectMsg: [],
|
|
|
activeNames: [],
|
|
|
orderList: [],
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
- // this.detilId = this.$route.query.detilId;
|
|
|
- // this.type = this.$route.query.type;
|
|
|
- // this.getTCFXList();
|
|
|
- // this.getSJSList();
|
|
|
- // this.getQGJZist();
|
|
|
- // this.getCustomerInfoList();
|
|
|
- // this.getManagementModelList();
|
|
|
- // this.getMainRelationList();
|
|
|
- // this.getMainProjectList();
|
|
|
- // this.getCustomerNatureList();
|
|
|
- // this.getpotentialCustomerTypeList();
|
|
|
- },
|
|
|
activated() {
|
|
|
this.showmap = false;
|
|
|
this.img = '';
|
|
|
this.detilId = this.$route.query.detilId;
|
|
|
- this.type = this.$route.query.type;
|
|
|
+ this.type = this.$route.query.type; // type:address 拜访时位置偏差过大,可以修改地址(只能修改地址)
|
|
|
this.getCustomerInfoList();
|
|
|
this.getManagementModelList();
|
|
|
this.getMainRelationList();
|
|
|
@@ -646,27 +612,6 @@ export default {
|
|
|
});
|
|
|
// 清楚选中状态
|
|
|
that.addresssb = -1;
|
|
|
- // jsonp(
|
|
|
- // "https://apis.map.qq.com/ws/place/v1/search?boundary=nearby(" +
|
|
|
- // val.location.lat +
|
|
|
- // "," +
|
|
|
- // val.location.lng +
|
|
|
- // ",500,0)&page_size=10&page_index=1&orderby=_distance&output=jsonp&key=WLCBZ-HRM6L-YOMPV-ME62B-AQOG6-JUBW6"
|
|
|
- // ).then((res) => {
|
|
|
- // console.log(res);
|
|
|
- // that.maplist = res.data;
|
|
|
- // that.marker.setGeometries([]);
|
|
|
- // setTimeout(() => {
|
|
|
- // for (let p = 0; p < res.data.length; p++) {
|
|
|
- // that.marker.updateGeometries([
|
|
|
- // {
|
|
|
- // id: res.data[p].id,
|
|
|
- // position: new TMap.LatLng(res.data[p].location.lat, res.data[p].location.lng),
|
|
|
- // },
|
|
|
- // ]);
|
|
|
- // }
|
|
|
- // });
|
|
|
- // });
|
|
|
});
|
|
|
},
|
|
|
searchFn() {
|
|
|
@@ -745,99 +690,6 @@ export default {
|
|
|
.catch((err) => {
|
|
|
console.log(err);
|
|
|
});
|
|
|
- // let loading1 = this.$toast.loading({
|
|
|
- // duration: 0,
|
|
|
- // message: "定位中...",
|
|
|
- // forbidClick: true,
|
|
|
- // });
|
|
|
- // let url = window.location.href;
|
|
|
- // // let url = encodeURIComponent("https://ssbsfatest.nipponpaint.com.cn/mobile" + window.location.href.split("/mobile")[1]).replaceAll("%3A", ":")
|
|
|
- // let that = this;
|
|
|
- // let qiyeData;
|
|
|
- // const instance = axios.create();
|
|
|
- // instance.defaults.headers.common["userId"] = localStorage.getItem("loginName");
|
|
|
- // instance
|
|
|
- // .get(process.env.VUE_APP_BASE_API + "mobile/wx/ticket", {
|
|
|
- // params: {
|
|
|
- // url: url,
|
|
|
- // },
|
|
|
- // })
|
|
|
- // .then((response) => {
|
|
|
- // if (response.status == 200) {
|
|
|
- // this.cont = 6;
|
|
|
- // var flat = true;
|
|
|
- // var times = setInterval(() => {
|
|
|
- // this.cont--;
|
|
|
- // if (this.cont == "0") {
|
|
|
- // if (flat) {
|
|
|
- // loading1.clear();
|
|
|
- // clearInterval(times);
|
|
|
- // that.$dialog.alert({
|
|
|
- // message: "定位失败,请开启企微定位权限",
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // clearInterval(times);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }, 1000);
|
|
|
- // qiyeData = response.data.data;
|
|
|
- // that.wx.config({
|
|
|
- // beta: true,
|
|
|
- // debug: false,
|
|
|
- // appId: qiyeData.appId,
|
|
|
- // timestamp: qiyeData.timestamp,
|
|
|
- // nonceStr: qiyeData.nonceStr,
|
|
|
- // signature: qiyeData.signature,
|
|
|
- // jsApiList: ["ready", "getLocation"],
|
|
|
- // });
|
|
|
- // that.wx.ready(function () {
|
|
|
- // that.wx.getLocation({
|
|
|
- // type: "gcj02",
|
|
|
- // success: function (res) {
|
|
|
- // flat = false;
|
|
|
- // loading1.clear();
|
|
|
- // var location = that.CJ02BD(res.latitude, res.longitude);
|
|
|
- // that.lat = location.lat;
|
|
|
- // that.lon = location.lon;
|
|
|
- // if (that.list.lon == "") {
|
|
|
- // that.list.lon = location.lon;
|
|
|
- // that.list.lat = res.latitude;
|
|
|
- // }
|
|
|
- // that.pLat = res.latitude;
|
|
|
- // that.pLot = res.longitude;
|
|
|
- // that.myLat = location.lat;
|
|
|
- // that.myLon = location.lon;
|
|
|
- // that.showmap = true;
|
|
|
- // jsonp(
|
|
|
- // "https://apis.map.qq.com/ws/place/v1/search?boundary=nearby(" +
|
|
|
- // res.latitude +
|
|
|
- // "," +
|
|
|
- // res.longitude +
|
|
|
- // ",500,0)&page_size=10&page_index=1&orderby=_distance&output=jsonp&key=WLCBZ-HRM6L-YOMPV-ME62B-AQOG6-JUBW6"
|
|
|
- // ).then((res) => {
|
|
|
- // console.log(res);
|
|
|
- // that.maplist = res.data;
|
|
|
- // setTimeout(() => {
|
|
|
- // that.addVisits1("1");
|
|
|
- // });
|
|
|
- // });
|
|
|
- // },
|
|
|
- // fail: function () {
|
|
|
- // loading1.clear();
|
|
|
- // that.$dialog.alert({
|
|
|
- // title: "系统提示",
|
|
|
- // message: "GPS未开启",
|
|
|
- // });
|
|
|
- // },
|
|
|
- // });
|
|
|
- // });
|
|
|
- // that.wx.error(function (res) {
|
|
|
- // this.$toast.fail("定位失败");
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // this.$toast.fail("接口异常");
|
|
|
- // }
|
|
|
- // });
|
|
|
},
|
|
|
addVisits1(val) {
|
|
|
var that = this;
|
|
|
@@ -1442,8 +1294,13 @@ export default {
|
|
|
.catch((err) => {
|
|
|
console.log(err);
|
|
|
});
|
|
|
- // 获取门店订单
|
|
|
- this.getStoreOrderList(this.list.storeCode);
|
|
|
+ // 同城店铺 未结案时获取
|
|
|
+ if (this.list.approvalStatus == 0) {
|
|
|
+ // 获取门店订单
|
|
|
+ this.getStoreOrderList(this.list.storeCode);
|
|
|
+ // 获取审批历史
|
|
|
+ this.storeApprovaHistoryFun();
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$toast.fail(res.msg);
|
|
|
}
|
|
|
@@ -1452,7 +1309,7 @@ export default {
|
|
|
// 获取门店订单
|
|
|
getStoreOrderList(storeCode) {
|
|
|
getOrderByStoreCode({ storeCode: storeCode }).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
+ if (res.code == 200 && res.data) {
|
|
|
let orderList = res.data.ORDERS || [];
|
|
|
if (orderList.length) {
|
|
|
let orderMap = new Map();
|
|
|
@@ -1480,6 +1337,11 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ storeApprovaHistoryFun() {
|
|
|
+ storeApprovaHistory({ storeId: this.list.storeId }).then((res) => {
|
|
|
+ this.rejectMsg = res.data || [];
|
|
|
+ });
|
|
|
+ },
|
|
|
positionFn() {
|
|
|
let loading1 = this.$toast.loading({
|
|
|
duration: 0,
|
|
|
@@ -1666,6 +1528,27 @@ export default {
|
|
|
examineDetail() {
|
|
|
this.rejectMsgShow = true;
|
|
|
},
|
|
|
+ // 新建同城店铺提交审核
|
|
|
+ submitApprovalFun() {
|
|
|
+ if (!this.orderList.length) {
|
|
|
+ this.$notify({ type: 'warning', message: '门店没有订单,无法提交审批' });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.list.imgSed == '') {
|
|
|
+ this.$notify({ type: 'warning', message: '请上传门店陈列照' });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.toastLoading(0, '正在提交...', true);
|
|
|
+ submitApproval({
|
|
|
+ storeId: this.list.storeId, // 店铺id
|
|
|
+ }).then((res) => {
|
|
|
+ this.toastLoading().clear();
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$toast.success('提交成功');
|
|
|
+ this.rejectReasonShow = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|