|
|
@@ -2,18 +2,27 @@
|
|
|
<div class="storeAdd">
|
|
|
<div class="navBarTOP">
|
|
|
<!-- 新建同城分销店必须要下单 -->
|
|
|
- <van-nav-bar
|
|
|
- class="navBar"
|
|
|
- title="新增信息"
|
|
|
- left-arrow
|
|
|
- @click-left="onClickLeft"
|
|
|
- :right-text="
|
|
|
- verifyStoreType(fromValue.storeCategory) &&
|
|
|
- verifyStoreType(fromValue.storeCategory).type == 'fxd'
|
|
|
- ? '去下单'
|
|
|
- : '保存'
|
|
|
- "
|
|
|
- @click-right="onSubmit" />
|
|
|
+ <van-nav-bar class="navBar" title="新增信息" left-arrow @click-left="onClickLeft">
|
|
|
+ <template #right>
|
|
|
+ <span
|
|
|
+ v-if="
|
|
|
+ verifyStoreType(fromValue.storeCategory) &&
|
|
|
+ verifyStoreType(fromValue.storeCategory).type == 'fxd'
|
|
|
+ ">
|
|
|
+ <span
|
|
|
+ @click="onSubmit"
|
|
|
+ v-if="
|
|
|
+ fromValue.storeCategory == '126565' &&
|
|
|
+ fromValue.orgName &&
|
|
|
+ fromValue.orgName.indexOf('BMD') != -1
|
|
|
+ "
|
|
|
+ >提交
|
|
|
+ </span>
|
|
|
+ <span v-else @click="onSubmit">去下单</span>
|
|
|
+ </span>
|
|
|
+ <span v-else @click="onSubmit">保存</span>
|
|
|
+ </template>
|
|
|
+ </van-nav-bar>
|
|
|
</div>
|
|
|
<!-- 主体内容-->
|
|
|
<div style="margin-top: 44px">
|
|
|
@@ -312,7 +321,7 @@
|
|
|
<deleteImgView :imgs="fromValue.carShopImgList"></deleteImgView>
|
|
|
</div>
|
|
|
<div v-if="fromValue.storeCategory != 'C917'">
|
|
|
- <div style="padding: 20px; height: 228px; background-color: #f1f1f1" v-if="imgShow">
|
|
|
+ <div style="padding: 20px; height: 228px; background-color: #f1f1f1">
|
|
|
<van-row gutter="20">
|
|
|
<van-col span="12">
|
|
|
<div v-if="!storeTypePOP">
|
|
|
@@ -335,28 +344,74 @@
|
|
|
ref="uploadImgVStore"></upload-img>
|
|
|
</div>
|
|
|
</van-col>
|
|
|
- <!-- 新建同城分销店不显示陈列照 -->
|
|
|
- <template
|
|
|
- v-if="
|
|
|
- verifyStoreType(fromValue.storeCategory) &&
|
|
|
- !verifyStoreType(fromValue.storeCategory).type == 'fxd'
|
|
|
- ">
|
|
|
- <van-col span="12" v-if="fromValue.ifJzStoreType != 1">
|
|
|
- <div v-if="storeTypePOP">
|
|
|
- <upload-img
|
|
|
- :uploadid="uploadid2"
|
|
|
- :imgArr="fromValue.imgSed"
|
|
|
- @newimgarr="newimgarr1"
|
|
|
- :type="2"
|
|
|
- :imgText="
|
|
|
- fromValue.ifJzStoreType != 1 ? '陈列照' : '立邦展厅照片'
|
|
|
- "></upload-img>
|
|
|
- </div>
|
|
|
- </van-col>
|
|
|
+ <template v-if="verifyStoreType(fromValue.storeCategory)">
|
|
|
+ <!-- 新建同城分销店不显示陈列照 -->
|
|
|
+ <template v-if="!verifyStoreType(fromValue.storeCategory).type == 'fxd'">
|
|
|
+ <van-col span="12" v-if="fromValue.ifJzStoreType != 1">
|
|
|
+ <div v-if="storeTypePOP">
|
|
|
+ <upload-img
|
|
|
+ :uploadid="uploadid2"
|
|
|
+ :imgArr="fromValue.imgSed"
|
|
|
+ @newimgarr="newimgarr1"
|
|
|
+ :type="2"
|
|
|
+ :imgText="
|
|
|
+ fromValue.ifJzStoreType != 1 ? '陈列照' : '立邦展厅照片'
|
|
|
+ "></upload-img>
|
|
|
+ </div>
|
|
|
+ </van-col>
|
|
|
+ </template>
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ fromValue.storeCategory == '126565' &&
|
|
|
+ fromValue.orgName &&
|
|
|
+ fromValue.orgName.indexOf('BMD') != -1
|
|
|
+ ">
|
|
|
+ <van-col span="12">
|
|
|
+ <div>
|
|
|
+ <upload-img
|
|
|
+ :uploadid="uploadid2"
|
|
|
+ imgArr=""
|
|
|
+ @newimgarr="newimgarr1"
|
|
|
+ imgText="陈列照"
|
|
|
+ :type="2"
|
|
|
+ :displayPhoto="'1'"
|
|
|
+ :displayImg="displayImg"
|
|
|
+ :count="1"></upload-img>
|
|
|
+ </div>
|
|
|
+ </van-col>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</van-row>
|
|
|
+ <!-- 专业五金店 -->
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ fromValue.storeCategory == '126565' &&
|
|
|
+ fromValue.orgName &&
|
|
|
+ fromValue.orgName.indexOf('BMD') != -1
|
|
|
+ "
|
|
|
+ class="displayImg">
|
|
|
+ <template v-if="displayImg.length">
|
|
|
+ <div class="displayImgBox" v-for="(urls, index) in displayImg" :key="index">
|
|
|
+ <van-icon name="close" size="16" @click="deleteImg(index)" />
|
|
|
+ <img :src="urls" width="99%" height="99%" @click="previewsImg(index)" />
|
|
|
+ <div class="title">陈列照</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- <div class="displayImgBox">
|
|
|
+ <div>
|
|
|
+ <upload-img
|
|
|
+ :uploadid="uploadid2"
|
|
|
+ imgArr=""
|
|
|
+ @newimgarr="newimgarr1"
|
|
|
+ imgText="陈列照"
|
|
|
+ :type="2"
|
|
|
+ :displayPhoto="'1'"
|
|
|
+ :count="1"></upload-img>
|
|
|
+ </div>
|
|
|
+ </div> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div style="padding: 20px; height: 228px; background-color: #f1f1f1" v-if="!imgShow">
|
|
|
+ <!-- <div style="padding: 20px; height: 228px; background-color: #f1f1f1" v-if="!imgShow">
|
|
|
<van-row gutter="20">
|
|
|
<van-col span="12">
|
|
|
<div v-if="!storeTypePOP">
|
|
|
@@ -376,27 +431,43 @@
|
|
|
:type="1"></uploadImgView>
|
|
|
</div>
|
|
|
</van-col>
|
|
|
- <!-- 新建同城A、B店不显示陈列照 -->
|
|
|
- <template
|
|
|
- v-if="
|
|
|
- verifyStoreType(fromValue.storeCategory) &&
|
|
|
- !verifyStoreType(fromValue.storeCategory).type == 'fxd'
|
|
|
- ">
|
|
|
- <van-col span="12" v-if="fromValue.ifJzStoreType != 1">
|
|
|
- <div v-if="storeTypePOP">
|
|
|
- <uploadImgView
|
|
|
- :uploadid="uploadid2"
|
|
|
- :imgArr="fromValue.imgSed"
|
|
|
- @newimgarr="newimgarr1"
|
|
|
- :type="2"
|
|
|
- :imgText="
|
|
|
- fromValue.ifJzStoreType != 1 ? '陈列照' : '立邦展厅照片'
|
|
|
- "></uploadImgView>
|
|
|
- </div>
|
|
|
- </van-col>
|
|
|
+ <template v-if="verifyStoreType(fromValue.storeCategory)">
|
|
|
+ <template v-if="!verifyStoreType(fromValue.storeCategory).type == 'fxd'">
|
|
|
+ <van-col span="12" v-if="fromValue.ifJzStoreType != 1">
|
|
|
+ <div v-if="storeTypePOP">
|
|
|
+ <uploadImgView
|
|
|
+ :uploadid="uploadid2"
|
|
|
+ :imgArr="fromValue.imgSed"
|
|
|
+ @newimgarr="newimgarr1"
|
|
|
+ :type="2"
|
|
|
+ :imgText="
|
|
|
+ fromValue.ifJzStoreType != 1 ? '陈列照' : '立邦展厅照片'
|
|
|
+ "></uploadImgView>
|
|
|
+ </div>
|
|
|
+ </van-col>
|
|
|
+ </template>
|
|
|
+ <template
|
|
|
+ v-else-if="
|
|
|
+ fromValue.storeCategory == '126565' &&
|
|
|
+ fromValue.orgName &&
|
|
|
+ fromValue.orgName.indexOf('BMD') != -1
|
|
|
+ ">
|
|
|
+ <van-col span="12">
|
|
|
+ <div v-if="storeTypePOP">
|
|
|
+ <uploadImgView
|
|
|
+ :uploadid="uploadid2"
|
|
|
+ :imgArr="fromValue.imgSed"
|
|
|
+ @newimgarr="newimgarr1"
|
|
|
+ :type="2"
|
|
|
+ displayPhoto="'1'"
|
|
|
+ :imgText="'陈列照'">
|
|
|
+ </uploadImgView>
|
|
|
+ </div>
|
|
|
+ </van-col>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</van-row>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</van-tab>
|
|
|
<van-tab title="属性信息" name="Planpic">
|
|
|
@@ -713,6 +784,17 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="mask" v-if="progressFlag">
|
|
|
+ <div class="progress">
|
|
|
+ <el-progress
|
|
|
+ type="circle"
|
|
|
+ :percentage="percentage"
|
|
|
+ :show-text="true"
|
|
|
+ :width="110"
|
|
|
+ :format="format"></el-progress>
|
|
|
+ <!-- <div class="progressClose" @click="progressClose">取消</div> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -736,6 +818,7 @@ import {
|
|
|
getCustomerNatureList,
|
|
|
getpotentialCustomerTypeList,
|
|
|
getDictOption,
|
|
|
+ recognizeDisplayPhoto,
|
|
|
} from '@/api/index';
|
|
|
import uploadImg from '@/components/uploadImgVStore';
|
|
|
import uploadImgc from '@/components/uploadImgVStorec';
|
|
|
@@ -750,9 +833,16 @@ import txmapimg3 from '@/assets/marker_blue.png';
|
|
|
import { getPosition, getTicketFun } from '@/utils/TXApiFun';
|
|
|
import { listChainsByCategory, checkStoreBeforeAdd } from '@/api/store';
|
|
|
import store from '@/store';
|
|
|
+import { mapState } from 'vuex';
|
|
|
+import { ImagePreview } from 'vant';
|
|
|
export default {
|
|
|
name: 'storeAdd',
|
|
|
components: { uploadImg, uploadImgView, mapmarker, uploadImgc, deleteImgView },
|
|
|
+ computed: {
|
|
|
+ ...mapState({
|
|
|
+ userInfo: (state) => state.user.userInfo,
|
|
|
+ }),
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
mapsearchlist: [],
|
|
|
@@ -888,6 +978,10 @@ export default {
|
|
|
otherCompetitor: '', //主营竞品品牌-其他
|
|
|
storeCompetitorList: [],
|
|
|
activatedStoreCompetitor: [],
|
|
|
+ progressFlag: false,
|
|
|
+ percentage: 0,
|
|
|
+ timeFlag: null,
|
|
|
+ displayImg: [],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -969,6 +1063,11 @@ export default {
|
|
|
storeCompetitorList: [],
|
|
|
otherCompetitor: '', //主营竞品品牌-其他
|
|
|
};
|
|
|
+ this.displayImg = [
|
|
|
+ // 'https://cdn-svs-test.nipponpaint.com.cn/17790740128352026-05-18%E7%95%A5%E7%95%A5%E7%95%A5.jpg?Expires=2094693212&OSSAccessKeyId=LTAI5tG1DTJFA16BHkzHVxjz&Signature=1O13rUNy5FHiqTxcuJTq7RnPek4%3D',
|
|
|
+ // 'https://cdn-svs-test.nipponpaint.com.cn/17790740128352026-05-18%E7%95%A5%E7%95%A5%E7%95%A5.jpg?Expires=2094693212&OSSAccessKeyId=LTAI5tG1DTJFA16BHkzHVxjz&Signature=1O13rUNy5FHiqTxcuJTq7RnPek4%3D',
|
|
|
+ // 'https://cdn-svs-test.nipponpaint.com.cn/17790740128352026-05-18%E7%95%A5%E7%95%A5%E7%95%A5.jpg?Expires=2094693212&OSSAccessKeyId=LTAI5tG1DTJFA16BHkzHVxjz&Signature=1O13rUNy5FHiqTxcuJTq7RnPek4%3D',
|
|
|
+ ];
|
|
|
setTimeout(() => {
|
|
|
// this.getLocation()
|
|
|
});
|
|
|
@@ -996,6 +1095,7 @@ export default {
|
|
|
});
|
|
|
// 拍照次数重置
|
|
|
store.dispatch('setShotsNum', 0);
|
|
|
+ this.resetProgress();
|
|
|
},
|
|
|
methods: {
|
|
|
addressFns(val) {
|
|
|
@@ -1231,6 +1331,10 @@ export default {
|
|
|
this.fromValue.chainName = '';
|
|
|
this.getChainsByDeptId(value.deptId, this.fromValue.ifJzStoreType);
|
|
|
this.showPickerDept = false;
|
|
|
+ // 非BMD门店,清空陈列照图片展示
|
|
|
+ if (value.text.indexOf('BMD') == -1) {
|
|
|
+ this.displayImg = [];
|
|
|
+ }
|
|
|
},
|
|
|
setStoreNameFn() {
|
|
|
if (this.fromValue.storeName.trim() == '') {
|
|
|
@@ -1310,7 +1414,16 @@ export default {
|
|
|
if (val.type == '1') {
|
|
|
this.fromValue.img = val.fileUrl;
|
|
|
} else if (val.type == '2') {
|
|
|
- this.fromValue.imgSed = val.fileUrl;
|
|
|
+ //
|
|
|
+ if (
|
|
|
+ this.fromValue.storeCategory == '126565' &&
|
|
|
+ this.fromValue.orgName &&
|
|
|
+ this.fromValue.orgName.indexOf('BMD') != -1
|
|
|
+ ) {
|
|
|
+ this.displayImg.push(val.fileUrl);
|
|
|
+ } else {
|
|
|
+ this.fromValue.imgSed = val.fileUrl;
|
|
|
+ }
|
|
|
} else {
|
|
|
this.fromValue.carShopImgList.push(val.fileUrl);
|
|
|
}
|
|
|
@@ -1467,7 +1580,13 @@ export default {
|
|
|
this.fromValue.lon = TXisBD.lon;
|
|
|
this.location.lat1 = resData.latitude;
|
|
|
this.location.lon1 = resData.longitude;
|
|
|
+ //**********************************
|
|
|
+ // **********************************
|
|
|
+ // ***********************************
|
|
|
+ // ***************************************
|
|
|
+ // ****************************** */
|
|
|
this.addVisits();
|
|
|
+ // this.beforeAddFn();
|
|
|
})
|
|
|
.catch((error) => {
|
|
|
this.beforeAddFn();
|
|
|
@@ -1663,7 +1782,10 @@ export default {
|
|
|
this.fromValue.tcfxCode = '';
|
|
|
this.dictTypeFormShow = false;
|
|
|
}
|
|
|
-
|
|
|
+ // 非专业五金店
|
|
|
+ if (value.dictValue !== '126565') {
|
|
|
+ this.displayImg = [];
|
|
|
+ }
|
|
|
if (value.dictValue == 'C917') {
|
|
|
this.GZAttributeFormShow = true;
|
|
|
this.dictTypeSJSFormShow = false;
|
|
|
@@ -1759,6 +1881,7 @@ export default {
|
|
|
this.moreTypeShow = false;
|
|
|
},
|
|
|
onSubmit() {
|
|
|
+ this.fromValue.tempStoreCode = null;
|
|
|
var that = this;
|
|
|
var arrList = [];
|
|
|
for (var n2 = 0; n2 < this.sfaOrderProducts.length; n2++) {
|
|
|
@@ -1900,6 +2023,18 @@ export default {
|
|
|
this.fromValue.storeCompetitorList = JSON.parse(
|
|
|
JSON.stringify(this.activatedStoreCompetitor),
|
|
|
);
|
|
|
+ // BMD-专业五金店-陈列照必须上传
|
|
|
+ if (
|
|
|
+ this.fromValue.storeCategory == '126565' &&
|
|
|
+ this.fromValue.orgName &&
|
|
|
+ this.fromValue.orgName.indexOf('BMD') != -1
|
|
|
+ ) {
|
|
|
+ this.fromValue.imgSed = this.displayImg.join(',');
|
|
|
+ if (!this.fromValue.imgSed && this.fromValue.imgSed.length == 0) {
|
|
|
+ this.$toast('陈列照未上传');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
// 非同城分销店 经销商必填校验
|
|
|
if (
|
|
|
@@ -1942,113 +2077,146 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
} else if (res.data.type == 2 || res.data.type == 1) {
|
|
|
- this.$dialog
|
|
|
- .confirm({
|
|
|
- title: '系统提示',
|
|
|
- message: `该门店类型为<span style="color:red">同城分销店</span>,<br/>首笔订单最低金额:<span style="color:red">1000元</span>`,
|
|
|
- confirmButtonText: '去下单',
|
|
|
- cancelButtonText: '修改门店信息',
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.toastLoading(0, '上传中...', true);
|
|
|
- this.addStoreFun();
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.addStoreFun();
|
|
|
- }
|
|
|
- },
|
|
|
- // 添加门店
|
|
|
- addStoreFun() {
|
|
|
- addStore(this.fromValue).then((res) => {
|
|
|
- this.toastLoading().clear();
|
|
|
- if (res.code == 200) {
|
|
|
- if (res.data.serverCode) {
|
|
|
- this.fromValue.storeCode = res.data.sfaStore.storeCode;
|
|
|
- this.fromValue.storeId = res.data.sfaStore.storeId;
|
|
|
if (
|
|
|
- res.data.orderUrl != null &&
|
|
|
- (res.data.orderUrl != '') & (res.data.orderUrl != undefined)
|
|
|
+ 126565 == this.fromValue.storeCategory &&
|
|
|
+ this.fromValue.orgName &&
|
|
|
+ this.fromValue.orgName.indexOf('BMD') != -1
|
|
|
) {
|
|
|
- window.location.replace(res.data.orderUrl);
|
|
|
+ this.progress();
|
|
|
+ recognizeDisplayPhoto({ imgSed: this.fromValue.imgSed })
|
|
|
+ .then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.fromValue.tempStoreCode = response.data;
|
|
|
+ this.addStoreFun();
|
|
|
+ } else {
|
|
|
+ this.resetProgress();
|
|
|
+ this.$dialog.alert({
|
|
|
+ title: '系统提示',
|
|
|
+ message: response.msg,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.resetProgress();
|
|
|
+ this.$dialog.alert({
|
|
|
+ title: '系统提示',
|
|
|
+ message: response.msg,
|
|
|
+ });
|
|
|
+ });
|
|
|
} else {
|
|
|
this.$dialog
|
|
|
.confirm({
|
|
|
title: '系统提示',
|
|
|
- message: '建店成功,是否立即拜访?',
|
|
|
- confirmButtonText: '立即拜访',
|
|
|
- cancelButtonText: '返回上一页',
|
|
|
+ message: `该门店类型为<span style="color:red">同城分销店</span>,<br/>首笔订单最低金额:<span style="color:red">1000元</span>`,
|
|
|
+ confirmButtonText: '去下单',
|
|
|
+ cancelButtonText: '修改门店信息',
|
|
|
})
|
|
|
.then(() => {
|
|
|
- checkVisit({ storeId: res.data.sfaStore.storeId }).then((response) => {
|
|
|
- localStorage.setItem('startTime', new Date());
|
|
|
- localStorage.setItem('ORGName', this.fromValue.deptName);
|
|
|
- localStorage.setItem('chainNameR', this.fromValue.storeName);
|
|
|
- if (response.code == 200) {
|
|
|
+ this.toastLoading(0, '上传中...', true);
|
|
|
+ this.addStoreFun();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.addStoreFun();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 添加门店
|
|
|
+ addStoreFun() {
|
|
|
+ addStore(this.fromValue)
|
|
|
+ .then((res) => {
|
|
|
+ this.toastLoading().clear();
|
|
|
+ this.resetProgress();
|
|
|
+ if (res.code == 200) {
|
|
|
+ if (res.data.serverCode) {
|
|
|
+ this.fromValue.storeCode = res.data.sfaStore.storeCode;
|
|
|
+ this.fromValue.storeId = res.data.sfaStore.storeId;
|
|
|
+ if (
|
|
|
+ res.data.orderUrl != null &&
|
|
|
+ (res.data.orderUrl != '') & (res.data.orderUrl != undefined)
|
|
|
+ ) {
|
|
|
+ window.location.replace(res.data.orderUrl);
|
|
|
+ } else {
|
|
|
+ this.$dialog
|
|
|
+ .confirm({
|
|
|
+ title: '系统提示',
|
|
|
+ message: '建店成功,是否立即拜访?',
|
|
|
+ confirmButtonText: '立即拜访',
|
|
|
+ cancelButtonText: '返回上一页',
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ checkVisit({ storeId: res.data.sfaStore.storeId }).then((response) => {
|
|
|
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 +
|
|
|
- this.locationOrigin +
|
|
|
- '/suishenbangOutstoreVisit?PointSum=0&visitModel=1&tabVal=1&hisTime=null&pageType=out&visitId=null&rdId=null&storeId=' +
|
|
|
- res.data.sfaStore.storeId +
|
|
|
- '&lat=' +
|
|
|
- this.fromValue.lat +
|
|
|
- '&lon=' +
|
|
|
- this.fromValue.lon +
|
|
|
- '&addressLine=' +
|
|
|
- this.fromValue.addressLine +
|
|
|
- '&storeCategory=' +
|
|
|
- res.data.sfaStore.storeCategory +
|
|
|
- '&storeName=' +
|
|
|
- this.fromValue.storeName +
|
|
|
- '&contactName=' +
|
|
|
- this.fromValue.contactName +
|
|
|
- '&storeCode=' +
|
|
|
- res.data.sfaStore.storeCode +
|
|
|
- '&latNew=' +
|
|
|
- this.fromValue.lat +
|
|
|
- '&lonNew=' +
|
|
|
- this.fromValue.lon +
|
|
|
- '&marklat=' +
|
|
|
- this.mlan +
|
|
|
- '&marklon=' +
|
|
|
- this.mlon,
|
|
|
- );
|
|
|
- } else {
|
|
|
- this.$dialog
|
|
|
- .alert({
|
|
|
- title: '系统提示',
|
|
|
- message: response.msg,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- this.$router.go(-1);
|
|
|
- });
|
|
|
- }
|
|
|
+ localStorage.setItem('ORGName', this.fromValue.deptName);
|
|
|
+ localStorage.setItem('chainNameR', this.fromValue.storeName);
|
|
|
+ if (response.code == 200) {
|
|
|
+ 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 +
|
|
|
+ this.locationOrigin +
|
|
|
+ '/suishenbangOutstoreVisit?PointSum=0&visitModel=1&tabVal=1&hisTime=null&pageType=out&visitId=null&rdId=null&storeId=' +
|
|
|
+ res.data.sfaStore.storeId +
|
|
|
+ '&lat=' +
|
|
|
+ this.fromValue.lat +
|
|
|
+ '&lon=' +
|
|
|
+ this.fromValue.lon +
|
|
|
+ '&addressLine=' +
|
|
|
+ this.fromValue.addressLine +
|
|
|
+ '&storeCategory=' +
|
|
|
+ res.data.sfaStore.storeCategory +
|
|
|
+ '&storeName=' +
|
|
|
+ this.fromValue.storeName +
|
|
|
+ '&contactName=' +
|
|
|
+ this.fromValue.contactName +
|
|
|
+ '&storeCode=' +
|
|
|
+ res.data.sfaStore.storeCode +
|
|
|
+ '&latNew=' +
|
|
|
+ this.fromValue.lat +
|
|
|
+ '&lonNew=' +
|
|
|
+ this.fromValue.lon +
|
|
|
+ '&marklat=' +
|
|
|
+ this.mlan +
|
|
|
+ '&marklon=' +
|
|
|
+ this.mlon,
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ this.$dialog
|
|
|
+ .alert({
|
|
|
+ title: '系统提示',
|
|
|
+ message: response.msg,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.$router.go(-1);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$router.go(-1);
|
|
|
});
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.$router.go(-1);
|
|
|
- });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.fromValue.storeCode = res.data.sfaStore.storeCode;
|
|
|
+ this.fromValue.storeId = res.data.sfaStore.storeId;
|
|
|
+ this.$dialog.alert({
|
|
|
+ title: '系统提示',
|
|
|
+ message: res.data.serverMsg,
|
|
|
+ });
|
|
|
}
|
|
|
} else {
|
|
|
- this.fromValue.storeCode = res.data.sfaStore.storeCode;
|
|
|
- this.fromValue.storeId = res.data.sfaStore.storeId;
|
|
|
this.$dialog.alert({
|
|
|
title: '系统提示',
|
|
|
- message: res.data.serverMsg,
|
|
|
+ message: res.msg,
|
|
|
+ messageAlign: 'left',
|
|
|
});
|
|
|
}
|
|
|
- } else {
|
|
|
- this.$dialog.alert({
|
|
|
- title: '系统提示',
|
|
|
- message: res.msg,
|
|
|
- messageAlign: 'left',
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.resetProgress();
|
|
|
+ });
|
|
|
},
|
|
|
onClickLeft() {
|
|
|
this.$router.go(-1);
|
|
|
@@ -2155,6 +2323,40 @@ export default {
|
|
|
this.sfaStoreChainsContactList = treeSelectArr;
|
|
|
this.showPickerChainsList = false;
|
|
|
},
|
|
|
+ // 重置loaidng状态
|
|
|
+ resetProgress() {
|
|
|
+ this.percentage = 100;
|
|
|
+ clearInterval(this.timeFlag);
|
|
|
+ this.progressFlag = false;
|
|
|
+ this.percentage = 0;
|
|
|
+ },
|
|
|
+ progress() {
|
|
|
+ // 后端接口20000ms后失效,每1000m progress加10,到90停止;
|
|
|
+ this.progressFlag = true;
|
|
|
+ this.percentage = 10;
|
|
|
+ this.timeFlag = setInterval(() => {
|
|
|
+ this.percentage = this.percentage + 10;
|
|
|
+ if (this.percentage == 90) clearInterval(this.timeFlag);
|
|
|
+ }, 1500);
|
|
|
+ },
|
|
|
+ format(percentage) {
|
|
|
+ return `${percentage} %\n图像识别中`;
|
|
|
+ },
|
|
|
+ // 陈列照 图片删除
|
|
|
+ deleteImg(index) {
|
|
|
+ this.displayImg.splice(index, 1);
|
|
|
+ },
|
|
|
+ // 预览
|
|
|
+ previewsImg(index) {
|
|
|
+ var arrimg = [];
|
|
|
+ for (var imgi = 0; imgi < this.displayImg.length; imgi++) {
|
|
|
+ arrimg.push(this.displayImg[imgi]);
|
|
|
+ }
|
|
|
+ ImagePreview({
|
|
|
+ images: arrimg,
|
|
|
+ startPosition: index,
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
@@ -2293,5 +2495,70 @@ export default {
|
|
|
width: 50px;
|
|
|
}
|
|
|
}
|
|
|
+ .mask {
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background: rgba(0, 0, 0, 0.5);
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ z-index: 99999999;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .progress {
|
|
|
+ width: 90%;
|
|
|
+ height: 140px;
|
|
|
+ background: #fff;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ .el-progress__text {
|
|
|
+ white-space: break-spaces;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .progressClose {
|
|
|
+ width: 70px;
|
|
|
+ text-align: center;
|
|
|
+ background: #67c23a;
|
|
|
+ color: #fff;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
+ border-radius: 5px;
|
|
|
+ margin-top: 5px;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .displayImg {
|
|
|
+ overflow: hidden;
|
|
|
+ padding-bottom: 10px;
|
|
|
+ .displayImgBox {
|
|
|
+ position: relative;
|
|
|
+ width: 48%;
|
|
|
+ padding: 20px 0;
|
|
|
+ height: 210px;
|
|
|
+ float: left;
|
|
|
+ margin-right: 4%;
|
|
|
+ .title {
|
|
|
+ text-align: center;
|
|
|
+ padding: 5px 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .displayImgBox:nth-child(even) {
|
|
|
+ margin-right: 0;
|
|
|
+ }
|
|
|
+ i {
|
|
|
+ position: absolute;
|
|
|
+ right: 4px;
|
|
|
+ color: white;
|
|
|
+ background: red;
|
|
|
+ overflow: hidden;
|
|
|
+ border-radius: 50%;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|