|
@@ -21,11 +21,11 @@
|
|
|
<text>{{ searchTypeLabel }}</text>
|
|
<text>{{ searchTypeLabel }}</text>
|
|
|
<zui-svg-icon class="search-type-icon" icon="general-switch" :width="14" :height="14" color="#fff" />
|
|
<zui-svg-icon class="search-type-icon" icon="general-switch" :width="14" :height="14" color="#fff" />
|
|
|
</button>
|
|
</button>
|
|
|
- <view class="search-box has-search-btn">
|
|
|
|
|
|
|
+ <view class="search-box">
|
|
|
<text class="search-icon">⌕</text>
|
|
<text class="search-icon">⌕</text>
|
|
|
<input v-model="searchText" class="search-input" placeholder="请输入" confirm-type="search" @confirm="searchGoods" />
|
|
<input v-model="searchText" class="search-input" placeholder="请输入" confirm-type="search" @confirm="searchGoods" />
|
|
|
- <button class="admin-button-com middle blue search-btn" @click="searchGoods">搜索</button>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <button class="admin-button-com middle blue add-btn" @click="addCurrent">添花束</button>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="filter-row">
|
|
<view class="filter-row">
|
|
@@ -108,26 +108,15 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view v-else class="panel">
|
|
|
|
|
- <!-- 已开通批发店:进入花材页仅展示引导,不加载零售端花材列表 -->
|
|
|
|
|
- <view v-if="pfItemLocked" class="pf-item-tip-panel">
|
|
|
|
|
- <view class="pf-item-tip-card">
|
|
|
|
|
- <text class="pf-item-tip-text">请到批发端修改花材</text>
|
|
|
|
|
- <view class="pf-item-tip-actions">
|
|
|
|
|
- <button class="admin-button-com middle default pf-tip-btn" @click="switchType('goods')">返回花束</button>
|
|
|
|
|
- <button class="admin-button-com middle blue pf-tip-btn" @click="goToPfMiniProgram">去批发端</button>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <block v-else>
|
|
|
|
|
|
|
+ <view v-else class="panel item-panel">
|
|
|
<view class="search-row">
|
|
<view class="search-row">
|
|
|
<button class="admin-button-com middle blue image-class-btn" @click="selectFlowerNumFn">图片分类</button>
|
|
<button class="admin-button-com middle blue image-class-btn" @click="selectFlowerNumFn">图片分类</button>
|
|
|
<view class="search-box">
|
|
<view class="search-box">
|
|
|
<text class="search-icon">⌕</text>
|
|
<text class="search-icon">⌕</text>
|
|
|
<input v-model="globalPy" class="search-input" placeholder="请输入/搜索商品名称" confirm-type="search" @confirm="searchItem" />
|
|
<input v-model="globalPy" class="search-input" placeholder="请输入/搜索商品名称" confirm-type="search" @confirm="searchItem" />
|
|
|
</view>
|
|
</view>
|
|
|
- <button class="admin-button-com middle blue search-btn" @click="searchItem">搜索</button>
|
|
|
|
|
|
|
+ <!-- 批发店锁定时不展示添花材,避免绕过蒙板引导 -->
|
|
|
|
|
+ <button v-if="!pfItemLocked" class="admin-button-com middle blue add-btn" @click="addCurrent">添花材</button>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="filter-row">
|
|
<view class="filter-row">
|
|
@@ -255,14 +244,23 @@
|
|
|
<app-wrapper-empty v-else title="暂无花材" :is-empty="$util.isEmpty(globalItemData)" />
|
|
<app-wrapper-empty v-else title="暂无花材" :is-empty="$util.isEmpty(globalItemData)" />
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
</view>
|
|
</view>
|
|
|
- </block>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
|
|
|
- <button
|
|
|
|
|
- v-if="!(activeType === 'item' && pfItemLocked)"
|
|
|
|
|
- class="admin-button-com big blue footer-btn"
|
|
|
|
|
- @click="addCurrent"
|
|
|
|
|
- >{{ activeType === 'goods' ? '新增花束' : '新增花材' }}</button>
|
|
|
|
|
|
|
+ <!-- 已开通批发店:底下仍展示花材,中间蒙板引导去批发端维护 -->
|
|
|
|
|
+ <view
|
|
|
|
|
+ v-if="pfItemLocked"
|
|
|
|
|
+ class="pf-item-tip-mask"
|
|
|
|
|
+ @touchmove.stop.prevent
|
|
|
|
|
+ @click.stop
|
|
|
|
|
+ >
|
|
|
|
|
+ <view class="pf-item-tip-card" @click.stop>
|
|
|
|
|
+ <text class="pf-item-tip-text">请到批发端修改花材</text>
|
|
|
|
|
+ <view class="pf-item-tip-actions">
|
|
|
|
|
+ <button class="admin-button-com middle default pf-tip-btn" @click="switchType('goods')">返回花束</button>
|
|
|
|
|
+ <button class="admin-button-com middle blue pf-tip-btn" @click="goToPfMiniProgram">去批发端</button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
<view v-if="showFilterPanel" class="filter-overlay" @click="closeFilterPanel">
|
|
<view v-if="showFilterPanel" class="filter-overlay" @click="closeFilterPanel">
|
|
|
<view class="filter-panel" @click.stop>
|
|
<view class="filter-panel" @click.stop>
|
|
@@ -307,7 +305,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <!-- 花材引导已改为页内居中提示(pfItemLocked),不再使用弹框 -->
|
|
|
|
|
|
|
+ <!-- 花材引导:pfItemLocked 时蒙板盖在列表上,不再使用弹框 -->
|
|
|
|
|
|
|
|
<modal-module :show="printLabelShow" @click="dialogInputConfirm" :maskClosable="true" title="数量" padding="30rpx 30rpx">
|
|
<modal-module :show="printLabelShow" @click="dialogInputConfirm" :maskClosable="true" title="数量" padding="30rpx 30rpx">
|
|
|
<template v-slot:content>
|
|
<template v-slot:content>
|
|
@@ -515,7 +513,7 @@ export default {
|
|
|
this.getAppIdList = res.data
|
|
this.getAppIdList = res.data
|
|
|
})
|
|
})
|
|
|
this.getCategoryData()
|
|
this.getCategoryData()
|
|
|
- // 深链直接进花材时走同一套切换逻辑(已开通批发店则页内引导)
|
|
|
|
|
|
|
+ // 深链直接进花材时走同一套切换逻辑(已开通批发店则列表+蒙板引导)
|
|
|
if (options && options.type === "item") {
|
|
if (options && options.type === "item") {
|
|
|
this.switchType("item")
|
|
this.switchType("item")
|
|
|
}
|
|
}
|
|
@@ -533,17 +531,18 @@ export default {
|
|
|
methods: {
|
|
methods: {
|
|
|
/**
|
|
/**
|
|
|
* 切换花束 / 花材面板。
|
|
* 切换花束 / 花材面板。
|
|
|
- * 已开通花材批发店(pfShopId>0)时仍进入花材页,但锁定为页内引导(不加载零售花材);
|
|
|
|
|
- * 未开通时切换并按需懒加载花材数据。
|
|
|
|
|
|
|
+ * 已开通花材批发店(pfShopId>0)时仍进入花材页并加载列表,再用蒙板引导去批发端;
|
|
|
|
|
+ * 未开通时正常切换并按需懒加载花材数据。
|
|
|
* @param {string} type goods | item
|
|
* @param {string} type goods | item
|
|
|
*/
|
|
*/
|
|
|
switchType(type) {
|
|
switchType(type) {
|
|
|
if (type === this.activeType) return
|
|
if (type === this.activeType) return
|
|
|
if (type === "item") {
|
|
if (type === "item") {
|
|
|
this.activeType = "item"
|
|
this.activeType = "item"
|
|
|
- // 零售店已绑定批发店:花材应在批发端维护,页内提示并引导跳转销花宝
|
|
|
|
|
|
|
+ // 零售店已绑定批发店:底下照常展示花材,蒙板提示去批发端维护
|
|
|
if (Number(this.getMyShopInfo && this.getMyShopInfo.pfShopId) > 0) {
|
|
if (Number(this.getMyShopInfo && this.getMyShopInfo.pfShopId) > 0) {
|
|
|
this.pfItemLocked = true
|
|
this.pfItemLocked = true
|
|
|
|
|
+ this.ensureItemLoaded()
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
this.pfItemLocked = false
|
|
this.pfItemLocked = false
|
|
@@ -1289,25 +1288,34 @@ page {
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/* 已开通批发店时的花材页内引导:居中卡片,替代原弹框 */
|
|
|
|
|
-.pf-item-tip-panel {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
|
|
+.item-panel {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 批发店锁定:半透明蒙板盖住花材操作区;卡片宽度缩 1/4,高度(内边距/字号)保持原样 */
|
|
|
|
|
+.pf-item-tip-mask {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ right: 0;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+ bottom: 0;
|
|
|
|
|
+ z-index: 20;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
padding: 40upx 48upx;
|
|
padding: 40upx 48upx;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
- background: #f5f6f8;
|
|
|
|
|
|
|
+ background: rgba(0, 0, 0, 0.45);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.pf-item-tip-card {
|
|
.pf-item-tip-card {
|
|
|
- width: 100%;
|
|
|
|
|
- max-width: 620upx;
|
|
|
|
|
|
|
+ width: 75%;
|
|
|
|
|
+ max-width: 465upx;
|
|
|
background: #fff;
|
|
background: #fff;
|
|
|
border-radius: 16upx;
|
|
border-radius: 16upx;
|
|
|
- padding: 56upx 40upx 40upx;
|
|
|
|
|
|
|
+ padding: 56upx 30upx 40upx;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
- box-shadow: 0 4upx 24upx rgba(0, 0, 0, 0.06);
|
|
|
|
|
|
|
+ box-shadow: 0 8upx 32upx rgba(0, 0, 0, 0.12);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.pf-item-tip-text {
|
|
.pf-item-tip-text {
|
|
@@ -1343,7 +1351,6 @@ page {
|
|
|
|
|
|
|
|
.small-btn,
|
|
.small-btn,
|
|
|
.image-class-btn,
|
|
.image-class-btn,
|
|
|
-.search-btn,
|
|
|
|
|
.tool-btn {
|
|
.tool-btn {
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
@@ -1383,11 +1390,6 @@ page {
|
|
|
margin-left: 8upx;
|
|
margin-left: 8upx;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/* 内嵌搜索按钮时收紧右侧内边距,让按钮贴在圆角框内 */
|
|
|
|
|
-.search-box.has-search-btn {
|
|
|
|
|
- padding-right: 6upx;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
.search-icon {
|
|
.search-icon {
|
|
|
font-size: 42upx;
|
|
font-size: 42upx;
|
|
|
color: #8d8d8d;
|
|
color: #8d8d8d;
|
|
@@ -1401,21 +1403,20 @@ page {
|
|
|
color: #333;
|
|
color: #333;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.search-btn {
|
|
|
|
|
- width: 108upx;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-/* 花束搜索框内的搜索按钮:压低高度以免撑破圆角输入框 */
|
|
|
|
|
-.search-box .search-btn {
|
|
|
|
|
- height: 54upx;
|
|
|
|
|
- padding-top: 0;
|
|
|
|
|
- padding-bottom: 0;
|
|
|
|
|
|
|
+/* 搜索行右侧:添花束 / 添花材 — 高度对齐左侧按钮,与搜索框间隔 10upx */
|
|
|
|
|
+.admin-button-com.middle.add-btn {
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ min-width: 120upx;
|
|
|
|
|
+ height: 68upx;
|
|
|
|
|
+ line-height: 68upx;
|
|
|
|
|
+ padding: 0 18upx;
|
|
|
|
|
+ margin: 0 0 0 10upx;
|
|
|
flex-shrink: 0;
|
|
flex-shrink: 0;
|
|
|
|
|
+ font-size: 26upx;
|
|
|
display: inline-flex;
|
|
display: inline-flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
- font-size: 24upx;
|
|
|
|
|
- border-radius: 26upx;
|
|
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.filter-row {
|
|
.filter-row {
|
|
@@ -1866,19 +1867,6 @@ page {
|
|
|
font-weight: normal;
|
|
font-weight: normal;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.footer-btn {
|
|
|
|
|
- flex-shrink: 0;
|
|
|
|
|
- margin: 14upx 18upx calc(14upx + env(safe-area-inset-bottom));
|
|
|
|
|
- padding: 0;
|
|
|
|
|
- height: 68upx;
|
|
|
|
|
- line-height: 68upx;
|
|
|
|
|
- border-radius: 6upx;
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- font-size: 30upx;
|
|
|
|
|
- background: #09C567;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
.bottom-space {
|
|
.bottom-space {
|
|
|
height: 36upx;
|
|
height: 36upx;
|
|
|
}
|
|
}
|