|
|
@@ -739,6 +739,15 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="mask" v-if="progressFlag">
|
|
|
+ <el-progress
|
|
|
+ type="circle"
|
|
|
+ :percentage="percentage"
|
|
|
+ :show-text="true"
|
|
|
+ :width="110"
|
|
|
+ :format="format"></el-progress>
|
|
|
+ <!-- <div class="progressClose" @click="progressClose">取消</div> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -920,6 +929,9 @@ export default {
|
|
|
otherCompetitor: '', //主营竞品品牌-其他
|
|
|
storeCompetitorList: [],
|
|
|
activatedStoreCompetitor: [],
|
|
|
+ progressFlag: false,
|
|
|
+ percentage: 0,
|
|
|
+ timeFlag: null,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -1986,17 +1998,26 @@ 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();
|
|
|
- });
|
|
|
+ if (
|
|
|
+ 126565 == this.fromValue.storeCategory &&
|
|
|
+ this.fromValue.orgName &&
|
|
|
+ this.fromValue.orgName.indexOf('BMD') != -1
|
|
|
+ ) {
|
|
|
+ this.progress();
|
|
|
+ this.addStoreFun('BMD');
|
|
|
+ } else {
|
|
|
+ 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 {
|
|
|
@@ -2004,7 +2025,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 添加门店
|
|
|
- addStoreFun() {
|
|
|
+ addStoreFun(BMDtype) {
|
|
|
addStore(this.fromValue).then((res) => {
|
|
|
this.toastLoading().clear();
|
|
|
if (res.code == 200) {
|
|
|
@@ -2086,6 +2107,7 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
+ this.resetProgress();
|
|
|
this.$dialog.alert({
|
|
|
title: '系统提示',
|
|
|
message: res.msg,
|
|
|
@@ -2199,6 +2221,25 @@ 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);
|
|
|
+ }, 1000);
|
|
|
+ },
|
|
|
+ format(percentage) {
|
|
|
+ return `${percentage} %\n图像识别中`;
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
@@ -2337,5 +2378,32 @@ export default {
|
|
|
width: 50px;
|
|
|
}
|
|
|
}
|
|
|
+ .mask {
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ z-index: 99999999;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .progressClose {
|
|
|
+ width: 70px;
|
|
|
+ text-align: center;
|
|
|
+ background: #67c23a;
|
|
|
+ color: #fff;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
+ border-radius: 5px;
|
|
|
+ margin-top: 5px;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|