Parcourir la source

feat:“同步2024.01.19,更换工具图标”

soobin il y a 1 an
Parent
commit
0e00e3c2f9
62 fichiers modifiés avec 1142 ajouts et 757 suppressions
  1. BIN
      src/assets/device/searchIcon.png
  2. BIN
      src/assets/home/M15.png
  3. BIN
      src/assets/home/M19.png
  4. BIN
      src/assets/home/M3.png
  5. BIN
      src/assets/home/M5.png
  6. BIN
      src/assets/home/M7.png
  7. BIN
      src/assets/home/M9.png
  8. 49 19
      src/assets/language/en.json
  9. 69 35
      src/assets/language/zh.json
  10. BIN
      src/assets/navbarLogo/device.png
  11. BIN
      src/assets/navbarLogo/deviceActive.png
  12. BIN
      src/assets/navbarLogo/home.png
  13. BIN
      src/assets/navbarLogo/homeActive.png
  14. BIN
      src/assets/navbarLogo/ranking.png
  15. BIN
      src/assets/navbarLogo/rankingActive.png
  16. BIN
      src/assets/navbarLogo/user.png
  17. BIN
      src/assets/navbarLogo/userActive.png
  18. BIN
      src/assets/right.png
  19. 0 16
      src/components/NavBar.vue
  20. 1 1
      src/components/dateSelectList/index.vue
  21. 4 0
      src/service/discountCode/index.js
  22. 4 0
      src/service/home.js
  23. 8 0
      src/service/merchantManage/index.js
  24. 0 4
      src/service/user.js
  25. 1 1
      src/styles/accountOperation/index.less
  26. 0 15
      src/styles/accountPer/index.less
  27. 5 22
      src/styles/alarmHistory/index.less
  28. 7 24
      src/styles/device/index.less
  29. 26 35
      src/styles/discountCode/index.less
  30. 1 0
      src/styles/home/index.less
  31. 6 23
      src/styles/merchantManage/index.less
  32. 45 67
      src/styles/orderCenter/index.less
  33. 63 78
      src/styles/robotRanking/index.less
  34. 6 14
      src/styles/taskMessage/index.less
  35. 3 3
      src/styles/user/index.less
  36. 1 1
      src/utils/dateUtil.js
  37. 10 5
      src/views/accountPer/add.vue
  38. 0 3
      src/views/alarmHistory/index.vue
  39. 8 0
      src/views/apkManage/add.vue
  40. 5 6
      src/views/changePassword.vue
  41. 1 1
      src/views/device/alarmClock.vue
  42. 39 28
      src/views/device/deviceOper.vue
  43. 8 0
      src/views/device/deviceSearch.vue
  44. 2 1
      src/views/device/deviceSet.vue
  45. 38 38
      src/views/device/diyFlower/index.vue
  46. 90 21
      src/views/device/doSugar.vue
  47. 24 20
      src/views/device/index.vue
  48. 1 1
      src/views/device/modulation.vue
  49. 33 12
      src/views/device/paramsSet/paramsSetInfo.vue
  50. 99 86
      src/views/device/toDaySugarList.vue
  51. 6 1
      src/views/device/viewLogs/index.vue
  52. 165 24
      src/views/discountCode/index.vue
  53. 5 1
      src/views/distributionSet/detail.vue
  54. 26 4
      src/views/home/index.vue
  55. 0 3
      src/views/merchantManage/index.vue
  56. 107 41
      src/views/merchantManage/set.vue
  57. 14 16
      src/views/orderCenter/index.vue
  58. 1 1
      src/views/orderExport/index.vue
  59. 17 20
      src/views/robotRanking.vue
  60. 74 15
      src/views/settlement/index.vue
  61. 16 13
      src/views/taskMessage/proportion/index.vue
  62. 54 38
      src/views/user.vue

BIN
src/assets/device/searchIcon.png


BIN
src/assets/home/M15.png


BIN
src/assets/home/M19.png


BIN
src/assets/home/M3.png


BIN
src/assets/home/M5.png


BIN
src/assets/home/M7.png


BIN
src/assets/home/M9.png


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

@@ -74,6 +74,7 @@
     "whole": "whole",
     "successfullyModifiedTheAccount": "Successfully modified the account",
     "failedToModifyTheAccount": "Failed to modify the account",
+    "accountNameExists": "Account name exists",
     "accountAddedSuccessfully": "Account added successfully",
     "failedToAddAccount": "Failed to add account",
     "successfullyDeletedTheAccount": "Successfully deleted the account",
@@ -157,7 +158,7 @@
       "selected": "Selected",
       "individual": "individual",
       "cancel": "cancel",
-      "confirmDel": "confirm deletion",
+      "confirmDel": "Confirm deletion",
       "addRule": {
         "title": "Add Rule",
         "editTitle": "Edit Rule",
@@ -274,6 +275,11 @@
     "advancedParameterConfiguration": "Advanced parameter configuration",
     "debuggingParameterConfiguration": "Debugging parameter configuration",
     "humidityParameterConfiguration": "Humidity parameter configuration",
+    "tips":"Remind",
+    "content": "Do you want to switch?",
+    "isUpdate": "Whether to update ",
+    "to": " to ",
+    "attention": "(Note: the number of bits is incorrect, updating may cause machine anomalies)",
     "submitUpdates": "Submit Updates",
     "modificationSucceeded": "Modification succeeded",
     "noParameterData": "No parameter data is available !",
@@ -339,6 +345,8 @@
     "enableMaterialSucceed": "Enable material successfully",
     "enableMaterialFailed": "Enable material failed",
     "sleepSuccessfully": "Sleep successfully",
+    "Succeed": "Request sent successfully",
+    "Failed": "Request sent failure",
     "open": "open",
     "close": "close",
     "success": "success",
@@ -365,6 +373,7 @@
     "clickSearch": "Click search",
     "spunSugar": "Cotton candy",
     "popcorn": "Pop corn",
+    "iceCream": "Ice cream",
     "sz": "Sunzee",
     "sc": "Sevencloud",
     "startUp": "Start up",
@@ -399,9 +408,15 @@
     "pleaseSelectTaste": "Please choose the flavor",
     "todaysMakeList": "Make Today List",
     "todaysSugarList": "Make a sugar list today",
+    "goods": "Product : ",
+    "doTime": " , Time : ",
+    "byDeice": " , Machine : ",
     "submitToMakeSugar": "Submit",
     "viewResults": "View Results",
     "notUploadData": "The machine did not upload data !",
+    "machineException": "The machine is abnormal, Please check the machine status.",
+    "netException": "Network exception !",
+    "receiveInstruction": "The machine has received instructions to make sugar.",
     "dataOverview": "Data Overview",
     "search": "search",
     "totalNumberOfRuns": "Total number of runs",
@@ -485,6 +500,7 @@
       "registerButton": "Commit",
       "customLogoSucceed": "Custom logo success"
     },
+    "lockDevice": "Remote lock",
     "deleteDevice": "Delete Machine",
     "viewLogs": "View logs",
     "noPosition": "No positioning",
@@ -543,14 +559,14 @@
     "flowerTypePlace": "Please select the flower type"
   },
   "alarmClockSet": {
-    "monday":"Mon",
-    "tuesday":"Tue",
-    "wednesday":"Wed",
-    "thursday":"Thu",
-    "friday":"Fri",
-    "saturday":"Sat",
-    "sunday":"Sun",
-    "checkedAll": "Pick All"
+    "monday": "Mon",
+    "tuesday": "Tue",
+    "wednesday": "Wed",
+    "thursday": "Thu",
+    "friday": "Fri",
+    "saturday": "Sat",
+    "sunday": "Sun",
+    "checkedAll": "PickAll"
   },
   "discountCode": {
     "discountCodeNoLabel": "Discount code No",
@@ -566,13 +582,19 @@
     "total": "Total ",
     "discountCodesInTotal": " Discount codes",
     "search": "search",
-    "notUsed": "not used",
+    "notUsed": "Not used",
     "used": "Used",
-    "export": "export",
-    "apply": "apply",
+    "export": "Export",
+    "apply": "Apply",
+    "cancel": "Cancel",
+    "delete": "Delete",
+    "selectAll": "All",
+    "confirmDel": "Confirm deletion",
+    "deletionSucceeded": "Deletion succeeded",
     "discount": "discount",
     "deduction": "deduction",
     "termOfValidity": "Valid until",
+    "affiliatedMerchants": "Business Owner",
     "expired": "(Expired)",
     "validDays": "Valid days",
     "usingTheMachine": "Using the machine",
@@ -620,9 +642,13 @@
       "clientIdPlace": "Please select the equipment code",
       "myDistProport": "My distribution proportion",
       "distInof": "Distribution Information",
-      "platDistRange": "The distribution proportion range of the platform is0-100",
-      "distPropRange": "The distribution proportion range is0-100",
-      "notDelMore": "Can't delete any more"
+      "platDistRange": "The distribution proportion range of the platform is 1-100",
+      "distPropRange": "The distribution proportion range is 0-100",
+      "noZero": "Platform distribution is a minimum of 1%",
+      "notDelMore": "Can't delete any more",
+      "submitSuccess": "Submit successfully",
+      "submitFailed": "Submit failed",
+      "hasExamine": "Records to be reviewed already exist, Do not submit them again."
     }
   },
   "home": {
@@ -655,7 +681,7 @@
       "nextTime": "See it next time",
       "roger": "Do not show again"
     },
-    "week" : {
+    "week": {
       "mon": "Mon",
       "tue": "Tue",
       "wed": "Wed",
@@ -794,6 +820,8 @@
     "withdrawalData": "Withdrawal data",
     "region": "region",
     "accountNumber": "account number",
+    "relationAdmin": "Associate superior",
+    "relationAdminPlaceholder": "Please enter the association superior",
     "subscriptionAdministrator": "Subscription administrator",
     "fullNameLabel": "full name",
     "fullNamePlaceholder": "Please enter your name",
@@ -833,8 +861,8 @@
     "bankNo": "Bank No",
     "theTwoPasswordsAreDifferent": "The two passwords are different",
     "modificationSucceeded": "Modification succeeded",
-    "joinpayMch":"JoinpayMch status",
-    "huifuMch":"HuifuMch Status",
+    "joinpayMch": "JoinpayMch status",
+    "huifuMch": "HuifuMch Status",
     "tips": "Remind",
     "autoLogin": "Do you want to switch login?"
   },
@@ -959,6 +987,7 @@
     "orderRefund": "Order refund",
     "systemOffline": "System offline",
     "labelMan": "Label management",
+    "relationAdmin": "Associate superior",
     "apkMan": "Apk management",
     "merchantMan": "Merchant management",
     "accountOperation": "Account operation",
@@ -1257,7 +1286,7 @@
     "replaysInSeconds": "Replays in seconds",
     "emailRegistration": "Email",
     "phoneRegistration": "Phone",
-    "twoTypedDiff" : "The two passwords are different"
+    "twoTypedDiff": "The two passwords are different"
   },
   "robotRanking": {
     "machineSalesRanking": "Machine sales ranking",
@@ -1304,6 +1333,7 @@
     "mailbox": "Email",
     "mailboxPlace": "Please enter your email address",
     "associateParent": "Associate Parent",
+    "superiorAccount": "Superior Account",
     "associateParentPlace": "Please enter the related superior",
     "commonOperations": "Common Operations",
     "taskMessage": "Task Message",

+ 69 - 35
src/assets/language/zh.json

@@ -75,12 +75,13 @@
     "successfullyModifiedTheAccount": "修改账号成功",
     "failedToModifyTheAccount": "修改账号失败",
     "accountAddedSuccessfully": "添加账号成功",
+    "accountNameExists": "账号名已存在",
     "failedToAddAccount": "添加账号失败",
     "successfullyDeletedTheAccount": "删除账号成功",
     "failedToDeleteTheAccount": "删除账号失败",
     "accountPermission": "账号权限",
-    "total": "共",
-    "permissions": "条权限",
+    "total": "共 ",
+    "permissions": " 条权限",
     "rolePermissions": "角色权限",
     "add": "子商家",
     "screen": "筛选",
@@ -133,8 +134,8 @@
     "advertisingManagement": "广告管理",
     "requestFailed": "请求失败,点击重新加载",
     "noMore": "没有更多了",
-    "total": "共",
-    "ads": "个广告",
+    "total": "共 ",
+    "ads": " 个广告",
     "advertisingRules": "广告规则",
     "add": "添加",
     "delete": "删除",
@@ -147,8 +148,8 @@
     "delTips": "请先选择需要删除的数据",
     "advertRule": {
       "sysTitle": "广告规则",
-      "total": "共",
-      "rules": "条规则",
+      "total": "共 ",
+      "rules": " 条规则",
       "add": "添加",
       "delete": "删除",
       "push": "推送",
@@ -197,8 +198,8 @@
     "alarmHistory": "报警历史",
     "requestFailed": "请求失败,点击重新加载",
     "noMore": "没有更多了",
-    "common": "共",
-    "recordsTotal": "条记录",
+    "common": "共 ",
+    "recordsTotal": " 条记录",
     "search": "搜索",
     "affiliatedMerchants": "所属商家",
     "equipmentNo": "设备编号",
@@ -237,6 +238,9 @@
     "managementCenter": "设备管理中心",
     "setAlarm": "设置闹钟",
     "equipmentName": "设备名称",
+    "lockCondition": "锁机状态",
+    "lockState": "不可使用,已锁机",
+    "unLockState": "正常使用,未锁机",
     "equipmentNameTips": "暂未设置名称",
     "selectDevice": "选择设备",
     "selectTime": "选择时间",
@@ -271,6 +275,11 @@
     "advancedParameterConfiguration": "进阶参数配置",
     "debuggingParameterConfiguration": "调试参数配置",
     "humidityParameterConfiguration": "湿度参数配置",
+    "tips":"提醒",
+    "content": "是否切换开关?",
+    "isUpdate": "是否更新",
+    "to": "为",
+    "attention": "(注意:位数不正确,更新可能会造成机器异常)",
     "submitUpdates": "提交更新",
     "modificationSucceeded": "修改成功",
     "noParameterData": "暂无参数数据",
@@ -335,6 +344,8 @@
     "deleteDeviceFailed": "删除设备失败",
     "enableMaterialSucceed": "启用物料监控成功",
     "enableMaterialFailed": "启用物料监控失败",
+    "Succeed": "请求发送成功",
+    "Failed": "请求发送失败",
     "sleepSuccessfully": "睡眠成功",
     "open": "开启",
     "close": "关闭",
@@ -362,6 +373,7 @@
     "clickSearch": "点击搜索",
     "spunSugar": "棉花糖",
     "popcorn": "爆米花",
+    "iceCream": "冰淇淋",
     "sz": "申泽",
     "sc": "七云",
     "startUp": "开机",
@@ -396,16 +408,22 @@
     "pleaseSelectTaste": "请选择口味",
     "todaysSugarList": "今日做糖列表",
     "todaysMakeList": "今日制作列表",
+    "goods": "商品:",
+    "doTime": ",时间:",
+    "byDeice": ",设备:",
     "submitToMakeSugar": "提交",
     "viewResults": "查看结果",
     "notUploadData": "机器未上传数据",
+    "machineException": "机器异常,请检查机器状态",
+    "netException": "网络异常",
+    "receiveInstruction": "机器已接收到做糖指令",
     "dataOverview": "设备管理",
     "search": "搜索",
     "totalNumberOfRuns": "运行总数",
     "totalNumberOfEquipment": "总设备数",
     "affiliatedMerchants": "所属商家",
     "sleepState": "睡眠状态",
-    "sleeping": "睡眠中zzZ",
+    "sleeping": "睡眠中 zzZ",
     "notSleeping": "未睡眠",
     "sleepDesc": "睡眠描述",
     "SuspendBusiness": "暂停营业",
@@ -467,8 +485,8 @@
     "modifyPricePage": {
       "title": "商品价格调整",
       "equipmentName": "设备名称",
-      "total": "共",
-      "goods": "个商品",
+      "total": "共 ",
+      "goods": " 个商品",
       "batchModify": "批量修改",
       "modify": "修改",
       "submit": "提交",
@@ -476,6 +494,7 @@
       "batchPricePlace": "请输入批量价格",
       "modifySubmit": "修改提交"
     },
+    "materialMonitor": "物料监控",
     "showGoodsPage": {
       "title": "商品显示设置",
       "equipmentName": "设备名称"
@@ -499,6 +518,7 @@
       "passwordCheckRequired": "请再次输入密码进行确认",
       "passwordMatch": "两次密码不一致"
     },
+    "lockDevice": "远程锁机",
     "changePassword": "修改机器密码",
     "deleteDevice": "删除设备",
     "viewLogs": "查看日志",
@@ -542,13 +562,13 @@
     "flowerTypePlace": "请选择花型种类"
   },
   "alarmClockSet": {
-    "monday":"一",
-    "tuesday":"二",
-    "wednesday":"三",
-    "thursday":"四",
-    "friday":"五",
-    "saturday":"六",
-    "sunday":"日",
+    "monday": "一",
+    "tuesday": "二",
+    "wednesday": "三",
+    "thursday": "四",
+    "friday": "五",
+    "saturday": "六",
+    "sunday": "日",
     "checkedAll": "全选"
   },
   "discountCode": {
@@ -562,22 +582,28 @@
     "clickQuery": "点击查询",
     "selectFullTime": "选择日期",
     "discountCode": "优惠码",
-    "total": "共",
-    "discountCodesInTotal": "个优惠码",
+    "total": "共 ",
+    "discountCodesInTotal": " 个优惠码",
     "search": "搜索",
     "notUsed": "未使用",
     "used": "已使用",
     "export": "导出",
     "apply": "申请",
+    "delete": "删除",
+    "cancel": "取消",
+    "selectAll": "全选",
+    "confirmDel": "确认删除",
+    "deletionSucceeded": "删除成功",
     "discount": "折扣",
     "deduction": "抵扣",
-    "termOfValidity": "有效期至",
+    "termOfValidity": "有效期",
+    "affiliatedMerchants": "所属商家",
     "expired": "(已过期)",
     "validDays": "有效天数",
     "usingTheMachine": "使用机器",
     "purchaseDiscountCode": "购买优惠码",
-    "numberOfDiscountCodesLabel": "优惠码个数",
-    "numberOfDiscountCodesPlaceholder": "请输入优惠码个数",
+    "numberOfDiscountCodesLabel": "个数",
+    "numberOfDiscountCodesPlaceholder": "请输入个数",
     "aSingleGenerationCannotExceed": "单次生成不能超过200个",
     "pleaseEnterTheValidityPeriod": "请输入有效期",
     "Months": "个月",
@@ -602,8 +628,8 @@
   },
   "distributionSet": {
     "distributionSettings": "分销设置",
-    "total": "共",
-    "leftTitle": "条分销设置",
+    "total": "共 ",
+    "leftTitle": " 条分销设置",
     "rightAdd": "添加设备分销人",
     "equipName": "设备名称",
     "partners": "合作商",
@@ -619,9 +645,13 @@
       "clientIdPlace": "请选择设备编码",
       "myDistProport": "我的分销比例",
       "distInof": "分销信息",
-      "platDistRange": "平台分销比例范围为0-100",
+      "platDistRange": "平台分销比例范围为1-100",
       "distPropRange": "分销比例范围为0-100",
-      "notDelMore": "不能再删除了"
+      "noZero": "平台分销比例最低为1%",
+      "notDelMore": "不能再删除了",
+      "submitSuccess": "提交成功",
+      "submitFailed": "提交失败",
+      "hasExamine": "已存在待审核记录,请勿重复提交"
     }
   },
   "home": {
@@ -654,7 +684,7 @@
       "nextTime": "下次再看",
       "roger": "不再显示"
     },
-    "week" : {
+    "week": {
       "mon": "周一",
       "tue": "周二",
       "wed": "周三",
@@ -774,8 +804,8 @@
   },
   "merchantManage": {
     "merchantManagement": "商户管理",
-    "total": "共",
-    "recordsInTotal": "条记录",
+    "total": "共 ",
+    "recordsInTotal": " 条记录",
     "search": "搜索",
     "telephone": "电话",
     "mailbox": "邮箱",
@@ -793,6 +823,8 @@
     "withdrawalData": "提现资料",
     "region": "地区",
     "accountNumber": "账号",
+    "relationAdmin": "关联上级",
+    "relationAdminPlaceholder": "请输入关联上级",
     "subscriptionAdministrator": "开通管理员",
     "fullNameLabel": "姓名",
     "fullNamePlaceholder": "请输入姓名",
@@ -964,6 +996,7 @@
     "orderRefund": "订单退款",
     "systemOffline": "系统脱机",
     "labelMan": "标签管理",
+    "relationAdmin": "关联上级",
     "apkMan": "apk管理",
     "merchantMan": "商户管理",
     "accountOperation": "账户操作",
@@ -974,8 +1007,8 @@
     "successfullyModifiedRole": "修改角色成功",
     "failedToModifyRole": "修改角色失败",
     "rolePermissionSettings": "角色权限设置",
-    "total": "共",
-    "inTotal": "个",
+    "total": "共 ",
+    "inTotal": " 角色",
     "addTo": "添加权限组",
     "edit": "编辑",
     "delete": "删除",
@@ -1090,8 +1123,8 @@
   },
   "taskMessage": {
     "equipmentInitializationApproval": "设备初始化审批",
-    "total": "共",
-    "recordsInTotal": "条记录",
+    "total": "共 ",
+    "recordsInTotal": " 条记录",
     "search": "搜索",
     "affiliatedMerchants": "所属商家",
     "equipmentNo": "设备编号",
@@ -1271,7 +1304,7 @@
     "replaysInSeconds": "秒后可重发",
     "emailRegistration": "邮箱注册",
     "phoneRegistration": "手机注册",
-    "twoTypedDiff" : "两次输入的密码不一致"
+    "twoTypedDiff": "两次输入的密码不一致"
   },
   "robotRanking": {
     "machineSalesRanking": "机器销售排行榜",
@@ -1318,6 +1351,7 @@
     "mailbox": "邮箱",
     "mailboxPlace": "请输入邮箱",
     "associateParent": "关联上级",
+    "superiorAccount": "上级账号",
     "associateParentPlace": "请输入关联上级",
     "commonOperations": "常用操作",
     "taskMessage": "任务消息",

BIN
src/assets/navbarLogo/device.png


BIN
src/assets/navbarLogo/deviceActive.png


BIN
src/assets/navbarLogo/home.png


BIN
src/assets/navbarLogo/homeActive.png


BIN
src/assets/navbarLogo/ranking.png


BIN
src/assets/navbarLogo/rankingActive.png


BIN
src/assets/navbarLogo/user.png


BIN
src/assets/navbarLogo/userActive.png


BIN
src/assets/right.png


+ 0 - 16
src/components/NavBar.vue

@@ -43,14 +43,6 @@
 <script>
 import { onMounted, computed } from "vue";
 import { useStore } from "vuex";
-import homeUrl from "@/assets/navbarLogo/home.png";
-import homeActiveUrl from "@/assets/navbarLogo/homeActive.png";
-import deviceUrl from "@/assets/navbarLogo/device.png";
-import deviceActiveUrl from "@/assets/navbarLogo/deviceActive.png";
-import rankingUrl from "@/assets/navbarLogo/ranking.png";
-import rankingActiveUrl from "@/assets/navbarLogo/rankingActive.png";
-import userUrl from "@/assets/navbarLogo/user.png";
-import userActiveUrl from "@/assets/navbarLogo/userActive.png";
 
 export default {
   setup() {
@@ -63,14 +55,6 @@ export default {
 
     return {
       count,
-      homeUrl,
-      homeActiveUrl,
-      deviceUrl,
-      deviceActiveUrl,
-      rankingUrl,
-      rankingActiveUrl,
-      userUrl,
-      userActiveUrl
     };
   },
 };

+ 1 - 1
src/components/dateSelectList/index.vue

@@ -118,7 +118,7 @@ export default {
         const diffDate = Math.abs(firstday - lastday);
         const totalDays = Math.floor(diffDate / (1000 * 3600 * 24));
         if (totalDays === 0) {
-          params.chartType = "days";
+          params.chartType = "day";
         } else if (dateUtil.isSameWeek(calendarDate[0], calendarDate[1])) {
           params.chartType = "week";
         } else {

+ 4 - 0
src/service/discountCode/index.js

@@ -13,4 +13,8 @@ export function discountCodeExport(params) {
 // 添加优惠码
 export function addCode(params) {
   return axios.get(`/SZWL-SERVER/tPromoCode/add?${stringToUrl(params)}`);
+}
+// 批量删除优惠码
+export function deleteCode(params) {
+  return axios.post(`/SZWL-SERVER/tPromoCode/deletes`, params)
 }

+ 4 - 0
src/service/home.js

@@ -24,4 +24,8 @@ export function Api_getUpdateNotice(params) {
 // 获取设备情况
 export function Api_postMachineNum(params) {
     return axios.post(`/SZWL-SERVER/tEquipment/getMachineNum`, params );
+}
+// 查询是否有设备报警
+export function getIsAlarm(params) {
+    return axios.get(`/SZWL-SERVER/tAlarmRecord/isAlarm?${stringToUrl(params)}`);
 }

+ 8 - 0
src/service/merchantManage/index.js

@@ -18,6 +18,14 @@ export function getAdminList(params) {
 export function getAdmin(params) {
   return axios.get(`/SZWL-SERVER/tAdmin/getAdmin?${stringToUrl(params)}`);
 }
+// 通过 adminId 获取上级账号信息
+export function getRelation(params) {
+  return axios.get(`/SZWL-SERVER/tAdmin/getRelation?${stringToUrl(params)}`);
+}
+// 通过 username 获取账号id
+export function getRelationAdminId(params) {
+  return axios.get(`/SZWL-SERVER/tAdmin/getRelationAdminId?${stringToUrl(params)}`);
+}
 // 获取账户基本详情-提现信息
 export function getAdminMch(params) {
   return axios.get(`/SZWL-SERVER/tJoinpayMch/getMch?${stringToUrl(params)}`);

+ 0 - 4
src/service/user.js

@@ -12,10 +12,6 @@ export function sentRegisterCode(params) {
 export function tAdminGetRelation(params) {
   return axios.get(`/SZWL-SERVER/tAdmin/getRelationAdminUsername?${stringToUrl(params)}`, params);
 }
-// 添加关联上级
-export function tAdminSetRelationAdmin(params) {
-  return axios.get(`/SZWL-SERVER/tAdmin/setRelationAdmin?${stringToUrl(params)}`, params);
-}
 // 三级联动获取地址
 export function Api_getArea(params) {
   return axios.get(`/SZWL-SERVER/tArea/getArea`, {params});

+ 1 - 1
src/styles/accountOperation/index.less

@@ -73,7 +73,7 @@
             position: absolute;
             width: 6px;
             height: 12px;
-            background: url(https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng51122feddbc4a9b3e0b055ed6181d290e60825befaa5c777794f1412ff817e57) top center no-repeat;
+            background: url('../../assets/accountOperation/right.png') top center no-repeat;
             background-size: 100%;
             right: 0.55rem;
             top: 0.5rem;

+ 0 - 15
src/styles/accountPer/index.less

@@ -111,21 +111,6 @@
         }
     }
 
-    .van-switch {
-        width: 38px;
-        height: 18px;
-      
-        .van-switch__node {
-          width: 18px;
-          height: 18px;
-        }
-      
-        &.van-switch--on .van-switch__node {
-          transform: translate(calc(38px - 18px));
-        }
-
-    }
-
     .van-switch--on {
         background-color: #2c87c8;
     }

+ 5 - 22
src/styles/alarmHistory/index.less

@@ -48,30 +48,13 @@
             }
 
             .main5 {
-                width: 39px;
-                height: 16px;
+                width: auto;
+                cursor: pointer;
 
                 .label2 {
-                    width: 14px;
-                    height: 14px;
-                    margin-top: 1px;
-                }
-
-                .TextGroup2 {
-                    height: 16px;
-                    width: 22px;
-
-                    .txt3 {
-                        width: 22px;
-                        height: 16px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 11px;
-                        text-align: center;
-                        white-space: nowrap;
-                        line-height: 16px;
-                        display: block;
-                    }
+                    width: 20px;
+                    height: 20px;
+                    margin-right: 5px;
                 }
             }
         }

+ 7 - 24
src/styles/device/index.less

@@ -12,7 +12,7 @@
     .deviceBox1 {
 
       .searchRow {
-        margin: 21px 15px;
+        margin: 18px 15px;
 
         .bd3 {
           width: 87px;
@@ -27,7 +27,7 @@
 
           .txt2 {
             width: 65px;
-            height: 14px;
+            height: 15px;
             overflow-wrap: break-word;
             color: rgba(64, 77, 116, 1);
             font-size: 15px;
@@ -40,30 +40,13 @@
         }
 
         .main5 {
-          width: 39px;
-          height: 16px;
+          width: auto;
+          cursor: pointer;
 
           .label2 {
-            width: 14px;
-            height: 14px;
-            margin-top: 1px;
-          }
-
-          .TextGroup2 {
-            height: 16px;
-            width: 22px;
-
-            .txt3 {
-              width: 22px;
-              height: 16px;
-              overflow-wrap: break-word;
-              color: rgba(64, 77, 116, 1);
-              font-size: 11px;
-              text-align: center;
-              white-space: nowrap;
-              line-height: 16px;
-              display: block;
-            }
+            width: 20px;
+            height: 20px;
+            margin-right: 5px;
           }
         }
       }

+ 26 - 35
src/styles/discountCode/index.less

@@ -48,30 +48,13 @@
             }
 
             .main5 {
-                width: 39px;
-                height: 16px;
+                width: auto;
+                cursor: pointer;
 
                 .label2 {
-                    width: 14px;
-                    height: 14px;
-                    margin-top: 1px;
-                }
-
-                .TextGroup2 {
-                    height: 16px;
-                    width: 22px;
-
-                    .txt3 {
-                        width: 22px;
-                        height: 16px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 11px;
-                        text-align: center;
-                        white-space: nowrap;
-                        line-height: 16px;
-                        display: block;
-                    }
+                    width: 20px;
+                    height: 20px;
+                    margin-right: 5px;
                 }
             }
         }
@@ -81,7 +64,7 @@
             height: 50px;
 
             .tabBox {
-                width: 50%;
+                width: 40%;
                 align-items: center;
                 justify-content: space-around;
 
@@ -104,12 +87,13 @@
             }
 
             .buttomBox {
-                width: 50%;
+                width: 60%;
                 justify-content: flex-end;
                 align-items: center;
 
                 .buttonItem {
-                    width: 60px;
+                    cursor: pointer;
+                    width: 55px;
                     line-height: 1.6;
                     font-size: 12px;
                     margin-right: 15px;
@@ -169,6 +153,13 @@
                         background-color: #8787a6;
                     }
                 }
+
+                .checkedBox {
+                    position: absolute;
+                    top: 40px;
+                    right: 10%;
+                }
+
             }
         }
 
@@ -199,17 +190,17 @@
 }
 
 .codeSearch {
-  width: 100%;
+    width: 100%;
 
-  .codeSearchPopup {
-    width: 90%;
-  }
+    .codeSearchPopup {
+        width: 90%;
+    }
 
-  .content {
-    padding-top: 1em;
-  }
+    .content {
+        padding-top: 1em;
+    }
 
-  .field .van-field__label {
-    width: auto;
-  }
+    .field .van-field__label {
+        width: auto;
+    }
 }

+ 1 - 0
src/styles/home/index.less

@@ -112,6 +112,7 @@
       .block5 {
         width: 100%;
         padding: 20px 30px;
+        cursor: pointer;
 
         .topTitle {
           width: 100%;

+ 6 - 23
src/styles/merchantManage/index.less

@@ -59,30 +59,13 @@
             }
 
             .main5 {
-                width: 39px;
-                height: 16px;
-
+                width: auto;
+                
                 .label2 {
-                    width: 14px;
-                    height: 14px;
-                    margin-top: 1px;
-                }
-
-                .TextGroup2 {
-                    height: 16px;
-                    width: 22px;
-
-                    .txt3 {
-                        width: 22px;
-                        height: 16px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 11px;
-                        text-align: center;
-                        white-space: nowrap;
-                        line-height: 16px;
-                        display: block;
-                    }
+                    width: 20px;
+                    height: 20px;
+                    margin-right: 5px;
+                    cursor: pointer;
                 }
             }
         }

+ 45 - 67
src/styles/orderCenter/index.less

@@ -7,89 +7,62 @@
     background-color: #f5f5f5;
 
     .main3 {
-      width: 100%;
+      // width: 100%;
       height: 54px;
       background: rgba(255, 255, 255, 1) url("../../assets/home/line.png") bottom center no-repeat;
       background-size: 100% auto;
       background-color: #f5f5f5;
-      margin-bottom: 21px;
 
-      .outer1 {
+      .group4 {
         width: 100%;
+        height: 17px;
+        padding: 0 14px;
 
-        .group4 {
-          width: 100%;
-          height: 17px;
-          padding: 0 14px;
+        .ImageText1 {
+          height: 16px;
+          margin-top: 1px;
+          width: 87px;
 
-          .ImageText1 {
-            height: 16px;
-            margin-top: 1px;
+          .outer2 {
             width: 87px;
+            height: 16px;
 
-            .outer2 {
-              width: 87px;
-              height: 16px;
+            .block1 {
+              width: 16px;
+              height: 18px;
+              background: url("../../assets/home/titleIcon.png") top center no-repeat;
+              background-size: 100%;
+            }
 
-              .block1 {
-                width: 16px;
-                height: 18px;
-                background: url("../../assets/home/titleIcon.png") top center no-repeat;
-                background-size: 100%;
-              }
+            .TextGroup1 {
+              height: 14px;
+              margin-top: 2px;
+              width: 65px;
 
-              .TextGroup1 {
-                height: 14px;
-                margin-top: 2px;
+              .txt1 {
                 width: 65px;
-
-                .txt1 {
-                  width: 65px;
-                  height: 14px;
-                  overflow-wrap: break-word;
-                  color: rgba(64, 77, 116, 1);
-                  font-size: 15px;
-                  font-family: PingFangSC-Semibold;
-                  text-align: left;
-                  white-space: nowrap;
-                  line-height: 15px;
-                  display: block;
-                }
+                height: 14px;
+                overflow-wrap: break-word;
+                color: rgba(64, 77, 116, 1);
+                font-size: 15px;
+                font-family: PingFangSC-Semibold;
+                text-align: left;
+                white-space: nowrap;
+                line-height: 15px;
+                display: block;
               }
             }
           }
+        }
 
-          .ImageText2 {
-            height: 16px;
-            width: 39px;
-
-            .group5 {
-              width: 39px;
-              height: 16px;
-
-              .icon2 {
-                width: 16px;
-                height: 16px;
-                margin-right: 5px;
-              }
-
-              .TextGroup2 {
-                height: 16px;
-                width: 22px;
+        .main5 {
+          width: auto;
+          cursor: pointer;
 
-                .txt2 {
-                  width: 22px;
-                  height: 16px;
-                  overflow-wrap: break-word;
-                  color: rgba(64, 77, 116, 1);
-                  font-size: 11px;
-                  text-align: center;
-                  white-space: nowrap;
-                  line-height: 16px;
-                  display: block;
-                }
-              }
-            }
+          .label2 {
+            width: 20px;
+            height: 20px;
+            margin-right: 5px;
           }
         }
       }
@@ -541,8 +514,8 @@
 
             .main11 {
               position: absolute;
-              top: 10px;
-              right: 10px;
+              top: 12px;
+              right: 12px;
               width: 60px;
               height: 60px;
 
@@ -551,6 +524,11 @@
                 background-size: 100%;
               }
 
+              &.coinOrderSuccess {
+                background: url('../../assets/order/coinPay.png') top center no-repeat;
+                background-size: 100%;
+              }
+
               &.orderError {
                 background: url('../../assets/order/payError.png') top center no-repeat;
                 background-size: 100%;

+ 63 - 78
src/styles/robotRanking/index.less

@@ -75,6 +75,36 @@ button:active {
     align-items: flex-end;
 }
 
+.group5 {
+    width: 15%;
+    height: 16px;
+    margin-right: 50px;
+
+    .icon2 {
+        width: 18px;
+        height: 18px;
+        margin-right: 5px;
+    }
+
+    .TextGroup2 {
+        height: 16px;
+        width: 22px;
+
+        .txt3 {
+            width: 22px;
+            height: 16px;
+            overflow-wrap: break-word;
+            color: rgba(64, 77, 116, 1);
+            font-size: 14px;
+            font-family: PingFangSC-Semibold;
+            text-align: center;
+            white-space: nowrap;
+            line-height: 16px;
+            display: block;
+        }
+    }
+}
+
 .robotRanking {
     background-color: #fff;
     width: 100%;
@@ -216,96 +246,51 @@ button:active {
                 }
 
                 .mod1 {
-                    background-color: rgba(255, 255, 255, 1);
-                    height: 54px;
-                    width: 100%;
 
-                    .block1 {
-                        width: 100%;
-                        height: 33px;
-                        margin-top: 21px;
+                    .section1 {
+                        margin: 15px 15px;
 
-                        .section1 {
-                            width: 100%;
-                            height: 17px;
-                            padding-left: 15px;
-                            padding-right: 15px;
+                        .ImageText1 {
+                            height: 16px;
+                            margin-top: 1px;
+                            width: 55%;
 
-                            .ImageText1 {
+                            .group4 {
+                                width: 40%;
                                 height: 16px;
-                                margin-top: 1px;
-                                width: 135px;
 
-                                .group4 {
-                                    width: 135px;
+                                .layer3 {
+                                    width: 16px;
                                     height: 16px;
-
-                                    .layer3 {
-                                        width: 16px;
-                                        height: 16px;
-                                        background: url("../../assets/home/titleIcon.png") top center no-repeat;
-                                        background-size: 100%;
-                                    }
-
-                                    .TextGroup1 {
-                                        height: 14px;
-                                        margin-top: 2px;
-                                        width: 113px;
-
-                                        .word3 {
-                                            width: 113px;
-                                            height: 14px;
-                                            overflow-wrap: break-word;
-                                            color: rgba(64, 77, 116, 1);
-                                            font-size: 15px;
-                                            font-family: PingFangSC-Semibold;
-                                            text-align: left;
-                                            white-space: nowrap;
-                                            line-height: 15px;
-                                            display: block;
-                                        }
-                                    }
+                                    margin-right: 5px;
+                                    background: url("../../assets/home/titleIcon.png") top center no-repeat;
+                                    background-size: 100%;
                                 }
-                            }
-
-                            .ImageText2 {
-                                height: 16px;
-                                width: 39px;
 
-                                .group5 {
-                                    width: 39px;
-                                    height: 16px;
-
-                                    .icon1 {
-                                        width: 14px;
-                                        height: 14px;
-                                        margin-top: 1px;
-                                    }
-
-                                    .TextGroup2 {
-                                        height: 16px;
-                                        width: 22px;
-
-                                        .word4 {
-                                            width: 22px;
-                                            height: 16px;
-                                            overflow-wrap: break-word;
-                                            color: rgba(64, 77, 116, 1);
-                                            font-size: 11px;
-                                            text-align: center;
-                                            white-space: nowrap;
-                                            line-height: 16px;
-                                            display: block;
-                                        }
-                                    }
+                                .word3 {
+                                    width: auto;
+                                    height: 14px;
+                                    overflow-wrap: break-word;
+                                    color: rgba(64, 77, 116, 1);
+                                    font-size: 15px;
+                                    font-family: PingFangSC-Semibold;
+                                    text-align: left;
+                                    white-space: nowrap;
+                                    line-height: 15px;
+                                    display: block;
                                 }
                             }
                         }
 
-                        .img1 {
-                            width: 100%;
-                            height: 2px;
-                            margin-top: 14px;
+                        .main5 {
+                            width: auto;
+                            cursor: pointer;
+
+                            .label2 {
+                                width: 20px;
+                                height: 20px;
+                                margin-right: 5px;
+                            }
                         }
                     }
                 }

+ 6 - 14
src/styles/taskMessage/index.less

@@ -63,7 +63,7 @@
           position: absolute;
           width: 6px;
           height: 12px;
-          background: url(https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng51122feddbc4a9b3e0b055ed6181d290e60825befaa5c777794f1412ff817e57) top center no-repeat;
+          background: url('../../assets/right.png') top center no-repeat;
           background-size: 100%;
           right: 0.55rem;
           top: 0.5rem;
@@ -135,21 +135,13 @@
       }
 
       .main5 {
-        width: 39px;
-        height: 16px;
+        width: auto;
 
         .label2 {
-          width: 15px;
-          height: 15px;
-        }
-
-        .txt3 {
-          overflow-wrap: break-word;
-          color: rgba(64, 77, 116, 1);
-          font-size: 11px;
-          text-align: center;
-          white-space: nowrap;
-          display: block;
+          width: 20px;
+          height: 20px;
+          margin-right: 5px;
+          cursor: pointer;
         }
       }
     }

+ 3 - 3
src/styles/user/index.less

@@ -118,9 +118,9 @@
                 .van-field__button {
                     background-color: #2c87c8;
                     color: #fff;
-                    padding: 0 5px;
+                    padding: 0 1em;
                     margin-left: 15px;
-                    border-radius: 0.5em;
+                    border-radius: 1em;
                 }
             }
         }
@@ -242,7 +242,7 @@
                         position: absolute;
                         width: 6px;
                         height: 12px;
-                        background: url(https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng51122feddbc4a9b3e0b055ed6181d290e60825befaa5c777794f1412ff817e57) top center no-repeat;
+                        background: url('../../assets/right.png') top center no-repeat;
                         background-size: 100%;
                         right: 0.55rem;
                         top: 0.5rem;

+ 1 - 1
src/utils/dateUtil.js

@@ -64,7 +64,7 @@ const dateUtil = {
     // 使用调整后的时间创建一个新的Date对象
     const adjustedDate = new Date(adjustedMilliseconds);
     // 格式化调整后的时间
-    const formattedDate = dateUtil.formateDate(adjustedDate, 'yyyy-MM-dd hh:mm:ss');
+    const formattedDate = dateUtil.formateDate(adjustedDate, 'yyyy/MM/dd hh:mm:ss');
     return formattedDate;
   },
   // isSameWeek(old,now){

+ 10 - 5
src/views/accountPer/add.vue

@@ -4,7 +4,7 @@
     <s-header :name="pageTitle" :noback="false"></s-header>
     <div class="accountPerBox flex-col">
       <van-form @submit="onSubmit">
-        <van-field v-model="username" name="username" :label="$t('accountPer.usernameLabel')"
+        <van-field v-model="username" name="username" :label="$t('accountPer.usernameLabel')" :readonly="isUserName"
           :placeholder="$t('accountPer.usernamePlaceholder')" :rules="[
             { required: true, message: $t('accountPer.usernamePlaceholder') },
           ]" />
@@ -26,9 +26,9 @@
           <div class="van-cell__title van-field__label">
             <label id="van-field-4-label" for="van-field-4-input">{{ $t("accountPer.setUp") }}:</label>
           </div>
-          <div class="van-cell__value van-field__value">
+          <div class="van-cell__value">
             <div class="van-field__body">
-              <van-switch v-model="isEnabled" class="o-mr-10" /><span>{{
+              <van-switch v-model="isEnabled" size="20px" class="o-mr-10" /><span>{{
                 $t("accountPer.startOrNot")
               }}</span>
             </div>
@@ -73,7 +73,7 @@
 import kSelectPop from "../../components/commom/kSelectPop/index.vue";
 import { onMounted, reactive, toRefs, ref } from "vue";
 import sHeader from "../../components/SimpleHeader";
-import { showFailToast, showSuccessToast } from 'vant';
+import { showFailToast, showSuccessToast, showToast } from 'vant';
 import {
   getSysRoleList,
   getEquipmentList,
@@ -108,6 +108,7 @@ export default {
     };
     const passwordPlaceholder = ref("");
     const havePassword = ref(true);
+    const isUserName = ref(false);
     let addParams = reactive({
       username: "",
       password: "",
@@ -131,6 +132,7 @@ export default {
         accoutPerSet = JSON.parse(accoutPerSet);
         addParams.id = accoutPerSet.id;
         addParams.username = accoutPerSet.username;
+        isUserName.value = true;
         addParams.name = accoutPerSet.name;
         addParams.phone = accoutPerSet.phone;
         addParams.isEnabled = accoutPerSet.isEnabled;
@@ -208,6 +210,8 @@ export default {
           showSuccessToast(t("accountPer.successfullyModifiedTheAccount"));
           // router.push("/accountPer");
           router.replace("/accountPer");
+        } else if (data.code === 'A0201') {
+          showToast(t("accountPer.accountNameExists"));
         } else {
           showFailToast(t("accountPer.failedToModifyTheAccount"), data.message);
         }
@@ -289,7 +293,8 @@ export default {
       cofficentForm,
       busiEquipInpClk,
       havePassword,
-      passwordPlaceholder
+      passwordPlaceholder,
+      isUserName
     };
   },
 };

+ 0 - 3
src/views/alarmHistory/index.vue

@@ -17,9 +17,6 @@
           <div class="flex-col">
             <div class="main5 flex-row justify-between" @click="searchClick">
               <img class="label2 o-mr-5" src="../../assets/device/searchIcon.png" />
-              <div class="TextGroup2 flex-col">
-                <span class="txt3">{{ $t('alarmHistory.search') }}</span>
-              </div>
             </div>
           </div>
         </div>

+ 8 - 0
src/views/apkManage/add.vue

@@ -207,6 +207,14 @@ export default {
       {
         name: "P30en",
         id: "P30en",
+      },
+      {
+        name: "SI320ch",
+        id: "SI320ch",
+      },
+      {
+        name: "SI320en",
+        id: "SI320en",
       }
     ]);
     const busiPopFieldName = reactive({

+ 5 - 6
src/views/changePassword.vue

@@ -23,19 +23,18 @@ 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 { useRouter } from "vue-router";
+import { useRouter, useRoute } from "vue-router";
 import { updatePassword } from '@/service/changePassword';
 import { useI18n } from 'vue-i18n';
-import { getLoginUser } from "@/common/js/utils";
 import { styleUrl } from '../common/js/utils';
+import { getLoginUser } from "@/common/js/utils";
 
 export default {
   setup() {
     // 引入语言
     const { t } = useI18n();
     const router = useRouter();
-    // const route = useRoute();
+    const route = useRoute();
     const user = getLoginUser();
     const password = ref('');
     const passwordCheck = ref('');
@@ -48,8 +47,8 @@ export default {
         return false;
       }
       const { data } = await updatePassword({
-        // username: route.query.name,
-        username: user.username,
+        username: route.query.name || user.username,
+        // username: user.username,
         password: md5(password.value)
       });
       if (data.code === '00000') {

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

@@ -15,7 +15,7 @@
           </div>
         </div>
         <img class="img2" referrerpolicy="no-referrer"
-          src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a" />
+          src="../../assets/line.png" />
       </div>
       <div v-for="(item, index) in list" :key="index">
         <div class="section6 l-flex-between kBordBott">

+ 39 - 28
src/views/device/deviceOper.vue

@@ -1,14 +1,14 @@
 <template>
   <!-- 设备常见操作弹窗 -->
-  <van-dialog class-name="operDialog" width="auto" v-model:show="show" :showConfirmButton="false"
+  <van-dialog class-name="operDialog" width="350px" v-model:show="show" :showConfirmButton="false"
     :showCancelButton="false">
     <slot name="title">
-      <div class="van-dialog__header">{{ $t("device.commonOperations") }}</div>
+      <div class="van-dialog__header" style="padding-bottom: 1em;">{{ $t("device.commonOperations") }}</div>
       <div class="txt1" style="padding: 0.2em 1em">
         {{ $t("device.equipmentName") }}: {{ device.name != null ? device.name : $t("device.equipmentNameTips") }}
       </div>
       <div class="txt1" style="padding: 0.2em 1em">
-        {{ $t("device.equipmentNo") }}: {{ device.clientId }}
+        {{ $t("device.equipmentNo") }}: {{ device.clientId.slice(-6) }}
       </div>
     </slot>
     <van-icon name="cross" class="close" @click="show = false" />
@@ -19,8 +19,9 @@
         <div class="operIcon">
           <img class="operImg" src="../../assets/device/operIcon/restart.png" />
         </div>
-        <div v-if="device.machineType === '1'" class="operText">{{ $t("device.restart") }}</div>
-        <div v-else class="operText">{{ $t("device.restartFurnaceHead") }}</div>
+        <div v-if="device.machineType === '0' || device.machineType === null" class="operText">{{
+          $t("device.restartFurnaceHead") }}</div>
+        <div v-else class="operText">{{ $t("device.restart") }}</div>
       </div>
       <!-- 睡眠 -->
       <div class="operItem" @click="sleepEquipmentFun()">
@@ -29,19 +30,23 @@
         </div>
         <div class="operText">{{ sleepTitle }}</div>
       </div>
+      <!-- 开启炉头/设备 -->
       <div class="operItem" @click="openOffFurnace(1)">
         <div class="operIcon">
           <img class="operImg" src="../../assets/device/operIcon/onOff.png" />
         </div>
-        <div v-if="device.machineType === '1'" class="operText">{{ $t("device.openDevice") }}</div>
-        <div v-else class="operText">{{ $t("device.openFurnHead") }}</div>
+        <div v-if="device.machineType === '0' || device.machineType === null" class="operText">{{
+          $t("device.openFurnHead") }}</div>
+        <div v-else class="operText">{{ $t("device.openDevice") }}</div>
       </div>
+      <!-- 关闭炉头/设备 -->
       <div class="operItem" @click="openOffFurnace(0)">
         <div class="operIcon">
           <img class="operImg" src="../../assets/device/operIcon/onOff.png" />
         </div>
-        <div v-if="device.machineType === '1'" class="operText">{{ $t("device.closeDevice") }}</div>
-        <div v-else class="operText">{{ $t("device.closeFurnHead") }}</div>
+        <div v-if="device.machineType === '0' || device.machineType === null" class="operText">{{
+          $t("device.closeFurnHead") }}</div>
+        <div v-else class="operText">{{ $t("device.closeDevice") }}</div>
       </div>
       <!--     <div class="operItem" @click="openDoorFun()">
               <div class="operIcon">
@@ -52,26 +57,31 @@
               </div>
               <div class="operText">{{ $t("device.remoteDoorOpening") }}</div>
             </div> -->
+      <!-- 远程开门 -->
       <div class="operItem" @click="openDoorFun()">
         <div class="operIcon">
           <img class="operImg" src="../../assets/device/operIcon/openDoor.png" />
         </div>
         <div class="operText">{{ $t("device.remoteDoorOpening") }}</div>
       </div>
+      <!-- 远程做糖 -->
       <div class="operItem" @click="doSugar()">
         <div class="operIcon">
           <img class="operImg" src="../../assets/device/operIcon/doSugar.png" />
         </div>
-        <div v-if="device.machineType === '1'" class="operText">{{ $t("device.remoteProduction") }}</div>
-        <div v-else class="operText">{{ $t("device.remoteSugarMaking") }}</div>
+        <div v-if="device.machineType === '0' || device.machineType === null" class="operText">{{
+          $t("device.remoteSugarMaking") }}</div>
+        <div v-else class="operText">{{ $t("device.remoteProduction") }}</div>
       </div>
-      <div class="operItem" @click="alarmClock()">
+      <!-- 定时开关 -->
+      <div class="operItem" @click="alarmClock()" v-if="device.equimentType != 'SI320'">
         <div class="operIcon">
           <img class="operImg" src="../../assets/device/operIcon/alarmClock.png" />
         </div>
         <div class="operText">{{ $t("device.timeSwitch") }}</div>
       </div>
-      <div class="operItem" @click="modulation()">
+      <!-- 音量调节 -->
+      <div class="operItem" @click="modulation()" v-if="device.equimentType != 'SI320'">
         <div class="operIcon">
           <img class="operImg" src="../../assets/device/operIcon/modulation.png" />
         </div>
@@ -83,7 +93,7 @@
         </div>
         <div class="operText">{{ $t("device.equipmentRecharge") }}</div>
       </div> -->
-      <div class="operItem" @click="paramSetPush()">
+      <div class="operItem" @click="paramSetPush()" v-if="device.equimentType != 'SI320'">
         <div class="operIcon">
           <img class="operImg" src="../../assets/device/operIcon/paramsSet.png" />
         </div>
@@ -108,14 +118,14 @@
         <div class="operText">{{ $t("device.modifyPrice") }}</div>
       </div>
       <!-- 物料监控 -->
-      <div class="operItem" @click="materialMonitorClk()">
+      <div class="operItem" @click="materialMonitorClk()" v-if="device.equimentType != 'SI320'">
         <div class="operIcon">
           <img class="operImg" src="../../assets/device/operIcon/materialMonitor.png" />
         </div>
         <div class="operText">{{ $t("device.materialMonitor") }}</div>
       </div>
       <!-- 屏蔽/展示商品 -->
-      <div class="operItem" @click="showGoodsClk()">
+      <div class="operItem" @click="showGoodsClk()" v-if="device.equimentType != 'SI320'">
         <div class="operIcon">
           <img class="operImg" src="../../assets/device/operIcon/showGoods.png" />
         </div>
@@ -314,11 +324,6 @@ export default {
     const paramSetPush = () => {
       router.push({ path: "paramsSet", query: { deviceId: device.value.id } });
     };
-    // 物料监控
-    const materialMonitorClk = () => {
-      operType.value = 7;
-      operCheckShow.value = true;
-    };
     // 跳转 - 添加分销人
     const saveProportionPush = () => {
       router.push({
@@ -338,10 +343,16 @@ export default {
         query: { deviceId: device.value.id, name: device.value.name },
       });
     };
+    // 删除设备
     const deleteDevice = () => {
       operType.value = 6;
       operCheckShow.value = true;
     };
+    // 物料监控
+    const materialMonitorClk = () => {
+      operType.value = 7;
+      operCheckShow.value = true;
+    };
     // 取消操作
     const operCheckClear = () => {
       operCheckShow.value = false;
@@ -444,10 +455,12 @@ export default {
           showFailToast(t("device.enableMaterialFailed"));
         }
       }
-      // 关闭弹窗
-      show.value = false;
-      // 触发操作完成回调
-      emit("operfinish", true);
+      setTimeout(() => {
+        // 关闭弹窗
+        show.value = false;
+        // 触发操作完成回调
+        emit("operfinish", true);
+      }, 2000);
     };
     const isRole = (key) => {
       return user.menuCodeList.filter((type) => key === type).length > 0;
@@ -488,6 +501,4 @@ export default {
   components: {},
 };
 </script>
-<style lang="less" scoped>
-@import "../../common/style/common";
-</style>
+<style lang="less" scoped>@import "../../common/style/common";</style>

+ 8 - 0
src/views/device/deviceSearch.vue

@@ -148,6 +148,10 @@ export default {
       {
         text: t('device.popcorn'),
         value: '1',
+      },
+      {
+        text: t('device.iceCream'),
+        value: '2',
       }
     ]); // 设备类型级联选项
     const companyTypeOptions = ref([
@@ -181,6 +185,10 @@ export default {
         text: 'SC320',
         value: 'MG320',
       },
+      {
+        text: 'SI320',
+        value: 'SI320',
+      }
       // {
       //   text: 'SC301',
       //   value: 'MG301',

+ 2 - 1
src/views/device/deviceSet.vue

@@ -8,7 +8,7 @@
           <div class="mod1 flex-col">
             <span class="word2">{{ $t("device.essentialInformation") }}</span>
             <img class="pic1" referrerpolicy="no-referrer"
-              src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a" />
+              src="../../assets/line.png" />
           </div>
           <div class="mod2 flex-col"></div>
         </div>
@@ -205,6 +205,7 @@
                   <van-radio name="26" icon-size="16px">26</van-radio>
                   <van-radio name="30" icon-size="16px">30</van-radio>
                   <van-radio name="42" icon-size="16px">42</van-radio>
+                  <van-radio name="60" icon-size="16px">60</van-radio>
                 </van-radio-group>
               </div>
             </template>

+ 38 - 38
src/views/device/diyFlower/index.vue

@@ -8,43 +8,43 @@
         <span class="c-text-color c-text-14">{{ equipmentName }}</span>
       </div>
     </div>
-  </div>
-  <van-cell center :title="checked ? $t('DIYFlower.openStatus') : $t('DIYFlower.closeStatus')" size="large"
-    title-style="color: #404d74;">
-    <template #right-icon>
-      <van-switch :model-value="checked" active-color="#2c87c8" @update:model-value="updateStatus" size="24" />
-    </template>
-  </van-cell>
-  <van-collapse v-if="checked" v-model="activeNames">
-    <van-collapse-item :title="$t('DIYFlower.shape')" name="1" size="large" title-style="color: #404d74;">
-      <van-row class="goods">
-        <van-col v-for="(item, index) in shapeData" :key="index" class="goodsCon o-mlr-5 o-mb-20" span="11">
-          <div class="l-flex-RC">
-            <van-image width="50" height="50" fit="contain" :src="showSugerPhoto(item)" />
-            <span class="o-ml-10" style="color: #000;word-wrap: break-word; width: 50px;">{{ item.name }}</span>
-            <van-checkbox class="o-ml-10" checked-color="#2c87c8" shape="square" v-model="shapeStates[index]"
-              @change="shapeChange(index)" />
-          </div>
-        </van-col>
-      </van-row>
-    </van-collapse-item>
-    <van-collapse-item :title="$t('DIYFlower.sugar')" name="2" size="large" title-style="color: #404d74;">
-      <van-row class="goods">
-        <van-col v-for="(item, index) in sugarData" :key="index" class="goodsCon o-mlr-5 o-mb-20" span="11">
-          <div class="l-flex-RC">
-            <van-image width="50" height="50" fit="contain" :src="showSugerPhoto(item)" />
-            <span class="o-ml-10" style="color: #000;word-wrap: break-word; width: 50px;">{{ item.name }}</span>
-            <van-checkbox class="o-ml-10" checked-color="#2c87c8" shape="square" v-model="sugarStates[index]"
-              @change="sugarChange(index)" />
-          </div>
-        </van-col>
-      </van-row>
-    </van-collapse-item>
-  </van-collapse>
-  <div class="l-flex-center" v-if="checked" style="margin: 16px">
-    <van-button round block class="Btn" type="primary" native-type="submit" @click="updateShowGoods()">
-      {{ $t('device.submitAndPushDeviceUpdates') }}
-    </van-button>
+    <van-cell center :title="checked ? $t('DIYFlower.openStatus') : $t('DIYFlower.closeStatus')" size="large"
+      title-style="color: #404d74;">
+      <template #right-icon>
+        <van-switch :model-value="checked" active-color="#2c87c8" @update:model-value="updateStatus" size="24" />
+      </template>
+    </van-cell>
+    <van-collapse v-if="checked" v-model="activeNames">
+      <van-collapse-item :title="$t('DIYFlower.shape')" name="1" size="large" title-style="color: #404d74;">
+        <van-row class="goods">
+          <van-col v-for="(item, index) in shapeData" :key="index" class="goodsCon o-mlr-5 o-mb-20" span="11">
+            <div class="l-flex-RC">
+              <van-image width="50" height="50" fit="contain" :src="showSugerPhoto(item)" />
+              <span class="o-ml-10" style="color: #000;word-wrap: break-word; width: 50px;">{{ item.name }}</span>
+              <van-checkbox class="o-ml-10" checked-color="#2c87c8" shape="square" v-model="shapeStates[index]"
+                @change="shapeChange(index)" />
+            </div>
+          </van-col>
+        </van-row>
+      </van-collapse-item>
+      <van-collapse-item :title="$t('DIYFlower.sugar')" name="2" size="large" title-style="color: #404d74;">
+        <van-row class="goods">
+          <van-col v-for="(item, index) in sugarData" :key="index" class="goodsCon o-mlr-5 o-mb-20" span="11">
+            <div class="l-flex-RC">
+              <van-image width="50" height="50" fit="contain" :src="showSugerPhoto(item)" />
+              <span class="o-ml-10" style="color: #000;word-wrap: break-word; width: 50px;">{{ item.name }}</span>
+              <van-checkbox class="o-ml-10" checked-color="#2c87c8" shape="square" v-model="sugarStates[index]"
+                @change="sugarChange(index)" />
+            </div>
+          </van-col>
+        </van-row>
+      </van-collapse-item>
+    </van-collapse>
+    <div class="l-flex-center" v-if="checked" style="margin: 16px">
+      <van-button round block class="Btn" type="primary" native-type="submit" @click="updateShowGoods()">
+        {{ $t('device.submitAndPushDeviceUpdates') }}
+      </van-button>
+    </div>
   </div>
 </template>
 
@@ -87,9 +87,9 @@ export default {
       const name = route.query.name || "";
       const diyFlowerStatus = route.query.diyFlowerStatus || "";
 
+      cofficentForm.equipmentId = id;
       if (diyFlowerStatus == "1") {
         checked.value = true;
-        cofficentForm.equipmentId = id;
         getList();
       }
       if (id) {

+ 90 - 21
src/views/device/doSugar.vue

@@ -7,15 +7,37 @@
         <div class="block3 flex-col"></div>
         <span class="info2">{{ $t('device.equipmentName') }}:{{ deviceDetal ? deviceDetal.name : '' }}</span>
       </div>
+      <div v-if="machineType === null || machineType === '0'">
+        <van-field v-model="fieldValue" is-link readonly :label="$t('device.clickToSelectPattern')"
+          :placeholder="$t('device.pleaseSelectAPattern')" @click="show = true" />
+        <van-popup v-model:show="show" round position="bottom">
+          <van-cascader v-model="cascaderValue" :title="$t('device.pleaseSelectAPattern')" :options="options"
+            @close="show = false" @finish="onFinish">
+            <template #option="{ option }">
+              <div class="cascader-item">
+                <van-image :src="option.imgUrl" width="55px" height="55px"></van-image>
+                <div class="cascader-label">{{ option.value }}</div>
+              </div>
+            </template>
+          </van-cascader>
+        </van-popup>
+        <div class="textRow o-pr-20">
+          <span @click="pushToDaySugarList">{{ $t('device.todaysSugarList') }}>></span>
+        </div>
+        <div v-if="!doSugartData" class="block5 flex-col" @click="submitDoSugar"><span class="txt3">{{
+          $t('device.submitToMakeSugar') }}</span></div>
+        <van-button v-if="doSugartData" style="padding: 1em;" round type="primary" class="block5 flex-col"
+          :disabled="doSugartType" @click="checkData()">{{ $t('device.viewResults') }}</van-button>
+      </div>
       <div v-if="machineType === '1'">
         <van-field v-model="fieldValue" is-link readonly :label="$t('device.clickToSelectTaste')"
           :placeholder="$t('device.pleaseSelectTaste')" @click="show = true" />
         <van-popup v-model:show="show" round position="bottom">
-          <van-cascader v-model="cascaderValue" :title="$t('device.pleaseSelectAPattern')" :options="options"
+          <van-cascader v-model="cascaderValue" :title="$t('device.pleaseSelectTaste')" :options="options"
             @close="show = false" @finish="onFinish">
             <template #option="{ option }">
               <div class="cascader-item">
-                <van-image :src="option.imgUrl" width="50px" height="50px"></van-image>
+                <van-image :src="option.imgUrl" width="55px" height="55px"></van-image>
                 <div class="cascader-label">{{ option.value }}</div>
               </div>
             </template>
@@ -29,28 +51,27 @@
         <van-button v-if="doSugartData" round type="primary" class="volumeChangeButton" :disabled="doSugartType"
           @click="checkData()">{{ $t('device.viewResults') }}</van-button>
       </div>
-      <div v-else>
-        <van-field v-model="fieldValue" is-link readonly :label="$t('device.clickToSelectPattern')"
-          :placeholder="$t('device.pleaseSelectAPattern')" @click="show = true" />
+      <div v-if="machineType === '2'">
+        <van-field v-model="fieldValue" is-link readonly :label="$t('device.clickToSelectTaste')"
+          :placeholder="$t('device.pleaseSelectTaste')" @click="show = true" />
         <van-popup v-model:show="show" round position="bottom">
-          <van-cascader v-model="cascaderValue" :title="$t('device.pleaseSelectAPattern')" :options="options"
+          <van-cascader v-model="cascaderValue" :title="$t('device.pleaseSelectTaste')" :options="options"
             @close="show = false" @finish="onFinish">
             <template #option="{ option }">
               <div class="cascader-item">
-                <van-image :src="option.imgUrl" width="50px" height="50px"></van-image>
+                <van-image :src="option.imgUrl" width="55px" height="55px"></van-image>
                 <div class="cascader-label">{{ option.value }}</div>
               </div>
             </template>
           </van-cascader>
         </van-popup>
         <div class="textRow o-pr-20">
-          <span @click="pushToDaySugarList">{{ $t('device.todaysSugarList') }}>></span>
+          <span @click="pushToDaySugarList">{{ $t('device.todaysMakeList') }}>></span>
         </div>
         <div v-if="!doSugartData" class="block5 flex-col" @click="submitDoSugar"><span class="txt3">{{
           $t('device.submitToMakeSugar') }}</span></div>
-        <van-button v-if="doSugartData" style="padding: 1em;" round type="primary" class="block5 flex-col" :disabled="doSugartType"
+        <van-button v-if="doSugartData" round type="primary" class="volumeChangeButton" :disabled="doSugartType"
           @click="checkData()">{{ $t('device.viewResults') }}</van-button>
-
       </div>
     </div>
   </div>
@@ -102,17 +123,51 @@ export default {
         getProduct();
       } else { showFailToast(data.message); }
     }
-    // 获取花形下拉列表
-    const getProduct = async () => {
+       // 获取花形下拉列表
+       const getProduct = async () => {
       const { data } = await selectProducts({ equipmentId: deviceId });
       if (data.code) {
-        options.value = data.data.map(item => {
-          return {
-            text: item.productName,
-            value: item.productName,
-            imgUrl: showSugarPhoto(item.no),
-          };
-        })
+        if(machineType != '2') {
+          options.value = data.data.map(item => {
+            return {
+              text: item.productName,
+              value: item.productName,
+              imgUrl: showSugarPhoto(item.no),
+            };
+          })
+        } else {
+          data.data.forEach(item => {
+            if (item.no == 'I01') {
+              options.value.push(
+                {
+                  text: item.productName,
+                  value: item.productName,
+                  imgUrl: showSugarPhoto(item.no),
+                  children: []
+                }
+              )
+            } else if (item.no.includes('J')) {
+              options.value[0].children.push(
+                {
+                  text: item.productName,
+                  value: item.productName,
+                  imgUrl: showSugarPhoto(item.no),
+                  children: [],
+                }
+              )
+            } else if (item.no.includes('C')) {
+              options.value[0].children.forEach(item1 => {
+                item1.children.push(
+                  {
+                    text: item.productName,
+                    value: item.productName,
+                    imgUrl: showSugarPhoto(item.no),
+                  }
+                )
+              })
+            }
+          })
+        }
       } else { showFailToast(data.message); }
       console.log(options.value);
     }
@@ -131,10 +186,24 @@ export default {
     const checkData = async () => {
       const { data } = await selectSugarStatus({ no: doSugartData.value.no });
       if (data.code) {
-        showSuccessToast(data.message);
+        if (data.data == '1') {
+          showToast(t('device.receiveInstruction'));
+        } else {
+          showSuccessToast(data.message);
+        }
         doSugartData.value = null;
         doSugartType.value = true;
-      } else { showToast(t('device.notUploadData')); }
+      } else {
+        if (data.data == '0') {
+          showToast(t('device.notUploadData'));
+        } else if (data.data == '2') {
+          showToast(t('device.machineException'));
+        } else if (data.data == '3') {
+          showToast(t('device.netException'));
+        } else {
+          showToast(data.message);
+        }
+      }
     };
 
     const pushToDaySugarList = async () => {

+ 24 - 20
src/views/device/index.vue

@@ -10,17 +10,13 @@
             <div class="flex-col">
               <div class="flex-row justify-between bd3">
                 <div class="flex-col outer4"></div>
-                <span class="flex-col txt2">{{
-                  $t("device.dataOverview")
-                }}</span>
+                <span class="flex-col txt2">
+                  {{ $t("device.dataOverview") }}</span>
               </div>
             </div>
             <div class="flex-col">
               <div class="main5 flex-row justify-between" @click="searchClick">
                 <img class="label2" src="../../assets/device/searchIcon.png" />
-                <div class="TextGroup2 flex-col">
-                  <span class="txt3">{{ $t("device.search") }}</span>
-                </div>
               </div>
             </div>
           </div>
@@ -83,7 +79,8 @@
                 }}</span>
                 <div class="contentBottomCon" v-if="item.checkType">
                   <img class="pic1" referrerpolicy="no-referrer" src="../../assets/home/line.png" />
-                  <div class="word4 flex-row justify-between o-ptb-5 kBordBott">
+                  <!-- 睡眠状态 -->
+                  <div class="word4 flex-row justify-between o-ptb-4 kBordBott">
                     <span class="info1 o-ptb-5 kBordBott">{{ $t("device.sleepState") }}:{{
                       item.isSleep
                       ? $t("device.sleeping")
@@ -116,7 +113,8 @@
                   <!-- <span class="txt5 o-ptb-10 kBordBott l-flex-RC"><span>一键重启炉头:</span>
                     <van-button type="primary">重启</van-button>
                   </span> -->
-                  <div class="word4 o-ptb-5">
+                  <!-- 炉头状态 -->
+                  <div class="word4 o-ptb-8">
                     <span class="word3 o-pr-5" v-if="item.machineType == '0' || item.machineType == null">{{
                       $t("device.furnHeadStatus") }}: </span>
                     <span class="word3 o-pr-5" v-else>{{ $t("device.deviceStatus") }}: </span>
@@ -146,35 +144,37 @@
 
                   <!-- 定位: -->
                   <div>
-                    <span v-if="item.latitude" class="txt5 o-ptb-7 kBordBott l-flex-RC">
+                    <span v-if="item.latitude" class="txt5 o-ptb-3 kBordBott l-flex-RC">
                       <span class="info1">{{ $t("device.position") }}:</span>
                       <a class="clickable-link o-ptb-7" @click="viewPosiClk(item)">{{ item.fullName }}</a>
                     </span>
                   </div>
+                  <!-- 机器参数 -->
                   <van-row class="layer5 o-pt-7 kBordBott" justify="space-between"
                     v-if="(item.machineType == '0' || item.machineType == null) && item.equimentType != 'P30'">
-                    <van-col class="word5" style="margin-bottom: 13px;">{{ $t("device.furnaceHeadTemperature") }}:{{
+                    <van-col class="word5" style="margin-bottom: 12px;">{{ $t("device.furnaceHeadTemperature") }}:{{
                       item.furnaceTm
                     }}{{ $t("device.degree") }}</van-col>
-                    <van-col class="word5" style="margin-bottom: 13px;">{{ $t("device.temperatureInCabinet") }}:{{
+                    <van-col class="word5" style="margin-bottom: 12px;">{{ $t("device.temperatureInCabinet") }}:{{
                       item.cabinetTm
                     }}{{ $t("device.degree") }}</van-col>
-                    <van-col class="word5" style="margin-bottom: 13px;">{{ $t("device.humidityInCabinet") }}:{{ item.cabinetHd
+                    <van-col class="word5" style="margin-bottom: 12px;">{{ $t("device.humidityInCabinet") }}:{{
+                      item.cabinetHd
                     }}{{ $t("device.humidity") }}</van-col>
                   </van-row>
-                  <van-row class="layer5 o-pt-7 kBordBott" justify="space-between" v-else>
-                    <van-col class="word5" style="margin-bottom: 13px;">{{ $t("device.stirringTemperature") }}:{{
+                  <van-row class="layer5 o-pt-7 kBordBott" justify="space-between" v-if="item.machineType == '1'">
+                    <van-col class="word5" style="margin-bottom: 12px;">{{ $t("device.stirringTemperature") }}:{{
                       item.stirTm
                     }}{{ $t("device.degree") }}</van-col>
-                    <van-col class="word5" style="margin-bottom: 13px;">{{ $t("device.cornGeneratorTemperature") }}:{{
+                    <van-col class="word5" style="margin-bottom: 12px;">{{ $t("device.cornGeneratorTemperature") }}:{{
                       item.cornGeneratorTm
                     }}{{ $t("device.degree") }}</van-col>
-                    <van-col class="word5" style="margin-bottom: 13px;">{{ $t("device.cupQuantity") }}:{{ item.cupQuantity
+                    <van-col class="word5" style="margin-bottom: 12px;">{{ $t("device.cupQuantity") }}:{{ item.cupQuantity
                     }}</van-col>
                   </van-row>
                   <template v-if="item.isMaterialUse === '1' && (item.machineType == '0' || item.machineType == null)">
                     <van-row justify="space-between" class="sugarTxt o-pt-7 kBordBott">
-                      <van-col style="margin-bottom: 15px;">
+                      <van-col style="margin-bottom: 12px;">
                         {{ $t("device.whiteSugar") }}:{{ Format_calcuDecial(item.whiteSugar) }}%
                       </van-col>
                       <van-col>
@@ -183,7 +183,7 @@
                       <van-col>
                         {{ $t("device.yellowSugar") }}:{{ Format_calcuDecial(item.yellowSugar) }}%
                       </van-col>
-                      <van-col style="margin-bottom: 10px;">
+                      <van-col style="margin-bottom: 8px;">
                         {{ $t("device.blueSugar") }}:{{ Format_calcuDecial(item.blueSugar) }}%
                       </van-col>
                     </van-row>
@@ -208,10 +208,13 @@
                       }}</a>
                     </span>
                   </template>
+                  <!-- 最近刷新时间 -->
                   <span class="info1 o-ptb-7 kBordBott">{{ $t("device.lastRefreshTime") }}:{{
                     showDateTime(item.lastUpdateTime)
                   }}</span>
-                  <span class="info2 o-ptb-7 kBordBott">{{ $t("device.volume") }}:{{ item.volume }}</span>
+                  <!-- 音量 -->
+                  <span v-if="item.machineType != '2'" class="info2 o-ptb-7 kBordBott">{{ $t("device.volume") }}:{{ item.volume }}</span>
+                  <!-- 报警内容 -->
                   <div class="l-flex-RC o-ptb-7">
                     <span class="info3 kBordBott">{{ $t("device.alarmContent") }}:</span>
                     <div class="info4 l-flex-RC">
@@ -349,6 +352,7 @@ export default {
     });
     // 初始化页面获取列表
     onMounted(() => {
+      sleepDescBoxShow.value = true;
       init();
       updateDataInterval();
       // window.addEventListener('scroll', handleScroll);
@@ -459,7 +463,7 @@ export default {
       if (!date) {
         return "";
       }
-      const currentDate = new Date(dateUtil.formateDate(new Date(date), "yyyy-MM-dd hh:mm:ss"));
+      const currentDate = new Date(dateUtil.formateDate(new Date(date), "yyyy/MM/dd hh:mm:ss"));
       return dateUtil.timeZoneDate(currentDate);
     };
 

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

@@ -9,7 +9,7 @@
           <span class="info1">{{ $t('device.equipmentName') }}:{{ deviceDetal ? deviceDetal.name : '' }}</span>
         </div>
         <img class="img1" referrerpolicy="no-referrer"
-             src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a" />
+             src="../../assets/line.png" />
       </div>
       <div class="box4 flex-row justify-between">
         <span class="word3">{{ $t('device.slideSliderToAdjustVolume') }} : {{ volume }}</span>

+ 33 - 12
src/views/device/paramsSet/paramsSetInfo.vue

@@ -34,10 +34,10 @@
           readonly />
       </div>
       <div class="paramsList" v-for="(item, key) in paramsList" :key="key">
-        <van-field v-model="item.val" v-if="item.name != 'M502' && item.name != 'M506'" name="phone" type="tel"
+        <van-field :model-value="item.val" @update:model-value="onUpdateParameters(item, key, $event)" v-if="item.name != 'M502' && item.name != 'M506'" name="phone" type="tel"
           :label="paramName[key]">
           <template #button>
-            <van-button size="small" type="primary" class="updataButton" @click="updateParams(item)">{{
+            <van-button size="small" type="primary" class="updataButton" @click="updateParams(item, key)">{{
               $t('device.submitUpdates') }}</van-button>
           </template>
         </van-field>
@@ -74,6 +74,8 @@ export default {
     const paramName = ref([]);
     const checked = ref([]);
     const type = ref("");
+    const isChange = ref(false);
+    const howLong = ref([]);
 
     // 初始化页面获取列表
     onMounted(async () => {
@@ -124,27 +126,45 @@ export default {
           } else {
             checked.value.push(false);
           }
+          howLong.value.push(paramItem.val != null ? paramItem.val.length : 0);
         })
-        // console.log("checked:", checked.value);
 
       } else {
         showToast(t('device.noParameterData'));
       }
     };
 
+    const onUpdateParameters = (item, key, e) => {
+      // console.log(e);
+      // console.log(howLong.value[key]);
+      if (howLong.value[key] != e.length) {
+        isChange.value = true;
+      } else {
+        isChange.value = false;
+      }
+      item.val = e;
+    }
+
     // 更新参数值
-    const updateParams = async (item) => {
+    const updateParams = async (item, key) => {
       const params = {
         id: deviceId,
         name: item.name,
         val: item.val,
       };
-      const { data } = await updateParameters(params);
-      if (data.code) {
-        showSuccessToast(t('device.modificationSucceeded'));
-      } else {
-        showFailToast(data.message);
-      }
+      showConfirmDialog({
+        title: t('device.tips'),
+        message: t('device.isUpdate') + paramName.value[key] + t('device.to') + item.val + '?'+ (isChange.value ? t('device.attention') : ''),
+      }).then(async() => {
+        const { data } = await updateParameters(params);
+        if (data.code) {
+          showSuccessToast(t('device.modificationSucceeded'));
+        } else {
+          showFailToast(data.message);
+        }
+      }).catch(() => {
+
+      })
     }
     const onUpdateValue = (item, key) => {
       console.log(item);
@@ -154,8 +174,8 @@ export default {
         val: item.val == '0' ? '1' : '0',
       };
       showConfirmDialog({
-        title: '提醒',
-        message: '是否切换开关?',
+        title: t('device.tips'),
+        message: t('device.content'),
       }).then(async () => {
         const { data } = await updateParameters(params);
         if (data.code) {
@@ -178,6 +198,7 @@ export default {
       checked,
       onUpdateValue,
       type,
+      onUpdateParameters,
     };
   },
 };

+ 99 - 86
src/views/device/toDaySugarList.vue

@@ -1,106 +1,119 @@
 <template>
 	<!-- 今日做糖列表 -->
 	<div class="sugarPage flex-col">
-		<s-header :name="$t('device.todaysSugarList')" :noback="false"></s-header>
-		<div class="box1 flex-col">
-			<div class="block2 flex-row justify-between">
-				<div class="block3 flex-col"></div>
-				<span class="info2">{{ $t('device.equipmentName') }}:{{ deviceDetal ? deviceDetal.name : '' }}</span>
-			</div>
-			<van-list class="o-pt-20" v-model:loading="loading" :finished="finished" :finished-text="$t('public.noMore')"
-				@load="selectSugarListFun">
-				<van-cell v-for="(item, index) in list" :key="index" :title="item" />
-			</van-list>
+	  <s-header :name="$t('device.todaysSugarList')" :noback="false"></s-header>
+	  <div class="box1 flex-col">
+		<div class="block2 flex-row justify-between">
+		  <div class="block3 flex-col"></div>
+		  <span class="info2">{{ $t('device.equipmentName') }}:{{ deviceDetal ? deviceDetal.name : '' }}</span>
 		</div>
+		<van-list class="o-pt-20" v-model:loading="loading" :finished="finished" :finished-text="$t('public.noMore')"
+		  @load="selectSugarListFun">
+		  <van-cell v-for="(item, index) in list" :key="index" :title="showDoList(item)" />
+		</van-list>
+	  </div>
 	</div>
-</template>
-<script>
-import {
+  </template>
+  <script>
+  import {
 	onMounted,
 	ref
-} from "vue";
-import sHeader from "@/components/SimpleHeader";
-import {
+  } from "vue";
+  import sHeader from "@/components/SimpleHeader";
+  import {
 	getDeviceDetal,
 	selectSugarList
-} from "@/service/device";
-import {
+  } from "@/service/device";
+  import {
 	showFailToast
-} from "vant";
-import {
+  } from "vant";
+  import {
 	getLoginUser,
 	styleUrl
-} from "@/common/js/utils";
-import {
+  } from "@/common/js/utils";
+  import {
 	useRoute
-} from 'vue-router';
-
-
-export default {
+  } from 'vue-router';
+  import dateUtil from "../../utils/dateUtil";
+  import { useI18n } from "vue-i18n";
+  
+  
+  
+  export default {
 	setup() {
-		const route = useRoute();
-		const deviceId = route.query.deviceId;
-		const deviceDetal = ref(null);
-		const loading = ref(false);
-		const finished = ref(false);
-		const user = getLoginUser();
-		const list = ref([]);
-		// 初始化页面获取列表
-		onMounted(async () => {
-			// 加载样式
-			styleUrl('doSugar');
-			getDeviceDetalFun();
-			selectSugarListFun();
-			// console.log(deviceDetal);
+	  const { t } = useI18n();
+	  const route = useRoute();
+	  const deviceId = route.query.deviceId;
+	  const deviceDetal = ref(null);
+	  const loading = ref(false);
+	  const finished = ref(false);
+	  const user = getLoginUser();
+	  const list = ref([]);
+	  // 初始化页面获取列表
+	  onMounted(async () => {
+		// 加载样式
+		styleUrl('doSugar');
+		getDeviceDetalFun();
+		selectSugarListFun();
+		// console.log(deviceDetal);
+	  });
+  
+  
+	  // 获取设备数据
+	  const getDeviceDetalFun = async () => {
+		const {
+		  data
+		} = await getDeviceDetal({
+		  id: deviceId
 		});
-
-
-		// 获取设备数据
-		const getDeviceDetalFun = async () => {
-			const {
-				data
-			} = await getDeviceDetal({
-				id: deviceId
-			});
-			if (data.code === '00000') {
-				deviceDetal.value = data.data;
-			} else {
-				showFailToast(data.message);
-			}
+		if (data.code === '00000') {
+		  deviceDetal.value = data.data;
+		} else {
+		  showFailToast(data.message);
 		}
-
-		// 获取做糖列表数据
-		const selectSugarListFun = async () => {
-			// console.log(user);
-			const {
-				data
-			} = await selectSugarList({
-				adminId: user.id
-			});
-			if (data.code) {
-				list.value = data.data.map((item) => {
-					return item.productName;
-				});
-				finished.value = true;
-			} else {
-				showFailToast(data.message);
-			}
-		};
-
-		return {
-			list,
-			deviceDetal,
-			loading,
-			finished,
-			selectSugarListFun,
-		};
+	  }
+  
+	  // 获取做糖列表数据
+	  const selectSugarListFun = async () => {
+		// console.log(user);
+		const {
+		  data
+		} = await selectSugarList({
+		  adminId: user.id
+		});
+		if (data.code) {
+		  // list.value = data.data.map((item) => {
+		  //   return item.productName;
+		  // });
+		  list.value = data.data;
+		  finished.value = true;
+		} else {
+		  showFailToast(data.message);
+		}
+	  };
+	  const showDoList = (item) => {
+		if (!item) {
+		  return "";
+		}
+		const currentDate = dateUtil.formateDate(new Date(item.modifyDate), "yyyy/MM/dd hh:mm:ss");
+		return t('device.goods') + item.productName + t('device.doTime') + currentDate + t('device.byDeice') + item.clientId.slice(-6);
+	  }
+  
+	  return {
+		list,
+		deviceDetal,
+		loading,
+		finished,
+		selectSugarListFun,
+		showDoList
+	  };
 	},
 	components: {
-		sHeader
+	  sHeader
 	},
-};
-</script>
-<style lang="less" scoped>
-@import "../../common/style/common";
-</style>
+  };
+  </script>
+  <style lang="less" scoped>
+  @import "../../common/style/common";
+  </style>
   

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

@@ -203,7 +203,12 @@ export default ({
       // 文件名
       const newFileName = fileName.value;
       try {
-        const response = await fetch(fileUrl);
+        const response = await fetch(fileUrl, {
+          headers: {
+            'Cache-Control': 'no-store', // 禁用缓存
+            'Pragma': 'no-cache',
+          }
+        });
         console.log('response', response);
 
         // 将文件内容创建为Blob

+ 165 - 24
src/views/discountCode/index.vue

@@ -5,7 +5,14 @@
     <div class="discountCodeBox flex-col">
       <van-list v-model:loading="loading" v-model:error="error" :error-text="$t('public.requestFailed')"
         :finished="finished" :finished-text="$t('public.noMore')" offset="300" :immediate-check="false" @load="onLoad">
-        <div class="searchRow flex-row justify-between">
+        <div v-if="isDelete" class="searchRow flex-row justify-between">
+          <div class="l-flex-RC c-text-15 c-text-color c-text-b">
+            {{ $t("advertManage.advertRule.selected") }}
+            {{ selectTotals }}
+            {{ $t("advertManage.advertRule.individual") }}
+          </div>
+        </div>
+        <div v-else class="searchRow flex-row justify-between">
           <div class="flex-col">
             <div class="flex-row justify-between bd3">
               <div class="flex-col outer4"></div>
@@ -16,40 +23,89 @@
           <div class="flex-col">
             <div class="main5 flex-row justify-between" @click="searchClick">
               <img class="label2" src="../../assets/device/searchIcon.png" />
-              <div class="TextGroup2 flex-col">
-                <span class="txt3">{{ $t('discountCode.search') }}</span>
-              </div>
             </div>
           </div>
         </div>
         <div class="tabButtomBox flex-row">
           <div class="tabBox flex-row">
-            <span :class="{ active: isUse === '0' }" @click="setIsUse('0')">{{ $t('discountCode.notUsed') }}</span>
-            <span :class="{ active: isUse === '1' }" @click="setIsUse('1')">{{ $t('discountCode.used') }}</span>
+            <span :class="{ active: isUse === '0' }" @click="setIsUse('0')" style="cursor: pointer;">{{
+              $t('discountCode.notUsed') }}</span>
+            <span :class="{ active: isUse === '1' }" @click="setIsUse('1')" style="cursor: pointer;">{{
+              $t('discountCode.used') }}</span>
+          </div>
+          <div v-if="isDelete" class="buttomBox flex-row">
+            <div @click="cancelClk" class="buttonItem" style="color: #9696b1;">
+              {{ $t("discountCode.cancel") }}
+            </div>
+            <div @click="allClk" class="buttonItem" style="color: #2c87c8">
+              {{ $t("discountCode.selectAll") }}
+            </div>
+            <div @click="noticeClk" class="buttonItem" style="color: #df5e4c">
+              {{ $t("discountCode.confirmDel") }}
+            </div>
           </div>
-          <div class="buttomBox flex-row">
-            <div class="buttonItem" @click="exportClick()">{{ $t('discountCode.export') }}&gt;</div>
-            <div class="buttonItem" @click="payCode()">{{ $t('discountCode.apply') }}&gt;</div>
+          <div v-else class="buttomBox flex-row">
+            <div class="buttonItem" @click="payCode()" style="color: #2c87c8">{{ $t('discountCode.apply') }}</div>
+            <div class="buttonItem" @click="isDelete = true">{{ $t('discountCode.delete') }}</div>
+            <div class="buttonItem" @click="exportClick()" style="color: #45be2d">{{ $t('discountCode.export') }}</div>
           </div>
         </div>
         <div class="intervalRow"></div>
         <div class="listBox">
           <div v-for="(item, index) in discountCodeList" :key="index" class="listItem" @click="disCountCodeClick(item)">
             <div class="itemBox">
-              <div class="itemRow"><span class="itemTitle">{{ $t('discountCode.discountCode') }}:&nbsp;</span>{{ item.code
-              }}<span class="itemTitle discount">{{ item.type == '1' ? $t('discountCode.deduction') : $t('discountCode.discount') }}:&nbsp;</span>{{ item.discount }}
+              <div class="itemRow">
+                <span class="itemTitle">
+                  {{ $t('discountCode.discountCode') }}:&nbsp;
+                </span>
+                {{ item.code }}
+                <span class="itemTitle discount">
+                  {{ item.type == '1' ? $t('discountCode.deduction') : $t('discountCode.discount') }}:&nbsp;
+                </span>
+                {{ item.discount }}
               </div>
-              <div class="itemRow"><span class="itemTitle">{{ $t('discountCode.creationTime') }}:&nbsp;</span>{{
-                showDateTime(item.createDate) }}</div>
-              <div class="itemRow" v-if="item.isUse !== '0'"><span class="itemTitle">{{ $t('discountCode.usageTime') }}:&nbsp;</span>{{
-                showDateTime(item.useDate) }}</div>
-              <div class="itemRow"><span class="itemTitle">{{ $t('discountCode.termOfValidity') }}:&nbsp;</span>{{
-                showDate(item.lastUseDate) }} <span v-if="item.isUse === '0' && isExpired(item.lastUseDate)">{{ $t('discountCode.expired') }}</span></div>
-              <div class="itemRow" v-if="item.isUse !== '0'"><span class="itemTitle">{{ $t('discountCode.usingTheMachine') }}:&nbsp;</span>{{
-                item.useBy }}</div>
+              <div class="itemRow">
+                <span class="itemTitle">
+                  {{ $t('discountCode.creationTime') }}:&nbsp;
+                </span>
+                {{ showDateTime(item.createDate) }}
+              </div>
+              <div class="itemRow" v-if="user.type < 2">
+                <span class="itemTitle">
+                  {{ $t('discountCode.affiliatedMerchants') }}:&nbsp;
+                </span>
+                {{ item.userName }}
+              </div>
+              <div class="itemRow" v-if="item.isUse !== '0'">
+                <span class="itemTitle">
+                  {{ $t('discountCode.usageTime') }}:&nbsp;
+                </span>
+                {{ showDateTime(item.useDate) }}
+              </div>
+              <div class="itemRow">
+                <span class="itemTitle">
+                  {{ $t('discountCode.termOfValidity') }}:&nbsp;
+                </span>{{ showDate(item.lastUseDate) }}
+                <span v-if="item.isUse === '0' && isExpired(item.lastUseDate)">
+                  {{ $t('discountCode.expired') }}
+                </span>
+              </div>
+              <div class="itemRow" v-if="item.isUse !== '0'">
+                <span class="itemTitle">
+                  {{ $t('discountCode.usingTheMachine') }}:&nbsp;
+                </span>
+                {{ item.useBy }}
+              </div>
+            </div>
+            <div class="tipBox" v-if="item.isUse === '0' && isDelete == false">
+              {{ $t('discountCode.notUsed') }}
+            </div>
+            <div class="tipBox isUseTip" v-if="item.isUse === '1' && isDelete == false">
+              {{ $t('discountCode.used') }}
+            </div>
+            <div v-if="isDelete" class="checkedBox">
+              <van-checkbox checked-color="#2c87c8" v-model="item.checked"></van-checkbox>
             </div>
-            <div class="tipBox" v-if="item.isUse === '0'">{{ $t('discountCode.notUsed') }}</div>
-            <div class="tipBox isUseTip" v-if="item.isUse === '1'">{{ $t('discountCode.used') }}</div>
           </div>
         </div>
       </van-list>
@@ -59,19 +115,23 @@
 </template>
 
 <script>
-import { onMounted, reactive, toRefs, ref } from "vue";
+import { onMounted, reactive, toRefs, ref, computed } from "vue";
 import sHeader from "@/components/SimpleHeader";
-import { getdiscountCodeList, discountCodeExport } from "@/service/discountCode";
-import { showFailToast } from "vant";
+import { getdiscountCodeList, discountCodeExport, deleteCode } from "@/service/discountCode";
+import { showFailToast, showToast, showConfirmDialog } from "vant";
 import { getLoginUser, $M_ExportFile, styleUrl } from "@/common/js/utils";
 import codeSearch from './codeSearch.vue';
 import dateUtil from "@/utils/dateUtil";
 import { useRouter } from "vue-router";
+import { useI18n } from "vue-i18n";
+
 
 export default {
   setup() {
+    const { t } = useI18n();
     const router = useRouter();
     const searchRef = ref(null);
+    const user = getLoginUser();
     const loading = ref(false); // 加载状态
     const error = ref(false); // 错误状态
     const finished = ref(false); // 结束翻页状态
@@ -112,6 +172,12 @@ export default {
     const getList = async () => {
       const { data } = await getdiscountCodeList(Object.assign({}, searchParams));
       if (data.code === "00000") {
+        // 加入删除选中状态
+        if (data.data.records.length > 0) {
+          data.data.records.forEach((item) => {
+            item.checked = false;
+          });
+        }
         // 列表值叠加
         discountCodeList.value = discountCodeList.value.concat(data.data.records);
         discountCodeTotal.value = data.data.total;
@@ -142,6 +208,75 @@ export default {
       return currentDate > lastUseDateTime;
     });
 
+    // 是否删除状态
+    const isDelete = ref(false); // 选中
+    const selectTotals = computed(() => {
+      let nums = 0;
+      if (discountCodeList.value.length > 0) {
+        discountCodeList.value.forEach((item) => {
+          if (item.checked) {
+            nums++;
+          }
+        });
+      }
+      return nums;
+    });
+    const cancelClk = () => {
+      // 把选中状态去掉
+      if (discountCodeList.value.length > 0) {
+        discountCodeList.value.forEach((item) => {
+          if (item.checked) {
+            item.checked = false;
+          }
+        });
+      }
+      isDelete.value = false;
+    };
+    // 点击全选
+    const allClk = () => {
+      if (discountCodeList.value.length > 0) {
+        discountCodeList.value.forEach((item) => {
+          item.checked = true;
+        });
+      }
+    };
+    // 点击确认删除
+    const noticeClk = () => {
+      if (selectTotals.value < 1) {
+        showToast(t("advertManage.delTips"));
+        return;
+      }
+      showConfirmDialog({
+        title: t('advertManage.delPopTitle'),
+        message: t('advertManage.delPopContent'),
+      })
+        .then(() => {
+          const ids = [];
+          discountCodeList.value.forEach((item) => {
+            if (item.checked) {
+              ids.push(item.id);
+            }
+          });
+          deleteCode(ids).then((res) => {
+            console.log(res);
+            if (res.data.code === '00000') {
+              isDelete.value = false;
+              showToast(t('discountCode.deletionSucceeded'));
+              setTimeout(() => {
+                discountCodeList.value = [];
+                getList();
+              }, 1500);
+            }
+          }).catch(() => {
+            isDelete.value = false;
+            showToast('ERROR');
+          });
+        })
+        .catch(() => {
+          // showToast('ERROR');
+        })
+    };
+
     return {
       searchRef,
       loading,
@@ -160,6 +295,12 @@ export default {
       exportClick,
       payCode,
       isExpired,
+      isDelete,
+      allClk,
+      noticeClk,
+      selectTotals,
+      cancelClk,
+      user,
     };
   },
   components: { sHeader, codeSearch },

+ 5 - 1
src/views/distributionSet/detail.vue

@@ -57,7 +57,7 @@
                 :rules="[{ required: true, message: $t('device.distributionProportionPlaceholder') }, { required: true, validator: distPropVali, message: $t('distributionSet.addDist.distPropRange'), trigger: ['onChange', 'onBlur', 'onSubmit'] }]" />
               <span class="o-pl-10 c-text-18 c-text-b" style="color: #434D74;">%</span>
             </div>
-            <div v-if="index !== 0" @click="toDele(index)" class="l-flex-RC" style="color: #FE5D55;">
+            <div @click="toDele(index)" class="l-flex-RC" style="color: #FE5D55;">
               <van-icon size="18" name="delete-o" />
               <span class="c-text-12">{{ $t('device.delete') }}</span>
             </div>
@@ -176,6 +176,10 @@ export default {
     ])
     // 点击提交审批按钮
     const onSubmit = () => {
+      if (cofficentForm.distProp == '0') {
+        showToast(t('distributionSet.addDist.noZero'));
+        return;
+      }
       let param = {
         adminId: user.id,
         clientId: cofficentForm.clientId,

+ 26 - 4
src/views/home/index.vue

@@ -12,9 +12,13 @@
       <div class="nameDeviceRow flex-col">
         <span class="txt3">{{ userName }}</span>
         <div class="l-flex-RC">
-          <span class="info3" style="color: #2c87c8;">{{ $t("home.totalEquipment") }} : {{ equipStatus.machineTotalNum }}</span>
+          <span class="info3" style="color: #2c87c8;">
+            {{ $t("home.totalEquipment") }} : {{ equipStatus.machineTotalNum }}
+          </span>
           <div class="lineCon o-mlr-6"></div>
-          <span class="word2" style="color: #07c160;">{{ $t("home.running") }} : {{ equipStatus.machineUseNum }}</span>
+          <span class="word2" style="color: #07c160;">
+            {{ $t("home.running") }} : {{ equipStatus.machineUseNum }}
+          </span>
         </div>
       </div>
       <!-- 没有数据概览M14权限的人看不到数据概览和ECharts -->
@@ -128,6 +132,7 @@ import {
   Api_getNotice,
   Api_postMachineNum,
   Api_getUpdateNotice,
+  getIsAlarm,
 } from "../../service/home";
 import dateUtil from "../../utils/dateUtil";
 import { useI18n } from "vue-i18n";
@@ -358,8 +363,11 @@ export default {
       }
     };
     const pushToolList = ref([]);
+    // 是否有报警
+    const showAlarm = ref(false);
+    const alarmList = ref([]);
     // 页面初始化
-    onMounted(() => {
+    onMounted(async() => {
       // 加载样式
       styleUrl('home');
       if (localStorage.getItem("loginSys")) {
@@ -390,7 +398,19 @@ export default {
       getNotice();
       // 获取设备情况
       getMachineNum();
-
+      if (user.type > 1) {
+        // 查询设备是否有报警
+        const queryParams = {
+          adminId: user.id,
+          todayDate: dateUtil.formateDate(new Date(), "yyyy-MM-dd"), // 当天时间
+        };
+        const { data } = await getIsAlarm(queryParams);
+        if(data.data.length > 0) {
+          showAlarm.value = true;
+          alarmList.value = data.data;
+          console.log("alarmList", alarmList.value)
+        }
+      }
     });
 
     const menuList = [];
@@ -584,6 +604,8 @@ export default {
       Format_time,
       showDataDiv,
       currencySymbol,
+      showAlarm,
+      alarmList,
     };
   },
 

+ 0 - 3
src/views/merchantManage/index.vue

@@ -16,9 +16,6 @@
           <div class="flex-col">
             <div class="main5 flex-row justify-between" @click="searchClick">
               <img class="label2" src="../../assets/device/searchIcon.png" />
-              <div class="TextGroup2 flex-col">
-                <span class="txt3">{{ $t('merchantManage.search') }}</span>
-              </div>
             </div>
           </div>
         </div>

+ 107 - 41
src/views/merchantManage/set.vue

@@ -13,8 +13,7 @@
                 $t('merchantManage.withdrawalData') }}</span>
             </div>
             <!-- <div class="section2 flex-col"></div> -->
-            <img class="img1" referrerpolicy="no-referrer"
-              src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a" />
+            <img class="img1" referrerpolicy="no-referrer" src="../../assets/line.png" />
           </div>
           <div v-if="tabType === '0'">
             <!-- <div class="wrap2 l-flex-RC">
@@ -32,13 +31,23 @@
                   <span> {{ adminObj.username }}</span>
                 </div>
               </div>
+              <!-- <div class="van-cell van-field">
+                <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.relationAdmin') }}</span>
+                </div>
+                <div class="van-field__value o-pt-8" style="text-align: left;">
+                  <span> {{ relationObj.username }}</span>
+                </div>
+              </div> -->
+              <van-field v-model="relationObj.relationUsername" name="password"
+                :label="$t('merchantManage.relationAdmin')"
+                :placeholder="$t('merchantManage.relationAdminPlaceholder')" />
               <van-field v-model="adminObj.name" name="password" :label="$t('merchantManage.fullNameLabel')"
                 :placeholder="$t('merchantManage.fullNamePlaceholder')"
                 :rules="[{ required: true, message: $t('merchantManage.fullNamePlaceholder') }]" />
-              <van-field v-model="adminObj.password" name="password" type="password"
+              <van-field v-model="adminObj.password" name="password" type="password" clearable
                 :label="$t('merchantManage.passwordLabel')" :placeholder="$t('merchantManage.passwordPlaceholder')" />
               <span class="txt3">{{ $t('merchantManage.leavBlanToIndiNoModi') }}</span>
-              <van-field v-model="adminObj.checkPassword" name="password" type="password"
+              <van-field v-model="adminObj.checkPassword" name="password" type="password" clearable
                 :label="$t('merchantManage.confirmPasswordLabel')"
                 :placeholder="$t('merchantManage.confirmPasswordPlaceholder')" />
               <van-field v-model="adminObj.email" name="password" :label="$t('merchantManage.mailbox')"
@@ -116,16 +125,15 @@
                 :{{ adminMchObj.bankAccountType === 1 ? $t('merchantManage.debitCard') : (adminMchObj.bankAccountType ===
                   4
                   ? $t('merchantManage.corporateAccount') : "") }}</span>
+              <!-- <span class="word9"></span> -->
             </div>
             <span class="word10">{{ $t('merchantManage.bankAccountName') }}:{{ adminMchObj.bankAccountName }}</span>
             <span class="word11">{{ $t('merchantManage.bankAccount') }}:{{ adminMchObj.bankAccountNo }}</span>
             <span v-if="adminMchObj.bankAccountType == 4" class="word12">{{ $t('merchantManage.bankNo') }}:{{
               adminMchObj.bankChannelNo }}</span>
             <div v-if="adminType < 2">
-              <span class="word12">{{ $t('merchantManage.joinpayMch') }}:{{ adminMchObj.signStatus == '签约成功' ?
-                adminMchObj.signStatus : '未签约' }}</span>
-              <span class="word12">{{ $t('merchantManage.huifuMch') }}:{{ huifuMchObj != null && huifuMchObj.status == '2'
-                ? '签约成功' : '未签约' }}</span>
+              <span class="word12">{{ $t('merchantManage.joinpayMch') }}:{{ joinpayState }}</span>
+              <span class="word12">{{ $t('merchantManage.huifuMch') }}:{{ huifuState }}</span>
             </div>
           </div>
         </div>
@@ -136,7 +144,7 @@
 <script>
 import { onMounted, ref } from "vue";
 import sHeader from "@/components/SimpleHeader";
-import { getAdmin, getAdminMch, updateAdmin, getHuifuMch } from "@/service/merchantManage";
+import { getAdmin, getRelation, getAdminMch, updateAdmin, getHuifuMch, getRelationAdminId } from "@/service/merchantManage";
 import { showFailToast, showSuccessToast } from "vant";
 import { useRoute } from "vue-router";
 import { getLoginUser, styleUrl } from "@/common/js/utils";
@@ -153,15 +161,18 @@ export default {
     const route = useRoute();
     const merchantId = ref('');
     const adminObj = ref({});
+    const relationObj = ref({});
     const adminMchObj = ref({});
     const huifuMchObj = ref({});
     const ifForeign = ref('0');
+    const huifuState = ref('未入驻');
+    const joinpayState = ref('未入驻');
     onMounted(async () => {
       // 加载样式
       styleUrl('merchantManage');
       merchantId.value = route.query.merchantId;
       getAdminFun();
-      console.log(ifForeign.value);
+      getRelationFun();
       getAdminMchFun();
       getHuifuMchFun();
 
@@ -180,64 +191,119 @@ export default {
         }
         ifForeign.value = data.data.ifForeign;
       }
+      // else { showFailToast(data.message); }
+      // console.log('getAdminFun', data);
     };
+    const getRelationFun = async () => {
+      const { data } = await getRelation({ adminId: merchantId.value });
+      if (data.code === "00000") {
+        if (data.data != null) {
+          relationObj.value = data.data;
+          relationObj.value.relationUsername = data.data.username;
+        }
+      }
+    }
     const getAdminMchFun = async () => {
       const { data } = await getAdminMch({ id: merchantId.value });
       if (data.code === "00000") {
         if (data.data != null) {
+          // adminMchObj.signStatus == '签约成功' ?
+          //       adminMchObj.signStatus : '未签约'
           adminMchObj.value = data.data;
+          if (adminMchObj.value.approveStatus == '审核通过') {
+            if (adminMchObj.value.signStatus == '签约成功') {
+              joinpayState.value = adminMchObj.value.signStatus;
+            } else {
+              if (adminMchObj.value.approveNote != null && adminMchObj.value.approveNote != '') {
+                joinpayState.value = adminMchObj.value.approveNote;
+              }
+            }
+          } else {
+            if (adminMchObj.value.approveNote != null && adminMchObj.value.approveNote != '') {
+              joinpayState.value = adminMchObj.value.approveNote;
+            }
+          }
         }
       }
+      // console.log('getAdminMchFun', data);
+      // console.log('adminMchObj', adminMchObj.value.signStatus);
     }
     const getHuifuMchFun = async () => {
       const { data } = await getHuifuMch({ adminId: merchantId.value });
       if (data.code === "00000") {
         if (data.data != null) {
           huifuMchObj.value = data.data;
+          if (huifuMchObj.value.status == '2') {
+            huifuState.value = '签约成功';
+          } else {
+            if (huifuMchObj.value.auditDesc != null && huifuMchObj.value.auditDesc != '') {
+              huifuState.value = huifuMchObj.value.auditDesc;
+            }
+          }
+
         }
       }
+      // console.log('getHuifuMchFun', data);
     }
     const onSubmit = async () => {
-      const params = {
-        id: adminObj.value.id,
-        name: adminObj.value.name,
-        username: adminObj.value.username,
-        ifForeign: adminObj.value.ifForeign,
-        phone: adminObj.value.phone,
-        email: adminObj.value.email,
-        tradeMerchantNo: adminObj.value.tradeMerchantNo,
-      };
-      if (adminType.value === 0 || adminType.value === 1) {
-        params.promoCodeOpen = adminObj.value.promoCodeOpen;
-        params.applyStartTime = adminObj.value.applyStartTime;
-        params.applyEndTime = adminObj.value.applyEndTime;
-        params.payPlatform = adminObj.value.payPlatform;
-      }
-      if (adminObj.value.password !== '') {
-        if (adminObj.value.checkPassword === '') { showFailToast(t('merchantManage.confirmPasswordPlaceholder')); return; }
-        if (adminObj.value.password === adminObj.value.checkPassword) {
-          params.password = adminObj.value.password;
-        } else {
-          showFailToast(t('merchantManage.theTwoPasswordsAreDifferent'));
+      try {
+        if (relationObj.value.relationUsername != null) {
+          const result = await getRelationAdminId({ relationUsername: relationObj.value.relationUsername });
+          if (result.data.code === "00000") {
+            if (result.data.data != null) {
+              adminObj.value.relationAdminId = result.data.data;
+            }
+          }
         }
+        // console.log("relationAdminId --> ", adminObj.value.relationAdminId);
+        const params = {
+          id: adminObj.value.id,
+          name: adminObj.value.name,
+          username: adminObj.value.username,
+          relationAdminId: adminObj.value.relationAdminId,
+          ifForeign: adminObj.value.ifForeign,
+          phone: adminObj.value.phone,
+          email: adminObj.value.email,
+          tradeMerchantNo: adminObj.value.tradeMerchantNo,
+        };
+        if (adminType.value === 0 || adminType.value === 1) {
+          params.promoCodeOpen = adminObj.value.promoCodeOpen;
+          params.applyStartTime = adminObj.value.applyStartTime;
+          params.applyEndTime = adminObj.value.applyEndTime;
+          params.payPlatform = adminObj.value.payPlatform;
+        }
+        if (adminObj.value.password !== '') {
+          if (adminObj.value.checkPassword === '') { showFailToast(t('merchantManage.confirmPasswordPlaceholder')); return; }
+          if (adminObj.value.password === adminObj.value.checkPassword) {
+            params.password = adminObj.value.password;
+          } else {
+            showFailToast(t('merchantManage.theTwoPasswordsAreDifferent'));
+          }
+        }
+        const { data } = await updateAdmin(params);
+        if (data.code === "00000") {
+          showSuccessToast(t('merchantManage.modificationSucceeded'));
+          setTimeout(() => {
+            // router.go(0);
+            getAdminFun();
+          }, 1500);
+        } else { showFailToast(data.message); }
+        console.log('onSubmit', data);
+      } catch (error) {
+        // 如果上面的方法执行失败,会执行到这里
+        console.error('提交管理员信息失败', error);
       }
-      const { data } = await updateAdmin(params);
-      if (data.code === "00000") {
-        showSuccessToast(t('merchantManage.modificationSucceeded'));
-        setTimeout(() => {
-          // router.go(0);
-          getAdminFun();
-        }, 1500);
-      } else { showFailToast(data.message); }
-      console.log('onSubmit', data);
     }
     return {
       tabType,
       adminType,
       adminObj,
+      relationObj,
       adminMchObj,
       huifuMchObj,
-      onSubmit
+      onSubmit,
+      joinpayState,
+      huifuState,
     };
   },
 };

+ 14 - 16
src/views/orderCenter/index.vue

@@ -6,27 +6,24 @@
       <van-list v-model:loading="loading" v-model:error="error" :error-text="$t('public.requestFailed')"
         :finished="finished" :finished-text="$t('public.noMore')" offset="300" :immediate-check="false" @load="onLoad">
         <div class="main3 flex-col justify-center">
-          <div class="outer1 flex-col justify-between">
-            <div class="group4 flex-row justify-between">
-              <div class="ImageText1 flex-col">
-                <div class="outer2 flex-row justify-between">
-                  <div class="block1 flex-col"></div>
-                  <div class="TextGroup1 flex-col">
-                    <span class="txt1">{{ $t('orderCenter.dataOverview') }}</span>
-                  </div>
+          <!-- <div class="outer1 flex-col justify-between"> -->
+          <div class="group4 flex-row justify-between">
+            <div class="ImageText1 flex-col">
+              <div class="outer2 flex-row justify-between">
+                <div class="block1 flex-col"></div>
+                <div class="TextGroup1 flex-col">
+                  <span class="txt1">{{ $t('orderCenter.dataOverview') }}</span>
                 </div>
               </div>
-              <div class="ImageText2 flex-col" @click="searchClick()">
-                <div class="group5 flex-row justify-between">
-                  <img class="icon2" src="../../assets/order/search.png" />
-                  <div class="TextGroup2 flex-col">
-                    <span class="txt2">{{ $t("common.search") }}</span>
-                  </div>
+            </div>
+            <div class="flex-col" >
+                <div class="main5 flex-row justify-between" @click="searchClick()">
+                  <img class="label2" src="@/assets/device/searchIcon.png" />
                 </div>
               </div>
-            </div>
           </div>
         </div>
+        <img class="img1" referrerpolicy="no-referrer" src="@/assets/line.png" />
         <dateSelectList @update="update($event)"></dateSelectList>
         <typeSelectList @upselectdata="upselectdata($event)"></typeSelectList>
         <div v-if="!noData(salesVolume, salesNumber, orderNumber)" class="o-plr-8 o-pt-15">
@@ -122,7 +119,8 @@
                   </van-card>
                   <div v-if="typeof item.status === 'undefined'" class="main11 flex-col orderSuccess"></div>
                   <div v-else class="main11 flex-col" :class="{
-                    orderSuccess: item.status === 1,
+                    orderSuccess: item.status === 1 && (user.ifForeign == '0' || user.ifForeign == null),
+                    coinOrderSuccess: item.status === 1 && user.ifForeign == '1',
                     orderError: item.status === 0,
                     refunding: item.status === 2,
                     refunded: item.status === 3,

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

@@ -49,7 +49,7 @@
                 </div>
               </div>
               <img class="img2" referrerpolicy="no-referrer"
-                src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a" />
+                src="../../assets/line.png" />
             </div>
           </div>
           <!-- <van-pull-refresh disabled v-model="refreshing" @refresh="onRefresh"> -->

+ 17 - 20
src/views/robotRanking.vue

@@ -5,27 +5,23 @@
       <div class="box3 flex-col">
         <div class="main1 flex-col">
           <div class="mod1 flex-col">
-            <div class="block1 flex-col justify-between">
-              <div class="section1 flex-row justify-between">
-                <div class="ImageText1 flex-col">
-                  <div class="group4 flex-row justify-between">
-                    <div class="layer3 flex-col"></div>
-                    <div class="TextGroup1 flex-col">
-                      <span class="word3">{{
-                        $t("robotRanking.machineSalesRanking")
-                      }}</span>
-                    </div>
-                  </div>
+            <div class="section1 flex-row justify-between">
+              <div class="ImageText1 flex-col">
+                <div class="group4 flex-row justify-between">
+                  <div class="layer3 flex-col"></div>
+                  <span class="word3 flex-col">
+                    {{ $t("robotRanking.machineSalesRanking") }}
+                  </span>
                 </div>
-                <div @click="noticeClk" class="l-flex-RC">
-                  <img class="label2 o-mr-5" src="@/assets/device/searchIcon.png" />
-                  <span class="txt3">{{ $t("robotRanking.rankMethod") }}</span>
+              </div>
+              <div class="flex-col">
+                <div @click="noticeClk" class="main5 flex-row justify-between">
+                  <img class="label2" src="@/assets/device/searchIcon.png" />
                 </div>
               </div>
-              <img class="img1" referrerpolicy="no-referrer"
-                src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a" />
             </div>
           </div>
+          <img class="img1" referrerpolicy="no-referrer" src="../assets/line.png" />
           <div class="l-f l-flex-e o-plr-15">
             <span class="robotLabelName l-in c-text-13" style="color: #404d74">{{ $t("robotRanking.dailySalesRanking")
             }}:</span>
@@ -279,19 +275,20 @@ export default {
     };
     // 年的日期选择弹窗
     // 点击确定
-    const yearPopConfirm = (e) => {
-      // console.log("e的值是11", e);
-      const year = e.id;
+    const yearPopConfirm = ({ selectedOptions }) => {
+      const year = selectedOptions[0].id;
       const startDate =
         moment().year(year).startOf("year").format("YYYY-MM-DD") + " 00:00:00";
       const endDate =
         moment().year(year).endOf("year").format("YYYY-MM-DD") + " 23:59:59";
+      console.log("startDate", startDate);
+      console.log("endDate", endDate);
       getEquipRankList("year", startDate, endDate);
       yearShow.value = false;
     };
     // 获取当前年前4年后1年
     let yearPopList = [];
-    for (let i = -1; i < 5; i++) {
+    for (let i = 0; i < 4; i++) {
       const year = moment().subtract(i, "years").format("YYYY");
       yearPopList.push({
         name: year,

+ 74 - 15
src/views/settlement/index.vue

@@ -226,21 +226,28 @@
             :label="$t('huifuMch.huifuBankAddress')" :placeholder="$t('huifuMch.huifuBankAddressPlaceholder')"
             :rules="[{ required: true, message: $t('huifuMch.huifuBankAddressPlaceholder') }]"
             @click="showBankAddress = true" />
-          <div v-if="bankAccountType === '4'" class="requiredLeft">
-            <!-- 联行号 -->
-            <van-field v-model="bankChannelNo" name="bankChannelNo" :label="$t('joinpayMch.interBankNoLabel')"
-              :placeholder="$t('joinpayMch.interBankNoPlaceholder')"
-              :rules="[{ required: bankAccountType === '4', message: $t('joinpayMch.interBankNoPlaceholder') }]"
-              @update:model-value="fieldUpdate" />
-            <van-field v-model="bankCodeValue" name="bankCodeValue" :label="$t('huifuMch.bankCodeLabel')"
-              :placeholder="$t('huifuMch.bankCodePlaceholder')"
-              :rules="[{ required: true, message: $t('huifuMch.bankCodePlaceholder') }]"
-              @update:model-value="fieldUpdate" />
-            <!-- <van-field v-model="openLicenceNoValue" name="openLicenceNoValue" :label="$t('huifuMch.openLicenceNo')"
-              :placeholder="$t('huifuMch.openLicenceNoPlaceholder')"
-              :rules="[{ required: true, message: $t('huifuMch.openLicenceNoPlaceholder') }]"
-              @update:model-value="fieldUpdate" /> -->
-          </div>
+          <!-- <div v-if="bankAccountType === '4'" class="requiredLeft"> -->
+          <!-- 联行号 -->
+          <van-field v-if="bankAccountType === '4'" class="requiredLeft" v-model="bankChannelNo" name="bankChannelNo"
+            :label="$t('joinpayMch.interBankNoLabel')" :placeholder="$t('joinpayMch.interBankNoPlaceholder')"
+            :rules="[{ required: bankAccountType === '4', message: $t('joinpayMch.interBankNoPlaceholder') }]"
+            @update:model-value="fieldUpdate" />
+          <!-- 银行编号 -->
+          <van-field v-if="bankAccountType === '4'" class="requiredLeft" v-model="bankCodeValue" name="bankCodeValue"
+            :label="$t('huifuMch.bankCodeLabel')" :placeholder="$t('huifuMch.bankCodePlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.bankCodePlaceholder') }]" @update:model-value="fieldUpdate">
+            <template #button>
+              <van-button size="small" type="primary" @click="showBankCode = true" style="padding: 0 1em;">
+                选择所属银行
+              </van-button>
+            </template>
+          </van-field>
+          <!-- </div> -->
+          <!-- 银行编号弹窗 -->
+          <van-popup v-model:show="showBankCode" position="bottom">
+            <van-picker title="请选择所属银行" :columns="bankCodePopList" @confirm="bankCodePopConfirm"
+              @cancel="showBankCode = false" />
+          </van-popup>
           <div v-if="altMerchantType === '12'" class="requiredLeft">
             <!-- 营业执照编号 -->
             <van-field v-model="licenseNo" name="licenseNo" :label="$t('joinpayMch.businessLicenseNoLabel')"
@@ -473,6 +480,55 @@ export default {
     const showArea = ref(false); // 是否弹窗
     const showBankAddress = ref(false);
     const showReAddress = ref(false);
+    const showBankCode = ref(false);
+    const bankCodePopList = [
+      {
+        text: '中国银行',
+        value: "01040000",
+      },
+      {
+        text: '中国农业银行',
+        value: "01030000",
+      },
+      {
+        text: '中国工商银行',
+        value: "01020000",
+      },
+      {
+        text: '中国建设银行',
+        value: "01050000",
+      },
+      {
+        text: '交通银行',
+        value: "03010000",
+      },
+      {
+        text: '中国邮政储蓄银行',
+        value: "04030000",
+      },
+      {
+        text: '中国民生银行',
+        value: "03050000",
+      },
+      {
+        text: '广发银行',
+        value: "03060000",
+      },
+      {
+        text: '招商银行',
+        value: "03080000",
+      },
+      {
+        text: '其他,请咨询售后人员',
+        value: "",
+      },
+    ];
+    const bankCodePopConfirm = ({ selectedOptions }) => {
+      console.log(selectedOptions[0])
+      addParams.bankCodeValue = selectedOptions[0].value;
+      fieldUpdate();
+      showBankCode.value = false;
+    };
     const verCodeTime = reactive({
       time: 0
     });
@@ -1233,6 +1289,9 @@ export default {
       onConfirmBeginDate,
       onConfirmEndDate,
       showBankAddress,
+      showBankCode,
+      bankCodePopList,
+      bankCodePopConfirm,
       areaList,
       onConfirmBankAddress,
       showArea,

+ 16 - 13
src/views/taskMessage/proportion/index.vue

@@ -27,16 +27,19 @@
           <div v-for="(item, index) in alarmHistoryList" :key="index" class="listItem">
             <div class="itemBox">
               <div class="itemRow">
-                <span class="itemTitle">{{ $t('taskMessage.equipmentName') }}:&nbsp;</span>{{ item.equipmentName != null ?
-                  item.equipmentName : item.clientId.slice(-6) }}
+                <span class="itemTitle">{{ $t('taskMessage.equipmentName') }}:&nbsp;</span>
+                {{ item.equipmentName != null ? item.equipmentName : item.clientId.slice(-6) }}
               </div>
               <div class="itemRow">
-                <span class="itemTitle">{{ $t('taskMessage.equipmentNo') }}:&nbsp;</span>{{ item.clientId }}
+                <span class="itemTitle">{{ $t('taskMessage.equipmentNo') }}:&nbsp;</span>
+                {{ item.clientId }}
               </div>
               <!-- 机主的 -->
               <div class="itemRow">
-                <span class="itemTitle">{{ $t('taskMessage.owner') }}:&nbsp;</span>{{ $t('taskMessage.machineOwner')
-                }}<span class="itemTitle discount">{{ $t('taskMessage.proportion') }}:&nbsp;</span>{{ item.proportion }}%
+                <span class="itemTitle">{{ $t('taskMessage.owner') }}:&nbsp;</span>
+                {{ $t('taskMessage.machineOwner') }}
+                <span class="itemTitle discount">{{ $t('taskMessage.proportion') }}:&nbsp;</span>
+                {{ item.proportion }}%
               </div>
               <!-- 平台的 -->
               <div class="itemRow">
@@ -62,19 +65,17 @@
               <!-- 分账方5个以上 -->
               <div class="itemRow" v-if="item.type >= 3">
                 <span class="itemTitle">{{ $t('taskMessage.partners') }}:&nbsp;</span>
-                {{ item.personageName }}
+                {{ item.personageNam }}
                 <span class="itemTitle discount">{{ $t('taskMessage.proportion') }}:&nbsp;</span>
                 {{ item.personageProportion }}%
               </div>
               <div class="itemRow">
-                <span class="itemTitle">{{ $t('taskMessage.applicationTime') }}:&nbsp;</span>{{
-                  showDateTime(item.createDate)
-                }}
+                <span class="itemTitle">{{ $t('taskMessage.applicationTime') }}:&nbsp;</span>
+                {{ showDateTime(item.createDate) }}
               </div>
               <div class="itemRow" v-if="item.checkType !== '0'">
-                <span class="itemTitle">{{ $t('taskMessage.approvalTime') }}:&nbsp;</span>{{
-                  showDateTime(item.modifyDate)
-                }}
+                <span class="itemTitle">{{ $t('taskMessage.approvalTime') }}:&nbsp;</span>
+                {{ showDateTime(item.modifyDate) }}
               </div>
               <div class="itemRow" style="display: flex; justify-content: flex-end"
                 v-if="item.checkType === '0' && isOper">
@@ -98,7 +99,8 @@
                   {{ $t('taskMessage.adopt') }}
                 </van-button>
               </div>
-              <div class="itemRow" style="display: flex; justify-content: flex-end" v-if="item.checkType !== '0'">
+              <div class="itemRow" style="display: flex; justify-content: flex-end">
+                <span v-if="item.checkType === '0' && user.type > 1" style="color: #FFA500"> {{ $t('taskMessage.toBeApproved') }}</span>
                 <span v-if="item.checkType === '1'" style="color: #1989fa"> {{ $t('taskMessage.adopt') }}</span>
                 <span v-if="item.checkType === '2'" style="color: #ff0000"> {{ $t('taskMessage.cancel') }}</span>
                 <span v-if="item.checkType === '3'" style="color: #ff0000"> {{ $t('taskMessage.fail') }}</span>
@@ -309,6 +311,7 @@ export default {
       busiPopFieldName,
       reviewedClk,
       isOper,
+      user,
     };
   },
 };

+ 54 - 38
src/views/user.vue

@@ -52,48 +52,55 @@
               <van-icon name="edit" class="editIcon" @click="editClk(4)" />
             </div>
           </div>
-          <!-- 手机号 -->
+          <!-- 邮箱 -->
           <div v-if="user.type != '0'">
-            <div v-if="!phoneNumberShow" class="userInfo l-flex-between">
-              <span class="userInfoLeft">{{ $t("user.phoneNumber") }}: </span>
+            <div v-if="!mailboxShow" class="userInfo l-flex-between">
+              <span class="userInfoLeft">{{ $t("user.mailbox") }}: </span>
               <div>
-                <van-field class="relationClass" v-model="cofficentForm.phone" :placeholder="$t('user.phoneNumberPlace')">
+                <van-field class="relationClass" v-model="cofficentForm.mailBox" :placeholder="$t('user.mailboxPlace')">
                   <template #button>
-                    <van-button type="primary" @click="mailboxChg(cofficentForm.phone, 3)">{{ $t("user.confirmLog") }}
+                    <van-button type="primary" @click="mailboxChg(cofficentForm.mailBox, 2)">{{ $t("user.confirmLog") }}
                     </van-button>
                   </template>
                 </van-field>
               </div>
-              <van-icon name="edit" class="editIcon" @click="editClk(3)" />
+              <van-icon name="edit" class="editIcon" @click="editClk(2)" />
             </div>
             <div v-else class="userInfo l-flex-between">
-              <span class="userInfoLeft">{{ $t("user.phoneNumber") }}: </span>
-              <span>{{ accountDetail.phone }}</span>
-              <van-icon name="edit" class="editIcon" @click="editClk(3)" />
+              <span class="userInfoLeft">{{ $t("user.mailbox") }}: </span>
+              <span>{{ accountDetail.email }}</span>
+              <van-icon name="edit" class="editIcon" @click="editClk(2)" />
             </div>
           </div>
-          <!-- 邮箱 -->
+          <!-- 上级账号 -->
+          <div v-if="isInland && user.type == '2'">
+            <div v-if="haveRelation" class="userInfo l-flex-between">
+              <span class="userInfoLeft">{{ $t("user.superiorAccount") }}: </span>
+              <span>{{ relationAdminName }}</span>
+            </div>
+          </div>
+          <!-- 手机号码 -->
           <div v-if="user.type != '0'">
-            <div v-if="!mailboxShow" class="userInfo l-flex-between">
-              <span class="userInfoLeft">{{ $t("user.mailbox") }}: </span>
+            <div v-if="!phoneNumberShow" class="userInfo l-flex-between">
+              <span class="userInfoLeft">{{ $t("user.phoneNumber") }}: </span>
               <div>
-                <van-field class="relationClass" v-model="cofficentForm.mailBox" :placeholder="$t('user.mailboxPlace')">
+                <van-field class="relationClass" v-model="cofficentForm.phone" :placeholder="$t('user.phoneNumberPlace')">
                   <template #button>
-                    <van-button type="primary" @click="mailboxChg(cofficentForm.mailBox, 2)">{{ $t("user.confirmLog") }}
+                    <van-button type="primary" @click="mailboxChg(cofficentForm.phone, 3)">{{ $t("user.confirmLog") }}
                     </van-button>
                   </template>
                 </van-field>
               </div>
-              <van-icon name="edit" class="editIcon" @click="editClk(2)" />
+              <van-icon name="edit" class="editIcon" @click="editClk(3)" />
             </div>
             <div v-else class="userInfo l-flex-between">
-              <span class="userInfoLeft">{{ $t("user.mailbox") }}: </span>
-              <span>{{ accountDetail.email }}</span>
-              <van-icon name="edit" class="editIcon" @click="editClk(2)" />
+              <span class="userInfoLeft">{{ $t("user.phoneNumber") }}: </span>
+              <span>{{ accountDetail.phone }}</span>
+              <van-icon name="edit" class="editIcon" @click="editClk(3)" />
             </div>
           </div>
           <!-- 关联上级 -->
-          <div v-if="isInland && user.type == '2'">
+          <!-- <div v-if="isInland && user.type == '2'">
             <div v-if="!relationType" class="userInfo l-flex-between">
               <span class="userInfoLeft">{{ $t("user.associateParent") }}: </span>
               <div>
@@ -113,7 +120,7 @@
               <span>{{ relationAdminName }}</span>
               <van-icon name="edit" class="editIcon" @click="editClk(1)" />
             </div>
-          </div>
+          </div> -->
 
           <!-- 自定义货币符号 -->
           <div v-if="!symbolShow" class="userInfo l-flex-between">
@@ -251,7 +258,7 @@ import {
   $M_PhoneTest,
 } from "@/common/js/utils";
 import { useRouter } from "vue-router";
-import { tAdminGetRelation, tAdminSetRelationAdmin, updatePayPlatform } from "@/service/user";
+import { tAdminGetRelation, updatePayPlatform } from "@/service/user";
 import { showFailToast, showToast, showSuccessToast, showConfirmDialog } from 'vant';
 import { useI18n } from "vue-i18n";
 import { styleUrl } from "../common/js/utils";
@@ -346,23 +353,23 @@ export default {
     // 点击邮箱的确定按钮
     const mailboxChg = async (e, idx) => {
       switch (idx) {
-        case 1:
-          if (!e) {
-            showToast(t("user.associateParentPlace"));
-          } else {
-            const { data } = await tAdminSetRelationAdmin({
-              adminId: user.id,
-              username: e,
-            });
-            relationType.value = true;
-            if (data.code === "00000") {
-              showToast(data.message);
-              setTimeout(() => {
-                gettAdminGetRelation();
-              }, 500);
-            }
-          }
-          break;
+        // case 1:
+        //   if (!e) {
+        //     showToast(t("user.associateParentPlace"));
+        //   } else {
+        //     const { data } = await tAdminSetRelationAdmin({
+        //       adminId: user.id,
+        //       username: e,
+        //     });
+        //     relationType.value = true;
+        //     if (data.code === "00000") {
+        //       showToast(data.message);
+        //       setTimeout(() => {
+        //         gettAdminGetRelation();
+        //       }, 500);
+        //     }
+        //   }
+        //   break;
         case 2:
           if (!e) {
             showToast(t("user.mailboxPlace"));
@@ -618,6 +625,13 @@ export default {
     // 是否内陆或海外
     const isInland = ref(true);
     const isAbroad = ref(false);
+    // 是否有上级账号
+    const haveRelation = ref(false);
+    const haveRelationCheck = () => {
+      if (user.relationAdminId !== null) {
+        haveRelation.value = true;
+      }
+    }
     // const checkIsAbroad = async () => {
     //   try {
     //     const { data } = await getIfForeign(user.id);
@@ -650,6 +664,7 @@ export default {
     onMounted(() => {
       checkInWechat();
       checkIsAbroad();
+      haveRelationCheck();
     })
     // 获取回显的值
     const getAreaName = (e) => {
@@ -681,6 +696,7 @@ export default {
       isInWeChat,
       getAreaName,
       isAbroad,
+      haveRelation,
       checkIsAbroad,
       isInland,
       symbolShow,