Ver código fonte

feat:"优化微信绑定,增加解绑功能,增加商品管理功能"

soobin 1 mês atrás
pai
commit
9f702e0f97

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "shenze-vue3-app",
-  "version": "1.5.707",
+  "version": "1.5.714",
   "private": true,
   "scripts": {
     "start": "vue-cli-service serve",

+ 2 - 2
public/version.json

@@ -1,5 +1,5 @@
 {
-  "version": "1.5.707",
-  "timestamp": "2025-07-07T11:11:48.076",
+  "version": "1.5.714",
+  "timestamp": "2025-07-14T10:37:59.707",
   "commitHash": "dev-build"
 }

BIN
src/assets/device/operIcon/goodsMan.png


+ 19 - 2
src/assets/language/en.json

@@ -550,6 +550,11 @@
       "batchPricePlace": "Enter price",
       "modifySubmit": "Apply Changes"
     },
+    "onShelf": "Available",
+    "offShelf": "Discontinued",
+    "editProductName": "Edit Product Name",
+    "enterProductName": "Enter product name",
+    "enterProductPrice": "Enter product price",
     "materialMonitor": "Material Monitoring",
     "showGoodsPage": {
       "title": "Product Display",
@@ -615,6 +620,11 @@
     "cheese": "Queijo",
     "peach": "Pêssego",
     "caramel": "Caramelo",
+    "C01": "Crushed Fruit (1)",
+    "C02": "Crushed Fruit (2)",
+    "J01": "Fruit Jam (1)",
+    "J02": "Fruit Jam (2)",
+    "J03": "Fruit Jam (3)",
     "sentSuccessfully": "Sent",
     "turnOffSleep": "Sleep Mode",
     "turnOnSleep": "Active",
@@ -1009,6 +1019,7 @@
     "tradeName": "Product",
     "dividingDomesticService": "Commission",
     "tax": "Taxes & Fees",
+    "memberCode": "Member ID",
     "business": "Merchant",
     "orderNo": "Order No",
     "commodity": "Item",
@@ -1574,8 +1585,13 @@
   },
   "bindWechat": {
     "cancel": "Cancel",
+    "welcomeTitle": "WeChat Binding",
+    "welcomeSubtitle": "Bind WeChat for easy login and important notifications",
+    "unbind": "Unlink",
+    "unbindTips": "Confirm unlinking WeChat account?",
+    "unbindSuccess": "WeChat unlinked",
     "bindCommit": "Bind WeChat",
-    "bindSuccess": "Bound Successfully"
+    "bindSuccess": "WeChat linked"
   },
   "labelMan": {
     "title": "Group Management",
@@ -1867,6 +1883,7 @@
     "C29": "Tax Administration",
     "C30": "Jam Extraction",
     "C31": "Maintenance Details",
-    "C32": "Payment Configuration"
+    "C32": "Payment Configuration",
+    "C33": "Product Management"
   }
 }

+ 20 - 3
src/assets/language/es.json

@@ -550,6 +550,11 @@
             "batchPricePlace": "Ej: 5.99",
             "modifySubmit": "Confirmar cambios"
         },
+        "onShelf": "Disponible",
+        "offShelf": "Retirado",
+        "editProductName": "Editar nombre del producto",
+        "enterProductName": "Introduzca el nombre del producto",
+        "enterProductPrice": "Introduzca el precio del producto",
         "materialMonitor": "Control inventario",
         "showGoodsPage": {
             "title": "Config. productos",
@@ -615,6 +620,11 @@
         "cheese": "Queijo",
         "peach": "Pêssego",
         "caramel": "Caramelo",
+        "C01": "Fruta triturada (1)",
+        "C02": "Fruta triturada (2)",
+        "J01": "Mermelada (1)",
+        "J02": "Mermelada (2)",
+        "J03": "Mermelada (3)",
         "sentSuccessfully": "Solicitud enviada",
         "turnOffSleep": "Modo descanso",
         "turnOnSleep": "Modo activo",
@@ -1009,6 +1019,7 @@
         "tradeName": "Producto",
         "dividingDomesticService": "Comisión",
         "tax": "Impuestos",
+        "memberCode": "Código de socio",
         "business": "Comercio",
         "orderNo": "N° pedido",
         "commodity": "Artículo",
@@ -1573,8 +1584,13 @@
     },
     "bindWechat": {
         "cancel": "Cancelar",
-        "bindCommit": "Vincular",
-        "bindSuccess": "Vinculado"
+        "welcomeTitle": "Vinculación WeChat",
+        "welcomeSubtitle": "Vincula WeChat para inicio fácil y notificaciones",
+        "unbind": "Desvincular",
+        "unbindTips": "¿Desvincular cuenta WeChat actual?",
+        "unbindSuccess": "WeChat desvinculado",
+        "bindCommit": "Vincular WeChat",
+        "bindSuccess": "WeChat vinculado"
     },
     "labelMan": {
         "title": "Gestión de grupos",
@@ -1866,6 +1882,7 @@
         "C29": "Gestión Tributaria",
         "C30": "Extracción de Mermelada",
         "C31": "Detalles de Mantenimiento",
-        "C32": "Configuración de pagos"
+        "C32": "Configuración de pagos",
+        "C33": "Gestión de productos"
     }
 }

+ 19 - 2
src/assets/language/fr.json

@@ -550,6 +550,11 @@
             "batchPricePlace": "Ex: 5.99",
             "modifySubmit": "Valider modifications"
         },
+        "onShelf": "En vente",
+        "offShelf": "Retiré",
+        "editProductName": "Modifier nom du produit",
+        "enterProductName": "Saisir le nom du produit",
+        "enterProductPrice": "Saisir le prix du produit",
         "materialMonitor": "Surveillance matières",
         "showGoodsPage": {
             "title": "Affichage produits",
@@ -615,6 +620,11 @@
         "cheese": "Queijo",
         "peach": "Pêssego",
         "caramel": "Caramelo",
+        "C01": "Fruits concassés (1)",
+        "C02": "Fruits concassés (2)",
+        "J01": "Confiture (1)",
+        "J02": "Confiture (2)",
+        "J03": "Confiture (3)",
         "sentSuccessfully": "Envoyé",
         "turnOffSleep": "Veille activée",
         "turnOnSleep": "Veille désactivée",
@@ -1009,6 +1019,7 @@
         "tradeName": "Produit",
         "dividingDomesticService": "Commission",
         "tax": "Taxes",
+        "memberCode": "Code membre",
         "business": "Marchand",
         "orderNo": "N° commande",
         "commodity": "Article",
@@ -1604,8 +1615,13 @@
     },
     "bindWechat": {
         "cancel": "Annuler",
+        "welcomeTitle": "Liaison WeChat",
+        "welcomeSubtitle": "Liez WeChat pour un accès facile et notifications importantes",
+        "unbind": "Dissocier",
+        "unbindTips": "Dissocier le compte WeChat actuel?",
+        "unbindSuccess": "WeChat dissocié",
         "bindCommit": "Lier WeChat",
-        "bindSuccess": "Compte lié"
+        "bindSuccess": "WeChat lié"
     },
     "labelMan": {
         "title": "Gestion des groupes",
@@ -1897,6 +1913,7 @@
         "C29": "Gestion Fiscale",
         "C30": "Extraction de Confiture",
         "C31": "Détails de la maintenance",
-        "C32": "Configuration de paiement"
+        "C32": "Configuration de paiement",
+        "C33": "Gestion des produits"
     }
 }

+ 20 - 3
src/assets/language/ja.json

@@ -544,6 +544,11 @@
             "batchPricePlace": "一括価格を入力してください",
             "modifySubmit": "変更を提出"
         },
+        "onShelf": "販売中",
+        "offShelf": "販売終了",
+        "editProductName": "商品名編集",
+        "enterProductName": "商品名を入力",
+        "enterProductPrice": "価格を入力",
         "materialMonitor": "材料監視",
         "showGoodsPage": {
             "title": "商品表示設定",
@@ -609,6 +614,11 @@
         "cheese": "Queijo",
         "peach": "Pêssego",
         "caramel": "Caramelo",
+        "C01": "フルーツ細粒 (1)",
+        "C02": "フルーツ細粒 (2)",
+        "J01": "フルーツジャム (1)",
+        "J02": "フルーツジャム (2)",
+        "J03": "フルーツジャム (3)",
         "sentSuccessfully": "リクエスト送信完了",
         "turnOffSleep": "スリープ中",
         "turnOnSleep": "スリープしていない",
@@ -998,6 +1008,7 @@
         "tradeName": "商品名",
         "dividingDomesticService": "コミッション分配",
         "tax": "税金",
+        "memberCode": "会員コード",
         "business": "ビジネス",
         "orderNo": "注文番号",
         "commodity": "商品",
@@ -1565,8 +1576,13 @@
     },
     "bindWechat": {
         "cancel": "キャンセル",
-        "bindCommit": "WeChatをバインドする",
-        "bindSuccess": "バインドに成功しました"
+        "welcomeTitle": "WeChat連携",
+        "welcomeSubtitle": "WeChat連携で簡単ログインと通知を受け取れます",
+        "unbind": "連携解除",
+        "unbindTips": "現在のWeChat連携を解除しますか?",
+        "unbindSuccess": "連携解除成功",
+        "bindCommit": "WeChat連携",
+        "bindSuccess": "連携成功"
     },
     "labelMan": {
         "title": "グループ管理",
@@ -1858,6 +1874,7 @@
         "C29": "税務管理",
         "C30": "ジャム抽出",
         "C31": "メンテナンス記録",
-        "C32": "決済設定"
+        "C32": "決済設定",
+        "C33": "商品管理"
     }
 }

+ 19 - 2
src/assets/language/pt.json

@@ -550,6 +550,11 @@
             "batchPricePlace": "Ex: 15.90",
             "modifySubmit": "Confirmar Alterações"
         },
+        "onShelf": "Disponível",
+        "offShelf": "Descontinuado",
+        "editProductName": "Editar nome do produto",
+        "enterProductName": "Digite o nome do produto",
+        "enterProductPrice": "Digite o preço do produto",
         "materialMonitor": "Monitor de Insumos",
         "showGoodsPage": {
             "title": "Configurar Exibição",
@@ -615,6 +620,11 @@
         "cheese": "Queijo",
         "peach": "Pêssego",
         "caramel": "Caramelo",
+        "C01": "Frutas trituradas (1)",
+        "C02": "Frutas trituradas (2)",
+        "J01": "Geleia (1)",
+        "J02": "Geleia (2)",
+        "J03": "Geleia (3)",
         "sentSuccessfully": "Comando Enviado",
         "turnOffSleep": "Modo Repouso Ativo",
         "turnOnSleep": "Modo Repouso Inativo",
@@ -1009,6 +1019,7 @@
         "tradeName": "Produto",
         "dividingDomesticService": "Comissão",
         "tax": "Tributos e Taxas",
+        "memberCode": "Código de membro",
         "business": "Comerciante",
         "orderNo": "Nº do Pedido",
         "commodity": "Item",
@@ -1573,8 +1584,13 @@
     },
     "bindWechat": {
         "cancel": "Cancelar",
+        "welcomeTitle": "Associação WeChat",
+        "welcomeSubtitle": "Associe WeChat para login fácil e notificações",
+        "unbind": "Desvincular",
+        "unbindTips": "Desvincular conta WeChat atual?",
+        "unbindSuccess": "WeChat desvinculado",
         "bindCommit": "Vincular WeChat",
-        "bindSuccess": "Vinculado"
+        "bindSuccess": "WeChat vinculado"
     },
     "labelMan": {
         "title": "Gestão de Grupos",
@@ -1866,6 +1882,7 @@
         "C29": "Gestão Tributária",
         "C30": "Extração de Geleia",
         "C31": "Registros de Manutenção",
-        "C32": "Configuração de pagamento"
+        "C32": "Configuração de pagamento",
+        "C33": "Gestão de produtos"
     }
 }

+ 20 - 3
src/assets/language/ru.json

@@ -550,6 +550,11 @@
             "batchPricePlace": "Цена...",
             "modifySubmit": "Сохранить"
         },
+        "onShelf": "В продаже",
+        "offShelf": "Снято с продажи",
+        "editProductName": "Изменить название товара",
+        "enterProductName": "Введите название товара",
+        "enterProductPrice": "Введите цену товара",
         "materialMonitor": "Контроль мат.",
         "showGoodsPage": {
             "title": "Отображение товаров",
@@ -615,6 +620,11 @@
         "cheese": "Queijo",
         "peach": "Pêssego",
         "caramel": "Caramelo",
+        "C01": "Фруктовая крошка (1)",
+        "C02": "Фруктовая крошка (2)",
+        "J01": "Фруктовый джем (1)",
+        "J02": "Фруктовый джем (2)",
+        "J03": "Фруктовый джем (3)",
         "sentSuccessfully": "Отправлено",
         "turnOffSleep": "Сон zzZ",
         "turnOnSleep": "Активно",
@@ -1009,6 +1019,7 @@
         "tradeName": "Товар",
         "dividingDomesticService": "Комиссия",
         "tax": "Налоги и сборы",
+        "memberCode": "Код участника",
         "business": "Мерчант",
         "orderNo": "№ заказа",
         "commodity": "Товар",
@@ -1604,8 +1615,13 @@
     },
     "bindWechat": {
         "cancel": "Отмена",
-        "bindCommit": "Привязать",
-        "bindSuccess": "Успешно"
+        "welcomeTitle": "Привязка WeChat",
+        "welcomeSubtitle": "Привяжите WeChat для простого входа и получения уведомлений",
+        "unbind": "Отвязать",
+        "unbindTips": "Отвязать текущий аккаунт WeChat?",
+        "unbindSuccess": "WeChat отвязан",
+        "bindCommit": "Привязать WeChat",
+        "bindSuccess": "WeChat привязан"
     },
     "labelMan": {
         "title": "Управление группами",
@@ -1897,6 +1913,7 @@
         "C29": "Управление налогообложением",
         "C30": "Экстракция джема",
         "C31": "Журнал обслуживания",
-        "C32": "Настройка платежей"
+        "C32": "Настройка платежей",
+        "C33": "Управление товарами"
     }
 }

+ 20 - 3
src/assets/language/uk.json

@@ -550,6 +550,11 @@
             "batchPricePlace": "Введіть ціну",
             "modifySubmit": "Зберегти зміни"
         },
+        "onShelf": "У продажу",
+        "offShelf": "Знято з продажу",
+        "editProductName": "Редагувати назву товару",
+        "enterProductName": "Введіть назву товару",
+        "enterProductPrice": "Введіть ціну товару",
         "materialMonitor": "Моніторинг матеріалів",
         "showGoodsPage": {
             "title": "Налаштування відображення",
@@ -615,6 +620,11 @@
         "cheese": "Сир",
         "peach": "Персик",
         "caramel": "Карамель",
+        "C01": "Фруктовий крихт (1)",
+        "C02": "Фруктовий крихт (2)",
+        "J01": "Фруктовий джем (1)",
+        "J02": "Фруктовий джем (2)",
+        "J03": "Фруктовий джем (3)",
         "sentSuccessfully": "Запит відправлено",
         "turnOffSleep": "Сон zzZ",
         "turnOnSleep": "Не спить",
@@ -1009,6 +1019,7 @@
         "tradeName": "Товар",
         "dividingDomesticService": "Розподіл комісій",
         "tax": "Податки та збори",
+        "memberCode": "Код члена",
         "business": "Продавець",
         "orderNo": "Номер замовлення",
         "commodity": "Товар",
@@ -1574,8 +1585,13 @@
     },
     "bindWechat": {
         "cancel": "Скасувати",
-        "bindCommit": "Прив'язка",
-        "bindSuccess": "Успішно прив'язано"
+        "welcomeTitle": "Прив'язка WeChat",
+        "welcomeSubtitle": "Прив'яжіть WeChat для входу та сповіщень",
+        "unbind": "Відв'язати",
+        "unbindTips": "Відв'язати поточний WeChat?",
+        "unbindSuccess": "WeChat відв'язано",
+        "bindCommit": "Прив'язати WeChat",
+        "bindSuccess": "WeChat прив'язано"
     },
     "labelMan": {
         "title": "Керування групами",
@@ -1867,6 +1883,7 @@
         "C29": "Управління оподаткуванням",
         "C30": "Витяг джему",
         "C31": "Журнал обслуговування",
-        "C32": "Налаштування платежів"
+        "C32": "Налаштування платежів",
+        "C33": "Управління товарами"
     }
 }

+ 18 - 1
src/assets/language/zh.json

@@ -559,6 +559,11 @@
       "batchPricePlace": "请输入批量价格",
       "modifySubmit": "修改提交"
     },
+    "onShelf": "上架中",
+    "offShelf": "已下架",
+    "editProductName": "编辑商品名称",
+    "enterProductName": "请输入商品名称",
+    "enterProductPrice": "请输入商品价格",
     "materialMonitor": "物料监控",
     "showGoodsPage": {
       "title": "商品显示设置",
@@ -624,6 +629,11 @@
     "cheese": "芝士",
     "peach": "水蜜桃",
     "caramel": "焦糖",
+    "C01": "果碎(1)",
+    "C02": "果碎(2)",
+    "J01": "果酱(1)",
+    "J02": "果酱(2)",
+    "J03": "果酱(3)",
     "sentSuccessfully": "发送请求成功",
     "turnOffSleep": "睡眠中zzZ",
     "turnOnSleep": "未睡眠",
@@ -1018,6 +1028,7 @@
     "tradeName": "商品名称",
     "dividingDomesticService": "分佣",
     "tax": "税费",
+    "memberCode": "会员代码",
     "business": "商家",
     "orderNo": "订单编号",
     "commodity": "商品",
@@ -1583,6 +1594,11 @@
   },
   "bindWechat": {
     "cancel": "取消",
+    "welcomeTitle": "微信绑定",
+    "welcomeSubtitle": "绑定微信,轻松登录并接收重要通知",
+    "unbind": "解绑",
+    "unbindTips": "确定要解绑当前微信吗?",
+    "unbindSuccess": "解绑成功",
     "bindCommit": "绑定微信",
     "bindSuccess": "绑定成功"
   },
@@ -1876,6 +1892,7 @@
     "C29": "税收管理",
     "C30": "果酱抽取",
     "C31": "维护记录",
-    "C32": "支付配置"
+    "C32": "支付配置",
+    "C33": "商品管理"
   }
 }

+ 16 - 0
src/common/js/countries-en.js

@@ -1367,6 +1367,22 @@ export const countriesDataEn = [
     ],
   },
   {
+    text: "Montenegro",
+    value: "ME",
+    children: [
+      { text: "Podgorica", value: "Podgorica" },
+      { text: "Bar", value: "Bar" },
+      { text: "Budva", value: "Budva" },
+      { text: "Cetinje", value: "Cetinje" },
+      { text: "Herceg Novi", value: "Herceg Novi" },
+      { text: "Kotor", value: "Kotor" },
+      { text: "Nikšić", value: "Nikšić" },
+      { text: "Pljevlja", value: "Pljevlja" },
+      { text: "Tivat", value: "Tivat" },
+      { text: "Ulcinj", value: "Ulcinj" }
+    ]
+  },
+  {
     text: "Madagascar",
     value: "MG",
     children: [

+ 16 - 0
src/common/js/countries.js

@@ -1355,6 +1355,22 @@ export const countriesData = [
     ],
   },
   {
+    text: "黑山",
+    value: "ME",
+    children: [
+      { text: "波德戈里察", value: "Podgorica" },
+      { text: "巴尔", value: "Bar" },
+      { text: "布德瓦", value: "Budva" },
+      { text: "采蒂涅", value: "Cetinje" },
+      { text: "新海尔采格", value: "Herceg Novi" },
+      { text: "科托尔", value: "Kotor" },
+      { text: "尼克希奇", value: "Nikšić" },
+      { text: "普列夫利亚", value: "Pljevlja" },
+      { text: "蒂瓦特", value: "Tivat" },
+      { text: "乌尔齐尼", value: "Ulcinj" }
+    ]
+  },
+  {
     text: "马达加斯加",
     value: "MG",
     children: [

+ 7 - 0
src/router/index.js

@@ -498,6 +498,13 @@ const router = createRouter({
       component: () => import("@/views/device/modifyPrice/index"),
       meta: { index: 1 },
     },
+    // 商品管理
+    {
+      path: "/goodsMan",
+      name: "goodsMan",
+      component: () => import("@/views/device/goodsMan/index"),
+      meta: { index: 1 },
+    },
     // 修改支付方式
     {
       path: "/payment",

+ 6 - 0
src/service/bindWechat.js

@@ -1,4 +1,5 @@
 import axios from '../utils/axios';
+import { stringToUrl } from '@/common/js/utils';
 
 // 绑定微信
 export function bindWechat(adminId) {
@@ -20,4 +21,9 @@ export function auth(code, state) {
 // 获取微信头像
 export function getAvatar(adminId) {
     return axios.get(`SZWL-SERVER/tWechat/getAvatar?adminId=${adminId}`);
+}
+
+// 解绑
+export function unbindWechat(params) {
+    return axios.get(`/SZWL-SERVER/tWechat/unbind?${stringToUrl(params)}`);
 }

+ 10 - 0
src/service/device/index.js

@@ -406,3 +406,13 @@ export function getPayConfig(params) {
 export function pushPayInfo(params) {
   return axios.post(`/SZWL-SERVER/openPayInfo/pushPayInfo`, params);
 }
+
+// 修改商品信息
+export function updateProductInfo(params) {
+  return axios.post(`/SZWL-SERVER/tEquipment/updateProductInfo`, params);
+}
+
+// 批量修改商品价格
+export function batchUpdatePrice(params) {
+  return axios.post(`/SZWL-SERVER/tEquipment/batchUpdatePrice`, params);
+}

+ 258 - 42
src/views/bindWechat.vue

@@ -1,27 +1,53 @@
 <template>
-  <!-- 绑定微信 -->
   <div class="bindWechat">
-    <s-header :name="$t('wechat.headerName')" :noback="false"></s-header>
-    <div class="loginFormBox">
-      <van-form @submit="onSubmit">
-        <!-- 微信头像 -->
-        <div style="display: flex;justify-content: center;align-items: center">
-          <van-image width="100px" height="100px" :src="wechatInfo.avatarUrl" fit="cover" radius="50%"
-            style="margin: auto" />
+    <s-header :name="$t('wechat.headerName')" :noback="false" />
+    
+    <!-- 内容区域 -->
+    <div class="content">
+      <!-- 欢迎标题 -->
+      <div class="welcome">
+        <h2 class="title">{{ $t('bindWechat.welcomeTitle') }}</h2>
+        <p class="subtitle">{{ $t('bindWechat.welcomeSubtitle') }}</p>
+      </div>
+      
+      <!-- 微信头像卡片 -->
+      <div class="avatar-card">
+        <div class="avatar-container">
+          <van-image
+            width="120px"
+            height="120px"
+            fit="cover"
+            :src="wechatInfo.avatarUrl"
+            radius="50%"
+            class="avatar-image"
+          />
+          <div class="avatar-ring"></div>
         </div>
-        <br>
-        <br>
-        <br>
-        <div class="buttonBox">
-          <!-- 取消绑定微信,返回登录页 -->
-          <van-button round type="primary" class="register" @click="cancelClick">{{ $t('bindWechat.cancel') }}
-          </van-button>
-          <!-- 用户回车,默认触发 form 表单提交操作 -->
-          <van-button round type="primary" native-type="submit" id="bind-btn">{{ $t('bindWechat.bindCommit') }}
-          </van-button>
-        </div>
-
-      </van-form>
+      </div>
+      
+      <!-- 底部按钮区域 -->
+      <div class="action-buttons">
+        <van-button 
+          v-if="wechatInfo.avatarUrl !== ''"
+          round 
+          class="cancel-btn"
+          @click="unbindClick"
+        >
+          <van-icon name="close" class="btn-icon"  size="20px" />
+          {{ $t("bindWechat.unbind") }}
+        </van-button>
+        
+        <van-button
+        v-if="wechatInfo.avatarUrl === ''"
+          round 
+          type="primary" 
+          class="bind-btn"
+          @click="onSubmit"
+        >
+          <van-icon name="wechat" class="btn-icon" size="20px" />
+          {{ $t("bindWechat.bindCommit") }}
+        </van-button>
+      </div>
     </div>
   </div>
 </template>
@@ -29,18 +55,22 @@
 <script>
 import { onMounted, reactive, ref } from "vue";
 // import {Toast} from "vant";
-import { showSuccessToast, showFailToast } from 'vant';
-import { bindWechat, getAvatar } from "@/service/bindWechat";
-import { setLocal, getLocal, navigatorLanguage, getLoginUser, styleUrl } from "@/common/js/utils";
+import { showSuccessToast, showFailToast, showConfirmDialog } from "vant";
+import { bindWechat, getAvatar, unbindWechat } from "@/service/bindWechat";
+import {
+  setLocal,
+  getLocal,
+  navigatorLanguage,
+  getLoginUser,
+} from "@/common/js/utils";
 import sHeader from "@/components/SimpleHeader";
 import logiLogoImgUrl from "@/assets/login/logo.png";
 import { useRouter } from "vue-router";
 import { useI18n } from "vue-i18n";
 
 export default {
-  setup: function () {
+  setup() {
     let languageName = ref(getLocal("curLang"));
-    // eslint-disable-next-line no-unused-vars
     const { t } = useI18n();
 
     const checked = ref(false); // 是否记住密码状态
@@ -51,7 +81,6 @@ export default {
     // 页面初始化
     onMounted(async () => {
       // 加载样式
-      styleUrl('bindWechat');
       // localStorage.clear();
       // 如果没有语言缓存
       if (!getLocal("curLang")) {
@@ -63,23 +92,37 @@ export default {
 
     const user = getLoginUser();
 
-    // 返回用户页
-    const cancelClick = async () => {
-      await router.push("/user");
-    }
+    // 解绑
+    const unbindClick = async () => {
+      showConfirmDialog({
+        title: t("user.tips"),
+        message: t("bindWechat.unbindTips"),
+      })
+        .then(async() => {
+          const { data } = await unbindWechat({adminId: user.id});
+          if (data.code === '00000') {
+            showSuccessToast(t("bindWechat.unbindSuccess"));
+            setTimeout(() => {
+              router.go(0);
+            }, 1500);
+          } else {
+            showFailToast(data.message);
+          }
+        })
+        .catch((error) => {
+          console.error(error);
+        });
+    };
 
     // 绑定微信
     const onSubmit = async () => {
       try {
-        const { data } = await bindWechat(
-          user.id
-        );
+        const { data } = await bindWechat(user.id);
         if (data.code === "00000") {
-          console.log(data.data);
           // 在当前窗口打开链接
           window.location.href = data.data;
           // 绑定成功
-          showSuccessToast("绑定成功")
+          showSuccessToast(t("bindWechat.bindSuccess"));
         } else {
           showFailToast("调用微信授权失败");
         }
@@ -91,8 +134,8 @@ export default {
 
     // 存储微信头像的链接
     const wechatInfo = reactive({
-      avatarUrl: ''
-    })
+      avatarUrl: "",
+    });
 
     // 在页面加载时调用后端接口获取信息
     onMounted(async () => {
@@ -102,7 +145,7 @@ export default {
       } catch (error) {
         console.error("获取微信头像失败");
       }
-    })
+    });
 
     return {
       logiLogoImgUrl,
@@ -111,8 +154,8 @@ export default {
       userPwd,
       onSubmit,
       sys,
-      cancelClick,
-      wechatInfo
+      unbindClick,
+      wechatInfo,
     };
   },
   components: { sHeader },
@@ -120,5 +163,178 @@ export default {
 </script>
 
 <style lang="less" scoped>
-@import "../common/style/mixin";
+@primary-color: #4d6add;
+@light-blue: #5b86e5;
+@light-cyan: #36d1dc;
+@text-dark: #333;
+@text-gray: #666;
+@border-color: #e4e7ec;
+@bg-color: #f8fafb;
+@success-green: #4caf50;
+@card-bg: #ffffff;
+@radius: 16px;
+
+.bindWechat {
+  display: flex;
+  flex-direction: column;
+  min-height: 100vh;
+  background: @bg-color;
+  position: relative;
+}
+
+.content {
+  flex: 1;
+  padding: 30px 20px 40px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+.welcome {
+  text-align: center;
+  margin-bottom: 40px;
+  
+  .title {
+    font-size: 24px;
+    font-weight: 600;
+    color: @text-dark;
+    margin-bottom: 12px;
+    position: relative;
+    
+    &::after {
+      content: '';
+      position: absolute;
+      bottom: -8px;
+      left: 50%;
+      transform: translateX(-50%);
+      width: 40px;
+      height: 3px;
+      background: linear-gradient(to right, @light-cyan, @light-blue);
+      border-radius: 2px;
+    }
+  }
+  
+  .subtitle {
+    font-size: 15px;
+    color: @text-gray;
+    line-height: 1.6;
+    max-width: 320px;
+    margin: 0 auto;
+  }
+}
+
+.avatar-card {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  width: 100%;
+  max-width: 350px;
+  margin-bottom: 20px;
+  position: relative;
+}
+
+.avatar-container {
+  position: relative;
+  margin-bottom: 25px;
+  
+  .avatar-image {
+    border: 3px solid white;
+    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
+  }
+  
+  .avatar-ring {
+    position: absolute;
+    top: -10px;
+    left: -10px;
+    right: -10px;
+    bottom: -10px;
+    border: 4px solid;
+    border-image-slice: 1;
+    border-image-source: linear-gradient(to right, @light-cyan, @light-blue);
+    border-radius: 50%;
+    z-index: -1;
+    animation: pulse-ring 3s infinite ease-in-out;
+  }
+}
+
+@keyframes pulse-ring {
+  0% {
+    opacity: 0.8;
+    transform: scale(0.9);
+  }
+  50% {
+    opacity: 0.3;
+    transform: scale(1.1);
+  }
+  100% {
+    opacity: 0.8;
+    transform: scale(0.9);
+  }
+}
+
+.action-buttons {
+  
+  .cancel-btn {
+    border: 1px solid @border-color;
+    background: #fb725f;
+    color: #f5f7ff;
+    transition: all 0.3s ease;
+    padding: 0 50px;
+    
+    .btn-icon {
+      margin-right: 5px;
+    }
+    
+    &:active {
+      background: #f5f7ff;
+    }
+  }
+  
+  .bind-btn {
+    background: linear-gradient(to right, @light-cyan, @light-blue);
+    border: none;
+    box-shadow: 0 5px 15px rgba(91, 134, 229, 0.4);
+    transition: all 0.3s ease;
+    padding: 0 50px;
+    
+    .btn-icon {
+      margin-right: 5px;
+    }
+    
+    &:active {
+      transform: translateY(2px);
+      box-shadow: 0 3px 10px rgba(91, 134, 229, 0.4);
+    }
+  }
+}
+
+// 响应式设计
+@media (max-width: 480px) {
+  .content {
+    padding: 20px 15px 30px;
+  }
+  
+  .welcome {
+    .title {
+      font-size: 22px;
+    }
+    
+    .subtitle {
+      font-size: 14px;
+    }
+  }
+  
+  .avatar-container {
+    .avatar-image {
+      width: 100px;
+      height: 100px;
+    }
+  }
+  
+  .action-buttons {
+    .cancel-btn, .bind-btn {
+      width: 100%;
+    }
+  }
+}
 </style>

+ 26 - 1
src/views/device/deviceOper.vue

@@ -372,7 +372,7 @@
       </div>
       <!-- 物料监控 -->
       <div
-        v-if="device.equimentType != 'SI320' && controlList.includes('C12')"
+        v-if="controlList.includes('C12')"
         class="operation-item"
         @click="materialMonitorClk()"
       >
@@ -657,6 +657,23 @@
           <span class="operation-text">{{ $t("remote.C32") }}</span>
         </div>
       </div>
+      <!-- 商品管理 -->
+      <div
+        v-if="user.type == 0"
+        class="operation-item"
+        @click="goodsManClk()"
+      >
+        <div class="icon-wrapper">
+          <img
+            class="operation-icon"
+            src="../../assets/device/operIcon/goodsMan.png"
+            alt="goodsMan"
+          />
+        </div>
+        <div class="text-wrapper">
+          <span class="operation-text">{{ $t("remote.C33") }}</span>
+        </div>
+      </div>
     </div>
   </van-dialog>
   <van-dialog
@@ -812,6 +829,13 @@ export default {
         },
       });
     };
+    // 点击修改价格
+    const goodsManClk = () => {
+      router.push({
+        path: "goodsMan",
+        query: { deviceId: device.value.id, name: device.value.name },
+      });
+    };
     const { t } = useI18n();
     const user = getLoginUser();
     const router = useRouter();
@@ -1196,6 +1220,7 @@ export default {
       tuojiEquipmentFun,
       isRole,
       modifyPriceClk,
+      goodsManClk,
       showGoodsClk,
       diyFlowerClk,
       sleepTitle,

+ 599 - 0
src/views/device/goodsMan/index.vue

@@ -0,0 +1,599 @@
+<template>
+  <div class="price-editor">
+    <s-header :name="$t('device.modifyPricePage.title')" :noback="false" />
+    <div class="content-container">
+      <!-- 设备信息卡片 -->
+      <div class="device-card">
+        <div class="device-header">
+          <div class="header-indicator"></div>
+          <h3 class="device-name">
+            {{ $t("device.modifyPricePage.equipmentName") }}:{{
+              equipmentName
+            }}
+          </h3>
+        </div>
+      </div>
+
+      <!-- 商品列表卡片 -->
+      <div class="goods-card">
+        <!-- 操作头部 -->
+        <div class="card-header">
+          <div class="goods-count">
+            {{ $t("device.modifyPricePage.total") }}
+            <span class="highlight">{{ tableData.length }}</span>
+            {{ $t("device.modifyPricePage.goods") }}
+          </div>
+          <van-button icon="edit" @click="noticeClk" class="batch-btn">
+            {{ $t("device.modifyPricePage.batchModify") }}
+          </van-button>
+        </div>
+
+        <!-- 商品列表 -->
+        <div class="goods-list">
+          <div
+            v-for="(item, index) in tableData"
+            :key="index"
+            class="goods-item"
+            :class="{ 'off-shelf': item.shelfStatus === 0 }"
+          >
+            <!-- 左侧商品图片 -->
+            <div class="goods-image-container">
+              <van-image
+                class="goods-image"
+                :src="showSugerPhoto(item)"
+                fit="cover"
+              />
+            </div>
+
+            <!-- 中间商品信息 -->
+            <div class="goods-info">
+              <!-- 商品名称行 -->
+              <div class="name-row">
+                <template v-if="item.isEditName">
+                  <van-field
+                    v-model="item.productName"
+                    class="name-input"
+                    :border="false"
+                    clearable
+                  >
+                  </van-field>
+                  <van-icon
+                    name="success"
+                    class="action-icon"
+                    @click="updateProduct(item, 1)"
+                  />
+                </template>
+                <template v-else>
+                  <span class="goods-name">{{ item.productName }}</span>
+                  <van-icon
+                    name="edit"
+                    class="name-edit-icon"
+                    @click="item.isEditName = true"
+                  />
+                </template>
+              </div>
+
+              <!-- 价格行 -->
+              <div class="price-row">
+                <template v-if="item.isEditPrice">
+                  <van-field
+                    type="number"
+                    v-model="item.rmbPrice"
+                    class="price-input"
+                    :border="false"
+                    clearable
+                  >
+                    <template #extra>
+                      <span class="currency-symbol">{{ currencySymbol }}</span>
+                    </template>
+                  </van-field>
+                  <van-icon
+                    name="success"
+                    class="action-icon"
+                    @click="updateProduct(item, 2)"
+                  />
+                </template>
+                <template v-else>
+                  <div class="price-display">
+                    <span class="currency">{{ currencySymbol }}</span>
+                    <span class="price">{{ item.rmbPrice }}</span>
+                  </div>
+                  <van-icon
+                    name="edit"
+                    class="action-icon"
+                    @click="item.isEditPrice = true"
+                  />
+                </template>
+              </div>
+            </div>
+
+            <!-- 右侧开关控制 -->
+            <div class="shelf-control">
+              <van-switch
+                v-model="item.sellStatus"
+                :active-value="true"
+                :inactive-value="false"
+                size="22px"
+                active-color="#4d6add"
+                inactive-color="#dcdee0"
+                @change="updateProduct(item, 3)"
+              />
+              <span class="shelf-status">
+                {{
+                  item.sellStatus ? $t("device.onShelf") : $t("device.offShelf")
+                }}
+              </span>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <!-- 批量修改弹窗 -->
+    <kDialog
+      :isCloseForConfirm="false"
+      :dialogTitle="$t('device.modifyPricePage.batchPrice')"
+      :confirmBtnTxt="$t('device.modifyPricePage.modifySubmit')"
+      ref="kDialogRef"
+      @confirmclk="confirmClk"
+    >
+      <template #content>
+        <van-field
+          type="number"
+          v-model="cofficentForm.price"
+          :placeholder="$t('device.modifyPricePage.batchPricePlace')"
+          :label="$t('device.modifyPricePage.batchPrice')"
+          class="batch-field"
+        >
+          <template #extra>
+            <span class="currency-symbol">{{ currencySymbol }}</span>
+          </template>
+        </van-field>
+      </template>
+    </kDialog>
+  </div>
+</template>
+
+<script>
+import kDialog from "@/components/commom/kDialog/index.vue";
+// 导入接口
+import {
+  selectProducts,
+  updateProductInfo,
+  batchUpdatePrice,
+} from "@/service/device/index";
+import sHeader from "@/components/SimpleHeader";
+import { reactive, ref } from "@vue/reactivity";
+import { onMounted } from "@vue/runtime-core";
+import { useRoute } from "vue-router";
+import { showToast } from "vant";
+import { useI18n } from "vue-i18n";
+
+export default {
+  components: { sHeader, kDialog },
+  setup() {
+    // 引入语言
+    const { t } = useI18n();
+    // 批量修改弹窗
+    const kDialogRef = ref(null);
+    // 点击批量修改
+    const noticeClk = () => {
+      cofficentForm.price = "";
+      kDialogRef.value.openDialog();
+    };
+    // 修改商品信息提交参数
+    const params = ref();
+    // 点击确定按钮
+    const confirmClk = async() => {
+      if (!cofficentForm.price) {
+        showToast(t("device.modifyPricePage.batchPricePlace"));
+        return;
+      }
+      params.value = {
+        equipmentId: cofficentForm.equipmentId,
+        rmbPrice: cofficentForm.price,
+      };
+      try {
+        const { data } = await batchUpdatePrice(params.value);
+        console.log(data);
+      } catch (error) {
+        console.log(error);
+      }
+      kDialogRef.value.closeDialog();
+    };
+    // 商品图片路径处理
+    const showSugerPhoto = (row) => {
+      let imgId = row.no;
+      if (imgId) {
+        return require(`../../../assets/order/spunSugar/goods/${imgId}.png`);
+      }
+      return imgId;
+    };
+    // 路由
+    const route = useRoute();
+    // 商品数据
+    const tableData = ref([]);
+    // 设备名称
+    const equipmentName = ref("");
+    // 刚进页面
+    onMounted(() => {
+      // 加载样式
+      const id = route.query.deviceId || "";
+      const name = route.query.name || "";
+      if (id) {
+        cofficentForm.equipmentId = id;
+        equipmentName.value = name;
+        getList();
+      }
+    });
+    // 获取商品列表
+    const getList = () => {
+      selectProducts({ equipmentId: cofficentForm.equipmentId }).then((res) => {
+        const { data } = res.data;
+        if (data) {
+          if (data.length > 0) {
+            // 是否修改状态
+            data.forEach((item) => {
+              item.isEditPrice = false;
+              item.isEditName = false;
+            });
+          }
+          tableData.value = data;
+        }
+      });
+    };
+    // 修改的价格
+    const cofficentForm = reactive({
+      equipmentId: "",
+      price: "",
+    });
+    // 自定义货币符号
+    const currencySymbol = ref("¥");
+    const loginUserStr = localStorage.getItem("loginUser");
+    const loginUser = JSON.parse(loginUserStr);
+    if (loginUser.currencySymbol) {
+      currencySymbol.value = loginUser.currencySymbol;
+    } else {
+      currencySymbol.value = "¥";
+    }
+
+    // 修改商品信息
+    const updateProduct = async (item, index) => {
+      // 排除掉isEditPrice、isEditName
+      if (index == 1) {
+        if (item.productName == "") {
+          showToast(t("device.enterProductName"));
+          return;
+        }
+        // 修改名称
+        item.isEditName = false;
+      } else if (index == 2) {
+        // 修改价格
+        if (item.rmbPrice == "") {
+          showToast(t("device.enterProductPrice"));
+          return;
+        }
+        item.codePrice = item.rmbPrice;
+        item.isEditPrice = false;
+      }
+      params.value = {
+        codePrice: item.codePrice,
+        equipmentId: item.equipmentId,
+        productName: item.productName,
+        name: item.name,
+        rmbPrice: item.rmbPrice,
+        sellStatus: item.sellStatus,
+        no: item.no,
+        // 故意省略 isEditPrice 和 isEditName
+      };
+      try {
+        const { data } = await updateProductInfo(params.value);
+        console.log(data);
+      } catch (error) {
+        console.log(error);
+      }
+    };
+    
+    return {
+      cofficentForm,
+      tableData,
+      showSugerPhoto,
+      kDialogRef,
+      noticeClk,
+      confirmClk,
+
+      // 参数
+
+      equipmentName,
+      currencySymbol,
+
+      // 方法
+      updateProduct,
+    };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@primary-color: #4d6add;
+@light-bg: #f5f8ff;
+@card-bg: #ffffff;
+@text-dark: #333;
+@text-light: #666;
+@text-lighter: #999;
+@border-color: #e4e7ec;
+@border-radius: 12px;
+@card-shadow: 0 4px 12px rgba(77, 106, 221, 0.15);
+@hover-shadow: 0 8px 20px rgba(77, 106, 221, 0.25);
+@transition: all 0.3s ease;
+
+.price-editor {
+  background: @light-bg;
+  min-height: 100vh;
+}
+
+.content-container {
+  padding: 15px;
+}
+
+.device-card {
+  background: @card-bg;
+  border-radius: @border-radius;
+  box-shadow: @card-shadow;
+  margin: 0 0 15px;
+  padding: 16px;
+
+  .device-header {
+    display: flex;
+    align-items: center;
+
+    .header-indicator {
+      width: 3px;
+      height: 20px;
+      background: @primary-color;
+      margin-right: 12px;
+      border-radius: 2px;
+    }
+
+    .device-name {
+      margin: 0;
+      font-size: 16px;
+      color: #404d74;
+      font-weight: 550;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      max-width: 85%;
+    }
+  }
+}
+
+.goods-card {
+  background: @card-bg;
+  border-radius: @border-radius;
+  box-shadow: @card-shadow;
+  padding: 16px;
+  margin-bottom: 20px;
+
+  .card-header {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-bottom: 20px;
+
+    .goods-count {
+      color: @text-light;
+      font-size: 14px;
+
+      .highlight {
+        color: @primary-color;
+        font-weight: 500;
+        margin: 0 4px;
+      }
+    }
+
+    .batch-btn {
+      height: 32px;
+      padding: 0 16px;
+      font-size: 13px;
+      border-radius: 8px;
+    }
+  }
+}
+
+.goods-list {
+  .goods-item {
+    display: flex;
+    align-items: center;
+    padding: 16px 0;
+    border-bottom: 1px solid @border-color;
+    position: relative;
+
+    &:last-child {
+      border-bottom: none;
+    }
+
+    &.off-shelf {
+      opacity: 0.8;
+      background-color: fade(@text-lighter, 5%);
+    }
+  }
+}
+
+.goods-image-container {
+  width: 70px;
+  height: 70px;
+  border-radius: 8px;
+  overflow: hidden;
+  margin-right: 15px;
+  flex-shrink: 0;
+
+  .goods-image {
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+    background-color: @light-bg;
+  }
+}
+
+.goods-info {
+  flex: 1;
+  min-width: 0;
+  margin-right: 15px;
+}
+
+.name-row {
+  display: flex;
+  align-items: center;
+  gap: 12px;
+  margin-bottom: 10px;
+
+  .goods-name {
+    font-size: 15px;
+    color: @text-dark;
+    font-weight: 500;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+
+  .name-input {
+    width: 80%;
+    background: @light-bg;
+    border-radius: 8px;
+    padding: 6px 14px;
+  }
+
+  .action-icon {
+    color: @primary-color;
+    font-size: 18px;
+    padding: 6px;
+    cursor: pointer;
+  }
+
+  .name-edit-icon {
+    color: @primary-color;
+    font-size: 18px;
+    flex-shrink: 0;
+    padding: 4px;
+    cursor: pointer;
+  }
+}
+
+.price-row {
+  display: flex;
+  align-items: center;
+  gap: 12px;
+
+  .price-input {
+    width: 100px;
+    background: @light-bg;
+    border-radius: 8px;
+    padding: 6px 14px;
+  }
+
+  .price-display {
+    color: #df5e4c;
+    font-size: 15px;
+    font-weight: 500;
+
+    .price {
+      font-size: 16px;
+    }
+  }
+
+  .currency-symbol,
+  .currency {
+    color: @primary-color;
+    font-size: 14px;
+    margin-right: 2px;
+  }
+
+  .action-icon {
+    color: @primary-color;
+    font-size: 18px;
+    padding: 6px;
+    cursor: pointer;
+  }
+}
+
+.shelf-control {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  min-width: 70px;
+
+  .shelf-status {
+    font-size: 12px;
+    color: @text-light;
+    margin-top: 6px;
+    text-align: center;
+  }
+}
+
+.batch-field {
+  :deep(.van-field__label) {
+    width: 100px;
+  }
+}
+
+.name-edit-dialog {
+  :deep(.van-dialog) {
+    border-radius: 16px;
+    overflow: hidden;
+  }
+
+  .dialog-content {
+    padding: 20px;
+  }
+
+  .name-edit-field {
+    background: @light-bg;
+    border-radius: 8px;
+    padding: 12px;
+  }
+
+  .char-count {
+    text-align: right;
+    font-size: 12px;
+    color: @text-lighter;
+    margin-top: 8px;
+  }
+}
+
+@media (max-width: 480px) {
+  .goods-card {
+    padding: 12px;
+  }
+
+  .goods-item {
+    padding: 12px 0;
+  }
+
+  .goods-image-container {
+    width: 60px;
+    height: 60px;
+    margin-right: 10px;
+  }
+
+  .goods-name {
+    font-size: 14px;
+  }
+
+  .price-input {
+    width: 90px;
+  }
+
+  .shelf-control {
+    min-width: 60px;
+
+    .shelf-status {
+      font-size: 11px;
+    }
+  }
+}
+
+:deep(.van-image__img) {
+  object-fit: contain !important;
+}
+</style>

+ 74 - 19
src/views/device/index.vue

@@ -10,8 +10,11 @@
     />
 
     <!-- 主体内容 -->
-    <div class="device-list-container" ref="scrollContainer"
-        @scroll="handleScroll">
+    <div
+      class="device-list-container"
+      ref="scrollContainer"
+      @scroll="handleScroll"
+    >
       <van-list
         v-model:loading="loading"
         v-model:error="error"
@@ -20,7 +23,7 @@
         offset="100"
         :immediate-check="false"
         :finished="finished"
-        @load="onLoad"    
+        @load="onLoad"
       >
         <!-- 数据概览 -->
         <div class="data-overview">
@@ -41,10 +44,14 @@
                   <van-icon name="bars" class="icon-filter" />
                 </template>
               </van-popover>
-              <van-icon name="search" class="icon-search" @click="searchClick" />
+              <van-icon
+                name="search"
+                class="icon-search"
+                @click="searchClick"
+              />
             </div>
           </div>
-  
+
           <!-- 统计卡片 -->
           <div class="stats-cards">
             <div class="stat-card">
@@ -59,7 +66,7 @@
             </div>
           </div>
         </div>
-  
+
         <!-- 设备列表 -->
         <div class="device-list-section">
           <van-tabs
@@ -78,7 +85,7 @@
               :name="item.id"
             />
           </van-tabs>
-  
+
           <!-- 设备项 -->
           <div class="device-items">
             <div v-for="item in list" :key="item.id" class="device-item">
@@ -90,7 +97,7 @@
                   alert: item.hasTodayAlarm,
                 }"
               ></div>
-  
+
               <!-- 设备主体信息 -->
               <div class="device-main">
                 <!-- 基础信息 -->
@@ -113,7 +120,7 @@
                   <div class="device-id">
                     {{ $t("device.machineUniqueCode") }}:{{ item.clientId }}
                   </div>
-  
+
                   <!-- 状态信息 -->
                   <div class="status-info">
                     <span v-if="user.type < 1" class="lock-status">
@@ -156,7 +163,10 @@
                           $t("device.degree")
                         }}
                       </span>
-                      <span v-if="item.equimentType != 'P10'" class="temperature">
+                      <span
+                        v-if="item.equimentType != 'P10'"
+                        class="temperature"
+                      >
                         {{
                           $t("device.stirringTemperature") +
                           ":" +
@@ -183,7 +193,7 @@
                     </template>
                   </div>
                 </div>
-  
+
                 <!-- 扩展内容 -->
                 <div v-if="item.checkType" class="device-detail">
                   <!-- 设备详细信息 -->
@@ -194,7 +204,7 @@
                       }}</label
                     >
                   </div>
-  
+
                   <!-- 睡眠控制 -->
                   <div class="detail-section machine-control">
                     <div class="control-container">
@@ -206,7 +216,7 @@
                             : $t("device.notSleeping")
                         }}
                       </span>
-  
+
                       <!-- 切换按钮 -->
                       <van-switch
                         :model-value="item.isSleep"
@@ -237,7 +247,7 @@
                         {{ $t("device.modify") }}
                       </van-button>
                     </div>
-  
+
                     <div class="desc-edit" v-else>
                       <van-field
                         v-model="item.sleepDesc"
@@ -399,6 +409,39 @@
                         </div>
                       </div>
                     </div>
+                    <!-- 冰淇淋物料 -->
+                    <div
+                      class="detail-section material-usage"
+                      v-if="item.machineType === '2'"
+                    >
+                      <div class="material-group">
+                        <div class="material-grid">
+                          <div
+                            v-for="(ice, index) in iceTypes"
+                            :key="index"
+                            class="material-item"
+                          >
+                            <van-icon
+                              :name="ice.icon"
+                              class="material-icon"
+                              size="25px"
+                              :style="{ color: ice.color }"
+                            />
+                            <div class="material-info">
+                              <span class="material-label">{{
+                                $t(`device.${ice.type}`)
+                              }}</span>
+                              <span class="material-value"
+                                >{{
+                                  Format_calcuDecial(item[ice.code])
+                                }}
+                                %</span
+                              >
+                            </div>
+                          </div>
+                        </div>
+                      </div>
+                    </div>
                   </template>
                   <!-- 最近刷新时间 -->
                   <div class="detail-section">
@@ -440,7 +483,7 @@
                         </div>
                       </div>
                     </div>
-  
+
                     <!-- 一键清除 -->
                     <div class="alert-actions">
                       <van-button
@@ -454,7 +497,7 @@
                       </van-button>
                     </div>
                   </div>
-  
+
                   <!-- 操作按钮 -->
                   <div class="action-buttons">
                     <van-button
@@ -475,7 +518,7 @@
                     </van-button>
                   </div>
                 </div>
-  
+
                 <!-- 展开/收起 -->
                 <div
                   class="toggle-detail"
@@ -484,7 +527,9 @@
                   <span>{{
                     item.checkType ? $t("device.stow") : $t("device.seeMore")
                   }}</span>
-                  <van-icon :name="item.checkType ? 'arrow-up' : 'arrow-down'" />
+                  <van-icon
+                    :name="item.checkType ? 'arrow-up' : 'arrow-down'"
+                  />
                 </div>
               </div>
             </div>
@@ -569,6 +614,15 @@ export default {
       { code: "blueSugar", type: "caramel", icon: "stop", color: "#D2691E" },
     ]);
 
+    // 冰淇淋物料
+    const iceTypes = ref([
+      { code: "whiteSugar", type: "C01", icon: "stop", color: "#5C3317" },
+      { code: "redSugar", type: "C02", icon: "stop", color: "#faad14" },
+      { code: "yellowSugar", type: "J01", icon: "stop", color: "#ff4d4f" },
+      { code: "blueSugar", type: "J02", icon: "stop", color: "#1890ff" },
+      { code: "stick", type: "J03", icon: "stop", color: "#f8ff3b" },
+    ])
+
     // 创建容器引用
     const scrollContainer = ref(null);
     // 创建响应式滚动位置
@@ -811,7 +865,7 @@ export default {
             longitude: row.longitude,
             fullName: row.fullName,
             name: row.name ? row.name : row.clientId.slice(-6),
-            status: row.eqeStatus
+            status: row.eqeStatus,
           },
         });
       } else {
@@ -1036,6 +1090,7 @@ export default {
       controlList,
       sugarTypes,
       popornTypes,
+      iceTypes,
 
       scrollContainer,
       scrollTop,

+ 7 - 0
src/views/orderCenter/index.vue

@@ -240,6 +240,13 @@
             refundObject.tax != null ? refundObject.tax.toFixed(2) : "0.00"
           }}</span>
         </div>
+        <div
+          v-if="refundObject.memberCode != null"
+          class="orderDetailBox flex-row justify-between"
+        >
+          <span class="title">{{ $t("orderCenter.memberCode") }}</span>
+          <span class="content">{{ refundObject.memberCode }}</span>
+        </div>
         <div class="orderDetailBox flex-row justify-between">
           <span class="title">{{ $t("orderCenter.equipmentNo") }}</span>
           <van-text-ellipsis

+ 0 - 11
src/views/user.vue

@@ -348,17 +348,6 @@
             </div>
           </div>
           <!-- 提现帐号 -->
-          <!-- <div
-            v-if="user.type == 2"
-            class="taskListRow l-flex-RC"
-            @click="pushPageList('/bindBankCard')"
-          >
-            <div class="taskIcon joinPayMchIcon"></div>
-            <div class="taskRight">
-              <div class="taskTitle">绑定银行卡</div>
-            </div>
-          </div> -->
-          <!-- 提现帐号 -->
           <div
             v-if="isInland && (user.type == 2 || user.type == 3)"
             class="taskListRow l-flex-RC"