Browse Source

feat:“同步2025.08.16“

soobin 1 week ago
parent
commit
89ce573c09
45 changed files with 3323 additions and 4436 deletions
  1. 1 1
      package.json
  2. 2 2
      public/version.json
  3. 5 1
      src/assets/language/en.json
  4. 5 1
      src/assets/language/es.json
  5. 5 1
      src/assets/language/fr.json
  6. 5 1
      src/assets/language/ja.json
  7. 5 1
      src/assets/language/pt.json
  8. 5 1
      src/assets/language/ru.json
  9. 5 1
      src/assets/language/uk.json
  10. 5 1
      src/assets/language/zh.json
  11. BIN
      src/assets/order/spunSugar/goods/B07.png
  12. 29 9
      src/components/NavBar.vue
  13. 7 14
      src/router/index.js
  14. 16 19
      src/service/device/index.js
  15. 3 4
      src/service/forgetPassword.js
  16. 308 37
      src/views/changePassword.vue
  17. 150 37
      src/views/device/customLogo.vue
  18. 74 17
      src/views/device/deviceOper.vue
  19. 6 10
      src/views/device/devicePassword/index.vue
  20. 30 4
      src/views/device/deviceSet.vue
  21. 20 14
      src/views/device/doSugar.vue
  22. 554 559
      src/views/device/goodsMan/index.vue
  23. 1 1
      src/views/device/index.vue
  24. 250 253
      src/views/device/jam/index.vue
  25. 816 819
      src/views/device/maintenance/index.vue
  26. 7 15
      src/views/device/modifyPrice/index.vue
  27. 6 8
      src/views/device/modulation.vue
  28. 8 11
      src/views/device/openDoor.vue
  29. 10 13
      src/views/device/paramsSet/index.vue
  30. 8 10
      src/views/device/paramsSet/paramsSetInfo.vue
  31. 301 300
      src/views/device/payInfo/index.vue
  32. 213 215
      src/views/device/payment/index.vue
  33. 386 389
      src/views/device/returnCoin/index.vue
  34. 0 142
      src/views/device/saveProportion/index.less
  35. 0 178
      src/views/device/saveProportion/index.vue
  36. 4 7
      src/views/device/showGoods/index.vue
  37. 0 8
      src/views/device/tagSet/index.vue
  38. 8 10
      src/views/device/tax/index.vue
  39. 10 9
      src/views/device/toDaySugarList.vue
  40. 10 75
      src/views/device/viewLogs/index.vue
  41. 17 7
      src/views/distributionSet/detail.vue
  42. 6 56
      src/views/forgetPassword.vue
  43. 21 12
      src/views/purse/index.vue
  44. 0 1163
      src/views/settlement/index.vue
  45. 1 0
      src/views/user.vue

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "sc-vue3-app",
-  "version": "1.5.811",
+  "version": "1.5.816",
   "private": true,
   "scripts": {
     "start": "vue-cli-service serve",

+ 2 - 2
public/version.json

@@ -1,5 +1,5 @@
 {
-  "version": "1.5.811",
-  "timestamp": "2025-08-11T09:49:18.558",
+  "version": "1.5.816",
+  "timestamp": "2025-08-16T18:29:29.663",
   "commitHash": "dev-build"
 }

+ 5 - 1
src/assets/language/en.json

@@ -1397,7 +1397,11 @@
     "passwordCheckRequired": "Required",
     "registerButton": "Submit",
     "inconsistentPasswords": "Mismatch",
-    "pwdEditSucess": "Password Changed"
+    "pwdEditSucess": "Password changed",
+    "passwordMismatch": "Passwords don't match",
+    "weak": "Weak",
+    "medium": "Medium",
+    "strong": "Strong"
   },
   "forgetPassword": {
     "header": "Forgot Password",

+ 5 - 1
src/assets/language/es.json

@@ -1396,7 +1396,11 @@
         "passwordCheckRequired": "Requerido",
         "registerButton": "Guardar",
         "inconsistentPasswords": "Las contraseñas no coinciden",
-        "pwdEditSucess": "Contraseña actualizada"
+        "pwdEditSucess": "Contraseña actualizada",
+        "passwordMismatch": "Las contraseñas no coinciden",
+        "weak": "Débil",
+        "medium": "Media",
+        "strong": "Fuerte"
     },
     "forgetPassword": {
         "header": "Recuperar contraseña",

+ 5 - 1
src/assets/language/fr.json

@@ -1427,7 +1427,11 @@
         "passwordCheckRequired": "Confirmation requise",
         "registerButton": "Soumettre",
         "inconsistentPasswords": "Mots de passe différents",
-        "pwdEditSucess": "Mot de passe modifié"
+        "pwdEditSucess": "Mot de passe modifié",
+        "passwordMismatch": "Les mots de passe ne correspondent pas",
+        "weak": "Faible",
+        "medium": "Moyen",
+        "strong": "Fort"
     },
     "forgetPassword": {
         "header": "Mot de passe oublié",

+ 5 - 1
src/assets/language/ja.json

@@ -1390,7 +1390,11 @@
         "passwordCheckRequired": "確認のためもう一度パスワードを入力してください",
         "registerButton": "登録",
         "inconsistentPasswords": "二回入力したパスワードが一致しません、正しいパスワードを確認してください",
-        "pwdEditSucess": "パスワード変更に成功"
+        "pwdEditSucess": "パスワード変更済み",
+        "passwordMismatch": "パスワードが一致しません",
+        "weak": "弱い",
+        "medium": "中",
+        "strong": "強い"
     },
     "forgetPassword": {
         "header": "パスワードを忘れた場合",

+ 5 - 1
src/assets/language/pt.json

@@ -1396,7 +1396,11 @@
         "passwordCheckRequired": "Confirme a senha",
         "registerButton": "Salvar",
         "inconsistentPasswords": "Senhas não coincidem",
-        "pwdEditSucess": "Senha atualizada"
+        "pwdEditSucess": "Senha alterada",
+        "passwordMismatch": "As senhas não correspondem",
+        "weak": "Fraca",
+        "medium": "Média",
+        "strong": "Forte"
     },
     "forgetPassword": {
         "header": "Recuperar Senha",

+ 5 - 1
src/assets/language/ru.json

@@ -1427,7 +1427,11 @@
         "passwordCheckRequired": "Обязательное поле",
         "registerButton": "Сохранить",
         "inconsistentPasswords": "Пароли не совпадают",
-        "pwdEditSucess": "Пароль изменён"
+        "pwdEditSucess": "Пароль изменён",
+        "passwordMismatch": "Пароли не совпадают",
+        "weak": "Слабый",
+        "medium": "Средний",
+        "strong": "Надёжный"
     },
     "forgetPassword": {
         "header": "Восстановление пароля",

+ 5 - 1
src/assets/language/uk.json

@@ -1397,7 +1397,11 @@
         "passwordCheckRequired": "Підтвердьте пароль",
         "registerButton": "Зберегти",
         "inconsistentPasswords": "Паролі не збігаються",
-        "pwdEditSucess": "Пароль змінено"
+        "pwdEditSucess": "Пароль змінено",
+        "passwordMismatch": "Паролі не збігаються",
+        "weak": "Слабкий",
+        "medium": "Середній",
+        "strong": "Сильний"
     },
     "forgetPassword": {
         "header": "Відновлення пароля",

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

@@ -1406,7 +1406,11 @@
     "passwordCheckRequired": "请再次输入密码进行确认",
     "registerButton": "提交",
     "inconsistentPasswords": "两次密码不一致,请确认密码正确",
-    "pwdEditSucess": "密码修改成功"
+    "pwdEditSucess": "密码修改成功",
+    "passwordMismatch": "两次输入的密码不一致",
+    "weak": "弱",
+    "medium": "中",
+    "strong": "强"
   },
   "forgetPassword": {
     "header": "忘记密码",

BIN
src/assets/order/spunSugar/goods/B07.png


+ 29 - 9
src/components/NavBar.vue

@@ -1,12 +1,27 @@
 <template>
   <!-- 底部横条 -->
   <van-tabbar route active-color="#2d87c8" inactive-color="#404d74">
-    <van-tabbar-item replace to="/home" icon="wap-home">{{ $t('navBar.homePage') }}</van-tabbar-item>
-    <van-tabbar-item v-if="isDeviceData" replace to="/device" :dot="hasAlarm" icon="setting-o">{{
-      $t('navBar.deviceInformation') }}</van-tabbar-item>
-    <van-tabbar-item v-if="isRankingData" replace to="/robotranking" icon="bar-chart-o">{{ $t('navBar.machineRanking')
-      }}</van-tabbar-item>
-    <van-tabbar-item replace to="/user" icon="contact">{{ $t('navBar.personalCenter') }}</van-tabbar-item>
+    <van-tabbar-item replace to="/home" icon="wap-home">{{
+      $t("navBar.homePage")
+    }}</van-tabbar-item>
+    <van-tabbar-item
+      v-if="isDeviceData"
+      replace
+      to="/device"
+      :dot="hasAlarm"
+      icon="setting-o"
+      >{{ $t("navBar.deviceInformation") }}</van-tabbar-item
+    >
+    <van-tabbar-item
+      v-if="isRankingData"
+      replace
+      to="/robotranking"
+      icon="bar-chart-o"
+      >{{ $t("navBar.machineRanking") }}</van-tabbar-item
+    >
+    <van-tabbar-item replace to="/user" icon="contact">{{
+      $t("navBar.personalCenter")
+    }}</van-tabbar-item>
   </van-tabbar>
 </template>
 
@@ -16,6 +31,12 @@ import { useStore } from "vuex";
 import { getLoginUser } from "../common/js/utils";
 
 export default {
+  props: {
+    hasAlarm: {
+      type: Boolean,
+      default: false,
+    },
+  },
   setup() {
     const store = useStore();
     const user = getLoginUser();
@@ -38,11 +59,10 @@ export default {
       });
     });
 
-
     return {
       count,
       isDeviceData,
-      isRankingData
+      isRankingData,
     };
   },
 };
@@ -57,7 +77,7 @@ export default {
   right: 0;
   height: 50px;
   background: white;
-  box-shadow: 0 -2px 12px rgba(77,106,221,0.1);
+  box-shadow: 0 -2px 12px rgba(77, 106, 221, 0.1);
   z-index: 100;
 }
 </style>

+ 7 - 14
src/router/index.js

@@ -160,13 +160,6 @@ const router = createRouter({
       component: () => import("@/views/device/paramsSet/paramsSetInfo.vue"),
       meta: { index: 1 },
     },
-    // 添加分销人
-    {
-      path: "/saveProportion",
-      name: "saveProportion",
-      component: () => import("@/views/device/saveProportion/index.vue"),
-      meta: { index: 1 },
-    },
     // 设备充值
     {
       path: "/recharge",
@@ -190,13 +183,6 @@ const router = createRouter({
     },
     // 结算账号
     {
-      path: "/settlement",
-      name: "settlement",
-      component: () => import("@/views/settlement/index"),
-      meta: { index: 1 },
-    },
-    // 结算账号
-    {
       path: "/joinPayBind",
       name: "joinPayBind",
       component: () => import("@/views/bindBankCard/joinPayBind.vue"),
@@ -462,6 +448,13 @@ const router = createRouter({
       component: () => import("@/views/device/returnCoin/index"),
       meta: { index: 1 },
     },
+    // 支付配置
+    {
+      path: "/payInfo",
+      name: "payInfo",
+      component: () => import("@/views/device/payInfo/index"),
+      meta: { index: 1 },
+    },
     // 修改机器密码
     {
       path: "/devicePassword",

+ 16 - 19
src/service/device/index.js

@@ -1,14 +1,6 @@
 import axios from "../../utils/axios";
 import { stringToUrl } from "@/common/js/utils";
 
-// 获取设备列表
-export function getDeviceList(params) {
-  return axios.post(
-    `/SZWL-SERVER/tEquipment/findList?${stringToUrl(params)}`,
-    params
-  );
-}
-
 // 获取机器列表
 export function getMachineList(params) {
   return axios.post(`/SZWL-SERVER/tEquipment/list`, params);
@@ -24,7 +16,7 @@ export function getDeviceDetal(params) {
 
 // 修改设备详情
 export function updateDevice(params) {
-  return axios.post(`/SZWL-SERVER/tEquipment/update`, params);
+  return axios.post(`/SZWL-SERVER/tEquipment/updateInfo`, params);
 }
 
 // 获取花型种类下拉列表
@@ -243,7 +235,7 @@ export function Api_getDiscCodeStatus(params) {
 
 // 修改睡眠描述
 export function changeSleepDesc(params) {
-  return axios.get(`/SZWL-SERVER/tEquipmentDesc/updateSleepDesc`, { params });
+  return axios.post(`/SZWL-SERVER/tEquipment/sleepDesc`, params);
 }
 
 // 删除设备
@@ -271,18 +263,18 @@ export function updateDevicePassword(params) {
   return axios.post(`/SZWL-SERVER/tEquipment/updatePassword`, params);
 }
 
-// 定制Logo
-export function customLogo(params) {
-  return axios.post(`/SZWL-SERVER/tLogo/customLogo`, params);
+// 修改Logo
+export function pushLogo(params) {
+  return axios.post(`/SZWL-SERVER/tEquipment/pushLogo`, params);
 }
 
 // 日志下载
-export function downloadLog(params) {
-  return axios.get(
-    `/SZWL-SERVER/tEquipment/downloadLog?${stringToUrl(params)}`,
-    { responseType: "blob", timeout: 12000 }
-  );
-}
+// export function downloadLog(params) {
+//   return axios.get(
+//     `/SZWL-SERVER/tEquipment/downloadLog?${stringToUrl(params)}`,
+//     { responseType: "blob", timeout: 12000 }
+//   );
+// }
 
 // 获取DIY花型列表信息
 export function selectDIYFlowers(params) {
@@ -421,3 +413,8 @@ export function updateProductInfo(params) {
 export function batchUpdatePrice(params) {
   return axios.post(`/SZWL-SERVER/tEquipment/batchUpdatePrice`, params);
 }
+
+// 推送商品
+export function pushGoods(params) {
+  return axios.post(`/SZWL-SERVER/tEquipment/pushGoods`, params);
+}

+ 3 - 4
src/service/forgetPassword.js

@@ -1,12 +1,11 @@
-import axios from '../utils/axios';
-import { stringToUrl } from '@/common/js/utils';
+import axios from "../utils/axios";
 
 // 发送验证码
 export function sentForgetCode(params) {
-  return axios.post(`/SZWL-SERVER/tMessageCode/sentForgetCode?${stringToUrl(params)}`, params);
+  return axios.post(`/SZWL-SERVER/tAdmin/sentForgetCode`, params);
 }
 
 // 注册
 export function checkForgetCode(params) {
-  return axios.post(`/SZWL-SERVER/tMessageCode/checkForgetCode?ifForeign=${params.ifForeign}&phoneOrEmail=${params.phoneOrEmail}&code=${params.code}`, params);
+  return axios.post(`/SZWL-SERVER/tAdmin/checkForgetCode`, params);
 }

+ 308 - 37
src/views/changePassword.vue

@@ -1,36 +1,90 @@
 <template>
-  <!-- 修改密码 -->
-  <div class="changePassword flex-col">
-    <s-header :name="$t('changePassword.changePassword')" :noback="false"></s-header>
-    <div class="changePasswordFormBox">
-      <van-form @submit="changePasswordSubmit">
-        <van-field v-model="password" name="password" type="password" :label="$t('changePassword.passwordLabel')"
+  <div class="change-password-page">
+    <!-- 自定义头部 -->
+    <s-header
+      :name="$t('changePassword.changePassword')"
+      :noback="false"
+      class="password-header"
+    />
+
+    <!-- 密码修改表单 -->
+    <div class="password-form-container">
+      <van-form @submit="changePasswordSubmit" class="password-form">
+        <!-- 新密码输入 -->
+        <van-field
+          v-model="password"
+          name="password"
+          type="password"
+          clearable
+          center
+          :label="$t('changePassword.passwordLabel')"
           :placeholder="$t('changePassword.passwordPlaceholder')"
-          :rules="[
-            { required: true, message: $t('changePassword.passwordRequired') },
-            { pattern: /^(?=.*[a-zA-Z])(?=.*\d).{10,}$/, message: $t('register.passwordPattern') }
-          ]" />
-        <br>
-        <van-field v-model="passwordCheck" name="passwordCheck" type="password"
-          :label="$t('changePassword.passwordCheckLabel')" :placeholder="$t('changePassword.passwordCheckPlaceholder')"
-          :rules="[{ required: true, message: $t('changePassword.passwordCheckRequired') }]" />
-        <van-button round type="primary" class="register" native-type="submit">{{ $t('changePassword.registerButton') }}
-        </van-button>
+          :rules="passwordRules"
+        >
+          <template #left-icon>
+            <van-icon name="lock" class="field-icon" />
+          </template>
+        </van-field>
+
+        <!-- 密码强度指示器 -->
+        <div class="password-strength">
+          <div
+            class="strength-bar"
+            :class="{
+              weak: passwordStrength === 1,
+              medium: passwordStrength === 2,
+              strong: passwordStrength === 3,
+            }"
+          ></div>
+          <div class="strength-text">
+            {{ passwordStrengthText }}
+          </div>
+        </div>
+
+        <!-- 确认密码输入 -->
+        <van-field
+          v-model="passwordCheck"
+          name="passwordCheck"
+          type="password"
+          clearable
+          center
+          :label="$t('changePassword.passwordCheckLabel')"
+          :placeholder="$t('changePassword.passwordCheckPlaceholder')"
+          :rules="passwordCheckRules"
+        >
+          <template #left-icon>
+            <van-icon name="lock" class="field-icon" />
+          </template>
+        </van-field>
+
+        <!-- 提交按钮 -->
+        <div class="form-actions">
+          <van-button
+            round
+            block
+            type="primary"
+            native-type="submit"
+            class="submit-button"
+            :disabled="!isFormValid"
+          >
+            {{ $t("changePassword.registerButton") }}
+          </van-button>
+        </div>
       </van-form>
     </div>
   </div>
 </template>
 
 <script>
-import md5 from 'js-md5';
-import { ref } from 'vue';
-import { showToast, showFailToast } from 'vant';
+import md5 from "js-md5";
+import { ref } from "vue";
+import { showToast, showFailToast } from "vant";
 import sHeader from "@/components/SimpleHeader";
 import { useRouter, useRoute } from "vue-router";
-import { updatePassword } from '@/service/changePassword';
-import { useI18n } from 'vue-i18n';
-import { styleUrl } from '../common/js/utils';
+import { updatePassword } from "@/service/changePassword";
+import { useI18n } from "vue-i18n";
 import { getLoginUser } from "@/common/js/utils";
+import { computed } from "vue";
 
 export default {
   setup() {
@@ -39,32 +93,87 @@ export default {
     const router = useRouter();
     const route = useRoute();
     const user = getLoginUser();
-    const password = ref('');
-    const passwordCheck = ref('');
+    const password = ref("");
+    const passwordCheck = ref("");
     // 加载样式
-    styleUrl('changePassword');
     // 验证-表单
     const changePasswordSubmit = async () => {
-      if (password.value !== passwordCheck.value) {
-        showFailToast(t('changePassword.inconsistentPasswords'));
-        return false;
-      }
       const { data } = await updatePassword({
         username: route.query.name || user.username,
-        // username: user.username,
-        password: md5(password.value)
+        password: md5(password.value),
       });
-      if (data.code === '00000') {
-        showToast(t('changePassword.pwdEditSucess'));
-        router.push({ path: '/login' });
+      if (data.code === "00000") {
+        showToast(t("changePassword.pwdEditSucess"));
+        router.push({ path: "/login" });
       } else {
         showFailToast(data.message);
       }
     };
+
+    // 密码强度计算
+    const passwordStrength = computed(() => {
+      if (!password.value) return 0;
+
+      let strength = 0;
+
+      // 长度得分
+      if (password.value.length >= 10) strength++;
+
+      // 复杂度得分
+      const hasLetter = /[a-zA-Z]/.test(password.value);
+      const hasNumber = /\d/.test(password.value);
+      const hasSpecialChar = /[^a-zA-Z0-9]/.test(password.value);
+
+      if (hasLetter && hasNumber) strength++;
+      if (hasSpecialChar) strength++;
+
+      return Math.min(strength, 3);
+    });
+
+    // 密码强度文本
+    const passwordStrengthText = computed(() => {
+      const texts = [
+        "",
+        t("changePassword.weak"),
+        t("changePassword.medium"),
+        t("changePassword.strong"),
+      ];
+      return texts[passwordStrength.value];
+    });
+
+    // 表单验证规则
+    const passwordRules = [
+      { required: true, message: t("changePassword.passwordRequired") },
+      {
+        pattern: /^(?=.*[a-zA-Z])(?=.*\d).{10,}$/,
+        message: t("register.passwordPattern"),
+      },
+    ];
+
+    const passwordCheckRules = [
+      { required: true, message: t('changePassword.passwordCheckRequired') },
+      {
+        validator: (value) => value === password.value,
+        message: t('changePassword.passwordMismatch')
+      }
+    ];
+
+    // 表单是否有效
+    const isFormValid = computed(() => {
+      return password.value && passwordCheck.value && 
+             password.value === passwordCheck.value &&
+             passwordRules[1].pattern.test(password.value);
+    });
+
     return {
       password,
       passwordCheck,
-      changePasswordSubmit
+      changePasswordSubmit,
+      passwordStrength,
+      passwordStrengthText,
+      passwordRules,
+      passwordCheckRules,
+      isFormValid,
     };
   },
   components: { sHeader },
@@ -72,5 +181,167 @@ export default {
 </script>
 
 <style lang="less" scoped>
-@import "../common/style/mixin";
-</style>
+@primary-color: #2c87c8;
+@text-dark: #333;
+@text-light: #666;
+@border-color: #e4e7ec;
+@weak-color: #ff4444;
+@medium-color: #ff9800;
+@strong-color: #4caf50;
+
+.change-password-page {
+  min-height: 100vh;
+  background-color: #f5f7fa;
+  padding-bottom: 20px;
+}
+
+.password-header {
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+}
+
+.password-form-container {
+  padding: 20px;
+}
+
+.password-form {
+  background-color: #fff;
+  border-radius: 12px;
+  padding: 20px;
+  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
+
+  .van-field {
+    margin-bottom: 15px;
+    background-color: #f9fbfe;
+    border-radius: 8px;
+    padding: 12px 16px;
+
+    :deep(.van-field__label) {
+      font-weight: 500;
+      color: @text-dark;
+    }
+
+    .field-icon {
+      color: @primary-color;
+      font-size: 18px;
+      margin-right: 10px;
+    }
+  }
+}
+
+.password-strength {
+  margin-bottom: 20px;
+  padding: 0 5px;
+
+  .strength-bar {
+    height: 5px;
+    border-radius: 3px;
+    background-color: #e0e0e0;
+    margin-bottom: 5px;
+    position: relative;
+    overflow: hidden;
+
+    &::after {
+      content: "";
+      position: absolute;
+      left: 0;
+      top: 0;
+      height: 100%;
+      transition: width 0.3s ease;
+    }
+
+    &.weak::after {
+      width: 33%;
+      background-color: @weak-color;
+    }
+
+    &.medium::after {
+      width: 66%;
+      background-color: @medium-color;
+    }
+
+    &.strong::after {
+      width: 100%;
+      background-color: @strong-color;
+    }
+  }
+
+  .strength-text {
+    font-size: 12px;
+    text-align: right;
+    color: @text-light;
+
+    .weak & {
+      color: @weak-color;
+    }
+    .medium & {
+      color: @medium-color;
+    }
+    .strong & {
+      color: @strong-color;
+    }
+  }
+}
+
+.form-actions {
+  margin-top: 25px;
+
+  .submit-button {
+    height: 44px;
+    background: linear-gradient(to right, #36d1dc, #5b86e5);
+    border: none;
+    font-weight: 500;
+
+    &:disabled {
+      background: #c4c4c4;
+      opacity: 0.7;
+    }
+  }
+}
+
+.password-requirements {
+  background-color: #f0f7ff;
+  border-radius: 8px;
+  padding: 15px;
+  margin-top: 25px;
+
+  .requirements-title {
+    display: flex;
+    align-items: center;
+    font-size: 14px;
+    font-weight: 500;
+    color: @primary-color;
+    margin-bottom: 10px;
+
+    .info-icon {
+      margin-right: 8px;
+      font-size: 16px;
+    }
+  }
+
+  .requirements-list {
+    padding-left: 24px;
+    margin: 0;
+
+    li {
+      font-size: 13px;
+      color: @text-light;
+      line-height: 1.6;
+      margin-bottom: 8px;
+
+      &:last-child {
+        margin-bottom: 0;
+      }
+    }
+  }
+}
+
+@media (max-width: 480px) {
+  .password-form-container {
+    padding: 15px;
+  }
+
+  .password-form {
+    padding: 15px;
+  }
+}
+</style>

+ 150 - 37
src/views/device/customLogo.vue

@@ -1,83 +1,196 @@
 <template>
-  <!--  修改logo  -->
-  <div class="viewLogsPage flex-col">
-    <s-header :name="$t('device.customLogo.customLogo')" :noback="false"></s-header>
-    <div class="block2 flex-row justify-between">
-      <div class="block3 flex-col"></div>
-      <span class="info2">{{ $t('device.equipmentName') }}:{{ deviceDetail ? deviceDetail.name : '' }}</span>
+  <div class="custom-logo-page">
+    <!-- 自定义头部 -->
+    <s-header :name="$t('device.customLogo.customLogo')" :noback="false" />
+
+    <!-- 设备信息 -->
+    <div class="device-header">
+      <van-icon name="desktop-o" class="icon" />
+      <h3 class="device-name">
+        {{ equipmentName }}
+      </h3>
     </div>
-    <div class="wrap1 flex-col o-pt-15">
-      <van-field v-model="logoNumber" type="digit" :label="$t('device.customLogo.logoLabel')"
-        :placeholder="$t('device.customLogo.logoPlaceholder')"
-        :rules="[{ required: true, message: $t('device.customLogo.logoRequired') }]"></van-field>
 
-      <van-button round :disabled="logoNumber === ''" type="primary" class="volumeChangeButton" @click="submitChange">{{
-        $t('device.customLogo.registerButton') }}</van-button>
+    <!-- 主内容区 -->
+    <div class="content-container">
+      <van-form @submit="submitChange">
+        <!-- 输入框 -->
+        <van-field
+          v-model="logoNumber"
+          type="digit"
+          clearable
+          center
+          :label="$t('device.customLogo.logoLabel')"
+          :placeholder="$t('device.customLogo.logoPlaceholder')"
+        />
+
+        <!-- 操作按钮 -->
+        <div class="form-actions">
+          <van-button
+            round
+            block
+            type="primary"
+            native-type="submit"
+            class="submit-button"
+            :disabled="logoNumber === ''"
+          >
+            {{ $t("device.customLogo.registerButton") }}
+          </van-button>
+        </div>
+      </van-form>
     </div>
   </div>
 </template>
 
 <script>
-import { defineComponent, onMounted, ref } from 'vue';
+import { defineComponent, onMounted, ref } from "vue";
 import sHeader from "@/components/SimpleHeader.vue";
-import { customLogo, getDeviceDetal } from "@/service/device";
+import { pushLogo, getDeviceDetal } from "@/service/device";
 import { showFailToast, showSuccessToast } from "vant";
-import { useRoute } from "vue-router";
+import { useRoute, useRouter } from "vue-router";
 import { useI18n } from "vue-i18n";
-import { styleUrl } from "../../common/js/utils";
 
 export default defineComponent({
   setup() {
     const { t } = useI18n();
     const route = useRoute();
-    const logoNumber = ref('');
+    const router = useRouter();
+    const logoNumber = ref("");
     const deviceId = route.query.deviceId;
+    const equipmentName = ref(route.query.name);
     const deviceDetail = ref(null);
 
-
     // 初始化页面获取列表
     onMounted(async () => {
       // 加载样式
-      styleUrl('viewLogs');
       await getDeviceDetailFun();
-      console.log(deviceDetail.value.name);
     });
 
     const getDeviceDetailFun = async () => {
       const { data } = await getDeviceDetal({ id: deviceId });
-      if (data.code === '00000') {
+      if (data.code === "00000") {
         deviceDetail.value = data.data;
-      } else { showFailToast(data.message); }
-    }
+      } else {
+        showFailToast(data.message);
+      }
+    };
 
     // 定制Logo
     const submitChange = async () => {
-      console.log('提交:${logoNumber.value}');
-
-      const { data } = await customLogo({
-        deviceId: deviceId,
-        logoNumber: logoNumber
-      })
-      if (data.code === '00000') {
-        showSuccessToast(t('device.modificationSucceeded'));
+      const { data } = await pushLogo({
+        id: deviceId,
+        logoNumber: logoNumber.value,
+      });
+      if (data.code === "00000") {
+        showSuccessToast(t("device.modificationSucceeded"));
+        setTimeout(() => {
+          router.go(-1);
+        }, 1500);
       } else {
         showFailToast(data.message);
       }
-      console.log('submitChange', { equipmentId: deviceId, logoNumber: logoNumber });
-
-    }
+    };
 
     return {
       deviceDetail,
       logoNumber,
       submitChange,
-    }
+      equipmentName,
+    };
   },
   components: { sHeader },
-
 });
 </script>
 
 <style lang="less" scoped>
-@import "../../common/style/common";
+@primary-color: #2c87c8;
+@text-dark: #333;
+@text-light: #666;
+@border-color: #e4e7ec;
+
+.custom-logo-page {
+  min-height: 100vh;
+  background-color: #f5f7fa;
+  padding-bottom: 20px;
+}
+
+// 设备信息样式
+.device-info {
+  background-color: #fff;
+  padding: 15px;
+  margin-top: 1px;
+  display: flex;
+  align-items: center;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
+
+  .icon {
+    font-size: 18px;
+    color: @primary-color;
+    margin-right: 10px;
+  }
+
+  .device-name {
+    font-size: 16px;
+    font-weight: 500;
+    color: @text-dark;
+  }
+}
+
+.device-header {
+  display: flex;
+  align-items: center;
+  padding: 12px 15px;
+  background: #fff;
+  margin: 12px 16px;
+  border-radius: 8px;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+
+  .icon {
+    font-size: 18px;
+    color: @primary-color;
+    margin-right: 10px;
+  }
+
+  .device-name {
+    margin: 0;
+    font-size: 15px;
+    color: #404d74;
+    font-weight: 550;
+
+    // 长名称处理
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    max-width: 70vw;
+  }
+}
+
+// 主内容区样式
+.content-container {
+  background-color: #fff;
+  border-radius: 12px;
+  margin: 15px;
+  overflow: hidden;
+  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
+  padding: 20px;
+}
+
+// 表单样式
+.van-form {
+  .form-actions {
+    margin-top: 25px;
+  }
+
+  .submit-button {
+    height: 44px;
+    background: linear-gradient(to right, #36d1dc, #5b86e5);
+    border: none;
+    font-weight: 500;
+
+    &:disabled {
+      background: #c4c4c4;
+      opacity: 0.7;
+    }
+  }
+}
 </style>

+ 74 - 17
src/views/device/deviceOper.vue

@@ -98,7 +98,7 @@
 
       <!-- 关闭炉头/设备 -->
       <div
-      v-if="controlList.includes('C4') && device.equimentType != 'SBM10'"
+        v-if="controlList.includes('C4') && device.equimentType != 'SBM10'"
         class="operation-item"
         @click="openOffFurnace(0)"
       >
@@ -664,7 +664,12 @@ export default {
     const modifyPriceClk = () => {
       router.push({
         path: "modifyPrice",
-        query: { deviceId: device.value.id, name: device.value.name },
+        query: {
+          deviceId: device.value.id,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
+        },
       });
     };
     // 点击支付方式
@@ -673,8 +678,10 @@ export default {
         path: "payment",
         query: {
           deviceId: device.value.id,
-          name: device.value.name,
           payment: device.value.paymentType,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
         },
       });
     };
@@ -684,8 +691,10 @@ export default {
         path: "showGoods",
         query: {
           deviceId: device.value.id,
-          name: device.value.name,
           machineType: device.value.machineType,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
         },
       });
     };
@@ -696,9 +705,12 @@ export default {
         path: "diyFlower",
         query: {
           deviceId: device.value.id,
-          name: device.value.name,
           diyFlowerStatus: device.value.diyFlowerStatus,
           flower: device.value.flowers,
+          clientId: device.value.clientId,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
         },
       });
     };
@@ -708,9 +720,11 @@ export default {
         path: "alarmClean",
         query: {
           deviceId: device.value.id,
-          name: device.value.name,
           clientId: device.value.clientId,
           cleanFunction: device.value.cleanFunction,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
         },
       });
     };
@@ -721,8 +735,10 @@ export default {
         path: "returnCoin",
         query: {
           deviceId: device.value.id,
-          name: device.value.name,
           clientId: device.value.clientId,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
         },
       });
     };
@@ -732,8 +748,10 @@ export default {
         path: "tax",
         query: {
           deviceId: device.value.id,
-          name: device.value.name,
           clientId: device.value.clientId,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
         },
       });
     };
@@ -743,8 +761,10 @@ export default {
         path: "jam",
         query: {
           deviceId: device.value.id,
-          name: device.value.name,
           clientId: device.value.clientId,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
         },
       });
     };
@@ -754,8 +774,10 @@ export default {
         path: "maintenance",
         query: {
           deviceId: device.value.id,
-          name: device.value.name,
           clientId: device.value.clientId,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
         },
       });
     };
@@ -765,8 +787,10 @@ export default {
         path: "payInfo",
         query: {
           deviceId: device.value.id,
-          name: device.value.name,
           clientId: device.value.clientId,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
         },
       });
     };
@@ -774,7 +798,12 @@ export default {
     const goodsManClk = () => {
       router.push({
         path: "goodsMan",
-        query: { deviceId: device.value.id, name: device.value.name },
+        query: {
+          deviceId: device.value.id,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
+        },
       });
     };
     const { t } = useI18n();
@@ -853,6 +882,9 @@ export default {
         query: {
           deviceId: device.value.id,
           machineType: device.value.machineType,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
         },
       });
     };
@@ -860,18 +892,36 @@ export default {
     const viewLogs = () => {
       router.push({
         path: "viewLogs",
-        query: { deviceId: device.value.id, name: device.value.name },
+        query: {
+          deviceId: device.value.id,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
+        },
       });
     };
     // 定制logo
     const customLogo = () => {
-      router.push({ path: "customLogo", query: { deviceId: device.value.id } });
+      router.push({
+        path: "customLogo",
+        query: {
+          deviceId: device.value.id,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
+        },
+      });
     };
     // 音量调节
     const modulation = () => {
       router.push({
         path: "modulation",
-        query: { deviceId: device.value.id, name: device.value.name },
+        query: {
+          deviceId: device.value.id,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
+        },
       });
     };
     // 远程做糖
@@ -881,6 +931,9 @@ export default {
         query: {
           deviceId: device.value.id,
           machineType: device.value.machineType,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
         },
       });
     };
@@ -899,7 +952,9 @@ export default {
         query: {
           deviceId: device.value.id,
           machineType: device.value.machineType,
-          name: device.value.name,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
         },
       });
     };
@@ -921,8 +976,10 @@ export default {
         path: "devicePassword",
         query: {
           deviceId: device.value.id,
-          name: device.value.name,
           equimentType: device.value.equimentType,
+          name: device.value.name
+            ? device.value.name
+            : device.value.clientId.slice(-6),
         },
       });
     };

+ 6 - 10
src/views/device/devicePassword/index.vue

@@ -5,11 +5,9 @@
     <!-- 设备信息卡片 -->
     <div class="device-card">
       <div class="device-header">
-        <div class="header-indicator"></div>
+        <van-icon name="desktop-o" class="icon" />
         <h3 class="device-name">
-          {{ $t("device.devicePasswordPage.equipmentName") }}:{{
-            equipmentName
-          }}
+          {{ equipmentName }}
         </h3>
       </div>
     </div>
@@ -311,12 +309,10 @@ export default {
     display: flex;
     align-items: center;
 
-    .header-indicator {
-      width: 3px;
-      height: 20px;
-      background: @primary-color;
-      margin-right: 12px;
-      border-radius: 2px;
+    .icon {
+      font-size: 18px;
+      color: @primary-color;
+      margin-right: 10px;
     }
 
     .device-name {

+ 30 - 4
src/views/device/deviceSet.vue

@@ -163,7 +163,6 @@
         <van-field
           v-if="machineType === '0' || machineType === '1'"
           v-model="deviceDetal.flowers"
-          is-link
           readonly
           :label="machineType === '1' ? '口味种类' : $t('device.flowerType')"
           :placeholder="machineType === '1' ? '选择口味种类' : '选择花型种类'"
@@ -262,7 +261,7 @@
         v-model="selectedFlower"
         :columns="flowerColumns"
         @cancel="showFlowerPicker = false"
-        @confirm="onFlowerConfirm"
+        @confirm="pushFlower"
       />
     </van-popup>
   </div>
@@ -290,6 +289,7 @@ import {
   Api_getDiscCodeStatus,
   getGoodsNumber,
   pushAppUpdate,
+  pushGoods,
 } from "@/service/device/index";
 import {
   showFailToast,
@@ -567,6 +567,31 @@ export default {
         }, 1000);
       });
     };
+    // 推送花型
+    const pushFlower = ({ selectedOptions }) => {
+      deviceDetal.value.flowers = selectedOptions[0].text;
+      showConfirmDialog({
+        title: "提醒",
+        message: "确认推送?",
+      }).then(async () => {
+        const { data } = await pushGoods({
+          id: deviceDetal.value.id,
+          flowers: deviceDetal.value.flowers,
+        });
+        if (data.code === "00000") {
+          // showSuccessToast("推送成功");
+          showFlowerPicker.value = false;
+          showToast({
+            message: "推送成功,\n修改花型后需要重新设置价格",
+            duration: 3000,
+            forbidClick: true,
+          });
+          setTimeout(() => {
+            router.go(-1);
+          }, 3500);
+        }
+      });
+    };
     // 点击优惠券开关
     const couponStatusChg = (couponStatus) => {
       Api_getDiscCodeStatus({
@@ -601,10 +626,10 @@ export default {
         duration: 0,
         forbidClick: true,
         message:
-          "提示:\n请确认PLC版本支持修改的花型,避免出现程序错乱,导致客诉!!!倒计时 5 S",
+          "提示:\n请确认PLC版本支持修改的花型,避免出现程序错乱,导致客诉!!!倒计时 3 S",
       });
 
-      let second = 5;
+      let second = 3;
       const timer = setInterval(() => {
         second--;
         if (second) {
@@ -632,6 +657,7 @@ export default {
       updateUrlClk,
       mqttUrl,
       mqttUrlClk,
+      pushFlower,
       confirmClk,
       kDialogRef,
       couponStatusChg,

+ 20 - 14
src/views/device/doSugar.vue

@@ -5,9 +5,9 @@
     <!-- 设备信息卡片 -->
     <div class="device-card">
       <div class="device-header">
-        <div class="header-indicator"></div>
+        <van-icon name="desktop-o" class="icon" />
         <h3 class="device-name">
-          {{ $t("device.equipmentName") }}:{{ deviceDetal?.name || "-" }}
+          {{ equipmentName }}
         </h3>
       </div>
     </div>
@@ -180,6 +180,7 @@ export default {
     const route = useRoute();
     const router = useRouter();
     const deviceId = route.query.deviceId;
+    const equipmentName = ref(route.query.name);
     const machineType = route.query.machineType;
     const deviceDetal = ref(null);
     const show = ref(false);
@@ -297,13 +298,8 @@ export default {
       }
     };
     const submitDoSugar = async () => {
-      if (fieldValue.value === "") {
-        showToast(t("device.pleaseSelectAPattern"));
-        return;
-      }
       const makeCodes = ref([1, 0, 0]);
       doSugartData.value = null;
-      doSugartType.value = true;
 
       if (machineType == "2") {
         fieldValue.value = "";
@@ -339,6 +335,11 @@ export default {
           );
           fieldValue.value = iceName.value + "(" + fieldValue.value + ")";
         }
+      } else {
+        if (fieldValue.value === "") {
+          showToast(t("device.pleaseSelectAPattern"));
+          return;
+        }
       }
       showConfirmDialog({
         title: t("user.tips"),
@@ -353,6 +354,7 @@ export default {
               productNo: productNo.value,
             }).then((data) => {
               if (data.data.code == "00000") {
+                doSugartType.value = true;
                 doSugartData.value = data.data.data;
                 setTimeout(() => {
                   doSugartType.value = false;
@@ -369,6 +371,7 @@ export default {
               productNo: productNo.value,
             }).then((data) => {
               if (data.data.code == "00000") {
+                doSugartType.value = true;
                 doSugartData.value = data.data.data;
                 setTimeout(() => {
                   doSugartType.value = false;
@@ -409,7 +412,11 @@ export default {
     const pushToDaySugarList = async () => {
       router.push({
         path: "toDaySugarList",
-        query: { deviceId: deviceId, clientId: deviceDetal.value.clientId },
+        query: {
+          deviceId: deviceId,
+          clientId: deviceDetal.value.clientId,
+          name: equipmentName.value,
+        },
       });
     };
 
@@ -431,6 +438,7 @@ export default {
       jamData,
       crushData,
       showPopPhoto,
+      equipmentName,
     };
   },
   components: { sHeader },
@@ -458,12 +466,10 @@ export default {
     display: flex;
     align-items: center;
 
-    .header-indicator {
-      width: 3px;
-      height: 20px;
-      background: @primary-color;
-      margin-right: 12px;
-      border-radius: 2px;
+    .icon {
+      font-size: 18px;
+      color: @primary-color;
+      margin-right: 10px;
     }
 
     .device-name {

File diff suppressed because it is too large
+ 554 - 559
src/views/device/goodsMan/index.vue


+ 1 - 1
src/views/device/index.vue

@@ -978,7 +978,7 @@ export default {
         showToast(t("device.sleepDescPlace"));
       } else {
         const { data } = await changeSleepDesc({
-          equipmentId: id,
+          id: id,
           sleepDesc,
         });
         if (data.code === "00000") {

+ 250 - 253
src/views/device/jam/index.vue

@@ -1,276 +1,273 @@
 <template>
-    <div class="payment-settings">
-      <s-header :name="$t('remote.C30')" :noback="false" />
-  
-      <!-- 设备名称标题 -->
-      <div class="device-header">
-        <div class="vertical-indicator"></div>
-        <h3 class="device-name">
-          {{ $t("device.equipmentName") }}:{{ deviceName }}
-        </h3>
-      </div>
-  
-      <!-- 果酱抽取卡片 -->
-      <div class="settings-card">
-        <div v-for="jam in jams" :key="jam.id" class="jam-item">
-          <!-- 图片和名称行 -->
-          <div class="jam-main-row">
-            <van-image
-              :src="showSugerPhoto(jam)"
-              width="70"
-              height="70"
-              radius="8"
-              fit="cover"
-              class="jam-image"
-            />
-            <h3 class="jam-title">{{ jam.productName }}</h3>
-          </div>
-          <!-- 操作按钮组 -->
-          <div class="jam-actions">
-            <van-button
-              type="primary"
-              size="small"
-              class="action-btn"
-              @click="handleExtract(jam.no, 1)"
-            >
-              {{ $t("jam.forward") }}
-            </van-button>
-            <van-button
-              type="warning"
-              size="small"
-              class="action-btn"
-              @click="handleExtract(jam.no, 2)"
-            >
-              {{ $t("jam.reverse") }}
-            </van-button>
-            <van-button
-              type="danger"
-              size="small"
-              class="action-btn"
-              @click="handleExtract(jam.no, 0)"
-            >
-              {{ $t("jam.stop") }}
-            </van-button>
-          </div>
+  <div class="payment-settings">
+    <s-header :name="$t('remote.C30')" :noback="false" />
+
+    <!-- 设备名称标题 -->
+    <div class="device-header">
+      <van-icon name="desktop-o" class="icon" />
+      <h3 class="device-name">
+        {{ equipmentName }}
+      </h3>
+    </div>
+
+    <!-- 果酱抽取卡片 -->
+    <div class="settings-card">
+      <div v-for="jam in jams" :key="jam.id" class="jam-item">
+        <!-- 图片和名称行 -->
+        <div class="jam-main-row">
+          <van-image
+            :src="showSugerPhoto(jam)"
+            width="70"
+            height="70"
+            radius="8"
+            fit="cover"
+            class="jam-image"
+          />
+          <h3 class="jam-title">{{ jam.productName }}</h3>
+        </div>
+        <!-- 操作按钮组 -->
+        <div class="jam-actions">
+          <van-button
+            type="primary"
+            size="small"
+            class="action-btn"
+            @click="handleExtract(jam.no, 1)"
+          >
+            {{ $t("jam.forward") }}
+          </van-button>
+          <van-button
+            type="warning"
+            size="small"
+            class="action-btn"
+            @click="handleExtract(jam.no, 2)"
+          >
+            {{ $t("jam.reverse") }}
+          </van-button>
+          <van-button
+            type="danger"
+            size="small"
+            class="action-btn"
+            @click="handleExtract(jam.no, 0)"
+          >
+            {{ $t("jam.stop") }}
+          </van-button>
         </div>
       </div>
     </div>
-  </template>
-  
-  <script>
-  import sHeader from "@/components/SimpleHeader";
-  import { selectProducts, smokeJam } from "@/service/device/index";
-  import { useRoute } from "vue-router";
-  import { ref } from "vue";
-  import { useI18n } from "vue-i18n";
-  import { onMounted } from "vue";
-  import { showConfirmDialog, showFailToast, showSuccessToast } from "vant";
-  
-  export default {
-    components: { sHeader },
-    setup() {
-      const { t } = useI18n();
-      const route = useRoute();
-      const deviceId = ref(route.query.deviceId);
-      const deviceName = ref(route.query.name);
-      const jams = ref([]);
-  
-      // 获取商品列表
-      const getList = () => {
-        selectProducts({
-          equipmentId: deviceId.value,
-        }).then((res) => {
-          const { data } = res.data;
-          if (data) {
-            data.forEach((item) => {
-              if (item.no.includes("J")) {
-                jams.value.push(item);
-              }
-            });
-          }
-        });
-      };
-  
-      // 商品图片路径处理
-      const showSugerPhoto = (row) => {
-        let imgId = row.no;
-        if (imgId) {
-          return require(`../../../assets/order/spunSugar/goods/${imgId}.png`);
-        }
-        return imgId;
-      };
-  
-      // 果酱抽取
-      const handleExtract = (no, status) => {
-        showConfirmDialog({
-          title: t("device.operationConfirmation"),
-          message: t("device.pleaseConfirmAgainWhetherToOperate"),
-        })
-          .then(async () => {
-            const { data } = await smokeJam({
-              equipmentId: deviceId.value,
-              productNo: no,
-              status: status,
-            });
-            if (data.code === "00000") {
-              showSuccessToast(t("device.Succeed"));
-            } else {
-              showFailToast(t("device.Failed"));
+  </div>
+</template>
+
+<script>
+import sHeader from "@/components/SimpleHeader";
+import { selectProducts, smokeJam } from "@/service/device/index";
+import { useRoute } from "vue-router";
+import { ref } from "vue";
+import { useI18n } from "vue-i18n";
+import { onMounted } from "vue";
+import { showConfirmDialog, showFailToast, showSuccessToast } from "vant";
+
+export default {
+  components: { sHeader },
+  setup() {
+    const { t } = useI18n();
+    const route = useRoute();
+    const deviceId = ref(route.query.deviceId);
+    const equipmentName = ref(route.query.name);
+    const jams = ref([]);
+
+    // 获取商品列表
+    const getList = () => {
+      selectProducts({
+        equipmentId: deviceId.value,
+      }).then((res) => {
+        const { data } = res.data;
+        if (data) {
+          data.forEach((item) => {
+            if (item.no.includes("J")) {
+              jams.value.push(item);
             }
-          })
-          .catch(() => {
-            // on cancel
-            showFailToast(t("device.Failed"));
           });
-      };
-  
-      onMounted(async () => {
-        getList();
+        }
       });
-  
-      return {
-        deviceName,
-        showSugerPhoto,
-        handleExtract,
-        jams,
-      };
-    },
-  };
-  </script>
-  
-  <style lang="less" scoped>
-  @primary-color: #4dc294;
-  @warning-color: #ff976a;
-  @danger-color: #ee0a24;
-  .payment-settings {
-    --payment-bg: #ffffff;
-    --border-color: #ebedf0;
-    --active-color: #2c87c8;
-    --text-primary: #323233;
-    --text-secondary: #969799;
-  
-    background: #f7f8fa;
-    min-height: 100vh;
-  
-    .device-header {
-      display: flex;
-      align-items: center;
-      padding: 12px 15px;
-      background: #fff;
-      margin: 12px 16px;
-      border-radius: 8px;
-      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
-  
-      .vertical-indicator {
-        width: 4px;
-        height: 15px;
-        background: var(--active-color, #2c87c8);
-        border-radius: 2px;
-        margin-right: 10px;
-      }
-  
-      .device-name {
-        margin: 0;
-        font-size: 15px;
-        color: #404d74;
-        font-weight: 550;
-  
-        // 长名称处理
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-        max-width: 70vw;
+    };
+
+    // 商品图片路径处理
+    const showSugerPhoto = (row) => {
+      let imgId = row.no;
+      if (imgId) {
+        return require(`../../../assets/order/spunSugar/goods/${imgId}.png`);
       }
+      return imgId;
+    };
+
+    // 果酱抽取
+    const handleExtract = (no, status) => {
+      showConfirmDialog({
+        title: t("device.operationConfirmation"),
+        message: t("device.pleaseConfirmAgainWhetherToOperate"),
+      })
+        .then(async () => {
+          const { data } = await smokeJam({
+            equipmentId: deviceId.value,
+            productNo: no,
+            status: status,
+          });
+          if (data.code === "00000") {
+            showSuccessToast(t("device.Succeed"));
+          } else {
+            showFailToast(t("device.Failed"));
+          }
+        })
+        .catch(() => {
+          // on cancel
+          showFailToast(t("device.Failed"));
+        });
+    };
+
+    onMounted(async () => {
+      getList();
+    });
+
+    return {
+      equipmentName,
+      showSugerPhoto,
+      handleExtract,
+      jams,
+    };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@primary-color: #4dc294;
+@warning-color: #ff976a;
+@danger-color: #ee0a24;
+.payment-settings {
+  --payment-bg: #ffffff;
+  --border-color: #ebedf0;
+  --active-color: #2c87c8;
+  --text-primary: #323233;
+  --text-secondary: #969799;
+
+  background: #f7f8fa;
+  min-height: 100vh;
+
+  .device-header {
+    display: flex;
+    align-items: center;
+    padding: 12px 15px;
+    background: #fff;
+    margin: 12px 16px;
+    border-radius: 8px;
+    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+
+    .icon {
+      font-size: 18px;
+      color: #2c87c8;
+      margin-right: 10px;
+    }
+
+    .device-name {
+      margin: 0;
+      font-size: 15px;
+      color: #404d74;
+      font-weight: 550;
+
+      // 长名称处理
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      max-width: 70vw;
     }
-  
-    .settings-card {
-      padding: 16px;
-      margin: 12px 16px;
-      background: #fff;
-      border-radius: 12px;
-      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
+  }
+
+  .settings-card {
+    padding: 16px;
+    margin: 12px 16px;
+    background: #fff;
+    border-radius: 12px;
+    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
+  }
+
+  .jam-item {
+    padding: 16px 0;
+    border-bottom: 1px solid #f5f5f5;
+
+    &:last-child {
+      border-bottom: none;
     }
-  
-    .jam-item {
-      padding: 16px 0;
-      border-bottom: 1px solid #f5f5f5;
-  
-      &:last-child {
-        border-bottom: none;
+  }
+
+  .jam-main-row {
+    display: flex;
+    align-items: center;
+    gap: 16px;
+    margin-bottom: 12px;
+  }
+
+  .jam-image {
+    flex-shrink: 0;
+  }
+
+  .jam-title {
+    font-size: 16px;
+    color: #333;
+    word-break: break-word;
+    line-height: 1.4;
+  }
+
+  .jam-actions {
+    display: flex;
+    justify-content: center;
+    gap: 12px;
+    flex-wrap: wrap;
+
+    .action-btn {
+      min-width: 80px;
+      border-radius: 20px;
+      font-size: 13px;
+      padding: 8px 16px;
+
+      &--primary {
+        background: @primary-color;
+        border-color: @primary-color;
+      }
+
+      &--warning {
+        background: @warning-color;
+        border-color: @warning-color;
+      }
+
+      &--danger {
+        background: @danger-color;
+        border-color: @danger-color;
       }
     }
-  
+  }
+
+  @media (max-width: 480px) {
     .jam-main-row {
-      display: flex;
-      align-items: center;
-      gap: 16px;
-      margin-bottom: 12px;
+      gap: 12px;
     }
-  
+
     .jam-image {
-      flex-shrink: 0;
+      width: 50px;
+      height: 50px;
     }
-  
+
     .jam-title {
-      font-size: 16px;
-      color: #333;
-      word-break: break-word;
-      line-height: 1.4;
+      font-size: 14px;
     }
-  
+
     .jam-actions {
-      display: flex;
-      justify-content: center;
-      gap: 12px;
-      flex-wrap: wrap;
-  
+      gap: 8px;
+
       .action-btn {
-        min-width: 80px;
-        border-radius: 20px;
-        font-size: 13px;
-        padding: 8px 16px;
-  
-        &--primary {
-          background: @primary-color;
-          border-color: @primary-color;
-        }
-  
-        &--warning {
-          background: @warning-color;
-          border-color: @warning-color;
-        }
-  
-        &--danger {
-          background: @danger-color;
-          border-color: @danger-color;
-        }
-      }
-    }
-  
-    @media (max-width: 480px) {
-      .jam-main-row {
-        gap: 12px;
-      }
-  
-      .jam-image {
-        width: 50px;
-        height: 50px;
-      }
-  
-      .jam-title {
-        font-size: 14px;
-      }
-  
-      .jam-actions {
-        gap: 8px;
-  
-        .action-btn {
-          min-width: 70px;
-          font-size: 12px;
-          padding: 6px 12px;
-        }
+        min-width: 70px;
+        font-size: 12px;
+        padding: 6px 12px;
       }
     }
   }
-  </style>
-  
+}
+</style>

File diff suppressed because it is too large
+ 816 - 819
src/views/device/maintenance/index.vue


+ 7 - 15
src/views/device/modifyPrice/index.vue

@@ -5,11 +5,9 @@
       <!-- 设备信息卡片 -->
       <div class="device-card">
         <div class="device-header">
-          <div class="header-indicator"></div>
+          <van-icon name="desktop-o" class="icon" />
           <h3 class="device-name">
-            {{ $t("device.modifyPricePage.equipmentName") }}:{{
-              equipmentName
-            }}
+            {{ equipmentName }}
           </h3>
         </div>
       </div>
@@ -23,11 +21,7 @@
             <span class="highlight">{{ tableData.length }}</span>
             {{ $t("device.modifyPricePage.goods") }}
           </div>
-          <van-button
-            icon="edit"
-            @click="noticeClk"
-            class="batch-btn"
-          >
+          <van-button icon="edit" @click="noticeClk" class="batch-btn">
             {{ $t("device.modifyPricePage.batchModify") }}
           </van-button>
         </div>
@@ -277,12 +271,10 @@ export default {
     display: flex;
     align-items: center;
 
-    .header-indicator {
-      width: 3px;
-      height: 20px;
-      background: @primary-color;
-      margin-right: 12px;
-      border-radius: 2px;
+    .icon {
+      font-size: 18px;
+      color: @primary-color;
+      margin-right: 10px;
     }
 
     .device-name {

+ 6 - 8
src/views/device/modulation.vue

@@ -5,9 +5,9 @@
     <!-- 设备信息卡片 -->
     <div class="device-card">
       <div class="device-header">
-        <div class="header-indicator"></div>
+        <van-icon name="desktop-o" class="icon" />
         <h3 class="device-name">
-          {{ $t("device.modifyPricePage.equipmentName") }}:{{ equipmentName }}
+          {{ equipmentName }}
         </h3>
       </div>
     </div>
@@ -130,12 +130,10 @@ export default {
     display: flex;
     align-items: center;
 
-    .header-indicator {
-      width: 3px;
-      height: 20px;
-      background: @primary-color;
-      margin-right: 12px;
-      border-radius: 2px;
+    .icon {
+      font-size: 18px;
+      color: @primary-color;
+      margin-right: 10px;
     }
 
     .device-name {

+ 8 - 11
src/views/device/openDoor.vue

@@ -5,11 +5,9 @@
 
     <!-- 设备名称标题 -->
     <div class="device-header">
-      <div class="vertical-indicator"></div>
+      <van-icon name="desktop-o" class="icon" />
       <h3 class="device-name">
-        {{ $t("device.equipmentName") }}:{{
-          deviceDetal ? deviceDetal.name : ""
-        }}
+        {{ equipmentName }}
       </h3>
     </div>
 
@@ -172,6 +170,7 @@ export default {
     const deviceId = route.query.deviceId;
     const machineType = route.query.machineType;
     const deviceDetal = ref({});
+    const equipmentName = ref(route.query.name);
     const { t } = useI18n();
 
     // 初始化页面获取列表
@@ -267,14 +266,13 @@ export default {
     };
 
     const materialChg = (isMaterialUse) => {
-      console.log(deviceDetal.value.equimentType);
       showConfirmDialog({
         title: t("device.openRemind"),
         message: t("device.openRemindMaterial"),
       }).then(async () => {
         const { data } = await changeMaterial({
           equipmentId: deviceDetal.value.id,
-          isMaterialUse: isMaterialUse ? "1" : "0",
+          isMaterialUse: isMaterialUse,
         });
         if (data.code === "00000") {
           showToast(t("device.sentSuccessfully"));
@@ -294,6 +292,7 @@ export default {
       banPaperChg,
       materialChg,
       machineType,
+      equipmentName,
       user,
     };
   },
@@ -333,11 +332,9 @@ export default {
   border-radius: 8px;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
 
-  .vertical-indicator {
-    width: 4px;
-    height: 15px;
-    background: var(--active-color, #2d88c9);
-    border-radius: 2px;
+  .icon {
+    font-size: 18px;
+    color: @theme-color;
     margin-right: 10px;
   }
 

+ 10 - 13
src/views/device/paramsSet/index.vue

@@ -5,11 +5,9 @@
     <!-- 设备信息卡片 -->
     <div class="device-card">
       <div class="device-header">
-        <div class="header-indicator"></div>
+        <van-icon name="desktop-o" class="icon" />
         <h3 class="device-name">
-          {{ $t("device.equipmentName") }}:{{
-            name || $t("device.equipmentNameTips")
-          }}
+          {{ equipmentName }}
         </h3>
       </div>
     </div>
@@ -57,7 +55,7 @@ export default {
     const route = useRoute();
     const deviceId = route.query.deviceId;
     const machineType = route.query.machineType;
-    const name = route.query.name;
+    const equipmentName = route.query.name;
     const deviceDetal = ref();
     // 初始化页面获取列表
     onMounted(async () => {
@@ -89,7 +87,7 @@ export default {
         id: "0",
         icon: "currency1.png",
         title: t("device.generalParameterConfiguration"),
-      }
+      },
     ]);
     const getIconPath = (icon) => {
       return require(`../../../assets/device/${icon}`);
@@ -115,6 +113,7 @@ export default {
           type: number,
           deviceId: route.query.deviceId,
           machineType: route.query.machineType,
+          name: equipmentName,
         },
       });
     };
@@ -125,7 +124,7 @@ export default {
       menuItems,
       handleMenuItemClick,
       getIconPath,
-      name,
+      equipmentName,
     };
   },
 };
@@ -152,12 +151,10 @@ export default {
     display: flex;
     align-items: center;
 
-    .header-indicator {
-      width: 3px;
-      height: 20px;
-      background: @primary-color;
-      margin-right: 12px;
-      border-radius: 2px;
+    .icon {
+      font-size: 18px;
+      color: @primary-color;
+      margin-right: 10px;
     }
 
     .device-name {

+ 8 - 10
src/views/device/paramsSet/paramsSetInfo.vue

@@ -6,11 +6,9 @@
       <!-- 设备信息卡片 -->
       <div class="device-card">
         <div class="device-header">
-          <div class="header-indicator"></div>
+          <van-icon name="desktop-o" class="icon" />
           <h3 class="device-name">
-            {{ $t("device.equipmentName") }}:{{
-              deviceDetal.name || $t("device.equipmentNameTips")
-            }}
+            {{ equipmentName }}
           </h3>
         </div>
       </div>
@@ -165,6 +163,7 @@ export default {
     const isChange = ref(false);
     const howLong = ref([]);
     const interval = ref("");
+    const equipmentName = route.query.name;
 
     const monitoringParams = ref([
       {
@@ -394,6 +393,7 @@ export default {
       checkBtn,
       monitoringParams,
       presets,
+      equipmentName,
     };
   },
 };
@@ -428,12 +428,10 @@ export default {
     display: flex;
     align-items: center;
 
-    .header-indicator {
-      width: 3px;
-      height: 20px;
-      background: @primary-color;
-      margin-right: 12px;
-      border-radius: 2px;
+    .icon {
+      font-size: 18px;
+      color: @primary-color;
+      margin-right: 10px;
     }
 
     .device-name {

+ 301 - 300
src/views/device/payInfo/index.vue

@@ -1,343 +1,344 @@
 <template>
-    <div class="merchant-config-page">
-      <!-- 顶部导航 -->
-      <s-header :name="$t('remote.C32')" :noback="false" />
-  
-      <!-- 设备名称标题 -->
-      <div class="device-header">
-        <div class="vertical-indicator"></div>
-        <h3 class="device-name">
-          {{ $t("device.equipmentName") }}:{{ deviceName }}
-        </h3>
-      </div>
-  
-      <!-- 商户信息表单 -->
-      <van-form @submit="handleSubmit">
-        <div class="settings-card">
-          <!-- Merchant ID -->
-          <div class="config-item">
-            <div class="config-info">
-              <van-icon name="user-circle-o" class="config-icon" />
-              <div class="config-detail">
-                <h3 class="config-title">merchant_id</h3>
-                <van-field
-                  v-model="configData.merchantId"
-                  class="config-input"
-                  :border="false"
-                  :rules="[
+  <div class="merchant-config-page">
+    <!-- 顶部导航 -->
+    <s-header :name="$t('remote.C32')" :noback="false" />
+
+    <!-- 设备名称标题 -->
+    <div class="device-header">
+      <van-icon name="desktop-o" class="icon" />
+      <h3 class="device-name">
+        {{ equipmentName }}
+      </h3>
+    </div>
+
+    <!-- 商户信息表单 -->
+    <van-form @submit="handleSubmit">
+      <div class="settings-card">
+        <!-- Merchant ID -->
+        <div class="config-item">
+          <div class="config-info">
+            <van-icon name="user-circle-o" class="config-icon" />
+            <div class="config-detail">
+              <h3 class="config-title">merchant_id</h3>
+              <van-field
+                v-model="configData.merchantId"
+                class="config-input"
+                :border="false"
+                :rules="[
                   {
                     required: true,
                     message: 'merchant_id',
                   },
                 ]"
-                />
-              </div>
+              />
             </div>
           </div>
-  
-          <!-- Secret Code -->
-          <div class="config-item">
-            <div class="config-info">
-              <van-icon name="lock" class="config-icon" />
-              <div class="config-detail">
-                <h3 class="config-title">secret_code</h3>
-                <van-field
-                  v-model="configData.secretCode"
-                  class="config-input"
-                  type="password"
-                  :border="false"
-                  :rules="[
+        </div>
+
+        <!-- Secret Code -->
+        <div class="config-item">
+          <div class="config-info">
+            <van-icon name="lock" class="config-icon" />
+            <div class="config-detail">
+              <h3 class="config-title">secret_code</h3>
+              <van-field
+                v-model="configData.secretCode"
+                class="config-input"
+                type="password"
+                :border="false"
+                :rules="[
                   {
                     required: true,
                     message: 'secret_code',
                   },
                 ]"
-                />
-              </div>
+              />
             </div>
           </div>
-  
-          <!-- Product Ability Code -->
-          <div class="config-item">
-            <div class="config-info">
-              <van-icon name="setting-o" class="config-icon" />
-              <div class="config-detail">
-                <h3 class="config-title">product_ability_code</h3>
-                <van-field
-                  v-model="configData.productAbilityCode"
-                  class="config-input"
-                  :border="false"
-                  :rules="[
+        </div>
+
+        <!-- Product Ability Code -->
+        <div class="config-item">
+          <div class="config-info">
+            <van-icon name="setting-o" class="config-icon" />
+            <div class="config-detail">
+              <h3 class="config-title">product_ability_code</h3>
+              <van-field
+                v-model="configData.productAbilityCode"
+                class="config-input"
+                :border="false"
+                :rules="[
                   {
                     required: true,
                     message: 'product_ability_code',
                   },
                 ]"
-                />
-              </div>
+              />
             </div>
           </div>
-  
-          <!-- Area Code -->
-          <div class="config-item">
-            <div class="config-info">
-              <van-icon name="location-o" class="config-icon" />
-              <div class="config-detail">
-                <h3 class="config-title">area_code</h3>
-                <van-field
-                  v-model="configData.areaCode"
-                  class="config-input"
-                  :border="false"
-                  :rules="[
+        </div>
+
+        <!-- Area Code -->
+        <div class="config-item">
+          <div class="config-info">
+            <van-icon name="location-o" class="config-icon" />
+            <div class="config-detail">
+              <h3 class="config-title">area_code</h3>
+              <van-field
+                v-model="configData.areaCode"
+                class="config-input"
+                :border="false"
+                :rules="[
                   {
                     required: true,
                     message: 'area_code',
                   },
                 ]"
-                />
-              </div>
+              />
             </div>
           </div>
         </div>
-        <!-- 提交按钮 -->
-        <div class="submit-footer">
-          <van-button round type="primary" class="submit-btn" native-type="submit">
-            <template #icon>
-              <van-icon name="success" class="btn-icon" />
-            </template>
-            {{ $t("device.modify") }}
-          </van-button>
-        </div>
-      </van-form>
-  
-    </div>
-  </template>
-  
-  <script>
-  import sHeader from "@/components/SimpleHeader";
-  import { showConfirmDialog, showSuccessToast, showFailToast } from "vant";
-  import { useRoute, useRouter } from "vue-router";
-  import { ref } from "vue";
-  import { useI18n } from "vue-i18n";
-  import { onMounted } from "vue";
-  import { getPayConfig, pushPayInfo } from "@/service/device/index";
-  
-  export default {
-    components: { sHeader },
-    setup() {
-      const { t } = useI18n();
-      const route = useRoute();
-      const router = useRouter();
-      const deviceId = ref(route.query.clientId);
-      const deviceName = ref(route.query.name);
-  
-      // 配置数据
-      const configData = ref({
-        clientId: deviceId.value,
-        merchantId: "",
-        secretCode: "",
-        productAbilityCode: "",
-        areaCode: "",
-      });
-  
-      onMounted(() => {
-        if (deviceId.value) {
-          handleGetPayConfig();
-        }
-      });
-  
-      const handleGetPayConfig = async () => {
-        const { data } = await getPayConfig({ clientId: deviceId.value });
-        if (data.data) {
-          configData.value.merchantId = data.data.merchantId;
-          configData.value.secretCode = data.data.secretCode;
-          configData.value.productAbilityCode = data.data.productAbilityCode;
-          configData.value.areaCode = data.data.areaCode;
-        }
-      };
-  
-      const handleSubmit = () => {
-        showConfirmDialog({
-          title: t("device.operationConfirmation"),
-          message: t("device.pleaseConfirmAgainWhetherToOperate"),
+      </div>
+      <!-- 提交按钮 -->
+      <div class="submit-footer">
+        <van-button
+          round
+          type="primary"
+          class="submit-btn"
+          native-type="submit"
+        >
+          <template #icon>
+            <van-icon name="success" class="btn-icon" />
+          </template>
+          {{ $t("device.modify") }}
+        </van-button>
+      </div>
+    </van-form>
+  </div>
+</template>
+
+<script>
+import sHeader from "@/components/SimpleHeader";
+import { showConfirmDialog, showSuccessToast, showFailToast } from "vant";
+import { useRoute, useRouter } from "vue-router";
+import { ref } from "vue";
+import { useI18n } from "vue-i18n";
+import { onMounted } from "vue";
+import { getPayConfig, pushPayInfo } from "@/service/device/index";
+
+export default {
+  components: { sHeader },
+  setup() {
+    const { t } = useI18n();
+    const route = useRoute();
+    const router = useRouter();
+    const deviceId = ref(route.query.clientId);
+    const equipmentName = ref(route.query.name);
+
+    // 配置数据
+    const configData = ref({
+      clientId: deviceId.value,
+      merchantId: "",
+      secretCode: "",
+      productAbilityCode: "",
+      areaCode: "",
+    });
+
+    onMounted(() => {
+      if (deviceId.value) {
+        handleGetPayConfig();
+      }
+    });
+
+    const handleGetPayConfig = async () => {
+      const { data } = await getPayConfig({ clientId: deviceId.value });
+      if (data.data) {
+        configData.value.merchantId = data.data.merchantId;
+        configData.value.secretCode = data.data.secretCode;
+        configData.value.productAbilityCode = data.data.productAbilityCode;
+        configData.value.areaCode = data.data.areaCode;
+      }
+    };
+
+    const handleSubmit = () => {
+      showConfirmDialog({
+        title: t("device.operationConfirmation"),
+        message: t("device.pleaseConfirmAgainWhetherToOperate"),
+      })
+        .then(async () => {
+          // on confirm
+          const { data } = await pushPayInfo(configData.value);
+          if (data.code === "00000") {
+            showSuccessToast(t("device.modificationSucceeded"));
+            setTimeout(() => {
+              router.go(-1);
+            }, 2000);
+          } else {
+            showFailToast(data.message);
+          }
         })
-          .then(async () => {
-            // on confirm
-            const { data } = await pushPayInfo(configData.value);
-            if (data.code === "00000") {
-              showSuccessToast(t("device.modificationSucceeded"));
-              setTimeout(() => {
-                router.go(-1);
-              }, 2000);
-            } else {
-              showFailToast(data.message);
-            }
-          })
-          .catch(() => {
-            // on cancel
-          });
-      };
-  
-      return {
-        deviceName,
-        handleSubmit,
-        configData,
-      };
-    },
-  };
-  </script>
-  
-  <style lang="less" scoped>
-  @theme-color: #2d88c9;
-  @light-bg: #f5f8ff;
-  @card-bg: #ffffff;
-  @text-dark: #333;
-  @text-light: #666;
-  @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;
-  
-  .merchant-config-page {
-    display: flex;
-    flex-direction: column;
-    height: 100vh;
-    background-color: @light-bg;
-    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
-      sans-serif;
+        .catch(() => {
+          // on cancel
+        });
+    };
+
+    return {
+      equipmentName,
+      handleSubmit,
+      configData,
+    };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@theme-color: #2d88c9;
+@light-bg: #f5f8ff;
+@card-bg: #ffffff;
+@text-dark: #333;
+@text-light: #666;
+@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;
+
+.merchant-config-page {
+  display: flex;
+  flex-direction: column;
+  height: 100vh;
+  background-color: @light-bg;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
+    sans-serif;
+}
+
+.device-header {
+  display: flex;
+  align-items: center;
+  padding: 12px 15px;
+  background: #fff;
+  margin: 12px 16px;
+  border-radius: 8px;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+
+  .icon {
+    font-size: 18px;
+    color: #2d88c9;
+    margin-right: 10px;
   }
-  
-  .device-header {
-    display: flex;
-    align-items: center;
-    padding: 12px 15px;
-    background: #fff;
-    margin: 12px 16px;
-    border-radius: 8px;
-    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
-  
-    .vertical-indicator {
-      width: 4px;
-      height: 15px;
-      background: var(--active-color, #2d88c9);
-      border-radius: 2px;
-      margin-right: 10px;
-    }
-  
-    .device-name {
-      margin: 0;
-      font-size: 15px;
-      color: #404d74;
-      font-weight: 550;
-  
-      // 长名称处理
-      overflow: hidden;
-      text-overflow: ellipsis;
-      white-space: nowrap;
-      max-width: 70vw;
-    }
+
+  .device-name {
+    margin: 0;
+    font-size: 15px;
+    color: #404d74;
+    font-weight: 550;
+
+    // 长名称处理
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    max-width: 70vw;
   }
-  
-  .settings-card {
-    background-color: @card-bg;
-    border-radius: @border-radius;
-    box-shadow: @card-shadow;
-    padding: 16px;
-    margin: 0 16px 24px;
+}
+
+.settings-card {
+  background-color: @card-bg;
+  border-radius: @border-radius;
+  box-shadow: @card-shadow;
+  padding: 16px;
+  margin: 0 16px 24px;
+}
+
+.config-item {
+  margin-bottom: 24px;
+
+  &:last-child {
+    margin-bottom: 0;
   }
-  
-  .config-item {
-    margin-bottom: 24px;
-  
-    &:last-child {
-      margin-bottom: 0;
-    }
+}
+
+.config-info {
+  display: flex;
+  align-items: center;
+}
+
+.config-icon {
+  font-size: 24px;
+  color: @theme-color;
+  margin-right: 16px;
+}
+
+.config-detail {
+  flex: 1;
+}
+
+.config-title {
+  font-size: 15px;
+  font-weight: 500;
+  color: @text-dark;
+  margin: 0 0 8px;
+}
+
+.config-input {
+  background-color: #f9fafc;
+  border-radius: 8px;
+  padding: 10px 16px;
+
+  :deep(.van-field__control) {
+    font-size: 15px;
+    color: @text-dark;
   }
-  
-  .config-info {
-    display: flex;
-    align-items: center;
+
+  :deep(.van-field__placeholder) {
+    color: #a0a4ab;
   }
-  
-  .config-icon {
-    font-size: 24px;
-    color: @theme-color;
-    margin-right: 16px;
+}
+
+.submit-footer {
+  padding: 0 16px 24px;
+  position: sticky;
+  bottom: 0;
+  background-color: @light-bg;
+}
+
+.submit-btn {
+  width: 100%;
+  height: 52px;
+  background-color: @theme-color;
+  border: none;
+  font-size: 17px;
+  font-weight: 500;
+  letter-spacing: 0.5px;
+  box-shadow: 0 6px 16px fade(@theme-color, 35%);
+
+  .btn-icon {
+    font-size: 22px;
+    margin-right: 8px;
   }
-  
-  .config-detail {
-    flex: 1;
+
+  &:active {
+    opacity: 0.92;
+    transform: translateY(1px);
   }
-  
-  .config-title {
-    font-size: 15px;
-    font-weight: 500;
-    color: @text-dark;
-    margin: 0 0 8px;
+
+  &:disabled {
+    opacity: 0.7;
+    transform: none;
   }
-  
-  .config-input {
-    background-color: #f9fafc;
-    border-radius: 8px;
-    padding: 10px 16px;
-  
-    :deep(.van-field__control) {
-      font-size: 15px;
-      color: @text-dark;
-    }
-  
-    :deep(.van-field__placeholder) {
-      color: #a0a4ab;
-    }
+}
+
+// 响应式调整
+@media (max-width: 360px) {
+  .device-header .device-name {
+    font-size: 16px;
   }
-  
-  .submit-footer {
-    padding: 0 16px 24px;
-    position: sticky;
-    bottom: 0;
-    background-color: @light-bg;
+
+  .config-title {
+    font-size: 14px;
   }
-  
+
   .submit-btn {
-    width: 100%;
-    height: 52px;
-    background-color: @theme-color;
-    border: none;
-    font-size: 17px;
-    font-weight: 500;
-    letter-spacing: 0.5px;
-    box-shadow: 0 6px 16px fade(@theme-color, 35%);
-  
-    .btn-icon {
-      font-size: 22px;
-      margin-right: 8px;
-    }
-  
-    &:active {
-      opacity: 0.92;
-      transform: translateY(1px);
-    }
-  
-    &:disabled {
-      opacity: 0.7;
-      transform: none;
-    }
-  }
-  
-  // 响应式调整
-  @media (max-width: 360px) {
-    .device-header .device-name {
-      font-size: 16px;
-    }
-  
-    .config-title {
-      font-size: 14px;
-    }
-  
-    .submit-btn {
-      height: 48px;
-      font-size: 16px;
-    }
+    height: 48px;
+    font-size: 16px;
   }
-  </style>
-  
+}
+</style>

+ 213 - 215
src/views/device/payment/index.vue

@@ -1,237 +1,235 @@
 <template>
-    <div class="payment-settings">
-      <s-header :name="$t('remote.C28')" :noback="false" />
-  
-      <!-- 设备名称标题 -->
-      <div class="device-header">
-        <div class="vertical-indicator"></div>
-        <h3 class="device-name">
-          {{ $t("device.equipmentName") }}:{{ deviceName }}
-        </h3>
-      </div>
-  
-      <!-- 支付方式列表 -->
-      <div class="settings-card">
-        <!-- Nayax/Z1 -->
-        <div class="payment-item">
-          <div class="payment-info">
-            <van-icon name="card" class="payment-icon" />
-            <div class="payment-detail">
-              <h3 class="payment-title">Nayax</h3>
-            </div>
+  <div class="payment-settings">
+    <s-header :name="$t('remote.C28')" :noback="false" />
+
+    <!-- 设备名称标题 -->
+    <div class="device-header">
+      <van-icon name="desktop-o" class="icon" />
+      <h3 class="device-name">
+        {{ equipmentName }}
+      </h3>
+    </div>
+
+    <!-- 支付方式列表 -->
+    <div class="settings-card">
+      <!-- Nayax/Z1 -->
+      <div class="payment-item">
+        <div class="payment-info">
+          <van-icon name="card" class="payment-icon" />
+          <div class="payment-detail">
+            <h3 class="payment-title">Nayax</h3>
           </div>
-          <van-switch v-model="activeZ1" size="22px" />
         </div>
-  
-        <!-- WMDB/Z2 -->
-        <div class="payment-item">
-          <div class="payment-info">
-            <van-icon name="card" class="payment-icon" />
-            <div class="payment-detail">
-              <h3 class="payment-title">WMDB</h3>
-            </div>
+        <van-switch v-model="activeZ1" size="22px" />
+      </div>
+
+      <!-- WMDB/Z2 -->
+      <div class="payment-item">
+        <div class="payment-info">
+          <van-icon name="card" class="payment-icon" />
+          <div class="payment-detail">
+            <h3 class="payment-title">WMDB</h3>
           </div>
-          <van-switch v-model="activeZ2" size="22px" />
         </div>
-  
-        <!-- Mixed/Z3 -->
-        <div class="payment-item">
-          <div class="payment-info">
-            <van-icon name="card" class="payment-icon" />
-            <div class="payment-detail">
-              <h3 class="payment-title">Mixed</h3>
-            </div>
+        <van-switch v-model="activeZ2" size="22px" />
+      </div>
+
+      <!-- Mixed/Z3 -->
+      <div class="payment-item">
+        <div class="payment-info">
+          <van-icon name="card" class="payment-icon" />
+          <div class="payment-detail">
+            <h3 class="payment-title">Mixed</h3>
           </div>
-          <van-switch v-model="activeZ3" size="22px" />
         </div>
+        <van-switch v-model="activeZ3" size="22px" />
       </div>
-  
-      <!-- 提交按钮 -->
-      <div class="submit-footer">
-        <van-button round type="primary" class="submit-btn" @click="handleSubmit">
-          <van-icon name="success" class="btn-icon" />
-          {{ $t("device.modify") }}
-        </van-button>
-      </div>
     </div>
-  </template>
-  
-  <script>
-  import sHeader from "@/components/SimpleHeader";
-  import { showConfirmDialog, showSuccessToast, showFailToast } from "vant";
-  import { useRoute, useRouter } from 'vue-router';
-  import { ref, reactive } from "vue";
-  import { useI18n } from 'vue-i18n';
-  import { onMounted } from "vue";
-  import { updatePayment } from "@/service/device/index";
-  
-  export default {
-      components: { sHeader },
-      setup() {
-          const { t } = useI18n();
-          const route = useRoute();
-          const router = useRouter();
-          const deviceId = ref(route.query.deviceId);
-          const deviceName = ref(route.query.name);
-          const activeZ1 = ref(false);
-          const activeZ2 = ref(false);
-          const activeZ3 = ref(false);
-  
-          onMounted(() => {
-              console.log(route.query.payment)
-              if (route.query.payment) {
-                  const payment = route.query.payment.split(',')
-                  if (payment.includes('Z1')) activeZ1.value = true
-                  if (payment.includes('Z2')) activeZ2.value = true
-                  if (payment.includes('Z3')) activeZ3.value = true
-              }
+
+    <!-- 提交按钮 -->
+    <div class="submit-footer">
+      <van-button round type="primary" class="submit-btn" @click="handleSubmit">
+        <van-icon name="success" class="btn-icon" />
+        {{ $t("device.modify") }}
+      </van-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import sHeader from "@/components/SimpleHeader";
+import { showConfirmDialog, showSuccessToast, showFailToast } from "vant";
+import { useRoute, useRouter } from "vue-router";
+import { ref, reactive } from "vue";
+import { useI18n } from "vue-i18n";
+import { onMounted } from "vue";
+import { updatePayment } from "@/service/device/index";
+
+export default {
+  components: { sHeader },
+  setup() {
+    const { t } = useI18n();
+    const route = useRoute();
+    const router = useRouter();
+    const deviceId = ref(route.query.deviceId);
+    const equipmentName = ref(route.query.name);
+    const activeZ1 = ref(false);
+    const activeZ2 = ref(false);
+    const activeZ3 = ref(false);
+
+    onMounted(() => {
+      console.log(route.query.payment);
+      if (route.query.payment) {
+        const payment = route.query.payment.split(",");
+        if (payment.includes("Z1")) activeZ1.value = true;
+        if (payment.includes("Z2")) activeZ2.value = true;
+        if (payment.includes("Z3")) activeZ3.value = true;
+      }
+    });
+
+    const handleSubmit = () => {
+      showConfirmDialog({
+        title: t("device.operationConfirmation"),
+        message: t("device.pleaseConfirmAgainWhetherToOperate"),
+      })
+        .then(async () => {
+          // on confirm
+          const activePayments = [];
+          if (activeZ1.value) activePayments.push("Z1");
+          if (activeZ2.value) activePayments.push("Z2");
+          if (activeZ3.value) activePayments.push("Z3");
+          const result = activePayments.join(",");
+          const params = reactive({
+            id: deviceId.value,
+            paymentType: result,
           });
-  
-          const handleSubmit = () => {
-              showConfirmDialog({
-                  title: t('device.operationConfirmation'),
-                  message: t('device.pleaseConfirmAgainWhetherToOperate'),
-              }).then(async() => {
-                  // on confirm
-                  const activePayments = [];
-                  if (activeZ1.value) activePayments.push("Z1");
-                  if (activeZ2.value) activePayments.push("Z2");
-                  if (activeZ3.value) activePayments.push("Z3");
-                  const result = activePayments.join(',')
-                  const params = reactive({
-                      id: deviceId.value,
-                      paymentType: result,
-                  });
-                  const { data } = await updatePayment(params);
-                  if (data.code === "00000") {
-                      showSuccessToast(t('device.modificationSucceeded'));
-                      setTimeout(() => {
-                          router.go(-1);
-                      }, 2000);
-                  } else {
-                      showFailToast(data.message);
-                  }
-              }).catch(() => {
-                  // on cancel
-              });
-          }
-  
-  
-          return {
-              deviceName,
-              activeZ1,
-              activeZ2,
-              activeZ3,
-              handleSubmit
+          const { data } = await updatePayment(params);
+          if (data.code === "00000") {
+            showSuccessToast(t("device.modificationSucceeded"));
+            setTimeout(() => {
+              router.go(-1);
+            }, 2000);
+          } else {
+            showFailToast(data.message);
           }
-      }
+        })
+        .catch(() => {
+          // on cancel
+        });
+    };
+
+    return {
+      equipmentName,
+      activeZ1,
+      activeZ2,
+      activeZ3,
+      handleSubmit,
+    };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.payment-settings {
+  --payment-bg: #ffffff;
+  --border-color: #ebedf0;
+  --active-color: #2d88c9;
+  --text-primary: #323233;
+  --text-secondary: #969799;
+
+  background: #f7f8fa;
+  min-height: 100vh;
+
+  .device-header {
+    display: flex;
+    align-items: center;
+    padding: 12px 15px;
+    background: #fff;
+    margin: 12px 16px;
+    border-radius: 8px;
+    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+
+    .icon {
+      font-size: 18px;
+      color: var(--active-color);
+      margin-right: 10px;
+    }
+
+    .device-name {
+      margin: 0;
+      font-size: 15px;
+      color: #404d74;
+      font-weight: 550;
+
+      // 长名称处理
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      max-width: 70vw;
+    }
+  }
+
+  .settings-card {
+    margin: 16px;
+    padding: 8px 16px;
+    background: var(--payment-bg);
+    border-radius: 12px;
+    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
   }
-  </script>
-  
-  <style lang="less" scoped>
-  .payment-settings {
-    --payment-bg: #ffffff;
-    --border-color: #ebedf0;
-    --active-color: #2d88c9;
-    --text-primary: #323233;
-    --text-secondary: #969799;
-  
-    background: #f7f8fa;
-    min-height: 100vh;
-  
-    .device-header {
+
+  .payment-item {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 16px 0;
+    border-bottom: 1px solid var(--border-color);
+
+    &:last-child {
+      border-bottom: none;
+    }
+
+    .payment-info {
       display: flex;
       align-items: center;
-      padding: 12px 15px;
-      background: #fff;
-      margin: 12px 16px;
-      border-radius: 8px;
-      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
-  
-      .vertical-indicator {
-        width: 4px;
-        height: 15px;
-        background: var(--active-color, #2d88c9);
-        border-radius: 2px;
-        margin-right: 10px;
-      }
-  
-      .device-name {
-        margin: 0;
-        font-size: 15px;
-        color: #404d74;
-        font-weight: 550;
-  
-        // 长名称处理
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-        max-width: 70vw;
-      }
+      flex: 1;
     }
-  
-    .settings-card {
-      margin: 16px;
-      padding: 8px 16px;
-      background: var(--payment-bg);
-      border-radius: 12px;
-      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
+
+    .payment-icon {
+      font-size: 22px;
+      color: var(--active-color);
+      margin-right: 12px;
     }
-  
-    .payment-item {
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-      padding: 16px 0;
-      border-bottom: 1px solid var(--border-color);
-  
-      &:last-child {
-        border-bottom: none;
-      }
-  
-      .payment-info {
-        display: flex;
-        align-items: center;
-        flex: 1;
-      }
-  
-      .payment-icon {
-        font-size: 22px;
-        color: var(--active-color);
-        margin-right: 12px;
+
+    .payment-detail {
+      flex: 1;
+
+      .payment-title {
+        margin: 0;
+        font-size: 16px;
+        color: var(--text-primary);
       }
-  
-      .payment-detail {
-        flex: 1;
-  
-        .payment-title {
-          margin: 0;
-          font-size: 16px;
-          color: var(--text-primary);
-        }
-  
-        .payment-desc {
-          margin: 4px 0 0;
-          font-size: 12px;
-          color: var(--text-secondary);
-        }
+
+      .payment-desc {
+        margin: 4px 0 0;
+        font-size: 12px;
+        color: var(--text-secondary);
       }
     }
-  
-    .submit-footer {
-      padding: 24px 16px;
-  
-      .submit-btn {
-        width: 100%;
-        height: 44px;
-        font-size: 16px;
-  
-        .btn-icon {
-          margin-right: 8px;
-          vertical-align: -2px;
-        }
+  }
+
+  .submit-footer {
+    padding: 24px 16px;
+
+    .submit-btn {
+      width: 100%;
+      height: 44px;
+      font-size: 16px;
+
+      .btn-icon {
+        margin-right: 8px;
+        vertical-align: -2px;
       }
     }
   }
-  </style>
-  
+}
+</style>

+ 386 - 389
src/views/device/returnCoin/index.vue

@@ -1,427 +1,424 @@
 <template>
-    <div class="coin-return">
-      <s-header :name="$t('device.returnCoin')" :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.showGoodsPage.equipmentName") }}:{{ equipmentName }}
-            </h3>
+  <div class="coin-return">
+    <s-header :name="$t('device.returnCoin')" :noback="false" />
+
+    <div class="content-container">
+      <!-- 设备信息卡片 -->
+      <div class="device-card">
+        <div class="device-header">
+          <van-icon name="desktop-o" class="icon" />
+          <h3 class="device-name">
+            {{ equipmentName }}
+          </h3>
+        </div>
+      </div>
+
+      <!-- 退币操作卡片 -->
+      <div class="operation-card">
+        <div class="return-control">
+          <div class="control-header">
+            <van-icon name="wap-nav" class="control-icon" />
+            <span class="control-title">{{
+              $t("device.returnCoinPage.amount")
+            }}</span>
+          </div>
+
+          <div class="stepper-container">
+            <van-stepper
+              v-model="amount"
+              :max="50"
+              integer
+              class="custom-stepper"
+            />
+            <van-button
+              type="primary"
+              icon="refund"
+              @click="applyReturnCoinClk"
+              class="submit-btn"
+            >
+              {{ $t("device.returnCoinPage.returnCoinBtn") }}
+            </van-button>
           </div>
         </div>
-  
-        <!-- 退币操作卡片 -->
-        <div class="operation-card">
-          <div class="return-control">
-            <div class="control-header">
-              <van-icon name="wap-nav" class="control-icon" />
-              <span class="control-title">{{
-                $t("device.returnCoinPage.amount")
-              }}</span>
+      </div>
+
+      <!-- 记录列表卡片 -->
+      <div class="record-card">
+        <div class="card-header">
+          <van-icon name="notes" class="header-icon" />
+          <span class="header-title">{{
+            $t("device.returnCoinPage.returnCoinRecord")
+          }}</span>
+        </div>
+
+        <van-list
+          v-model:loading="loading"
+          :finished="finished"
+          :finished-text="$t('public.noMore')"
+          @load="onLoad"
+        >
+          <!-- 记录项 -->
+          <div v-for="item in recordList" :key="item.id" class="record-item">
+            <div class="info-row">
+              <span class="label"
+                >{{ $t("device.returnCoinPage.applyTime") }}:</span
+              >
+              <span class="value">{{ showTime(item.createDate) }}</span>
             </div>
-  
-            <div class="stepper-container">
-              <van-stepper
-                v-model="amount"
-                :max="50"
-                integer
-                class="custom-stepper"
-              />
-              <van-button
-                type="primary"
-                icon="refund"
-                @click="applyReturnCoinClk"
-                class="submit-btn"
+            <div class="info-row">
+              <span class="label"
+                >{{ $t("device.returnCoinPage.amount") }}:</span
               >
-                {{ $t("device.returnCoinPage.returnCoinBtn") }}
-              </van-button>
+              <span class="value">{{ item.amount }}</span>
             </div>
-          </div>
-        </div>
-  
-        <!-- 记录列表卡片 -->
-        <div class="record-card">
-          <div class="card-header">
-            <van-icon name="notes" class="header-icon" />
-            <span class="header-title">{{
-              $t("device.returnCoinPage.returnCoinRecord")
-            }}</span>
-          </div>
-  
-          <van-list
-            v-model:loading="loading"
-            :finished="finished"
-            :finished-text="$t('public.noMore')"
-            @load="onLoad"
-          >
-            <!-- 记录项 -->
-            <div v-for="item in recordList" :key="item.id" class="record-item">
-              <div class="info-row">
-                <span class="label"
-                  >{{ $t("device.returnCoinPage.applyTime") }}:</span
-                >
-                <span class="value">{{ showTime(item.createDate) }}</span>
-              </div>
-              <div class="info-row">
-                <span class="label"
-                  >{{ $t("device.returnCoinPage.amount") }}:</span
-                >
-                <span class="value">{{ item.amount }}</span>
-              </div>
-              <div class="info-row">
-                <span class="label"
-                  >{{ $t("device.returnCoinPage.status") }}:</span
-                >
-                <van-tag :color="getStatusColor(item.status)" class="status-tag">
-                  {{ getStatusText(item.status) }}
-                </van-tag>
-              </div>
-              <div v-if="item.status == 2" class="info-row">
-                <span class="label"
-                  >{{ $t("device.returnCoinPage.reason") }}:</span
-                >
-                <span class="error-text">{{ item.reason }}</span>
-              </div>
+            <div class="info-row">
+              <span class="label"
+                >{{ $t("device.returnCoinPage.status") }}:</span
+              >
+              <van-tag :color="getStatusColor(item.status)" class="status-tag">
+                {{ getStatusText(item.status) }}
+              </van-tag>
             </div>
-          </van-list>
-        </div>
+            <div v-if="item.status == 2" class="info-row">
+              <span class="label"
+                >{{ $t("device.returnCoinPage.reason") }}:</span
+              >
+              <span class="error-text">{{ item.reason }}</span>
+            </div>
+          </div>
+        </van-list>
       </div>
     </div>
-  </template>
-  
-  <script>
-  // 导入接口
-  import { applyReturnCoin, returnCoinList } from "@/service/device/index";
-  import sHeader from "@/components/SimpleHeader";
-  import { ref } from "@vue/reactivity";
-  import { onMounted } from "@vue/runtime-core";
-  import { useRoute, useRouter } from "vue-router";
-  import { showConfirmDialog, showFailToast, showToast } from "vant";
-  import { useI18n } from "vue-i18n";
-  import { getLoginUser, styleUrl } from "../../../common/js/utils";
-  import dateUtil from "../../../utils/dateUtil";
-  import { reactive } from "vue";
-  export default {
-    components: {
-      sHeader,
-    },
-    setup() {
-      // 引入语言
-      const { t } = useI18n();
-      // 路由
-      const route = useRoute();
-      const router = useRouter();
-      const amount = ref(1);
-      const user = getLoginUser();
-      const equipmentId = ref("");
-      const equipmentName = ref("");
-      const clientId = ref(route.query.clientId);
-      const activeNames = ref(["1"]);
-      const recordList = ref([]);
-      const loading = ref(false);
-      const finished = ref(false);
-      const total = ref(0);
-      // 刚进页面
-      onMounted(() => {
-        // 加载样式
-        styleUrl("showGoods");
-        equipmentId.value = route.query.deviceId || "";
-        const name = route.query.name || "";
-        if (equipmentId) {
-          equipmentName.value = name;
-        }
-      });
-  
-      // 页面列表查询参数
-      const searchParams = reactive({
-        status: "", // 制作状态 1:制作中 2:制作失败 0:未制作
-        clientId: clientId.value,
-        current: 0, // 页数
-        size: 10, // 页大小
-        startTime: "", // 开始时间
-        endTime: "", // 结束时间
-      });
-  
-      // 滚动加载
-      const onLoad = () => {
-        if (!finished.value) {
-          searchParams.current = searchParams.current + 1;
-          returnCoinListFun();
+  </div>
+</template>
+
+<script>
+// 导入接口
+import { applyReturnCoin, returnCoinList } from "@/service/device/index";
+import sHeader from "@/components/SimpleHeader";
+import { ref } from "@vue/reactivity";
+import { onMounted } from "@vue/runtime-core";
+import { useRoute, useRouter } from "vue-router";
+import { showConfirmDialog, showFailToast, showToast } from "vant";
+import { useI18n } from "vue-i18n";
+import { getLoginUser, styleUrl } from "../../../common/js/utils";
+import dateUtil from "../../../utils/dateUtil";
+import { reactive } from "vue";
+export default {
+  components: {
+    sHeader,
+  },
+  setup() {
+    // 引入语言
+    const { t } = useI18n();
+    // 路由
+    const route = useRoute();
+    const router = useRouter();
+    const amount = ref(1);
+    const user = getLoginUser();
+    const equipmentId = ref("");
+    const equipmentName = ref("");
+    const clientId = ref(route.query.clientId);
+    const activeNames = ref(["1"]);
+    const recordList = ref([]);
+    const loading = ref(false);
+    const finished = ref(false);
+    const total = ref(0);
+    // 刚进页面
+    onMounted(() => {
+      // 加载样式
+      styleUrl("showGoods");
+      equipmentId.value = route.query.deviceId || "";
+      const name = route.query.name || "";
+      if (equipmentId) {
+        equipmentName.value = name;
+      }
+    });
+
+    // 页面列表查询参数
+    const searchParams = reactive({
+      status: "", // 制作状态 1:制作中 2:制作失败 0:未制作
+      clientId: clientId.value,
+      current: 0, // 页数
+      size: 10, // 页大小
+      startTime: "", // 开始时间
+      endTime: "", // 结束时间
+    });
+
+    // 滚动加载
+    const onLoad = () => {
+      if (!finished.value) {
+        searchParams.current = searchParams.current + 1;
+        returnCoinListFun();
+      }
+    };
+
+    // 获取退币记录列表数据
+    const returnCoinListFun = async () => {
+      finished.value = false;
+      const { data } = await returnCoinList(searchParams);
+      if (data.code) {
+        recordList.value = recordList.value.concat(data.data.records);
+        total.value = data.data.total;
+        if (recordList.value.length === data.data.total) {
+          finished.value = true;
         }
+        loading.value = false;
+      } else {
+        showFailToast(data.message);
+      }
+    };
+
+    // 格式化时间
+    const showTime = (time) => {
+      return dateUtil.timeZoneDate(
+        new Date(dateUtil.formateDate(new Date(time), "yyyy/MM/dd hh:mm:ss"))
+      );
+    };
+
+    // 退币申请
+    const applyReturnCoinClk = () => {
+      const params = {
+        equipmentId: equipmentId.value,
+        amount: amount.value,
+        adminId: user.id,
       };
-  
-      // 获取退币记录列表数据
-      const returnCoinListFun = async () => {
-        finished.value = false;
-        const { data } = await returnCoinList(searchParams);
-        if (data.code) {
-          recordList.value = recordList.value.concat(data.data.records);
-          total.value = data.data.total;
-          if (recordList.value.length === data.data.total) {
-            finished.value = true;
+      showConfirmDialog({
+        title: t("alramClean.tips"),
+        message: t("device.returnCoinPage.tipsContent"),
+      })
+        .then(async () => {
+          const { data } = await applyReturnCoin(params);
+          console.log("data>>>", data);
+          if (data.code) {
+            showToast(t("alramClean.successfully"));
+            setTimeout(() => {
+              router.go(-1);
+            }, 1500);
+          } else {
+            showFailToast(data.message);
           }
-          loading.value = false;
-        } else {
-          showFailToast(data.message);
-        }
-      };
-  
-      // 格式化时间
-      const showTime = (time) => {
-        return dateUtil.timeZoneDate(
-          new Date(dateUtil.formateDate(new Date(time), "yyyy/MM/dd hh:mm:ss"))
-        );
-      };
-  
-      // 退币申请
-      const applyReturnCoinClk = () => {
-        const params = {
-          equipmentId: equipmentId.value,
-          amount: amount.value,
-          adminId: user.id,
-        };
-        showConfirmDialog({
-          title: t("alramClean.tips"),
-          message: t("device.returnCoinPage.tipsContent"),
         })
-          .then(async () => {
-            const { data } = await applyReturnCoin(params);
-            console.log("data>>>", data);
-            if (data.code) {
-              showToast(t("alramClean.successfully"));
-              setTimeout(() => {
-                router.go(-1);
-              }, 1500);
-            } else {
-              showFailToast(data.message);
-            }
-          })
-          .catch((error) => {
-            console.log(error);
-          });
-      };
-  
-      const getStatusText = (status) => {
-        return status === 1
-          ? t("device.returnCoinPage.returnCoinSuccess")
-          : status === 2
-          ? t("device.returnCoinPage.returnCoinFailed")
-          : t("device.returnCoinPage.waiting");
-      };
-  
-      const getStatusColor = (status) => {
-        return (
-          {
-            1: "#4dc294",
-            2: "#ee0a24",
-            0: "#ff976a",
-          }[status] || "#969799"
-        );
-      };
-  
-      return {
-        equipmentName,
-        applyReturnCoinClk,
-        amount,
-        activeNames,
-        recordList,
-        showTime,
-        loading,
-        finished,
-        onLoad,
-        getStatusText,
-        getStatusColor,
-      };
-    },
-  };
-  </script>
-  
-  <style lang="less" scoped>
-  @primary-color: #2d88c9;
-  @card-bg: #ffffff;
-  @text-primary: #2d3436;
-  @border-color: #e4e7ec;
-  
-  .content-container {
-    background: #f5f6fa;
-    // padding: 16px;
-    height: calc(100% - 55px);
-    overflow: auto;
-    overflow-x: hidden;
-  }
-  
-  .coin-return {
-    background: #f8fafb;
-    min-height: 100vh;
-  }
-  
-  .device-card {
+        .catch((error) => {
+          console.log(error);
+        });
+    };
+
+    const getStatusText = (status) => {
+      return status === 1
+        ? t("device.returnCoinPage.returnCoinSuccess")
+        : status === 2
+        ? t("device.returnCoinPage.returnCoinFailed")
+        : t("device.returnCoinPage.waiting");
+    };
+
+    const getStatusColor = (status) => {
+      return (
+        {
+          1: "#4dc294",
+          2: "#ee0a24",
+          0: "#ff976a",
+        }[status] || "#969799"
+      );
+    };
+
+    return {
+      equipmentName,
+      applyReturnCoinClk,
+      amount,
+      activeNames,
+      recordList,
+      showTime,
+      loading,
+      finished,
+      onLoad,
+      getStatusText,
+      getStatusColor,
+    };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@primary-color: #2d88c9;
+@card-bg: #ffffff;
+@text-primary: #2d3436;
+@border-color: #e4e7ec;
+
+.content-container {
+  background: #f5f6fa;
+  // padding: 16px;
+  height: calc(100% - 55px);
+  overflow: auto;
+  overflow-x: hidden;
+}
+
+.coin-return {
+  background: #f8fafb;
+  min-height: 100vh;
+}
+
+.device-card {
+  display: flex;
+  align-items: center;
+  padding: 12px 15px;
+  background: #fff;
+  margin: 10px;
+  border-radius: 8px;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+
+  .device-header {
     display: flex;
     align-items: center;
-    padding: 12px 15px;
-    background: #fff;
-    margin: 10px;
-    border-radius: 8px;
-    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
-  
-    .device-header {
-      display: flex;
-      align-items: center;
-  
-      .header-indicator {
-        width: 3px;
-        height: 20px;
-        background: @primary-color;
-        margin-right: 12px;
-        border-radius: 2px;
-      }
-  
-      .device-name {
-        font-size: 15px;
-        color: #404d74;
-        margin: 0;
-      }
+
+    .icon {
+      font-size: 18px;
+      color: #2d88c9;
+      margin-right: 10px;
     }
-  }
-  
-  .operation-card {
-    background: @card-bg;
-    border-radius: 8px;
-    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
-    padding: 15px;
-    margin: 10px;
-  
-    .return-control {
-      .control-header {
-        display: flex;
-        align-items: center;
-        margin-bottom: 16px;
-  
-        .control-icon {
-          color: @primary-color;
-          font-size: 20px;
-          margin-right: 8px;
-        }
-  
-        .control-title {
-          font-size: 15px;
-          color: @text-primary;
-        }
-      }
-  
-      .stepper-container {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-  
-        .custom-stepper {
-          :deep(.van-stepper__input) {
-            width: 80px;
-            background: #f8fafb;
-            border-radius: 4px;
-          }
-        }
-  
-        .submit-btn {
-          height: 36px;
-          padding: 0 20px;
-          box-shadow: 0 2px 6px rgba(77, 194, 148, 0.2);
-        }
-      }
+
+    .device-name {
+      font-size: 15px;
+      color: #404d74;
+      margin: 0;
     }
   }
-  
-  .record-card {
-    background: @card-bg;
-    border-radius: 12px;
-    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
-    padding: 16px;
-    margin: 10px;
-  
-    .card-header {
+}
+
+.operation-card {
+  background: @card-bg;
+  border-radius: 8px;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+  padding: 15px;
+  margin: 10px;
+
+  .return-control {
+    .control-header {
       display: flex;
       align-items: center;
       margin-bottom: 16px;
-  
-      .header-icon {
+
+      .control-icon {
         color: @primary-color;
-        font-size: 18px;
+        font-size: 20px;
         margin-right: 8px;
       }
-  
-      .header-title {
+
+      .control-title {
         font-size: 15px;
         color: @text-primary;
-        font-weight: 500;
       }
     }
-  
-    .record-item {
-      padding: 12px 0;
-      border-bottom: 1px solid @border-color;
-  
-      &:last-child {
-        border-bottom: none;
-      }
-  
-      .info-row {
-        display: flex;
-        align-items: center;
-        margin: 8px 0;
-        font-size: 14px;
-  
-        .label {
-          color: #666;
-          min-width: 80px;
-        }
-  
-        .value {
-          color: @text-primary;
-        }
-  
-        .status-tag {
-          color: white;
-          padding: 2px 8px;
+
+    .stepper-container {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+
+      .custom-stepper {
+        :deep(.van-stepper__input) {
+          width: 80px;
+          background: #f8fafb;
           border-radius: 4px;
         }
-  
-        .error-text {
-          color: #ee0a24;
-          flex: 1;
-        }
+      }
+
+      .submit-btn {
+        height: 36px;
+        padding: 0 20px;
+        box-shadow: 0 2px 6px rgba(77, 194, 148, 0.2);
       }
     }
-  
-    .empty-state {
-      text-align: center;
-      padding: 40px 0;
-  
-      .empty-icon {
-        font-size: 48px;
-        color: #c8c9cc;
-        margin-bottom: 16px;
+  }
+}
+
+.record-card {
+  background: @card-bg;
+  border-radius: 12px;
+  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
+  padding: 16px;
+  margin: 10px;
+
+  .card-header {
+    display: flex;
+    align-items: center;
+    margin-bottom: 16px;
+
+    .header-icon {
+      color: @primary-color;
+      font-size: 18px;
+      margin-right: 8px;
+    }
+
+    .header-title {
+      font-size: 15px;
+      color: @text-primary;
+      font-weight: 500;
+    }
+  }
+
+  .record-item {
+    padding: 12px 0;
+    border-bottom: 1px solid @border-color;
+
+    &:last-child {
+      border-bottom: none;
+    }
+
+    .info-row {
+      display: flex;
+      align-items: center;
+      margin: 8px 0;
+      font-size: 14px;
+
+      .label {
+        color: #666;
+        min-width: 80px;
+      }
+
+      .value {
+        color: @text-primary;
       }
-  
-      p {
-        color: #969799;
-        margin: 0;
+
+      .status-tag {
+        color: white;
+        padding: 2px 8px;
+        border-radius: 4px;
+      }
+
+      .error-text {
+        color: #ee0a24;
+        flex: 1;
       }
     }
   }
-  
-  @media (max-width: 480px) {
-    .stepper-container {
-      flex-direction: column;
-      align-items: stretch !important;
-      gap: 12px;
-  
-      .submit-btn {
-        width: 100%;
-      }
+
+  .empty-state {
+    text-align: center;
+    padding: 40px 0;
+
+    .empty-icon {
+      font-size: 48px;
+      color: #c8c9cc;
+      margin-bottom: 16px;
+    }
+
+    p {
+      color: #969799;
+      margin: 0;
+    }
+  }
+}
+
+@media (max-width: 480px) {
+  .stepper-container {
+    flex-direction: column;
+    align-items: stretch !important;
+    gap: 12px;
+
+    .submit-btn {
+      width: 100%;
     }
   }
-  </style>
-  
+}
+</style>

+ 0 - 142
src/views/device/saveProportion/index.less

@@ -1,142 +0,0 @@
-.paramsSetPage {
-  position: relative;
-  width: 100%;
-  overflow: hidden;
-
-  .paramsSetBox {
-    width: 100%;
-    height: calc(100vh - 44px);
-    overflow: auto;
-    overflow-x: hidden;
-    .deleteSpan {
-      padding: 0 1em;
-      color: #df5e4c;
-    }
-    .addSpan { color: #4d6add; }
-    .addRow { height: 3em; line-height: 3em; text-align: center; }
-    .vanInputRow {
-      position: relative;
-      &::after{
-        position: absolute;
-        box-sizing: border-box;
-        content: " ";
-        pointer-events: none;
-        right: var(--van-padding-md);
-        bottom: 0;
-        left: var(--van-padding-md);
-        border-bottom: 0.02667rem solid var(--van-cell-border-color);
-        transform: scaleY(.5);
-      }
-      :deep(.van-cell)  {
-        &::after{ display: none; }
-      }
-    }
-
-    .wrap2 {
-      width: 100%;
-      height: 54px;
-      background-color: #fff;
-      justify-content: center;
-      position: relative;
-      .outer1 {
-        width: 162px;
-        height: 20px;
-        margin: 0 0 0 15px;
-
-        .block1 {
-          background-color: rgba(128, 150, 236, 1);
-          border-radius: 2px;
-          width: 4px;
-          height: 12px;
-          margin-top: 4px;
-        }
-
-        .txt2 {
-          width: 150px;
-          height: 20px;
-          overflow-wrap: break-word;
-          color: rgba(64, 77, 116, 1);
-          font-size: 14px;
-          font-family: PingFangSC-Medium;
-          text-align: left;
-          white-space: nowrap;
-          line-height: 20px;
-          display: block;
-        }
-      }
-
-      .pic2 {
-        z-index: 26;
-        position: absolute;
-        left: 0;
-        top: 53px;
-        width: 375px;
-        height: 2px;
-      }
-    }
-    .list{
-      width: 100%;
-      height: 54px;
-      padding: 0 15px;
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-      position: relative;
-      .title {
-        display: flex;
-        .icon {
-          width: 24px;
-          padding-right: 10px;
-        }
-        .word3 {
-          display: block;
-          width: 78px;
-          height: 13px;
-          overflow-wrap: break-word;
-          color: rgba(64, 77, 116, 1);
-          font-size: 13px;
-          text-align: left;
-          white-space: nowrap;
-          line-height: 13px;
-        }
-        .section4 {
-          position: relative;
-          width: 18px;
-          height: 19px;
-          margin-right: 10px;
-          background: url(../../../assets/device/currency1.png) 100% no-repeat;
-
-          .main4 {
-            z-index: 34;
-            position: absolute;
-            left: 12px;
-            top: -1px;
-            width: 4px;
-            height: 4px;
-            background: url(../../../assets/device/currency2.png) 100% no-repeat;
-          }
-        }
-      }
-      .outer2 {
-        width: 6px;
-        height: 12px;
-        background: url('../../../assets/right.png') top center no-repeat;
-        background-size: 100%;
-        margin-top: 4px;
-      }
-    }
-    :deep(.van-cell)  { align-items: center; }
-    :deep(.van-field__control)  {
-      width: 60%;
-      border: 1px solid var(--van-border-color);
-      padding: 0.2em 0;
-    }
-    :deep(.updataButton)  {
-      background-color: transparent;
-      color: var(--van-button-primary-background-color);
-      padding: 0 0.5em;
-      border-radius: 50px;
-    }
-  }
-}
-

+ 0 - 178
src/views/device/saveProportion/index.vue

@@ -1,178 +0,0 @@
-<template>
-  <!-- 添加分销人 -->
-  <div class="paramsSetPage flex-col">
-    <s-header :name="$t('device.addDistributor')" :noback="false"></s-header>
-    <div class="paramsSetBox mod1 flex-col">
-      <van-form @submit="updateAdFun">
-        <van-field v-model="adInfo.clientId" name="clientId" :label="`${$t('device.addDistributor')}:`"
-          :placeholder="$t('device.equipmentNoPlaceholder')"
-          :rules="[{ required: true, message: $t('device.equipmentNoPlaceholder') }]" />
-
-        <van-field v-model="adInfo.adminProportion" name="adminProportion"
-          :label="`${$t('device.proportionOfPlatformDistributionLabel')}:`"
-          :placeholder="$t('device.proportionOfPlatformDistributionPlaceholder')"
-          :rules="[{ required: true, message: $t('device.proportionOfPlatformDistributionPlaceholder') }]">
-          <template #button>%</template>
-        </van-field>
-
-        <van-field v-model="adInfo.proportion" name="proportion"
-          :label="`${$t('device.merchantDistributionProportionLabel')}:`"
-          :placeholder="$t('device.merchantDistributionProportionPlaceholder')"
-          :rules="[{ required: true, message: $t('device.merchantDistributionProportionPlaceholder') }]">
-          <template #button>%</template>
-        </van-field>
-        <div class="vanInputRow" v-if='adInfo.type >= 1'>
-          <van-field v-model="adInfo.agencyName" name="agencyName" :label="`${$t('device.accountNoOfDistributorLabel')}:`"
-            :placeholder="$t('device.accountNoOfDistributorPlaceholder')" />
-          <van-field v-model="adInfo.agencyProportion" name="agencyProportion"
-            :label="`${$t('device.distributionProportionLabel')}:`"
-            :placeholder="$t('device.distributionProportionPlaceholder')">
-            <template #button>%</template>
-          </van-field>
-        </div>
-        <div class="vanInputRow" v-if='adInfo.type >= 2'>
-          <van-field v-model="adInfo.merchantName" name="merchantName"
-            :label="`${$t('device.accountNoOfDistributorLabel')}:`"
-            :placeholder="$t('device.accountNoOfDistributorPlaceholder')" />
-          <van-field v-model="adInfo.merchantProportion" name="merchantProportion"
-            :label="`${$t('device.distributionProportionLabel')}:`"
-            :placeholder="$t('device.distributionProportionPlaceholder')">
-            <template #button>%<span class="deleteSpan" @click="delectType()"><van-icon
-                  name="delete-o" />{{ $t('device.delete') }}</span></template>
-          </van-field>
-        </div>
-        <div class="vanInputRow" v-if='adInfo.type === 3'>
-          <van-field v-model="adInfo.personageName" name="personageName"
-            :label="`${$t('device.accountNoOfDistributorLabel')}:`"
-            :placeholder="$t('device.accountNoOfDistributorPlaceholder')" />
-          <van-field v-model="adInfo.personageProportion" name="personageProportion"
-            :label="`${$t('device.distributionProportionLabel')}:`"
-            :placeholder="$t('device.distributionProportionPlaceholder')">
-            <template #button>%<span class="deleteSpan" @click="delectType()"><van-icon
-                  name="delete-o" />{{ $t('device.delete') }}</span></template>
-          </van-field>
-        </div>
-        <div class="vanInputRow addRow" v-if='adInfo.type < 3'>
-          <span class="addSpan" @click="addType()"><van-icon
-              name="plus" />{{ $t('device.continueToAddDistributors') }}</span>
-        </div>
-        <van-row justify="space-around" style="padding: 1em">
-          <van-button span="5" round type="primary" style="height: 2em; padding: 0 2em"
-            native-type="submit">{{ $t('device.submitForApproval') }}</van-button>
-        </van-row>
-      </van-form>
-    </div>
-  </div>
-</template>
-<script>
-import { onMounted, ref } from 'vue';
-import sHeader from "@/components/SimpleHeader";
-import { useRoute, useRouter } from 'vue-router';
-import { getDeviceDetal, getProportion, saveProportion } from '@/service/device';
-import { showFailToast, showSuccessToast } from 'vant';
-import { getLoginUser } from "@/common/js/utils";
-
-export default {
-  components: { sHeader },
-  setup() {
-    const user = getLoginUser();
-    const route = useRoute();
-    const router = useRouter();
-    const deviceId = route.query.deviceId;
-    const deviceDetal = ref(null);
-    const adInfo = ref({
-      adminId: user.id, // 当前登录账户的id
-      clientId: '', // 设备编号
-      type: 0, // 分销的人数
-      proportion: 99, // 该商户自己的分销比例
-      adminProportion: 1, // 平台的分账比例
-      agencyName: '', // 分账人的账号
-      agencyProportion: '', // 分账人的比例
-
-      merchantName: '', // 分账人的账号
-      merchantProportion: '', // 分账人的比例
-
-      personageName: '', // 分账人的账号
-      personageProportion: '', // 分账人的比例
-
-    });
-    // 初始化页面获取列表
-    onMounted(async () => { getDeviceDetalFun(); });
-    // 获取设备列表数据
-    const getDeviceDetalFun = async () => {
-      const { data } = await getDeviceDetal({ id: deviceId });
-      if (data.code === '00000') {
-        deviceDetal.value = data.data;
-        adInfo.value.clientId = deviceDetal.value.clientId;
-        getProportionFun();
-      } else { showFailToast(data.message); }
-    }
-    const getProportionFun = async () => {
-      const { data } = await getProportion({ adminId: user.id, clientId: deviceDetal.value.clientId });
-      if (data.code === '00000') {
-        adInfo.value.id = data.data.id;
-        adInfo.value.type = data.data.type;
-        adInfo.value.proportion = data.data.proportion;
-        adInfo.value.agencyName = data.data.agencyName;
-        adInfo.value.agencyProportion = data.data.agencyProportion;
-        adInfo.value.merchantName = data.data.merchantName;
-        adInfo.value.merchantProportion = data.data.merchantProportion;
-        adInfo.value.personageName = data.data.personageName;
-        adInfo.value.personageProportion = data.data.personageProportion;
-        adInfo.value.adminProportion = data.data.adminProportion;
-        if (adInfo.value.personageName !== '' && adInfo.value.personageProportion !== '') {
-          adInfo.value.type++;
-        }
-        if (adInfo.value.merchantName !== '' && adInfo.value.merchantProportion !== '') {
-          adInfo.value.type++;
-        }
-        if (adInfo.value.agencyName !== '' && adInfo.value.agencyProportion !== '') {
-          adInfo.value.type++;
-        }
-      } else { showFailToast(data.message); }
-    }
-    const delectType = () => { adInfo.value.type--; }
-    const addType = () => { adInfo.value.type++; }
-    const updateAdFun = async () => {
-      const params = {};
-      params.id = adInfo.value.id;
-      params.adminId = adInfo.value.adminId;
-      params.clientId = adInfo.value.clientId;
-      params.proportion = adInfo.value.proportion;
-      params.adminProportion = adInfo.value.adminProportion;
-      params.type = 0;
-      if (adInfo.value.personageName !== '' && adInfo.value.personageProportion !== '') {
-        params.personageName = adInfo.value.personageName;
-        params.personageProportion = adInfo.value.personageProportion;
-        params.type++;
-      }
-      if (adInfo.value.merchantName !== '' && adInfo.value.merchantProportion !== '') {
-        params.merchantName = adInfo.value.merchantName;
-        params.merchantProportion = adInfo.value.merchantProportion;
-        params.type++;
-      }
-      if (adInfo.value.agencyName !== '' && adInfo.value.agencyProportion !== '') {
-        params.agencyName = adInfo.value.agencyName;
-        params.agencyProportion = adInfo.value.agencyProportion;
-        params.type++;
-      }
-      const { data } = await saveProportion(params);
-      if (data.code === '00000') {
-        showSuccessToast(data.data);
-        router.back();
-      } else { showFailToast(data.message); }
-      console.log('updateAdFun', data);
-    };
-    return {
-      adInfo,
-      delectType,
-      addType,
-      updateAdFun
-    };
-  },
-};
-</script>
-<style lang="less" scoped>
-@import "../../../common/style/common";
-@import "./index.less";
-</style>

+ 4 - 7
src/views/device/showGoods/index.vue

@@ -11,8 +11,7 @@
       <div class="device-card">
         <div class="device-info">
           <h3 class="device-name">
-            <div class="vertical-indicator"></div>
-            {{ $t("device.showGoodsPage.equipmentName") }}:
+            <van-icon name="desktop-o" class="icon" />
             <span class="highlight">{{ equipmentName }}</span>
           </h3>
           <div class="goods-count">
@@ -239,11 +238,9 @@ export default {
   margin: 0 0 8px;
   color: #404d74;
 
-  .vertical-indicator {
-    width: 4px;
-    height: 15px;
-    background: var(--active-color, #2d88c9);
-    border-radius: 2px;
+  .icon {
+    font-size: 18px;
+    color: var(--primary-color);
     margin-right: 10px;
   }
 }

+ 0 - 8
src/views/device/tagSet/index.vue

@@ -4,19 +4,11 @@
     <div class="o-p-10">
       <div class="l-flex-between">
         <div class="c-border o-ptb-10 o-plr-12 l-flex-RC l-flex-w o-w" style="padding-bottom: 0;min-height: 36px;">
-          <!-- @click="noticeClk({ item, index }, 1)" -->
           <div class="c-border l-flex-RC o-p-3 c-color-f o-mr-10 o-mb-10"
             style="background: #e59a6d; border: 1px solid #e59a6d" v-for="(item, index) in tagList" :key="index">
             <span class="o-mr-3">{{ item.name }}</span>
             <van-icon @click.stop="delTag(item, index)" name="clear" />
           </div>
-          <!-- <div
-            class="c-border l-flex-RC o-p-3 o-mb-10"
-            @click="noticeClk(null, 2)"
-          >
-            <van-icon name="add" />
-            <span class="o-mr-3">{{ $t("device.tagSet.tag") }}</span>
-          </div> -->
         </div>
         <div @click="submitClk" class="submitBtn o-ml-10">
           <van-button round type="primary">{{

+ 8 - 10
src/views/device/tax/index.vue

@@ -4,9 +4,9 @@
 
     <!-- 设备名称标题 -->
     <div class="device-header">
-      <div class="vertical-indicator"></div>
+      <van-icon name="desktop-o" class="icon" />
       <h3 class="device-name">
-        {{ $t("device.equipmentName") }}:{{ deviceName }}
+        {{ equipmentName }}
       </h3>
     </div>
 
@@ -81,11 +81,11 @@ export default {
     const { t } = useI18n();
     const route = useRoute();
     const deviceId = ref(route.query.deviceId);
-    const deviceName = ref(route.query.name);
+    const equipmentName = ref(route.query.name);
     const deviceDetal = ref(null);
 
     const taxStatus = ref(false);
-    const taxRate = ref(100.00);
+    const taxRate = ref(100.0);
 
     onMounted(async () => {
       await getDeviceInfo();
@@ -145,7 +145,7 @@ export default {
     };
 
     return {
-      deviceName,
+      equipmentName,
       taxStatus,
       taxRate,
       handleSubmit,
@@ -175,11 +175,9 @@ export default {
     border-radius: 8px;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
 
-    .vertical-indicator {
-      width: 4px;
-      height: 15px;
-      background: var(--active-color, #2c87c8);
-      border-radius: 2px;
+    .icon {
+      font-size: 18px;
+      color: #2c87c8;
       margin-right: 10px;
     }
 

+ 10 - 9
src/views/device/toDaySugarList.vue

@@ -4,11 +4,11 @@
     <s-header :name="$t('device.todaysSugarList')" :noback="false"></s-header>
 
     <div class="content-container">
-      <div class="device-card" v-if="deviceDetail">
+      <div class="device-card" v-if="equipmentName">
         <div class="device-header">
-          <div class="header-indicator"></div>
+          <van-icon name="desktop-o" class="icon" />
           <h3 class="device-name">
-            {{ $t("device.equipmentName") }}:{{ deviceDetail?.name || "-" }}
+            {{ equipmentName }}
           </h3>
         </div>
       </div>
@@ -223,6 +223,7 @@ export default {
     const route = useRoute();
     const deviceId = route.query.deviceId;
     const clientId = route.query.clientId;
+    const equipmentName = route.query.name;
     const deviceDetail = ref(null);
     const loading = ref(false);
     const finished = ref(false);
@@ -454,6 +455,7 @@ export default {
       handleStartConfirm,
       handleEndConfirm,
       handleExport,
+      equipmentName,
     };
   },
   components: {
@@ -485,14 +487,13 @@ export default {
       display: flex;
       align-items: center;
 
-      .header-indicator {
-        width: 3px;
-        height: 20px;
-        background: #2d88c9;
-        margin-right: 12px;
-        border-radius: 2px;
+      .icon {
+        font-size: 18px;
+        color: #2c87c8;
+        margin-right: 10px;
       }
 
+
       .device-name {
         font-size: 15px;
         color: #404d74;

+ 10 - 75
src/views/device/viewLogs/index.vue

@@ -4,9 +4,9 @@
 
     <!-- 设备名称标题 -->
     <div class="device-header">
-      <div class="vertical-indicator"></div>
+      <van-icon name="desktop-o" class="icon" />
       <h3 class="device-name">
-        {{ $t("device.equipmentName") }}:{{ deviceName }}
+        {{ equipmentName }}
       </h3>
     </div>
 
@@ -46,18 +46,6 @@
         />
       </div>
 
-      <!-- 新增通道选择 -->
-      <div class="channel-selector">
-        <van-radio-group v-model="channelType" direction="horizontal">
-          <van-radio name="1" icon-size="16px" class="channel-option">
-            默认通道
-          </van-radio>
-          <van-radio name="2" icon-size="16px" class="channel-option">
-            新通道
-          </van-radio>
-        </van-radio-group>
-      </div>
-
       <!-- 操作按钮 -->
       <div class="action-buttons">
         <van-button
@@ -100,29 +88,19 @@
 <script>
 import { onMounted, computed, ref } from "vue";
 import sHeader from "@/components/SimpleHeader.vue";
-import {
-  downloadLog,
-  getDeviceDetal,
-  uploadLog,
-  newUploadLog,
-  queryLog,
-} from "@/service/device";
-import { $M_ExportFile } from "@/common/js/utils";
+import { getDeviceDetal, newUploadLog, queryLog } from "@/service/device";
 import { showFailToast, showToast } from "vant";
 import { useRoute } from "vue-router";
 import dateUtil from "@/utils/dateUtil";
-// import { styleUrl } from "../../../common/js/utils";
-// import {useI18n} from "vue-i18n";
 
 export default {
   components: {
     sHeader,
   },
   setup() {
-    // const { t } = useI18n();
     const route = useRoute();
     const deviceId = route.query.deviceId;
-    const deviceName = ref("");
+    const equipmentName = ref("");
     const deviceDetail = ref(null);
     const showPicker = ref(false);
     const downloading = ref(false);
@@ -147,14 +125,11 @@ export default {
       return new Date();
     });
 
-    // 上传通道
-    const channelType = ref("1");
-
     // 初始化页面获取列表
     onMounted(async () => {
       // 加载样式
       await getDeviceDetailFun();
-      deviceName.value = route.query.name;
+      equipmentName.value = route.query.name;
     });
 
     // 选择时间
@@ -178,40 +153,6 @@ export default {
       }
     };
 
-    const downloadBtn = async () => {
-      const pattern = /^\d{4}-\d{2}-\d{2}$/;
-      if (logsTime.value == null) {
-        showToast("请选择日期");
-        return;
-      }
-      if (!pattern.test(logsTime.value)) {
-        showToast("日期格式有误");
-        return;
-      }
-      const formattedDate = logsTime.value.replace(/-/g, "");
-      downloading.value = true;
-      try {
-        const { headers, data } = await downloadLog({
-          equipmentId: deviceId,
-          day: formattedDate,
-        });
-        console.log("请求成功", headers, data);
-        $M_ExportFile(data, headers);
-      } catch (error) {
-        if (error.code === "ECONNABORTED") {
-          // 处理请求超时的错误
-          console.error("请求超时:", error);
-          showFailToast("请求超时");
-        } else {
-          // 处理其他请求错误
-          console.error("请求失败:", error);
-          showFailToast("请求失败");
-        }
-      } finally {
-        downloading.value = false;
-      }
-    };
-
     const uploadLogBtn = async () => {
       const pattern = /^\d{4}-\d{2}-\d{2}$/;
       if (logsTime.value == "") {
@@ -223,9 +164,7 @@ export default {
         return;
       }
       const formattedDate = logsTime.value.replace(/-/g, "");
-      const { data } = await (channelType.value == "1"
-        ? uploadLog
-        : newUploadLog)({
+      const { data } = await newUploadLog({
         equipmentId: deviceId,
         day: formattedDate,
       });
@@ -297,7 +236,6 @@ export default {
 
     return {
       deviceDetail,
-      downloadBtn,
       chooseTime,
       selectTime,
       showPicker,
@@ -310,8 +248,7 @@ export default {
       queryLogBtn,
       fileName,
       message,
-      channelType,
-      deviceName,
+      equipmentName,
     };
   },
 };
@@ -339,11 +276,9 @@ export default {
   border-radius: 8px;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
 
-  .vertical-indicator {
-    width: 4px;
-    height: 15px;
-    background: var(--active-color, #2d88c9);
-    border-radius: 2px;
+  .icon {
+    font-size: 18px;
+    color: #2c87c8;
     margin-right: 10px;
   }
 

+ 17 - 7
src/views/distributionSet/detail.vue

@@ -7,12 +7,9 @@
       <div class="detail-container">
         <!-- 客户ID输入区域 -->
         <div class="input-section">
+          <van-icon name="desktop-o" class="icon" />
           <template v-if="clientId">
-            <van-field
-              disabled
-              v-model="cofficentForm.clientId"
-              :label="$t('distributionSet.addDist.clientId')"
-            />
+            <van-field disabled v-model="cofficentForm.clientId" />
           </template>
           <template v-else>
             <van-field
@@ -47,7 +44,7 @@
         <!-- 信息展示区域 -->
         <div class="info-section">
           <div class="section-title">
-            <van-icon name="todo-list-o" size="20" />
+            <van-icon name="todo-list-o" size="22" class="section-icon" />
             {{
               proportionCheck
                 ? $t("distributionSet.addDist.pendingRecord")
@@ -547,10 +544,18 @@ export default {
 }
 
 .input-section {
-  padding: 10px;
+  padding: 5px;
+  display: flex;
+  align-items: center;
 
   border-bottom: 1px solid @border-color;
 
+  .icon {
+    font-size: 18px;
+    color: @primary-color;
+    margin-right: 10px;
+  }
+
   .field-icons {
     display: flex;
     gap: 8px;
@@ -570,6 +575,11 @@ export default {
 .info-section {
   padding: 16px;
 
+  .section-icon {
+    color: @primary-color;
+    margin-right: 10px;
+  }
+
   .section-title {
     padding: 12px 0;
     font-weight: 500;

+ 6 - 56
src/views/forgetPassword.vue

@@ -8,21 +8,6 @@
 
       <!-- 找回密码表单 -->
       <van-form @submit="forgetPasswordSubmit" class="password-form">
-        <!-- 用户名输入 -->
-        <van-field
-          v-model="username"
-          name="username"
-          :placeholder="$t('forgetPassword.usernamePlaceholder')"
-          :rules="[
-            { required: true, message: $t('forgetPassword.usernameRequired') },
-          ]"
-          label=""
-          class="form-field"
-        >
-          <template #left-icon>
-            <van-icon name="user-o" size="20" class="field-icon" />
-          </template>
-        </van-field>
 
         <!-- 选择找回方式 -->
         <div class="recovery-methods">
@@ -47,18 +32,6 @@
             </van-radio>
 
             <van-radio
-              name="2"
-              shape="square"
-              icon-size="20"
-              checked-color="@theme-color"
-            >
-              <div class="radio-option">
-                <van-icon name="envelop-o" size="20" class="radio-icon" />
-                <span>{{ $t("forgetPassword.emailChina") }}</span>
-              </div>
-            </van-radio>
-
-            <van-radio
               name="1"
               shape="square"
               icon-size="20"
@@ -66,7 +39,7 @@
             >
               <div class="radio-option">
                 <van-icon name="envelop-o" size="20" class="radio-icon" />
-                <span>{{ $t("forgetPassword.emailAbroad") }}</span>
+                <span>{{ $t("forgetPassword.email") }}</span>
               </div>
             </van-radio>
           </van-radio-group>
@@ -91,9 +64,9 @@
           </van-field>
         </div>
 
-        <div class="contact-input" v-if="ifForeign === '2'">
+        <div class="contact-input" v-else>
           <p class="method-title">
-            {{ $t("forgetPassword.emailWordSpanChina") }}
+            {{ $t("forgetPassword.emailRequired") }}
           </p>
           <van-field
             v-model="email"
@@ -110,23 +83,6 @@
           </van-field>
         </div>
 
-        <div class="contact-input" v-if="ifForeign === '1'">
-          <p class="method-title">{{ $t("forgetPassword.emailWordSpan") }}</p>
-          <van-field
-            v-model="email"
-            name="email"
-            :placeholder="$t('forgetPassword.emailPlaceholder')"
-            :rules="[
-              { required: true, message: $t('forgetPassword.emailRequired') },
-            ]"
-            class="form-field"
-          >
-            <template #left-icon>
-              <van-icon name="envelop-o" size="20" class="field-icon" />
-            </template>
-          </van-field>
-        </div>
-
         <!-- 验证码输入 -->
         <div class="verification-code">
           <van-field
@@ -178,7 +134,6 @@ import { sentForgetCode, checkForgetCode } from "@/service/forgetPassword";
 
 export default {
   setup() {
-    const username = ref(""); // 用户名
     const ifForeign = ref("0"); // 手机号&邮箱状态
     const email = ref(""); // 邮箱
     const phone = ref(""); // 手机号
@@ -190,14 +145,11 @@ export default {
     // 发送验证码
     const seedVerCode = async () => {
       const { data } = await sentForgetCode({
-        username: username.value,
-        ifForeign: ifForeign.value,
         phoneOrEmail: ifForeign.value === "0" ? phone.value : email.value,
-        hostName: "Sunzee",
       });
       if (data.code === "00000") {
         showToast("验证码发送成功");
-        verCodeTime.time = 3 * 60;
+        verCodeTime.time = 60;
         verCodeTimeInterval();
       } else {
         showFailToast(data.message);
@@ -216,7 +168,6 @@ export default {
     // 验证-表单
     const forgetPasswordSubmit = async () => {
       const { data } = await checkForgetCode({
-        ifForeign: ifForeign.value,
         phoneOrEmail: ifForeign.value === "0" ? phone.value : email.value,
         code: code.value,
       });
@@ -224,7 +175,7 @@ export default {
         showToast("校验成功");
         router.push({
           path: "/changepassword",
-          query: { name: username.value },
+          query: { name: data.data },
         });
       } else {
         showFailToast(data.message);
@@ -247,7 +198,6 @@ export default {
 
     return {
       ...toRefs(verCodeTime),
-      username,
       ifForeign,
       phone,
       email,
@@ -261,7 +211,7 @@ export default {
 </script>
 
 <style lang="less" scoped>
-@theme-color: #2d88c9;
+@theme-color: #2c87c8;
 
 .forget-password-container {
   display: flex;

+ 21 - 12
src/views/purse/index.vue

@@ -2,7 +2,7 @@
   <div class="wallet-page">
     <!-- 导航栏 -->
     <s-header name="我的钱包" :noback="false" :isBorder="false"></s-header>
-    
+
     <div class="wallet-content">
       <!-- 新增提示栏 -->
       <van-notice-bar
@@ -94,7 +94,11 @@
         <div class="bank-cards">
           <!-- 已绑卡状态 -->
           <div class="bank-card" v-if="hasBankCard">
-            <div @click="jumpTo(user.payPlatform === '1'? '/huifuBind': '/joinPayBind')">
+            <div
+              @click="
+                jumpTo(user.payPlatform === '1' ? '/huifuBind' : '/joinPayBind')
+              "
+            >
               <div class="card-header">
                 <van-icon name="card" size="20" />
                 <span>已绑定</span>
@@ -114,7 +118,13 @@
           </div>
 
           <!-- 未绑卡状态 -->
-          <div class="bank-card empty-state" @click="jumpTo(user.payPlatform === '1'? '/huifuBind': '/joinPayBind')" v-else>
+          <div
+            class="bank-card empty-state"
+            @click="
+              jumpTo(user.payPlatform === '1' ? '/huifuBind' : '/joinPayBind')
+            "
+            v-else
+          >
             <div class="empty-content">
               <p class="empty-title">尚未绑定银行卡</p>
               <p class="empty-desc">绑定后可享受快捷支付服务</p>
@@ -183,7 +193,12 @@ import {
 } from "@/service/huifuMch";
 import { getLoginUser } from "../../common/js/utils";
 import { useRouter } from "vue-router";
-import { showConfirmDialog, showFailToast, showSuccessToast, showToast } from "vant";
+import {
+  showConfirmDialog,
+  showFailToast,
+  showSuccessToast,
+  showToast,
+} from "vant";
 import { useI18n } from "vue-i18n";
 
 export default {
@@ -264,7 +279,7 @@ export default {
           message: "提现需要先绑定银行卡,是否立即绑定?",
           confirmButtonColor: "#2d88c9",
         }).then(() => {
-          router.push("/settlement");
+          router.push(user.payPlatform === "1" ? "/huifuBind" : "/joinPayBind");
         });
         return;
       }
@@ -272,13 +287,7 @@ export default {
         bankCardInfo.value.settMode === 1 ||
         bankCardInfo.value.settType === 1
       ) {
-        showConfirmDialog({
-          title: "未开启手动提现",
-          message: "当前银行卡已开启自动结算,是否切换成手动提现?",
-          confirmButtonColor: "#2d88c9",
-        }).then(() => {
-          router.push("/settlement");
-        });
+        showToast("当前银行卡为自动结算,请先切换成手动提现");
         return;
       }
 

File diff suppressed because it is too large
+ 0 - 1163
src/views/settlement/index.vue


+ 1 - 0
src/views/user.vue

@@ -910,6 +910,7 @@ export default {
       showConfirmDialog({
         title: t("user.tips"),
         message: t("user.logOutContent"),
+        confirmButtonColor: "#2c87c8"
       })
         .then(() => {
           localStorage.removeItem("loginUser");