|
|
@@ -83,7 +83,17 @@
|
|
|
</block>
|
|
|
</div>
|
|
|
<NotLogin></NotLogin>
|
|
|
- <ShopSelect ref="shopSelectComponent" class="bar" :isShowTit="false" top="0upx" @selectShopFn="selectShopFn" />
|
|
|
+
|
|
|
+ <view class="shop-select-wrap">
|
|
|
+ <view v-if="shopSelectOpen" class="pull-custom-tip">从其他门店拉取客户</view>
|
|
|
+ <ShopSelect
|
|
|
+ ref="shopSelectComponent"
|
|
|
+ class="bar"
|
|
|
+ :isShowTit="false"
|
|
|
+ top="0upx"
|
|
|
+ @selectShopFn="selectShopFn"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
|
|
|
<view v-if="showFilterPanel" class="filter-overlay" @click="closeFilterPanel">
|
|
|
<view class="filter-panel" @click.stop>
|
|
|
@@ -274,7 +284,8 @@ export default {
|
|
|
seekVal: "",
|
|
|
searchText: "",
|
|
|
lastSearchText: "",
|
|
|
- searchTimer: null
|
|
|
+ searchTimer: null,
|
|
|
+ shopSelectOpen: false
|
|
|
};
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
@@ -313,6 +324,7 @@ export default {
|
|
|
clearTimeout(this.searchTimer);
|
|
|
this.searchTimer = null;
|
|
|
}
|
|
|
+ this.clearShopSelectWatch();
|
|
|
},
|
|
|
onHide() {
|
|
|
// 清理搜索定时器
|
|
|
@@ -392,9 +404,39 @@ export default {
|
|
|
this.$util.pageTo({url: "/admin/custom/set"})
|
|
|
},
|
|
|
showAllShop () {
|
|
|
- this.$refs.shopSelectComponent.dropdownShow = true;
|
|
|
+ const comp = this.$refs.shopSelectComponent;
|
|
|
+ if (!comp) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ comp.dropdownShow = true;
|
|
|
+ this.watchShopSelectOpen();
|
|
|
+ },
|
|
|
+ watchShopSelectOpen () {
|
|
|
+ this.clearShopSelectWatch();
|
|
|
+ const comp = this.$refs.shopSelectComponent;
|
|
|
+ if (!comp) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.shopSelectOpen = comp.dropdownShow;
|
|
|
+ this._shopSelectWatch = this.$watch(
|
|
|
+ () => comp.dropdownShow,
|
|
|
+ (val) => {
|
|
|
+ this.shopSelectOpen = val;
|
|
|
+ if (!val) {
|
|
|
+ this.clearShopSelectWatch();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ clearShopSelectWatch () {
|
|
|
+ if (this._shopSelectWatch) {
|
|
|
+ this._shopSelectWatch();
|
|
|
+ this._shopSelectWatch = null;
|
|
|
+ }
|
|
|
+ this.shopSelectOpen = false;
|
|
|
},
|
|
|
selectShopFn(val){
|
|
|
+ this.clearShopSelectWatch();
|
|
|
let fromShopId = val.id
|
|
|
uni.showLoading({mask:true})
|
|
|
copyCumtomer({fromShopId}).then(res => {
|
|
|
@@ -785,4 +827,19 @@ export default {
|
|
|
color: #fff;
|
|
|
background: #3385ff;
|
|
|
}
|
|
|
+.shop-select-wrap {
|
|
|
+ .pull-custom-tip {
|
|
|
+ position: fixed;
|
|
|
+ left: 30upx;
|
|
|
+ right: 30upx;
|
|
|
+ top: 48upx;
|
|
|
+ z-index: 30;
|
|
|
+ padding-bottom: 20upx;
|
|
|
+ font-size: 28upx;
|
|
|
+ line-height: 40upx;
|
|
|
+ color: #0f0f0f;
|
|
|
+ font-weight: bold;
|
|
|
+ background: #ffffff;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|