shish 2 месяцев назад
Родитель
Сommit
0548817f3f

+ 21 - 19
hdApp/src/admin/home/homeMenus.js

@@ -1,13 +1,14 @@
 const homeIcon = name => name
 
+/** 花束栏已下线菜单(兼容本地 storage 旧配置) */
+const REMOVED_FLOWER_MENU_KEYS = ['hsBill', 'hsQuickBill', 'goHsKd', 'goHsKjKd']
+
 export const APPLY_MENU_GROUPS = [
   {
     title: '花束',
     titleIcon: homeIcon('bouquet'),
     list: [
       { name: '商城码', icon: homeIcon('mall-filled'), url: '/admin/cg/mall', pf: 1 },
-      { name: '开单', icon: homeIcon('bouquet-billing'), action: 'goHsKd', pf: 1 },
-      { name: '快捷开单', icon: homeIcon('bouquet-quick-billing'), action: 'goHsKjKd', pf: 1 },
       { name: '花束', icon: homeIcon('bouquet'), url: '/admin/goods/list', pf: 1 },
       { name: '新增花束', icon: homeIcon('add-bouquet'), url: '/admin/goods/add', pf: 1 },
       { name: '分类', icon: homeIcon('category-filled'), url: '/admin/goods/category', pf: 1 },
@@ -98,8 +99,6 @@ export const APPLY_MENU_GROUPS = [
 
 //菜单项配置, 用于快速菜单和更多菜单
 export const HOME_MENU_ITEMS = {
-  hsBill: { name: '开单', icon: homeIcon('bouquet-billing'), action: 'goHsKd', pf: 1 },
-  hsQuickBill: { name: '快捷开单', icon: homeIcon('bouquet-quick-billing'), action: 'goHsKjKd', pf: 1 },
   itemBill: { name: '开单', icon: homeIcon('plant-billing'), action: 'goItemKd', pf: 1 },
   itemQuickBill: { name: '快捷开单', icon: homeIcon('plant-quick-billing'), action: 'goItemKjKd', pf: 1 },
   customer: { name: '客户', icon: homeIcon('customer-filled'), url: '/admin/home/member', type: 4, pf: 1 },
@@ -135,8 +134,8 @@ export const HOME_MENU_ITEMS = {
  */
 export const HOME_MENU_DEFAULT_KEYS = {
   quickMenus: ['itemBill', 'itemQuickBill', 'flower', 'buyItem'],
-  flowerMenus: ['mall', 'task', 'hsBill', 'hsQuickBill', 'flowerCategory', 'flowerSort', 'flower', 'addFlower'],
-  plantMenus: ['itemMall', 'plant', 'itemBill', 'itemQuickBill', 'part', 'changePrice', 'breakage', 'plantCategory'],
+  flowerMenus: ['mall', 'task', 'flowerCategory', 'flowerSort', 'flower', 'addFlower'],
+  plantMenus: ['itemMall', 'plant', 'part', 'changePrice', 'breakage', 'plantCategory'],
   moreMenus: ['calculator', 'staff', 'profit', 'picText', 'scanPay', 'payCode', 'redPacket', 'rechargeSetting']
 }
 
@@ -157,6 +156,13 @@ export const HOME_OVERVIEW_FALLBACK = [
 
 export const getMenuItemKey = item => item.url || item.action || item.name
 
+const isRemovedFlowerMenuItem = item => {
+  const key = getMenuItemKey(item)
+  return REMOVED_FLOWER_MENU_KEYS.includes(key)
+    || item.action === 'goHsKd'
+    || item.action === 'goHsKjKd'
+}
+
 export const getMenuByKeys = keys => {
   return keys.map(key => {
     let item = HOME_MENU_ITEMS[key]
@@ -183,7 +189,9 @@ export const MENU_EDITOR_SCOPE = {
 export const getApplyCatalog = () => {
   return APPLY_MENU_GROUPS.map(group => ({
     ...group,
-    list: group.list.map(item => ({ ...item, key: getMenuItemKey(item) }))
+    list: group.list
+      .filter(item => group.title !== '花束' || !isRemovedFlowerMenuItem(item))
+      .map(item => ({ ...item, key: getMenuItemKey(item) }))
   }))
 }
 
@@ -231,8 +239,12 @@ export const getStoredMenuKeys = type => {
       storedKeys = stored
     }
   }
-  const keys = storedKeys.length ? storedKeys : defaultKeys
-  return keys.filter(key => key !== 'allApply')
+  let keys = storedKeys.length ? storedKeys : defaultKeys
+  keys = keys.filter(key => key !== 'allApply')
+  if (type === 'flowerMenus') {
+    keys = keys.filter(key => !REMOVED_FLOWER_MENU_KEYS.includes(key))
+  }
+  return keys
 }
 
 export const navigateMenuItem = (vm, item) => {
@@ -257,15 +269,5 @@ export const HOME_MENU_BILLING_METHODS = {
   },
   goItemKd() {
     this.$util.pageTo({ url: '/admin/custom/selectCustom' })
-  },
-  goHsKjKd() {
-    if (this.myShopInfo && Number(this.myShopInfo.defaultCustomId) > 0) {
-      this.$util.pageTo({ url: '/admin/billing/hs?customId=' + this.myShopInfo.defaultCustomId })
-    } else {
-      this.$msg('请设置快捷开单的对应客户')
-    }
-  },
-  goHsKd() {
-    this.$util.pageTo({ url: '/admin/custom/selectCustom?style=3' })
   }
 }

Разница между файлами не показана из-за своего большого размера
+ 0 - 3
hdApp/src/static/icons/bouquet-billing.svg


+ 0 - 12
hdApp/src/static/icons/bouquet-quick-billing.svg

@@ -1,12 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="120 55 850 915" width="200" height="200" aria-hidden="true">
-  <g id="kuaijiekaidan-main" transform="translate(16 0) scale(0.94)">
-    <path d="M395.765333 586.570667h-171.733333c-22.421333 0-37.888-22.442667-29.909333-43.381334L364.768 95.274667A32 32 0 0 1 394.666667 74.666667h287.957333c22.72 0 38.208 23.018667 29.632 44.064l-99.36 243.882666h187.050667c27.509333 0 42.186667 32.426667 24.042666 53.098667l-458.602666 522.56c-22.293333 25.408-63.626667 3.392-54.976-29.28l85.354666-322.421333z" fill="#09C567" p-id="5619"></path>
-  </g>
-  <g id="badge-bg">
-    <circle cx="760" cy="755" r="228" fill="#FFFFFF"/>
-    <circle cx="760" cy="755" r="214" fill="#F6FFF9" stroke="#09C567" stroke-width="28"/>
-  </g>
-  <g id="badge-mark" transform="translate(544 539) scale(0.422)">
-    <path d="M375.3728 841.8432c92.96-12.5184 203.8784-71.264 299.5456-166.9248 22.6112-22.6112 43.1616-46.08 61.5232-69.952C712.7616 786.3936 621.2608 921.6 512 921.6c-51.1488 0-98.4-29.632-136.6272-79.7568z m-87.808-422.8096C311.2384 237.6064 402.7328 102.4 512 102.4c51.1488 0 98.4 29.632 136.6272 79.7568-92.96 12.5184-203.8784 71.264-299.5456 166.9248a719.1232 719.1232 0 0 0-61.5232 69.952z m-129.536 139.5648c57.3248 74.2464 163.6608 140.9344 294.336 175.9488a719.1232 719.1232 0 0 0 91.3472 18.304c-168.9664 70.208-331.808 58.5728-386.432-36.0512-25.5744-44.288-23.5456-100.032 0.7552-158.2016z m322.2592-287.4496c168.9664-70.208 331.808-58.5728 386.432 36.0512 25.5744 44.288 23.5456 100.032-0.7552 158.2016-57.3184-74.2464-163.648-140.9344-294.336-175.9488a719.1232 719.1232 0 0 0-91.3408-18.304zM294.656 228.7552c-35.6352 86.7648-40.224 212.1984-5.2032 342.8736a719.1232 719.1232 0 0 0 29.8176 88.256C173.9904 548.6592 102.6432 401.824 157.2736 307.2c25.5744-44.288 74.8608-70.4 137.3824-78.4448z m410.0736 135.36c145.28 111.2256 216.6272 258.0608 161.9968 352.6848-25.5744 44.288-74.8608 70.4-137.3824 78.4448 35.6352-86.7648 40.224-212.1984 5.2032-342.8736a719.1232 719.1232 0 0 0-29.8176-88.256zM512 678.4c-88.3648 0-160-71.6352-160-160s71.6352-160 160-160 160 71.6352 160 160-71.6352 160-160 160z m0-83.2c42.4128 0 76.8-34.3872 76.8-76.8s-34.3872-76.8-76.8-76.8-76.8 34.3872-76.8 76.8 34.3872 76.8 76.8 76.8z" fill="#e16531" p-id="5555"></path>
-  </g>
-</svg>

Некоторые файлы не были показаны из-за большого количества измененных файлов