Просмотр исходного кода

Merge branch 'redesign‌-260706' of git.huaml.com:zhh/front-end into redesign‌-260706

shizhongqi 2 дней назад
Родитель
Сommit
69a6674395

+ 126 - 65
hdApp/src/admin/goods/manage.vue

@@ -1,8 +1,18 @@
 <template>
   <view class="goods-manage-page">
-    <view class="top-tabs">
-      <view class="top-tab" :class="{ active: activeType === 'goods' }" @click="switchType('goods')">花束</view>
-      <view class="top-tab" :class="{ active: activeType === 'item' }" @click="switchType('item')">花材</view>
+    <view class="modern-tabs-container">
+      <view class="modern-tabs">
+        <view class="modern-tab" :class="{ active: activeType === 'goods' }" @click="switchType('goods')">
+          <view class="tab-content">
+            <text class="tab-text">花束</text>
+          </view>
+        </view>
+        <view class="modern-tab" :class="{ active: activeType === 'item' }" @click="switchType('item')">
+          <view class="tab-content">
+            <text class="tab-text">花材</text>
+          </view>
+        </view>
+      </view>
     </view>
 
     <view v-if="activeType === 'goods'" class="panel">
@@ -105,6 +115,18 @@
     </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 class="search-row">
         <button class="admin-button-com middle blue image-class-btn" @click="selectFlowerNumFn">图片分类</button>
         <view class="search-box">
@@ -245,9 +267,14 @@
           <app-wrapper-empty v-else title="暂无花材" :is-empty="$util.isEmpty(globalItemData)" />
         </scroll-view>
       </view>
+      </block>
     </view>
 
-    <button class="admin-button-com big blue footer-btn" @click="addCurrent">{{ activeType === 'goods' ? '新增花束' : '新增花材' }}</button>
+    <button
+      v-if="!(activeType === 'item' && pfItemLocked)"
+      class="admin-button-com big blue footer-btn"
+      @click="addCurrent"
+    >{{ activeType === 'goods' ? '新增花束' : '新增花材' }}</button>
 
     <view v-if="showFilterPanel" class="filter-overlay" @click="closeFilterPanel">
       <view class="filter-panel" @click.stop>
@@ -292,17 +319,7 @@
       </view>
     </view>
 
-    <!-- 已开通花材批发店时,引导去批发端小程序修改花材,避免在零售端误改 -->
-    <modal-module
-      :show="showPfItemTip"
-      content="请到销花宝批发端修改花材"
-      color="#333"
-      :size="32"
-      padding="30rpx 30rpx"
-      :button="pfItemTipButtons"
-      :maskClosable="true"
-      @click="onPfItemTipClick"
-    />
+    <!-- 花材引导已改为页内居中提示(pfItemLocked),不再使用弹框 -->
 
     <modal-module :show="printLabelShow" @click="dialogInputConfirm" :maskClosable="true" title="数量" padding="30rpx 30rpx">
       <template v-slot:content>
@@ -491,13 +508,8 @@ export default {
       remarkFocus: false,
       // 花材是否已懒加载过,避免重复 initItem 请求
       itemInited: false,
-      // 已开通批发店时切换花材的引导弹窗
-      showPfItemTip: false,
-      // 引导弹窗按钮:沿用 modal-module 默认描边/实心样式
-      pfItemTipButtons: [
-        { text: "返回花束", plain: true },
-        { text: "去批发端", plain: false }
-      ]
+      // 已开通批发店时进入花材页:页内引导,不加载零售花材
+      pfItemLocked: false
     }
   },
   // 汇总门店、登录人与字典信息;只读取 Vuex,不修改全局状态。
@@ -515,7 +527,7 @@ export default {
       this.getAppIdList = res.data
     })
     this.getCategoryData()
-    // 深链直接进花材时走同一套切换逻辑,以便已开通批发店时弹出引导而非误加载花材
+    // 深链直接进花材时走同一套切换逻辑(已开通批发店则页内引导)
     if (options && options.type === "item") {
       this.switchType("item")
     }
@@ -543,42 +555,31 @@ export default {
     },
     /**
      * 切换花束 / 花材面板。
-     * 已开通花材批发店(pfShopId>0)时切到花材只弹引导,不切换面板、不加载花材
-     * 未开通时切换并按需懒加载花材数据。
+     * 已开通花材批发店(pfShopId>0)时仍进入花材页,但锁定为页内引导(不加载零售花材)
+     * 未开通时切换并按需懒加载花材数据。
      * @param {string} type goods | item
      */
     switchType(type) {
       if (type === this.activeType) return
       if (type === "item") {
-        // 零售店已绑定批发店:花材应在批发端维护,此处拦截并引导跳转销花宝
+        this.activeType = "item"
+        // 零售店已绑定批发店:花材应在批发端维护,页内提示并引导跳转销花宝
         if (Number(this.getMyShopInfo && this.getMyShopInfo.pfShopId) > 0) {
-          this.showPfItemTip = true
+          this.pfItemLocked = true
           return
         }
-        this.activeType = "item"
+        this.pfItemLocked = false
         this.ensureItemLoaded()
         return
       }
+      this.pfItemLocked = false
       this.activeType = "goods"
     },
-    // 关闭「去批发端」引导弹窗,保持当前仍在花束面板。
-    closePfItemTip() {
-      this.showPfItemTip = false
-    },
-    // 处理引导弹窗按钮:0 返回花束,1 跳转批发端小程序。
-    onPfItemTipClick(val) {
-      if (!val || val.index == 0) {
-        this.closePfItemTip()
-        return
-      }
-      this.goToPfMiniProgram()
-    },
     /**
      * 打开批发端小程序(现网「销花宝」,测试环境「花惠宝」)。
      * appId 取自 getWeixinId 的 ghs.miniAppId;未缓存时再请求一次。
      */
     goToPfMiniProgram() {
-      this.closePfItemTip()
       const openGhs = appIdList => {
         const appId = appIdList && appIdList.ghs && appIdList.ghs.miniAppId
         if (!appId) {
@@ -1248,40 +1249,59 @@ page {
   flex-direction: column;
 }
 
-.top-tabs {
-  display: flex;
-  align-items: flex-end;
-  height: 100upx;
-  padding: 0 120upx 0;
-  box-sizing: border-box;
+/* 顶部花束/花材切换:对齐 admin/item/list2.vue 的 modern-tabs */
+.modern-tabs-container {
+  padding: 0;
+  background-color: #f8f9fa;
+  width: 100%;
   flex-shrink: 0;
 }
 
-.top-tab {
+.modern-tabs {
+  display: flex;
+  background-color: #ffffff;
+  padding: 6upx;
+  box-shadow: 0 2upx 12upx rgba(0, 0, 0, 0.06);
+  border: 2upx solid #f0f2f5;
+  position: relative;
+  z-index: 5;
+  width: 100%;
+}
+
+.modern-tab {
   flex: 1;
-  height: 84upx;
-  line-height: 84upx;
   text-align: center;
-  font-size: 34upx;
-  color: #777;
-  font-weight: 700;
+  padding: 30upx 0;
   position: relative;
+  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
+  border-radius: 12upx;
+  margin: 0 2upx;
+  background-color: #e2dfdf;
+  border: 2upx solid #f2f4f7;
+  box-shadow: none;
 }
 
-.top-tab.active {
-  color: #35a511;
+.modern-tab .tab-content {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
 }
 
-.top-tab.active::after {
-  content: "";
-  position: absolute;
-  left: 50%;
-  bottom: 4upx;
-  transform: translateX(-50%);
-  width: 78upx;
-  height: 6upx;
-  border-radius: 6upx;
-  background: #35a511;
+.modern-tab .tab-text {
+  font-size: 30upx;
+  color: #666;
+  font-weight: 700;
+}
+
+.modern-tab.active {
+  background: #09C567;
+}
+
+.modern-tab.active .tab-text {
+  color: #ffffff;
+  font-weight: 700;
+  font-size: 30upx;
 }
 
 .panel {
@@ -1291,6 +1311,47 @@ page {
   flex-direction: column;
 }
 
+/* 已开通批发店时的花材页内引导:居中卡片,替代原弹框 */
+.pf-item-tip-panel {
+  flex: 1;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  padding: 40upx 48upx;
+  box-sizing: border-box;
+  background: #f5f6f8;
+}
+
+.pf-item-tip-card {
+  width: 100%;
+  max-width: 620upx;
+  background: #fff;
+  border-radius: 16upx;
+  padding: 56upx 40upx 40upx;
+  box-sizing: border-box;
+  box-shadow: 0 4upx 24upx rgba(0, 0, 0, 0.06);
+}
+
+.pf-item-tip-text {
+  display: block;
+  text-align: center;
+  font-size: 32upx;
+  color: #333;
+  line-height: 1.5;
+  margin-bottom: 48upx;
+}
+
+.pf-item-tip-actions {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.pf-tip-btn {
+  width: 46%;
+  margin: 0;
+}
+
 .search-row {
   display: flex;
   align-items: center;

+ 1 - 1
hdApp/src/admin/home/apply.vue

@@ -53,7 +53,7 @@ export default {
           titleIcon: 'bouquet',
           list: [
             { name: '商城码', icon: 'mall-filled', url: '/admin/cg/item', pf: 1 },
-            { name: '商品管理', icon: 'bouquet', url: '/admin/goods/manage', pf: 1 },
+            { name: '商品', icon: 'bouquet', url: '/admin/goods/manage', pf: 1 },
             { name: '新增花束', icon: 'add-bouquet', url: '/admin/goods/add', pf: 1 },
             { name: '分类', icon: 'category-filled', url: '/admin/goods/categoryV2?tab=0', pf: 1 },
             { name: '使用场景', icon: 'category-filled', url: '/admin/useCase/list', pf: 1 },

+ 1 - 1
hdApp/src/admin/home/components/mall-home-panel.vue

@@ -210,7 +210,7 @@ export default {
         { name: '商城码', icon: 'mall-filled', url: '/admin/cg/item', pf: 1 },
         { name: '分类', icon: 'category-filled', url: '/admin/goods/categoryV2?tab=0', pf: 1 },
         { name: '花束排序', icon: 'sort-filled', url: '/admin/goods/categorySort', pf: 1 },
-        { name: '商品管理', icon: 'bouquet', url: '/admin/goods/manage', pf: 1 },
+        { name: '商品', icon: 'bouquet', url: '/admin/goods/manage', pf: 1 },
         { name: '新增花束', icon: 'add-bouquet', url: '/admin/goods/add', pf: 1 },
         { name: '涨价管理', icon: 'price-increase', url: '/admin/goods/price-increase', pf: 1 },
         { name: '公告', icon: 'notice', url: '/admin/shopNotice/list', pf: 1 },

+ 5 - 56
hdApp/src/admin/home/order.vue

@@ -167,38 +167,22 @@
                 class="outline-action"
                 :class="{ disabled: !item._isPaid }"
                 @click.stop="item._isPaid ? printOrder(index) : ''"
-              >
-                <image
-                  class="action-icon"
-                  :class="{ 'action-icon-muted': !item._isPaid }"
-                  :src="iconSrc('order-printer-green')"
-                  mode="aspectFit"
-                />
-                <text>打印</text>
-              </view>
+              >打印</view>
 
               <view
                 v-if="item._expressText"
                 class="outline-action"
                 :class="{ disabled: item._expressDisabled }"
                 @click.stop="item._expressDisabled ? '' : openExpressPage(item.id)"
-              >
-                <image
-                  class="action-icon"
-                  :class="{ 'action-icon-muted': item._expressDisabled }"
-                  :src="iconSrc('delivery-outline')"
-                  mode="aspectFit"
-                />
-                <text>{{ item._expressText }}</text>
-              </view>
+              >{{ item._expressText }}</view>
             </view>
 
             <view class="action-more-wrap">
-              <!-- 已取消订单:「更多」与状态文案同为灰色 -->
+              <!-- 已取消订单:「更多」灰色且不可点开菜单 -->
               <view
                 class="outline-action"
                 :class="{ disabled: item.status == 5 }"
-                @click.stop="toggleActionMore(index)"
+                @click.stop="item.status == 5 ? '' : toggleActionMore(index)"
               >更多</view>
             </view>
           </view>
@@ -1639,11 +1623,6 @@ export default {
   background: linear-gradient(135deg, #18d36f 0%, #08b856 100%);
 }
 
-.outline-action text,
-.solid-action text {
-  margin-left: 6upx;
-}
-
 .outline-action.disabled,
 .solid-action.disabled {
   color: #b7bfc0;
@@ -1655,8 +1634,7 @@ export default {
 .filter-icon,
 .card-icon,
 .card-icon-sm,
-.merge-icon,
-.action-icon {
+.merge-icon {
   display: block;
   flex-shrink: 0;
 }
@@ -1688,35 +1666,6 @@ export default {
   align-self: center;
 }
 
-.action-icon {
-  width: 36upx;
-  height: 36upx;
-}
-
-.outline-action .action-icon {
-  width: 36upx;
-  height: 36upx;
-}
-
-.action-row .outline-action .action-icon,
-.action-row .solid-action .action-icon {
-  width: 32upx;
-  height: 32upx;
-}
-
-.action-icon-white {
-  filter: brightness(0) invert(1);
-}
-
-.action-icon-muted {
-  opacity: 0.45;
-  filter: none;
-}
-
-.solid-action.disabled .action-icon-white {
-  filter: none;
-}
-
 .staff-popup {
   display: flex;
   flex-wrap: wrap;

+ 1 - 1
hdApp/src/pages.json

@@ -338,7 +338,7 @@
 		{
 			"root": "admin/goods",
 			"pages": [
-				{ "path": "manage", "style": { "navigationBarTitleText": "商品管理" } },
+				{ "path": "manage", "style": { "navigationBarTitleText": "商品" } },
 				{ "path": "lz", "style": { "navigationBarTitleText": "绿植" } },
 				{ "path": "categoryV2", "style": { "navigationBarTitleText": "分类管理", "enablePullDownRefresh": true } },
 				{ "path": "category-edit", "style": { "navigationBarTitleText": "编辑分类" } },

+ 0 - 1
hdApp/src/static/icons/order-printer-green.svg

@@ -1 +0,0 @@
-<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1783474302342" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5212" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="256"><path d="M786.3 382.5m-40.9 0a40.9 40.9 0 1 0 81.8 0 40.9 40.9 0 1 0-81.8 0Z" fill="#09c567" p-id="5213"></path><path d="M125.4 689.9V649v16.2c0.8 13.8 12.2 24.7 26.2 24.7h-26.2zM266.4 888.9V848v16.2c0.8 13.8 12.2 24.7 26.2 24.7h-26.2zM886.4 689.7h-40.9 16.2c13.8-0.8 24.7-12.2 24.7-26.2v26.2zM745.8 888.4h-40.9 16.2c13.8-0.8 24.7-12.2 24.7-26.2v26.2zM745.5 139.8v40.9-16.2c-0.8-13.8-12.2-24.7-26.2-24.7h26.2zM745.5 619.9v40.9-16.2c-0.8-13.8-12.2-24.7-26.2-24.7h26.2zM265.9 139.8h40.9-16.2c-13.8 0.8-24.7 12.2-24.7 26.2v-26.2zM266 619.7h41-16.2c-13.8 0.9-24.8 12.3-24.8 26.2v-26.2zM125.4 289.1h40.9-16.2c-13.8 0.8-24.7 12.2-24.7 26.2v-26.2zM886.1 289.2v40.9-16.2c-0.8-13.8-12.2-24.7-26.2-24.7h26.2z" fill="#09c567" p-id="5214"></path><path d="M967.8 710.1V266c-4.7-33-33.1-58.5-67.4-58.5h-73.1v-89.6c-3.9-32.8-31.1-58.4-64.5-59.8H250.2c-34.8 1-63.1 28.2-65.8 62.6v86.8h-78.8c-33.2 3-59.5 29.7-61.8 63.1v438.7c2.4 31.7 26.4 57.3 57.4 62.1h83.2v133.1c1.2 34.8 28.5 62.9 62.8 65.5h519.2c32.6-3.3 58.4-29.7 60.9-62.6v-136h80.5c31.8-3.6 57-29.2 60-61.3zM266.3 140h479.1v67.5H266.3V140z m479.1 590.4V888H266.3V620h479.1v110.4z m140.5-40.9h-58.6v-92c-3.9-31.9-29.8-56.9-62.1-59.4H248.3c-34.4 2-61.9 29.6-63.9 64v87.4h-58.6V289.4H886v400.1z" fill="#09c567" p-id="5215"></path></svg>