Forráskód Böngészése

feat:“同步2024.12.13“

soobin 8 hónapja
szülő
commit
bac8133f31
38 módosított fájl, 5258 hozzáadás és 272 törlés
  1. BIN
      src/assets/device/operIcon/thaw.png
  2. 56 13
      src/assets/language/en.json
  3. 48 5
      src/assets/language/ja.json
  4. 55 12
      src/assets/language/zh.json
  5. BIN
      src/assets/order/spunSugar/goods/D01.png
  6. BIN
      src/assets/order/spunSugar/goods/D02.png
  7. BIN
      src/assets/order/spunSugar/goods/D03.png
  8. BIN
      src/assets/order/spunSugar/goods/D04.png
  9. BIN
      src/assets/order/spunSugar/goods/D05.png
  10. BIN
      src/assets/order/spunSugar/goods/D06.png
  11. BIN
      src/assets/order/spunSugar/goods/D07.png
  12. BIN
      src/assets/order/spunSugar/goods/D08.png
  13. BIN
      src/assets/order/spunSugar/goods/D09.png
  14. BIN
      src/assets/order/spunSugar/goods/D10.png
  15. BIN
      src/assets/order/spunSugar/goods/D11.png
  16. BIN
      src/assets/order/spunSugar/goods/D12.png
  17. BIN
      src/assets/order/spunSugar/goods/E01.png
  18. BIN
      src/assets/order/spunSugar/goods/E02.png
  19. BIN
      src/assets/taskMessage/refundIcon.png
  20. 2106 0
      src/common/js/countries-en.js
  21. 2103 0
      src/common/js/countries.js
  22. 65 0
      src/components/dateOrderList/index.less
  23. 270 0
      src/components/dateOrderList/index.vue
  24. 2 2
      src/components/dateSelectList/index.less
  25. 29 8
      src/components/typeDownMenu/index.vue
  26. 10 0
      src/service/orderExport/index.js
  27. 16 1
      src/service/user.js
  28. 52 53
      src/styles/kDialog/index.less
  29. 21 33
      src/styles/register/index.less
  30. 15 6
      src/views/accountPer/add.vue
  31. 19 10
      src/views/device/deviceOper.vue
  32. 2 2
      src/views/home/index.vue
  33. 6 1
      src/views/orderCenter/index.vue
  34. 16 9
      src/views/orderCenter/orderSearch.vue
  35. 43 28
      src/views/orderExport/index.vue
  36. 133 26
      src/views/register.vue
  37. 3 0
      src/views/role/add.vue
  38. 188 63
      src/views/user.vue

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


+ 56 - 13
src/assets/language/en.json

@@ -17,6 +17,7 @@
     "nextStep": "Next",
     "dayType": "Daily statistics",
     "monthType": "Monthly statistics",
+    "yearType": "Yearly statistics",
     "monthTip1": "The time span cannot exceed six months",
     "monthTip2": "The end time cannot be later than the start time"
   },
@@ -561,6 +562,7 @@
     "refrigeration": "Refrigeration mode",
     "keepFresh": "Fresh-keeping mode",
     "stir": "Stirring mode",
+    "thaw": "Thawing mode",
     "view": "view",
     "oneKeyFeed": "One key feeding",
     "replenishment": "Replenish",
@@ -1264,7 +1266,21 @@
       "cardName": "Card Name",
       "mp": "Billing Phone",
       "successful": "Successful"
-    }
+    },
+    "refundRemind": "Refund reminder record",
+    "sn": "Order number",
+    "clientId": "Machine number",
+    "phone": "Receiving number",
+    "sendTime": "Sending time",
+    "sendWait": "Wait for return",
+    "sendSucess": "Received successfully",
+    "sendFail": "Receive failure",
+    "remark": "Cause of failure",
+    "snPlaceholder": "Please enter the order number",
+    "clientIdPlaceholder": "Please enter the machine number",
+    "searchDate": "Time frame",
+    "searchDatePlaceholder": "Click to select a time frame",
+    "chooseTitle": "Select the date"
   },
   "uniPay": {
     "selfRecharging": "Self recharging",
@@ -1328,11 +1344,11 @@
   "register": {
     "header": "User Registration",
     "usernameLabel": "Account name",
-    "usernamePlaceholder": "Please enter the account name",
+    "usernamePlaceholder": "Please enter the Account name",
     "usernameRequired": "Alphanumeric with letter as the first character",
-    "nameLabel": "User Name",
-    "namePlaceholder": "Please enter the user name",
-    "nameRequired": "Please enter the user name",
+    "nameLabel": "Personal Name",
+    "namePlaceholder": "Please enter the Personal Name",
+    "nameRequired": "Please enter the Personal Name",
     "passwordLabel": "Login password",
     "passwordPlaceholder": "Please enter a password with more than 10 digits",
     "passwordRequired": "Please enter a password with more than 10 digits",
@@ -1340,7 +1356,13 @@
     "passwordCheckLabel": "Confirm Password",
     "passwordCheckPlaceholder": "Please enter the password again to confirm",
     "passwordCheckRequired": "Please enter the password again to confirm",
-    "country": "Country/region",
+    "countryCity": "Country and city",
+    "clickCountryCity": "Click to select country and city",
+    "chooseCountryCity": "Please select a country and city",
+    "areaLabel": "Regional selection",
+    "areaPlaceholder": "Click to select Province",
+    "areaRequired": "Please select a province",
+    "country": "Region",
     "chinese": "中国大陆",
     "other": "Abroad/HKMT",
     "logonMode": "Logon mode",
@@ -1358,11 +1380,27 @@
     "emailCodeLabel": "Verification code",
     "emailCodePlaceholder": "Please enter the email verification code",
     "emailCodeRequired": "Please enter the email verification code",
+    "invitationCode": "Invitation Code (optional)",
+    "invitationCodePlaceholder": "Please enter the invitation code",
     "registerButton": "Register",
     "replaysInSeconds": "Replays in seconds",
     "emailRegistration": "Email",
     "phoneRegistration": "Phone",
-    "twoTypedDiff": "The two passwords are different"
+    "twoTypedDiff": "The two passwords are different",
+    "registerSucess": "Successful",
+    "registerFail": "Registration failed. Please contact the administrator",
+    "R0001": "The invitation code does not exist",
+    "R0002": "The phone number is empty",
+    "R0003": "Mailbox is empty",
+    "R0004": "Not a valid phone number or email address",
+    "R0005": "The verification code is empty",
+    "R0006": "Verification code error",
+    "R0008": "The verification code does not exist",
+    "R0009": "Do not send frequently, try again in 10 minutes",
+    "A0201": "Email not registered",
+    "A0202": "The user's mobile phone already exists",
+    "A0203": "The phone number is not registered",
+    "A0207": "The user mailbox already exists"
   },
   "robotRanking": {
     "noPermission": "insufficient permissions",
@@ -1429,7 +1467,7 @@
     "corrPhonePlace": "Please enter the correct mobile number",
     "bindWechat": "Bind WeChat",
     "airwallex": "Airwallex",
-    "setTheTimezone": "Set timezone",
+    "setTheTimezone": "Timezone",
     "setTheTimezonePlace": "Please select a timezone",
     "currencySymbol": "Currency",
     "currencySymbolPlace": "Please enter currency symbol",
@@ -1489,6 +1527,9 @@
   "kCascader": {
     "selectRegion": "Please select your region"
   },
+  "kTimezone": {
+    "selectTimezone": "Please select your timezone"
+  },
   "paramNames": {
     "D405": "Stove low speed",
     "D406": "Stove medium speed",
@@ -1535,7 +1576,9 @@
     "D487": "No.1004",
     "D489": "No.1005",
     "D396": "No.1006",
-    "D491": "No.1007"
+    "D491": "No.1007",
+    "M311": "Out stick putter",
+    "M307": "Mixer motor"
   },
   "popParams": {
     "D460": "NO.1095",
@@ -1548,10 +1591,10 @@
     "D346": "NO.1052",
     "D497": "NO.1096",
     "D344": "NO.1083",
-    "M559": "シールドシュガー欠乏アラーム",
-    "M566": "シールド絶縁熱線故障アラーム",
-    "M568": "シールド発生器のエアポンプアラーム",
-    "M569": "シールド混合エアポンプのアラーム"
+    "M559": "Block the sugar shortage alarm",
+    "M566": "Shield insulation heating wire fault alarm",
+    "M568": "Shield generator air pump alarm",
+    "M569": "Shield stirring air pump alarm"
   },
   "accountOperation": {
     "title": "Acount operation",

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

@@ -17,6 +17,7 @@
         "nextStep": "次のステップです",
         "dayType": "日毎に集計する",
         "monthType": "月ごとに集計します",
+        "yearType": "年ごとに集計します",
         "monthTip1": "期間は半年以内です",
         "monthTip2": "終了時間が開始時間より小さくなってはいけません"
     },
@@ -583,6 +584,7 @@
         "refrigeration": "冷却モードです",
         "keepFresh": "鮮度保持モードです",
         "stir": "撹拌モードです",
+        "thaw": "解凍モード",
         "view": "見る",
         "oneKeyFeed": "ワンタッチ補充",
         "replenishment": "補充",
@@ -1248,7 +1250,21 @@
                 "statePlace": "状態を選択してください",
                 "filterBtn": "クリックして検索"
             }
-        }
+        },
+        "refundRemind": "退款提醒记录",
+        "sn": "订单编号",
+        "clientId": "设备编码",
+        "phone": "接收号码",
+        "sendTime": "发送时间",
+        "sendWait": "等待返回",
+        "sendSucess": "接收成功",
+        "sendFail": "接收失败",
+        "remark": "失败原因",
+        "snPlaceholder": "请输入订单编号",
+        "clientIdPlaceholder": "请输入设备编号",
+        "searchDate": "时间范围",
+        "searchDatePlaceholder": "点击选择时间范围",
+        "chooseTitle": "选择年月"
     },
     "joinpayMchCheck": {
         "convergence": "ユニペイ",
@@ -1360,7 +1376,13 @@
         "passwordCheckLabel": "パスワード確認",
         "passwordCheckPlaceholder": "確認のためパスワードを再入力してください",
         "passwordCheckRequired": "確認のためパスワードを再入力してください",
-        "country": "国/地域",
+        "countryCity": "国と市",
+        "clickCountryCity": "国と都市をクリックして選択します",
+        "chooseCountryCity": "国と都市を選択してください",
+        "areaLabel": "地域選択です",
+        "areaPlaceholder": "クリックして都道府県を選びます",
+        "areaRequired": "都道府県を選びます。",
+        "country": "地域",
         "chinese": "中国本土",
         "other": "海外/香港・マカオ・台湾",
         "logonMode": "登録方法",
@@ -1380,11 +1402,27 @@
         "emailCodeLabel": "メール認証コード",
         "emailCodePlaceholder": "メール認証コードを入力してください",
         "emailCodeRequired": "メール認証コードを入力してください",
+        "invitationCode": "招待コードです(任意)",
+        "invitationCodePlaceholder": "招待コードの入力をお願いします",
         "registerButton": "登録する",
         "replaysInSeconds": "数秒後に再送信できます",
         "emailRegistration": "メールでの登録",
         "phoneRegistration": "電話での登録",
-        "twoTypedDiff": "入力したパスワードが一致しません"
+        "twoTypedDiff": "入力したパスワードが一致しません",
+        "registerSucess": "成功です",
+        "registerFail": "失敗しました,管理人に連絡してください",
+        "R0001": "招待コードは存在しません",
+        "R0002": "携帯番号は空です",
+        "R0003": "メールボックスは空です。",
+        "R0004": "有効な携帯番号やメールアドレスではありません",
+        "R0005": "認証コードがNULLです",
+        "R0006": "認証コードエラー",
+        "R0008": "認証コードが存在しません",
+        "R0009": "頻繁に送信せず、10分後に再試行してください",
+        "A0201": "メールボックスは登録されていません",
+        "A0202": "ユーザーの携帯電話はすでに存在します",
+        "A0203": "携帯番号未登録",
+        "A0207": "ユーザーメールボックスはすでに存在します"
     },
     "robotRanking": {
         "noPermission": "権限が不十分",
@@ -1454,7 +1492,7 @@
         "syncOldData": "データ同期",
         "modifyLoc": "位置を修正する",
         "airwallex": "エアウォレックス",
-        "setTheTimezone": "タイムゾーンを設定する",
+        "setTheTimezone": "タイムゾーンです",
         "setTheTimezonePlace": "タイムゾーンを選択してください",
         "currencySymbol": "カスタム通貨",
         "currencySymbolPlace": "カスタム通貨を入力してください",
@@ -1514,6 +1552,9 @@
     "kCascader": {
         "selectRegion": "居住地域を選択してください"
     },
+    "kTimezone": {
+        "selectTimezone": "タイムゾーンを選択してください"
+    },
     "paramNames": {
         "D405": "炉頭の低速",
         "D406": "炉頭の中速",
@@ -1560,7 +1601,9 @@
         "D487": "No.1004",
         "D489": "No.1005",
         "D396": "No.1006",
-        "D491": "No.1007"
+        "D491": "No.1007",
+        "M311": "パターを出します",
+        "M307": "攪拌モーターです"
     },
     "popParams": {
         "D460": "NO.1095",

+ 55 - 12
src/assets/language/zh.json

@@ -17,6 +17,7 @@
     "nextStep": "下一步",
     "dayType": "按日统计",
     "monthType": "按月统计",
+    "yearType": "按年统计",
     "monthTip1": "时间跨度不能超过半年",
     "monthTip2": "结束时间不能小于开始时间"
   },
@@ -586,6 +587,7 @@
     "refrigeration": "制冷模式",
     "keepFresh": "保鲜模式",
     "stir": "搅拌模式",
+    "thaw": "解冻模式",
     "view": "查看",
     "oneKeyFeed": "一键补料",
     "replenishment": "补料",
@@ -1090,7 +1092,7 @@
     "taskMessage": "任务消息",
     "discountCode": "优惠码",
     "accountPermission": "账号权限",
-    "orderExport": "订单导出",
+    "orderExport": "订单分析",
     "shandeSubLedger": "杉德分账",
     "salesRanking": "销售排行",
     "settlementAccount": "结算账号",
@@ -1311,7 +1313,21 @@
       "cardName": "卡户名",
       "mp": "结算手机号",
       "successful": "审核成功"
-    }
+    },
+    "refundRemind": "退款提醒记录",
+    "sn": "订单编号",
+    "clientId": "设备编码",
+    "phone": "接收号码",
+    "sendTime": "发送时间",
+    "sendWait": "等待返回",
+    "sendSucess": "接收成功",
+    "sendFail": "接收失败",
+    "remark": "失败原因",
+    "snPlaceholder": "请输入订单编号",
+    "clientIdPlaceholder": "请输入设备编号",
+    "searchDate": "时间范围",
+    "searchDatePlaceholder": "点击选择时间范围",
+    "chooseTitle": "选择年月"
   },
   "uniPay": {
     "selfRecharging": "自充值",
@@ -1374,12 +1390,12 @@
   },
   "register": {
     "header": "用户注册",
-    "usernameLabel": "账号名称",
-    "usernamePlaceholder": "请输入账号名称",
-    "usernameRequired": "账号名称由字母或数字组成,且只能字母开头",
-    "nameLabel": "用户名",
-    "namePlaceholder": "请输入用户名",
-    "nameRequired": "请输入用户名",
+    "usernameLabel": "登录用户名",
+    "usernamePlaceholder": "请输入登录用户名",
+    "usernameRequired": "由字母或数字组成,且只能字母开头",
+    "nameLabel": "用户名",
+    "namePlaceholder": "请输入用户名",
+    "nameRequired": "请输入用户名",
     "passwordLabel": "登录密码",
     "passwordPlaceholder": "请输入10位以上密码",
     "passwordRequired": "请输入密码",
@@ -1387,9 +1403,15 @@
     "passwordCheckLabel": "确认密码",
     "passwordCheckPlaceholder": "请再次输入密码进行确认",
     "passwordCheckRequired": "请再次输入密码进行确认",
-    "country": "国家/地区",
+    "countryCity": "国家城市",
+    "clickCountryCity": "点击选择国家城市",
+    "chooseCountryCity": "请选择国家城市",
+    "country": "地区",
     "chinese": "中国大陆",
     "other": "海外/港澳台",
+    "areaLabel": "地区选择",
+    "areaPlaceholder": "点击选择省市",
+    "areaRequired": "请选择省市",
     "logonMode": "注册方式",
     "phoneLabel": "手机号码",
     "phonePlaceholder": "请输入手机号码",
@@ -1407,11 +1429,27 @@
     "emailCodeLabel": "验证码",
     "emailCodePlaceholder": "请输入邮箱验证码",
     "emailCodeRequired": "请输入邮箱验证码",
+    "invitationCode": "邀请码(选填)",
+    "invitationCodePlaceholder": "请输入邀请码",
     "registerButton": "注册",
     "replaysInSeconds": "秒后可重发",
     "emailRegistration": "邮箱注册",
     "phoneRegistration": "手机注册",
-    "twoTypedDiff": "两次输入的密码不一致"
+    "twoTypedDiff": "两次输入的密码不一致",
+    "registerSucess": "注册成功",
+    "registerFail": "注册失败,请联系管理员",
+    "R0001": "邀请码不存在",
+    "R0002": "手机号为空",
+    "R0003": "邮箱为空",
+    "R0004": "不是有效的手机号或邮箱地址",
+    "R0005": "验证码为空",
+    "R0006": "验证码错误",
+    "R0008": "验证码不存在",
+    "R0009": "请勿频繁发送, 10分钟后再试",
+    "A0201": "邮箱未注册",
+    "A0202": "用户手机已存在",
+    "A0203": "手机号未注册",
+    "A0207": "用户邮箱已存在"
   },
   "robotRanking": {
     "noPermission": "权限不足",
@@ -1538,6 +1576,9 @@
   "kCascader": {
     "selectRegion": "请选择所在地区"
   },
+  "kTimezone": {
+    "selectTimezone": "请选择所在时区"
+  },
   "paramNames": {
     "D405": "炉头低速",
     "D406": "炉头中速",
@@ -1584,7 +1625,9 @@
     "D487": "No.1004",
     "D489": "No.1005",
     "D396": "No.1006",
-    "D491": "No.1007"
+    "D491": "No.1007",
+    "M311": "出棍推杆",
+    "M307": "搅拌电机"
   },
   "popParams": {
     "D460": "NO.1095",
@@ -1637,6 +1680,6 @@
   "优惠码": "优惠码",
   "报警历史": "报警历史",
   "广告管理": "广告管理",
-  "订单导出": "订单导出",
+  "订单分析": "订单分析",
   "apk管理": "apk管理"
 }

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


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


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


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


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


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


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


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


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


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


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


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


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


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


BIN
src/assets/taskMessage/refundIcon.png


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 2106 - 0
src/common/js/countries-en.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 2103 - 0
src/common/js/countries.js


+ 65 - 0
src/components/dateOrderList/index.less

@@ -0,0 +1,65 @@
+.dateSelectListBox {
+  .Tabs1 {
+    background-color: rgba(255, 255, 255, 1);
+    z-index: 29;
+    border: 0.5px solid rgba(185, 186, 208, 1);
+    width: calc(100% - 30px);
+    margin: 0 auto;
+    position: relative;
+    box-shadow: 0 2px 4px 2px rgba(0, 0, 0, 0.1);
+
+
+    .timeTabBox {
+      display: flex;
+
+      .timeTab {
+        width: 20%;
+        text-align: center;
+        overflow-wrap: break-word;
+        color: rgba(64, 77, 116, 1);
+        font-size: 0.35rem;
+        text-align: center;
+        white-space: nowrap;
+        line-height: 1rem;
+        border-right: 1px solid #B9BAD0;
+        &:last-child{
+          border-right: none;
+        }
+        .block3 {
+          width: 0;
+          height: 0;
+          border-left: 3px solid transparent;
+          border-right: 3px solid transparent;
+          border-bottom: 3px solid rgba(64, 77, 116, 1);
+          transform: rotate(180deg);
+          display: inline-block;
+          margin-bottom: 3px;
+          margin-left: 3px;
+        }
+      }
+
+      .active {
+        background: #2c87c8;
+        color: #fff;
+        position: relative;
+
+        .block3 {
+          border-bottom-color: #fff;
+        }
+
+        &::after {
+          position: absolute;
+          top: 34px;
+          left: 65%;
+          width: 0;
+          height: 0;
+          border-left: 5px solid transparent;
+          border-right: 5px solid transparent;
+          border-bottom: 5px solid #2c87c8;
+          transform: rotate(180deg);
+          content: "";
+        }
+      }
+    }
+  }
+}

+ 270 - 0
src/components/dateOrderList/index.vue

@@ -0,0 +1,270 @@
+<template>
+  <div class="dateSelectListBox flex-col">
+    <div class="Tabs1 flex-col">
+      <div class="timeTabBox">
+        <div class="timeTab" :class="{ active: timeType === '0' }" @click="timeChange('0')">
+          {{ $t('dateSelectList.today') }}</div>
+        <div class="timeTab" :class="{ active: timeType === '1' }" @click="timeChange('1')">
+          {{ $t('dateSelectList.yesterday') }}</div>
+        <div class="timeTab" :class="{ active: timeType === '2' }" @click="timeChange('2')">
+          {{ $t('dateSelectList.thisWeek') }}</div>
+        <div class="timeTab" :class="{ active: timeType === '3' }" @click="timeChange('3')">
+          {{ $t('dateSelectList.thisMonth') }}</div>
+        <div class="timeTab" :class="{ active: timeType === '4' }" @click="timeChange('4')">
+          {{ $t('dateSelectList.other') }}
+          <div class="block3 flex-col"></div>
+        </div>
+        <!-- 日期选择 -->
+        <van-calendar color="#4d6add" v-model:show="calendarShow" type="range" :show-confirm="false"
+          :allow-same-day="true" :min-date="minDate" @confirm="calendarConfirm" />
+        <!-- 选择统计类型 -->
+        <van-popup v-model:show="timeTypeShow" position="bottom">
+          <van-picker :title="$t('dateSelectList.timeType')" :columns="timeTypeList" @confirm="timeTypeConfirm"
+            @cancel="timeTypeCancel" />
+        </van-popup>
+        <!-- 按月统计 -->
+        <van-popup v-model:show="monthDateShow" position="bottom">
+          <van-date-picker v-model="monthDate" :title="$t('dateSelectList.monthDate')" :min-date="minDate" :max-date="maxDate" @confirm="monthDateConfirm" @cancel="monthDateCancel"
+            :columns-type="monthDateType" />
+        </van-popup>
+        <!-- 按年统计 -->
+        <van-popup v-model:show="yearDateShow" position="bottom">
+          <van-date-picker v-model="yearDate" :title="$t('dateSelectList.monthDate')" :min-date="minDate" :max-date="maxDate" @confirm="yearDateConfirm" @cancel="yearDateCancel"
+            :columns-type="yearDateType" />
+        </van-popup>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { ref } from "vue";
+import dateUtil from "@/utils/dateUtil";
+import { getLoginUser } from "@/common/js/utils";
+// import { showToast } from "vant";
+import { useI18n } from 'vue-i18n';
+
+
+
+
+export default {
+  name: "dateSelectList",
+  components: {},
+  setup(props, { emit }) {
+    const minDate = new Date(2022, 0, 1);
+    const maxDate = new Date();
+    const { t } = useI18n();
+    const user = getLoginUser();
+    // 时间类型
+    const timeType = ref("0");
+    // 统计类型
+    const chartType = ref("0");
+    // 时间类型切换
+    const timeChange = (data) => {
+      timeType.value = data;
+      // 当时时间类型切换为其他时间弹出日期控件
+      // (data === "4") ? calendarShow.value = true : outputDate();
+      (data === "4") ? timeTypeShow.value = true : outputDate();
+    };
+    let calendarDate = [];
+    const calendarShow = ref(false);
+    // 其他时间日期组件确认返回
+    const calendarConfirm = (data) => {
+      calendarShow.value = false;
+      console.log(data);
+      calendarDate = data;
+      outputDate();
+    };
+    const outputDate = async () => {
+      const params = {};
+      // 今日
+      if (timeType.value === "0") {
+        params.chartType = "day";
+        params.startDate = dateUtil.formateDate(
+          new Date(new Date(new Date().getTime()).setHours(0, 0, 0, 0)),
+          "yyyy-MM-dd hh:mm:ss"
+        );
+        params.endDate = dateUtil.formateDate(
+          new Date(new Date(new Date().getTime()).setHours(23, 59, 59, 59)),
+          "yyyy-MM-dd hh:mm:ss"
+        );
+        params.dateType = "2";
+      }
+      // 昨日
+      if (timeType.value === "1") {
+        let yesterday = new Date();
+        yesterday.setDate(yesterday.getDate() - 1);
+        params.chartType = "day";
+        params.startDate = dateUtil.formateDate(
+          new Date(new Date(yesterday.getTime()).setHours(0, 0, 0, 0)),
+          "yyyy-MM-dd hh:mm:ss"
+        );
+        params.endDate = dateUtil.formateDate(
+          new Date(new Date(yesterday.getTime()).setHours(23, 59, 59, 59)),
+          "yyyy-MM-dd hh:mm:ss"
+        );
+        params.dateType = "2";
+      }
+      // 本周
+      if (timeType.value === "2") {
+        const curr = new Date();
+        const dayOfWeek = curr.getDay();
+        // 如果是周日,将当前日期设置到本周的周一
+        if (dayOfWeek === 0 && user.ifForeign != '1') {
+          curr.setDate(curr.getDate() - 6); // 将当前日期设置为本周的周一
+        }
+        const firstday = new Date(
+          curr.setDate(curr.getDate() - curr.getDay() + 1)
+        );
+        const lastday = new Date(
+          curr.setDate(curr.getDate() - curr.getDay() + 7)
+        );
+        params.chartType = "week";
+        params.startDate =
+          dateUtil.formateDate(firstday, "yyyy-MM-dd") + " 00:00:00";
+        params.endDate =
+          dateUtil.formateDate(lastday, "yyyy-MM-dd") + " 23:59:59";
+        params.dateType = "2";
+      }
+      // 本月
+      if (timeType.value === "3") {
+        const now = new Date(); //当前日期
+        const nowMonth = now.getMonth(); //当前月
+        const nowYear = now.getFullYear(); //当前年
+        params.chartType = "month";
+        params.startDate =
+          dateUtil.formateDate(new Date(nowYear, nowMonth, 1), "yyyy-MM-dd") +
+          " 00:00:00";
+        params.endDate =
+          dateUtil.formateDate(
+            new Date(nowYear, nowMonth + 1, 0),
+            "yyyy-MM-dd"
+          ) + " 23:59:59";
+          params.dateType = "0";
+      }
+      // 其他时间
+      if (timeType.value === "4") {
+        let startTime = null;
+        let endTime = null;
+        if (chartType.value == '1') {
+          // 按日统计
+          const firstday = Date.parse(calendarDate[0]);
+          const lastday = Date.parse(calendarDate[1]);
+          const diffDate = Math.abs(firstday - lastday);
+          const totalDays = Math.floor(diffDate / (1000 * 3600 * 24));
+          if (totalDays === 0) {
+            params.chartType = "day";
+          } else {
+            params.chartType = "month";
+          }
+          timeTypeShow.value = false;
+          startTime = calendarDate[0];
+          endTime = calendarDate[1];
+          params.startDate =
+            dateUtil.formateDate(startTime, "yyyy-MM-dd") + " 00:00:00";
+          params.endDate =
+            dateUtil.formateDate(endTime, "yyyy-MM-dd") + " 23:59:59";
+          params.dateType = "2";
+        } else if (chartType.value == '2') {
+          // 按月统计
+          params.chartType = "month";
+          startTime = new Date(monthDate.value[0] + '-' + monthDate.value[1] + '-01');
+          endTime = new Date(monthDate.value[0], monthDate.value[1], 0);
+
+          params.startDate =
+            dateUtil.formateDate(startTime, "yyyy-MM-dd") + " 00:00:00";
+          params.endDate =
+            dateUtil.formateDate(endTime, "yyyy-MM-dd") + " 23:59:59";
+          timeTypeShow.value = false;
+          params.dateType = "0";
+        } else if (chartType.value == '3') {
+          // 按年统计
+          params.chartType = "year";
+          startTime = new Date(monthDate.value[0] + '-01-01');
+          endTime = new Date(monthDate.value[0] + '-12-31');
+          params.startDate =
+            dateUtil.formateDate(startTime, "yyyy-MM-dd") + " 00:00:00";
+          params.endDate =
+            dateUtil.formateDate(endTime, "yyyy-MM-dd") + " 23:59:59";
+          timeTypeShow.value = false;
+          params.dateType = "1";
+        }
+
+      }
+      emit('update', params);
+    };
+    // 统计类型
+    const timeTypeShow = ref(false);
+    const timeTypeList = [
+      { text: t('dateSelectList.dayType'), value: "1" },
+      { text: t('dateSelectList.monthType'), value: "2" },
+      { text: t('dateSelectList.yearType'), value: "3" },
+    ];
+    const timeTypeConfirm = ({ selectedOptions }) => {
+      console.log('selectedOptions[0].text', selectedOptions[0].value);
+      // 按日统计
+      chartType.value = selectedOptions[0].value;
+      if (selectedOptions[0].value == '1') {
+        calendarShow.value = true;
+      } else if (selectedOptions[0].value == '2') {
+        monthDateShow.value = true;
+      } else if (selectedOptions[0].value == '3') {
+        yearDateShow.value = true;
+      }
+
+    }
+    const timeTypeCancel = () => { timeTypeShow.value = false; }
+    // 按月统计
+    // 创建一个Date对象,表示当前时间
+    const currentDate = new Date();
+    // 获取当前时间的年份
+    const currentYear = currentDate.getFullYear();
+    // 获取当前时间的月份(注意,月份是从0开始的,所以要加1)
+    const currentMonth = currentDate.getMonth() + 1;
+    const monthDateShow = ref(false);
+    const monthDate = ref([currentYear, currentMonth]);
+    const monthDateType = ['year', 'month'];
+    const monthDateConfirm = () => {
+      monthDateShow.value = false;
+      outputDate();
+    }
+    const monthDateCancel = () => { monthDateShow.value = false; }
+    // 按年统计
+    const yearDateShow = ref(false);
+    const yearDateType = ['year'];
+    const yearDate = ref([currentYear]);
+    const yearDateConfirm = () => {
+      yearDateShow.value = false;
+      outputDate();
+    }
+    const yearDateCancel = () => { yearDateShow.value = false; }
+    return {
+      minDate,
+      maxDate,
+      timeType,
+      timeChange,
+      calendarShow,
+      calendarConfirm,
+      timeTypeShow,
+      timeTypeList,
+      timeTypeConfirm,
+      timeTypeCancel,
+      monthDateShow,
+      monthDateType,
+      monthDateConfirm,
+      monthDateCancel,
+      monthDate,
+      yearDateShow,
+      yearDateType,
+      yearDateConfirm,
+      yearDateCancel,
+      yearDate
+    };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@import "@/common/style/common.less";
+@import "./index.less";
+</style>

+ 2 - 2
src/components/dateSelectList/index.less

@@ -37,7 +37,7 @@
       }
 
       .active {
-        background: #4d6add;
+        background: #2c87c8;
         color: #fff;
         position: relative;
 
@@ -53,7 +53,7 @@
           height: 0;
           border-left: 5px solid transparent;
           border-right: 5px solid transparent;
-          border-bottom: 5px solid #4d6add;
+          border-bottom: 5px solid #2c87c8;
           transform: rotate(180deg);
           content: "";
         }

+ 29 - 8
src/components/typeDownMenu/index.vue

@@ -1,8 +1,8 @@
 <template>
   <van-dropdown-menu class="titleMenu" swipe-threshold="3" active-color="#2c87c8">
     <!-- 用户 -->
-    <!-- <van-dropdown-item v-if="isShowAdmin()" :title="adminTypeTitle" v-model="adminType" :options="adminList"
-      @change="adminTypeChange" /> -->
+    <van-dropdown-item v-if="isShowAdmin()" :title="adminTypeTitle" v-model="adminType" :options="adminList"
+      @change="adminTypeChange" />
     <!-- 设备类型 -->
     <van-dropdown-item :title="machineTypeTitle" v-model="machineType" :options="machineList"
       @change="machineTypeChange" />
@@ -192,7 +192,7 @@ export default {
     // 商户筛选
     const adminType = ref(null);
     // 商户筛选标题
-    const adminTypeTitle = ref(t('typeSelectList.thisMerchant'));
+    const adminTypeTitle = ref('选择商户');
     // 商户列表
     const adminList = ref([]);
     // 获取商户列表
@@ -200,17 +200,37 @@ export default {
       const { data } = await getAdminList({ adminId: user.id });
       if (data.code === '00000') {
         adminList.value = data.data.map(item => {
-          return { text: item.username, value: item.id }
+          return { text: item.username, value: item.id, ifForeign: item.ifForeign }
         });
-        adminList.value.unshift({ text: t('typeSelectList.allSuboUsers'), value: 'all' });
-        adminList.value.unshift({ text: t('typeSelectList.thisMerchant'), value: 'this' });
       }
     }
-    // 选择商户
     const adminTypeChange = (value) => {
+      console.log(value);
       adminTypeTitle.value = adminList.value.find(adminList => adminList.value === value).text;
       searchParams.adminType = (adminTypeTitle.value === t('typeSelectList.allSuboUsers')) ? 'all' : '';
       searchParams.userName = (adminTypeTitle.value === t('typeSelectList.allSuboUsers')) ? 'all' : (adminTypeTitle.value === t('typeSelectList.thisMerchant')) ? user.username : adminTypeTitle.value;
+      searchParams.adminId = (value ===  ('this' || 'all') ? null : value);
+      searchParams.ifForeign = adminList.value.find(adminList => adminList.value === value).ifForeign;
+      if (searchParams.ifForeign == "0") {
+        payList.value = [
+          { text: t('typeSelectList.whole'), value: '' },
+          { text: t('typeSelectList.mainSweepOfAlipay'), value: 'ALIPAY_NATIVE' },
+          { text: t('typeSelectList.weChatScanning'), value: 'WEIXIN_NATIVE' },
+          { text: t('typeSelectList.antiScanningOfAlipay'), value: 'ALIPAY_CARD' },
+          { text: t('typeSelectList.weChatBackScanning'), value: 'WEIXIN_CARD' },
+          { text: t('typeSelectList.eCNYBackeScanning'), value: 'ECNY_CARD' },
+        ];
+      } else {
+        payList.value = [
+          { text: t('typeSelectList.whole'), value: '' },
+          { text: t('typeSelectList.noPaymentRequired'), value: 0 },
+          { text: t('typeSelectList.coin'), value: 1 },
+          { text: t('typeSelectList.notes'), value: 2 },
+          { text: t('typeSelectList.coinsNotes'), value: 3 },
+          { text: t('typeSelectList.creditCard'), value: 4 },
+          { text: t('typeSelectList.electronicPayment'), value: 5 },
+        ];
+      }
       outputDate();
     }
 
@@ -226,11 +246,12 @@ export default {
       companyType: '',
       machineType: '',
       ifForeign: '',
+      adminId: user.id,
     });
 
 
     // 是否商户
-    const isShowAdmin = () => { return (user && user.type === 1); }
+    const isShowAdmin = () => { return (user && user.type === 4); }
     // 是否管理员
     const isShowCompany = () => { return (user && user.type === 0); }
     // 是否管理员和公司人员

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

@@ -7,6 +7,16 @@ export function getOrderList(params) {
   return axios.get(`/ORDER-SERVER/tOrder/orderSelect?${stringToUrl(params)}`);
 }
 
+// 订单分析
+export function getOrderAnalysis(params) {
+  return axios.post(`/ORDER-SERVER/tOrder/orderAnalysis`, params);
+}
+
+// 订单分析导出
+export function Api_getOrderAnalysisExport(params) {
+  return axios.post(`/ORDER-SERVER/tOrder/orderAnalysisExport`, params, {responseType:'blob'});
+}
+
 // 导出Excle
 export function Api_getOrderExport(params) {
   return axios.get(`/ORDER-SERVER/tOrder/onlineExport?${stringToUrl(params)}`,{responseType:'blob'});

+ 16 - 1
src/service/user.js

@@ -37,4 +37,19 @@ export function updateOrderNotice(params) {
 // 切换设备通知开关
 export function updateOnOffNotice(params) {
   return axios.get(`/SZWL-SERVER/tAdmin/updateOnOffNotice?${stringToUrl(params)}`, params);
-} 
+}
+
+// 修改地区
+export function updateArea(params) {
+  return axios.get(`/SZWL-SERVER/tAdmin/updateArea?${stringToUrl(params)}`, params);
+} 
+
+// 国内账号获取所属地区
+export function getAreaById(params) {
+  return axios.get(`/SZWL-SERVER/tAdmin/getAreaById?${stringToUrl(params)}`, params);
+}
+
+// 海外账号获取所属地区
+export function getCitiesById(params) {
+  return axios.get(`/SZWL-SERVER/tAdmin/getCitiesById?${stringToUrl(params)}`, params);
+}

+ 52 - 53
src/styles/kDialog/index.less

@@ -1,67 +1,66 @@
 .kDialogIdx {
 
-    .operCheckBox {
-      padding: 0 10px;
-      padding-top: 10px;
+  .operCheckBox {
+    padding: 0 10px;
+    padding-top: 10px;
 
-      .operCheckCon {
-        padding-top: 10px;
-        border-top: 1px solid #D7D7E2;
+    .operCheckCon {
+      padding-top: 10px;
+      border-top: 1px solid #D7D7E2;
 
-        .word10 {
-          width: 143px;
-          height: 13px;
-          overflow-wrap: break-word;
-          color: rgba(64, 77, 116, 1);
-          font-size: 13px;
-          text-align: left;
-          white-space: nowrap;
-          line-height: 13px;
-          display: block;
-          margin: 33px auto;
-        }
+      .word10 {
+        width: 143px;
+        height: 13px;
+        overflow-wrap: break-word;
+        color: rgba(64, 77, 116, 1);
+        font-size: 13px;
+        text-align: left;
+        white-space: nowrap;
+        line-height: 13px;
+        display: block;
+        margin: 33px auto;
+      }
 
-        .block6 {
-          margin: 20px auto;
+      .block6 {
+        padding: 20px 20px;
 
-          .mod7 {
-            border-radius: 20px;
-            padding: 10px 20px;
-            border: 1px solid #2c87c8;
-            justify-content: center;
-            align-items: center;
+        .mod7 {
+          border-radius: 20px;
+          padding: 10px 0;
+          width: 100px;
+          border: 1px solid #2c87c8;
+          justify-content: center;
+          align-items: center;
 
-            .info5 {
-              overflow-wrap: break-word;
-              color: #2c87c8;
-              font-size: 13px;
-              font-family: PingFangSC-Medium;
-              text-align: center;
-              line-height: 15px;
-              display: block;
-            }
+          .info5 {
+            overflow-wrap: break-word;
+            color: #2c87c8;
+            font-size: 13px;
+            font-family: PingFangSC-Medium;
+            text-align: center;
+            display: block;
           }
+        }
 
-          .mod8 {
-            background-color: #2c87c8;
-            border-radius: 20px;
-            height: 30px;
-            padding: 0 20px;
-            width: 60px;
-            justify-content: center;
-            align-items: center;
+        .mod8 {
+          background-color: #2c87c8;
+          border-radius: 20px;
+          padding: 10px 0;
+          width: 100px;
+          justify-content: center;
+          align-items: center;
 
-            .info6 {
-              overflow-wrap: break-word;
-              color: rgba(255, 255, 255, 1);
-              font-size: 13px;
-              font-family: PingFangSC-Medium;
-              text-align: center;
-              display: block;
-            }
+          .info6 {
+            overflow-wrap: break-word;
+            color: rgba(255, 255, 255, 1);
+            font-size: 13px;
+            font-family: PingFangSC-Medium;
+            text-align: center;
+            display: block;
           }
         }
       }
-
     }
-  }
+
+  }
+}

+ 21 - 33
src/styles/register/index.less

@@ -58,48 +58,36 @@
             background: #2c87c8;
           }
 
-          .van-icon-success::before {
-            content: '';
-            background: #fff;
-            width: 40%;
-            height: 40%;
-            position: absolute;
-            top: 30%;
-            left: 29%;
-            border-radius: 100%;
-          }
-
           .van-radio__icon--checked+.van-radio__label {
             color: #2c87c8;
           }
         }
       }
-    }
-  }
-
-  .van-tabs__nav {
 
-    .van-tab--card {
-      color: #2c87c8;
-      border-right: #2c87c8
-    }
+      .searchCity {
+        margin-top: auto;
+        // background-color: #2c87c8;
+        padding: 5px 0px;
 
-    border-color: #2c87c8;
+        .van-search__content {
+          background-color: #fff;
+          padding: 10px;
+        }
 
-    .van-tab--active {
-      color: #fff;
-      background-color: #2c87c8;
+        .van-cell__value {
+          height: auto;
+        }
+      }
     }
-
   }
 
-  .register {
-    background-color: #2c87c8;
-    border-radius: 17px;
-    height: 34px;
-    width: 220px;
-    margin-top: 60px;
-    font-size: 15px;
-    font-family: PingFangSC-Medium;
-  }
+	.register {
+		background-color: #2c87c8;
+		border-radius: 17px;
+		height: 34px;
+		width: 220px;
+		margin-top: 30px;
+		font-size: 15px;
+		font-family: PingFangSC-Medium;
+	}
 }

+ 15 - 6
src/views/accountPer/add.vue

@@ -20,11 +20,19 @@
           :placeholder="$t('accountPer.phonePlaceholder')" :rules="[
             { required: true, message: $t('accountPer.phonePlaceholder') },
           ]" />
+        <van-field name="radio" label="类型" v-if="user.type === 0">
+          <template #input>
+            <van-radio-group v-model="type" direction="horizontal">
+              <van-radio name="1">公司人员</van-radio>
+              <van-radio name="4">营销经理</van-radio>
+            </van-radio-group>
+          </template>
+        </van-field>
         <van-field v-model="roleText" is-link readonly :label="$t('accountPer.roleLabel')"
-          :placeholder="$t('accountPer.rolePlaceholder')" @click="roleShow = true" />
+          :placeholder="$t('accountPer.rolePlaceholder')" @click="roleShow = true" :rules="[{ required: true, message: $t('accountPer.rolePlaceholder') }]"/>
         <div class="van-cell van-field">
           <div class="van-cell__title van-field__label">
-            <label id="van-field-4-label" for="van-field-4-input">{{ $t("accountPer.setUp") }}:</label>
+            <label id="van-field-4-label" for="van-field-4-input">{{ $t("accountPer.setUp") }}</label>
           </div>
           <div class="van-cell__value">
             <div class="van-field__body">
@@ -34,11 +42,10 @@
             </div>
           </div>
         </div>
-        <van-field colon :border="false" @click-input="busiEquipInpClk" readonly clearable
+        <van-field :border="false" @click-input="busiEquipInpClk" readonly clearable
           v-model="cofficentForm.equipmentNames" :label="$t('accountPer.manageMachinesLabel')"
-          :placeholder="$t('accountPer.manageMachinesPlaceholder')" :rules="[
-            { required: true, message: $t('accountPer.manageMachinesPlaceholder') },
-          ]">
+          :placeholder="$t('accountPer.manageMachinesPlaceholder')" >
+          <!-- :rules="[{ required: true, message: $t('accountPer.manageMachinesPlaceholder') }]" -->
           <template #right-icon>
             <div class="l-flex-RC">
               <van-icon v-if="cofficentForm.equipmentNames" @click="cofficentForm.equipmentNames = ''; equipmentIds = ''"
@@ -114,6 +121,7 @@ export default {
       password: "",
       name: "",
       phone: "",
+      type: user.type === 0 ? "1" : "",
       isEnabled: true,
       roleList: "",
       equipmentIds: "",
@@ -274,6 +282,7 @@ export default {
       kSelectPopEquipRef.value.selPopClose();
     };
     return {
+      user,
       pageTitle,
       roleShow,
       roleText,

+ 19 - 10
src/views/device/deviceOper.vue

@@ -69,6 +69,13 @@
         </div>
         <div class="operText">{{ $t("device.keepFresh") }}</div>
       </div>
+      <!-- 雪糕机解冻模式 -->
+      <div v-if="device.machineType == '2'" class="operItem" @click="updateWorkingMode(3)">
+        <div class="operIcon">
+          <img class="operImg" src="../../assets/device/operIcon/thaw.png" />
+        </div>
+        <div class="operText">{{ $t("device.thaw") }}</div>
+      </div>
       <!--     <div class="operItem" @click="openDoorFun()">
               <div class="operIcon">
                 <img
@@ -249,7 +256,8 @@ import { onMounted, ref } from "vue";
 import {
   setFurnace,
   sleepEquipment,
-  openDoor,
+  // openDoor,
+  Api_openDoor,
   deviceTuoji,
   delOneDevice,
   enableMaterial,
@@ -294,7 +302,7 @@ export default {
         query: { deviceId: device.value.id, name: device.value.name, clientId: device.value.clientId, cleanFunction: device.value.cleanFunction },
       });
     };
-    
+
     // 点击远程退币
     const returnCoinClk = () => {
       router.push({
@@ -371,13 +379,13 @@ export default {
           operCheckShow.value = true;
         }; */
     const openDoorFun = () => {
-      // if (device.value.machineType === '1' || device.value.equimentType === 'MG280') {
-      //   operType.value = 4;
-      //   operCheckShow.value = true;
-      // } else {
-      //   router.push({ path: "openDoor", query: { deviceId: device.value.id } });
-      // }
-      router.push({ path: "openDoor", query: { deviceId: device.value.id, machineType: device.value.machineType } });
+      if (device.value.machineType === '2') {
+        operType.value = 4;
+        operCheckShow.value = true;
+      } else {
+        // router.push({ path: "openDoor", query: { deviceId: device.value.id } });
+        router.push({ path: "openDoor", query: { deviceId: device.value.id, machineType: device.value.machineType } });
+      }
     };
     // 日志功能
     const viewLogs = () => {
@@ -518,7 +526,8 @@ export default {
       }
       // 远程开门
       if (operType.value === 4) {
-        const { data } = await openDoor({ equipmentId: device.value.id });
+        // const { data } = await openDoor({ equipmentId: device.value.id });
+        const { data } = await Api_openDoor({ equipmentId: device.value.id, type: 0, status: 1 });
         if (data.code) {
           showSuccessToast(t("device.remoteDoorOpeningSucceeded"));
           operCheckShow.value = false;

+ 2 - 2
src/views/home/index.vue

@@ -235,8 +235,7 @@ export default {
     const getStatisticsFun = async () => {
       const params = {
         ...dateSelect.value,
-        // ...typeSelectData,
-        adminId: user.id,
+        adminId: typeSelectData.adminId === null ? user.id : typeSelectData.adminId,
         ifForeign: typeSelectData.ifForeign === '' ? user.ifForeign : typeSelectData.ifForeign,
         payType: typeSelectData.payType,
         clientId: typeSelectData.clientId,
@@ -412,6 +411,7 @@ export default {
       typeSelectData = {
         userName: user.username,
         clientId: null,
+        adminId: null,
       };
       getStatisticsFun();
       // 获取首页公告

+ 6 - 1
src/views/orderCenter/index.vue

@@ -592,6 +592,11 @@ export default {
     let chartType = "day";
     // 获取订单列表数据
     const getList = async () => {
+      if (user.type === 4 && user.username === searchParams.userName) {
+        loading.value = false;
+        finished.value = true;
+        return;
+      }
       finished.value = false;
       getStatisticsFun();
       // 因为订单的时间格式不一样
@@ -878,7 +883,7 @@ export default {
     const getStatisticsFun = async () => {
       // console.log('searchParams', searchParams)
       const params = {
-        adminId: user.id,
+        adminId: searchParams.adminId === null ? user.id : searchParams.adminId,
         chartType: chartType,
         endDate: searchParams.endDate,
         ifForeign: searchParams.ifForeign == '' ? user.ifForeign : searchParams.ifForeign,

+ 16 - 9
src/views/orderCenter/orderSearch.vue

@@ -38,12 +38,12 @@
       </div>
     </van-popup>
     <van-popup v-model:show="startDateShow" position="bottom">
-      <van-date-picker :title="$t('orderCenter.selectFullTime')" @confirm="startDateConFirm($event)"
-        @cancel="startDateCancel()" :min-date="minDate" :max-date="maxDate" />
+      <van-date-picker v-model="startDateValue" :title="$t('orderCenter.selectFullTime')"
+        @confirm="startDateConFirm($event)" @cancel="startDateCancel()" :min-date="minDate" :max-date="maxDate" />
     </van-popup>
     <van-popup v-model:show="endDateShow" position="bottom">
-      <van-date-picker :title="$t('orderCenter.selectFullTime')" @confirm="endDateConFirm($event)"
-        @cancel="endDateCancel()" :min-date="minDate" :max-date="maxDate" />
+      <van-date-picker v-model="endDateValue" :title="$t('orderCenter.selectFullTime')"
+        @confirm="endDateConFirm($event)" @cancel="endDateCancel()" :min-date="minDate" :max-date="maxDate" />
     </van-popup>
   </div>
 </template>
@@ -62,6 +62,16 @@ export default {
     const endDateShow = ref(false);
     const minDate = new Date(2022, 1, 1);
     const maxDate = new Date();
+    // 创建一个Date对象,表示当前时间
+    const dateTime = new Date();
+    // 获取当前时间的年份
+    const currentYear = dateTime.getFullYear();
+    // 获取当前时间的月份(注意,月份是从0开始的,所以要加1)
+    const currentMonth = dateTime.getMonth() + 1;
+    // 获取当前时间的日期
+    const currentDate = dateTime.getDate();
+    const startDateValue = ref([currentYear, currentMonth, currentDate])
+    const endDateValue = ref([currentYear, currentMonth, currentDate])
 
     const userName = ref(''); // 用户名
     const sn = ref(''); // 订单编号
@@ -99,13 +109,8 @@ export default {
     const onSubmit = () => {
       console.log('startTime.value', startTime.value)
       if (userName.value == '' && sn.value == '' && trxNo.value == '' && clientId.value == '' && startTime.value == '' && endTime.value == '') {
-        // if (startTime.value != '' || endTime.value != '') {
-        //   Toast("请输入正确时间");
-        //   return;
-        // } else {
         showToast(t('orderCenter.searchCriteria'));
         return;
-        // }
       }
       if (clientId.value != '' || userName.value != '') {
         if (startTime.value == '' || endTime.value == '') {
@@ -158,6 +163,8 @@ export default {
       startTime,
       endTime,
       maxDate,
+      startDateValue,
+      endDateValue
     };
   },
   components: {},

+ 43 - 28
src/views/orderExport/index.vue

@@ -69,9 +69,9 @@
               </div>
               <span class="info9">{{ $t("orderExport.address") }}:{{ item.address }}</span>
               <div class="mod11 flex-col">
-                <span v-if="type == 2" class="txt5">{{ item.equipmentTotal }}{{ $t("orderExport.machines") }},{{
-                  $t("orderExport.superior")
-                }}:{{ item.lastUsername }}</span>
+                <span v-if="packetType == '0'" class="txt5">{{ item.equipmentTotal }}{{ $t("orderExport.machines") }}
+                <!-- ,{{$t("orderExport.superior")}}:{{ item.lastUsername }} -->
+                </span>
                 <div v-else class="txt5 l-flex-RC">
                   <div>{{ item.equipmentType }}</div>
                   <div class="lineCon o-mlr-6"></div>
@@ -90,9 +90,9 @@
       :isCloseForCancel="false" @cancelclk="cancelClk">
       <template #content>
         <div class="cust_vantBorder">
-          <van-field clearable v-model="searchForm.orderNo" :placeholder="$t('orderExport.searchPop.orderNoPlace')"
+          <van-field v-if="packetType == '1'" clearable v-model="searchForm.orderNo" :placeholder="$t('orderExport.searchPop.orderNoPlace')"
             :label="$t('orderExport.searchPop.orderNo')" />
-          <van-field clearable v-model="searchForm.busiName" :placeholder="$t('orderExport.searchPop.busiNamePlace')"
+            <van-field v-if="packetType == '0'" clearable v-model="searchForm.busiName" :placeholder="$t('orderExport.searchPop.busiNamePlace')"
             :label="$t('orderExport.searchPop.busiName')" />
           <van-field @click-input="changeTypeInpClk" readonly clearable v-model="searchForm.ifForeignName"
             :placeholder="$t('orderExport.searchPop.mainOverPlace')" :label="$t('orderExport.searchPop.mainOver')">
@@ -134,11 +134,11 @@
   </div>
 </template>
 <script>
-import { getOrderList, Api_getOrderExport } from "@/service/orderExport";
+import { getOrderAnalysis, Api_getOrderAnalysisExport } from "@/service/orderExport";
 import { onMounted, reactive, toRefs, ref } from "vue";
 import sHeader from "@/components/SimpleHeader";
 import { getLoginUser, $M_ExportFile } from "@/common/js/utils";
-import dateSelectList from "@/components/dateSelectList";
+import dateSelectList from "@/components/dateOrderList";
 import dateUtil from "@/utils/dateUtil";
 import kTabs from "@/components/commom/kTabs/index.vue";
 import { useI18n } from "vue-i18n";
@@ -208,7 +208,7 @@ export default {
         current: pageNo.value,
         size: pageSize.value,
       };
-      const { data } = await getOrderList(Object.assign(param, searchParams));
+      const { data } = await getOrderAnalysis(Object.assign(param, searchParams));
       if (data.code === "00000") {
         if (data.data.total === 0) {
           finished.value = true;
@@ -290,12 +290,10 @@ export default {
     // 点击导出按钮
     const exportOrder = async () => {
       const param = {
-        current: pageNo.value,
-        size: pageSize.value,
+        current: 1,
+        size: 50,
       };
-      const { headers, data } = await Api_getOrderExport(Object.assign(param, searchParams));
-      // console.log('headers', headers)
-      // console.log('data', data)
+      const { headers, data } = await Api_getOrderAnalysisExport(Object.assign(param, searchParams));
       $M_ExportFile(data, headers);
     };
     // 筛选弹窗的元素
@@ -365,23 +363,25 @@ export default {
       pageSize.value = 10;
       // ruleData.tableData = [];
       tableData.value = [];
-      if (e == 1) {
-        searchParams.type = 1;
+      if (e == 0) {
+        searchParams.packetType = "0";
       } else {
-        searchParams.type = 2;
+        searchParams.packetType = "1";
       }
       getList();
     };
     let searchParams = reactive({
-      type: "2", // 分组类型
+      type: user.type, // 商户类型
       clientId: "", // 设备编号
       username: "",
       userName: "",
       startDate: "",
       endDate: "",
       ifForeign: '0',
-      adminId: user.id,
-      companyType: "",
+      adminId: user.type == 4 ? user.id : "",
+      companyType: "1",
+      dateType: "2",
+      packetType: "0", // 分组类型
     });
     // 搜索点击
     const searchClick = () => {
@@ -389,21 +389,36 @@ export default {
     };
     // 今日、明日、本周、本月、其他时间选择回调
     const update = (uDate) => {
-      // console.log("日期修改")
       pageNo.value = 1;
       pageSize.value = 10;
       // ruleData.tableData = [];
       tableData.value = [];
       searchParams = Object.assign(searchParams, uDate);
-      searchParams.startDate = dateUtil.formateDate(
-        new Date(searchParams.startDate),
-        "yyyy-MM-dd hh:mm:ss"
-      );
-      searchParams.endDate = dateUtil.formateDate(
-        new Date(searchParams.endDate),
-        "yyyy-MM-dd hh:mm:ss"
-      );
+      if (searchParams.dateType === "2") {
+        // 按日、周统计
+        searchParams.startDate = dateUtil.formateDate(
+          new Date(searchParams.startDate),
+          "yyyy-MM-dd hh:mm:ss"
+        );
+        searchParams.endDate = dateUtil.formateDate(
+          new Date(searchParams.endDate),
+          "yyyy-MM-dd hh:mm:ss"
+        );
+      } else if (searchParams.dateType === "0") {
+        // 按月统计
+        searchParams.startDate = dateUtil.formateDate(
+          new Date(searchParams.startDate),
+          "yyyy-MM"
+        );
+      } else if (searchParams.dateType === "1") {
+        // 按年统计
+        searchParams.startDate = dateUtil.formateDate(
+          new Date(searchParams.startDate),
+          "yyyy"
+        );
+      }
       getList();
+      console.log("searchParams的值是 >>>", searchParams);
       // onRefresh(1);
     };
 

+ 133 - 26
src/views/register.vue

@@ -35,6 +35,28 @@
             </van-radio-group>
           </div>
         </div>
+        <!-- 国家城市 -->
+        <van-field v-model="areaValue" v-if="ifForeign === '0'" readonly name="picker" :label="$t('register.areaLabel')"
+          :placeholder="$t('register.areaPlaceholder')" @click="showArea = true"
+          :rules="[{ required: true, message: $t('register.areaRequired') }]" />
+        <van-popup v-model:show="showArea" position="bottom">
+          <van-cascader :title="$t('register.areaRequired')" :options="areaOptions" @close="showArea = false" active-color="#2c87c8"
+            @finish="onConfirmArea" />
+        </van-popup>
+
+        <van-field v-model="cityValue" v-if="ifForeign === '1'" readonly name="picker"
+          :label="$t('register.countryCity')" :placeholder="$t('register.clickCountryCity')" @click="showCountry = true"
+          :rules="[{ required: true, message: $t('register.chooseCountryCity') }]" />
+        <van-popup v-model:show="showCountry" round position="bottom">
+          <van-cascader :title="$t('register.chooseCountryCity')" :options="countryOptions" @close="showCountry = false" active-color="#2c87c8"
+            @finish="onConfirmCountry">
+            <template #options-top="{ tabIndex }">
+              <van-search v-if="tabIndex === 0" v-model="searchValue" class="searchCity"
+                :placeholder="$t('kSelectPop.searchKey')" @update:model-value="valueChange(tabIndex)" />
+            </template>
+          </van-cascader>
+        </van-popup>
+        <br>
         <!-- 中国 -->
         <div v-if="ifForeign === '0'">
           <div class="van-cell van-field">
@@ -107,10 +129,13 @@
             </template>
           </van-field>
         </div>
+        <br>
+        <van-field v-model="inviteCode" name="inviteCode" :label="$t('register.invitationCode')"
+          :placeholder="$t('register.invitationCodePlaceholder')" />
         <!-- 提交验证信息 -->
         <van-button round type="primary" class="register" native-type="submit">{{
-        $t('register.registerButton')
-      }}
+          $t('register.registerButton')
+          }}
         </van-button>
       </van-form>
     </div>
@@ -126,11 +151,15 @@ import logiLogoImgUrl from "@/assets/login/logo.png";
 import { useRouter } from 'vue-router';
 import { getLocal, setLocal, styleUrl } from '@/common/js/utils';
 import { useI18n } from "vue-i18n";
+import { countriesData } from '@/common/js/countries';
+import { countriesDataEn } from '@/common/js/countries-en';
+import { useCascaderAreaData } from '@vant/area-data';
 
 
 export default {
   setup() {
     // 引入语言
+    let languageName = ref(getLocal("curLang"));
     const { t } = useI18n();
     const active = ref(0);
     const username = ref('');
@@ -142,6 +171,7 @@ export default {
     const phone = ref('');
     const email = ref('');
     const code = ref('');
+    const inviteCode = ref('');
     const verifyRef = ref(null);
     const verCodeTime = reactive({
       time: 0
@@ -152,6 +182,31 @@ export default {
     const router = useRouter();
     const reqApi = ref(false);
 
+    const citiesValue = ref('');
+    const showCountry = ref(false);
+    const cityValue = ref('');
+    const countryOptions = ref(languageName.value == 'zh' ? countriesData : countriesDataEn);
+
+    const onConfirmCountry = ({ selectedOptions }) => {
+      cityValue.value = selectedOptions.map((option) => option.text).join('/');
+      citiesValue.value = selectedOptions[1]?.value;
+      showCountry.value = false;
+    };
+
+    const areaOptions = ref();
+    const areaValue = ref('');
+    const showArea = ref(false);
+    const onConfirmArea = ({ selectedOptions }) => {
+      if (selectedOptions[0]?.text == selectedOptions[1]?.text) {
+        areaValue.value = selectedOptions[0]?.text;
+        citiesValue.value = selectedOptions[0]?.text;
+      } else {
+        areaValue.value = selectedOptions[0]?.text + "/" + selectedOptions[1]?.text;
+        citiesValue.value = selectedOptions[0]?.text + selectedOptions[1]?.text;
+      }
+      showArea.value = false;
+    };
+
     // 注册点击
     const registerSubmit = async () => {
       if (password.value !== passwordCheck.value) {
@@ -163,18 +218,34 @@ export default {
         name: name.value,
         password: md5(password.value),
         ifForeign: ifForeign.value,
-        // phone: phone.value,
-        // email: email.value,
         phoneOrEmail: phone.value || email.value,
         code: code.value,
-        companyType: '1'
+        companyType: '1',
+        inviteCode: inviteCode.value,
+        cities: citiesValue.value
       });
 
       if (data.code === '00000') {
-        showToast('注册成功');
+        showToast(t('register.registerSucess'));
         router.push({ path: '/login' });
+      } else if (data.code === 'R0001') {
+        showFailToast(t('register.R0001'));
+      } else if (data.code === 'R0002') {
+        showFailToast(t('register.R0002'));
+      } else if (data.code === 'R0003') {
+        showFailToast(t('register.R0003'));
+      } else if (data.code === 'R0004') {
+        showFailToast(t('register.R0004'));
+      } else if (data.code === 'R0005') {
+        showFailToast(t('register.R0005'));
+      } else if (data.code === 'R0006') {
+        showFailToast(t('register.R0006'));
+      } else if (data.code === 'A0201') {
+        showFailToast(t('register.A0201'));
+      } else if (data.code === 'A0203') {
+        showFailToast(t('register.A0203'));
       } else {
-        showFailToast(data.message);
+        showFailToast(t('register.registerFail'));
       }
     };
 
@@ -195,14 +266,23 @@ export default {
           phoneOrEmail: phoneOrEmailStr,
           hostName: 'SevenCloud',
         });
+        reqApi.value = false;
         if (data.code === '00000') {
-          reqApi.value = false;
           showToast(data.data);
           verCodeTime.time = 1 * 60; // 1分钟定时器,60s后可以更换验证方式
           verCodeTimeInterval();
+        } else if (data.code === 'R0009') {
+          showToast(t('register.R0009'));
+        } else if (data.code === 'R0008') {
+          showToast(t('register.R0008'));
+        } else if (data.code === 'A0202') {
+          showToast(t('register.A0202'));
+        } else if (data.code === 'A0207') {
+          showToast(t('register.A0207'));
+        } else if (data.code === 'R0004') {
+          showToast(t('register.R0004'));
         } else {
-          reqApi.value = false;
-          showFailToast(data.message);
+          showToast(data.message);
         }
       } catch (error) {
         reqApi.value = false;
@@ -231,27 +311,42 @@ export default {
       } else {
         verCodeTime.time = 0;
       }
+      const areaData = useCascaderAreaData();
+      areaData.forEach(province => {
+        province.children.forEach(city => {
+          // 删除城市中的区级信息
+          delete city.children;
+        });
+      });
+      // 删除台湾、澳门和香港
+      const provincesToRemove = ['710000', '810000', '820000'];
+      areaOptions.value = areaData.filter(province => !provincesToRemove.includes(province.value));
     });
 
     const signOptions = [
       { text: '手机注册', value: "mo" },
       { text: '邮箱注册', value: "ema" }
     ]
-    const option1 = [
-      {
-        text: 'aaaa', value: 0,
-
-      },
-      {
-        text: 'ccc', value: 1
-      }
-    ]
-
-    const option2 = [
-      {
-        text: 'bbb', value: 'b'
+    // 搜索关键词
+    const searchValue = ref('');
+    const countryData = ref(languageName.value == 'zh' ? countriesData : countriesDataEn);
+    // 搜索数据
+    const valueChange = (index) => {
+      let tempOptions = [];
+      if (searchValue.value) {
+        if (index === 0) {
+          // 国家
+          countryData.value.forEach(item => {
+            if (item.text.includes(searchValue.value)) {
+              tempOptions.push(item);
+            }
+          });
+          countryOptions.value = tempOptions;
+        }
+      } else {
+        countryOptions.value = countryData.value;
       }
-    ]
+    };
 
     return {
       ...toRefs(verCodeTime),
@@ -264,18 +359,30 @@ export default {
       phone,
       email,
       code,
+      inviteCode,
       verifyRef,
       verCodeTime,
       verCodeTimeInterval,
       seedVerCode,
       registerSubmit,
-      option1,
-      option2,
       signOptions,
       signinModel: 'aaabb',
       active,
       logonMode,
       reqApi,
+
+      cityValue,
+      showCountry,
+      countryOptions,
+      onConfirmCountry,
+      showArea,
+      areaOptions,
+      // areaList,
+      onConfirmArea,
+      areaValue,
+
+      searchValue,
+      valueChange
     }
   },
   components: { sHeader }

+ 3 - 0
src/views/role/add.vue

@@ -124,6 +124,9 @@ export default {
       }
 
       for (const key in $M_Menus) {
+        if (key === "M21") {
+          continue;
+        }
         menuCodeList.value.push({
           label: $M_Menus[key],
           value: key

+ 188 - 63
src/views/user.vue

@@ -25,20 +25,18 @@
         </div>
         <div class="userInfoBox">
           <!-- 地区 -->
-          <div v-if="isInland && user.type != '0'">
+          <div v-if="user.type == '2'">
             <div v-if="!areaShow" class="userInfo l-flex-between">
               <span class="userInfoLeft">{{ $t("user.region") }}: </span>
               <div class="cust_vantBorder">
                 <div class="filedInpPad">
-                  <van-field @click-input="fieldValueInpClk" readonly clearable v-model="fieldValue"
+                  <van-field @click-input="clickShowArea" readonly clearable v-model="fieldValue"
                     :placeholder="$t('user.regionPlace')">
                     <template #right-icon>
                       <div class="l-flex-RC">
-                        <van-icon v-if="fieldValue" @click="
-        fieldValue = '';
-      accountDetail.areaId = '';
+                        <van-icon v-if="fieldValue" @click="fieldValue = ''; accountDetail.areaId = '';
       " class="o-mr-6" name="clear" />
-                        <van-icon @click="fieldValueInpClk" name="arrow-down" />
+                        <van-icon @click="clickShowArea" name="arrow-down" />
                       </div>
                     </template>
                   </van-field>
@@ -174,7 +172,7 @@
             </div>
           </div>
           <!-- 设备上下线提醒 -->
-          <div v-if="isInWeChat && user.type == '2'" class="userInfo l-flex-RC">
+          <div v-if="(isInWeChat || user.ifForeign === '1') && user.type == '2'" class="userInfo l-flex-RC">
             <span class="userInfoLeft l-flex-RC">{{ $t("user.onOffNotice") }}: </span>
             <div class="cust_vantBorder">
               <van-switch :model-value="onOffNotice" active-color="#0090fa" style="font-size: 18px;"
@@ -255,17 +253,32 @@
       @confirmclk="confirmClk">
     </kDialog>
     <!-- 地区弹窗 -->
-    <kCascader @getareaname="getAreaName" :selectId="accountDetail.areaId" @areapopfinish="areaPopFinish"
-      ref="kCascaderRef"></kCascader>
+    <!-- <kCascader @getareaname="getAreaName" :selectId="accountDetail.areaId" @areapopfinish="areaPopFinish"
+      ref="kCascaderRef"></kCascader> -->
     <!-- 时区弹窗 -->
     <kTimezone @gettimezone="getTimezone" :selectId="accountDetail.timezone" @timezonepopfinish="timezonePopFinish"
       ref="kTimezoneRef"></kTimezone>
+    <!-- 省市选择弹窗 -->
+    <van-popup v-model:show="showArea" position="bottom">
+      <van-cascader :title="$t('register.areaRequired')" :options="areaOptions" @close="showArea = false"
+        @finish="onConfirmArea" />
+    </van-popup>
+    <!-- 国家选择弹窗 -->
+    <van-popup v-model:show="showCountry" round position="bottom">
+      <van-cascader :title="$t('register.chooseCountryCity')" :options="countryOptions" @close="showCountry = false"
+        @finish="onConfirmCountry">
+        <template #options-top="{ tabIndex }">
+          <van-search v-if="tabIndex === 0" v-model="searchValue" class="searchCity"
+            :placeholder="$t('kSelectPop.searchKey')" @update:model-value="valueChange(tabIndex)" />
+        </template>
+      </van-cascader>
+    </van-popup>
   </div>
 </template>
 
 <script>
 // 导入地区弹窗
-import kCascader from "@/components/commom/kCascader/index.vue";
+// import kCascader from "@/components/commom/kCascader/index.vue";
 // 导入时区弹窗
 import kTimezone from "@/components/commom/kTimezone/index.vue";
 // 导入接口
@@ -276,19 +289,24 @@ import kDialog from "@/components/commom/kDialog/index.vue";
 import { onMounted, reactive, ref } from "vue";
 import sHeader from "@/components/SimpleHeader";
 import {
+  getLocal,
   getLoginUser,
   $M_EmailAvailable,
   $M_PhoneTest,
 } from "@/common/js/utils";
 import { useRouter } from "vue-router";
-import { tAdminGetRelation, updatePayPlatform, updateOrderNotice, updateOnOffNotice } from "@/service/user";
+import { tAdminGetRelation, updatePayPlatform, updateOrderNotice, updateOnOffNotice, getAreaById, updateArea, getCitiesById } from "@/service/user";
 import { showFailToast, showToast, showSuccessToast, showConfirmDialog } from 'vant';
 import { useI18n } from "vue-i18n";
 import { styleUrl } from "../common/js/utils";
+import { countriesData } from '@/common/js/countries';
+import { countriesDataEn } from '@/common/js/countries-en';
+import { useCascaderAreaData } from '@vant/area-data';
 
 export default {
-  components: { sHeader, kDialog, kCascader, kTimezone },
+  components: { sHeader, kDialog, kTimezone },
   setup() {
+    let languageName = ref(getLocal("curLang"));
     // 引入语言
     const { t } = useI18n();
     // 账户信息
@@ -311,6 +329,21 @@ export default {
     const orderNotice = ref(false);
     // 设备上/离线通知开关状态
     const onOffNotice = ref(false);
+    // 弹窗省市
+    const showArea = ref(false);
+    const areaOptions = ref();
+    // 弹窗国家
+    const showCountry = ref(false);
+    const countryOptions = ref(languageName.value == 'zh' ? countriesData : countriesDataEn);
+
+    // 弹窗控制
+    const clickShowArea = () => {
+      if (user.ifForeign == 0) {
+        showArea.value = true;
+      } else {
+        showCountry.value = true;
+      }
+    }
 
     const sunzeePay = ref(false);
     const sevencloudPay = ref(false);
@@ -397,23 +430,6 @@ 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 2:
           if (!e) {
             showToast(t("user.mailboxPlace"));
@@ -477,18 +493,27 @@ export default {
           break;
       }
     };
+    // 地区ID
+    const areaId = ref(null);
     // 获取账户详情
-    const getAcccountDetail = () => {
+    const getAcccountDetail = async () => {
       getAdmin({ id: user.id }).then((res) => {
         accountDetail.value = res.data.data;
-        // 查询地址回显
+        if (accountDetail.value.areaId != null && accountDetail.value.type == 2) {
+          areaId.value = accountDetail.value.areaId;
+          // 查询地址回显
+          if (accountDetail.value.ifForeign == "0") {
+            getArea();
+          } else {
+            getCities();
+          }
+        }
         if (accountDetail.value.orderNotice == "1") {
           orderNotice.value = true;
         }
         if (accountDetail.value.onOffNotice == "1") {
           onOffNotice.value = true;
         }
-        kCascaderRef.value.init(accountDetail.value.areaId);
         // 查询时区回显
         kTimezoneRef.value.init(accountDetail.value.timeZone)
       });
@@ -500,7 +525,6 @@ export default {
         if (res.data.data.payPlatform == '1') {
           sunzeePay.value = true;
         }
-        console.log("sunzeePay", sunzeePay.value)
       });
     };
     // 获取七云支付平台
@@ -510,7 +534,6 @@ export default {
         if (res.data.data.payPlatform == '1') {
           sevencloudPay.value = true;
         }
-        console.log("sevencloudPay", sevencloudPay.value)
       });
     };
     // 退出登录弹窗
@@ -545,8 +568,6 @@ export default {
         title: t('user.tips'),
         message: t('user.changeTips'),
       }).then(() => {
-        // checked.value = newValue;
-        console.log(value);
         params.id = 2738;
         if (value) {
           params.payPlatform = '1';
@@ -570,8 +591,6 @@ export default {
         title: t('user.tips'),
         message: t('user.changeTips'),
       }).then(() => {
-        // checked.value = newValue;
-        console.log(value);
         params.id = 2739;
         if (value) {
           params.payPlatform = '1';
@@ -657,6 +676,18 @@ export default {
         getSunzeeDetail();
         getSevenCloudDetail();
       }
+      // 省市选择器
+      const areaData = useCascaderAreaData();
+      areaData.forEach(province => {
+        province.children.forEach(city => {
+          // 删除城市中的区级信息
+          delete city.children;
+        });
+      });
+      // 删除台湾、澳门和香港
+      const provincesToRemove = ['710000', '810000', '820000'];
+      areaOptions.value = areaData.filter(province => !provincesToRemove.includes(province.value));
+
     });
     const gettAdminGetRelation = async () => {
       const { data } = await tAdminGetRelation({
@@ -711,30 +742,100 @@ export default {
         return menuList.length > 0;
       }
     };
+    // 获取地区
+    const fullName = ref("");
+    const name = ref("");
+    // 国内省市
+    const getArea = async () => {
+      const { data } = await getAreaById({
+        areaId: areaId.value,
+      });
+      if (data.code === "00000") {
+        fullName.value = data.data.fullName;
+        name.value = data.data.name;
+        if (fullName.value != name.value) {
+          fullName.value = fullName.value.replace(name.value, "").trim();
+          fullName.value = fullName.value + "/" + name.value;
+        }
+        fieldValue.value = fullName.value;
+      }
+    };
+    const countryValue = ref("");
+    const cityValue = ref("");
+    // 国外城市
+    const getCities = async () => {
+      const { data } = await getCitiesById({
+        areaId: areaId.value,
+      });
+      if (data.data != "") {
+        const citiesCode = data.data.split('/')[0];
+        const countriesCode = data.data.split('/')[1];
+        countryOptions.value.find(item => {
+          if (item.value === countriesCode) {
+            countryValue.value = item.text;
+            item.children.find(item => {
+              if (item.value === citiesCode) {
+                cityValue.value = item.text;
+              }
+            });
+          }
+        });
+        if (countryValue.value == cityValue.value) {
+          fieldValue.value = cityValue.value;
+        } else {
+          fieldValue.value = countryValue.value + "/" + cityValue.value;
+        }
+      }
+    };
     // 地区弹窗
     const fieldValue = ref("");
-    const kCascaderRef = ref(null);
-    // 点击地区输入框
-    const fieldValueInpClk = () => {
-      kCascaderRef.value.openPop();
-    };
-    // 选择地区完成
-    const areaPopFinish = async (e) => {
-      console.log("e", e);
-      fieldValue.value = e.selectName;
-      accountDetail.value.areaId = e.selectId;
+    // 地区参数值
+    const areaValue = ref('');
+    const onConfirmArea = async ({ selectedOptions }) => {
+      if (selectedOptions[0]?.text == selectedOptions[1]?.text) {
+        fieldValue.value = selectedOptions[0]?.text;
+        if (user.ifForeign === "1") {
+          areaValue.value = selectedOptions[1]?.value;
+        } else {
+          areaValue.value = selectedOptions[0]?.text;
+        }
+      } else {
+        fieldValue.value = selectedOptions[0]?.text + "/" + selectedOptions[1]?.text;
+        if (user.ifForeign === "1") {
+          areaValue.value = selectedOptions[1]?.value;
+        } else {
+          areaValue.value = selectedOptions[0]?.text + selectedOptions[1]?.text;
+        }
+      }
       const params = {
-        id: user.id,
-        areaId: e.selectId,
+        adminId: user.id,
+        areaValue: areaValue.value,
       };
-      const { data } = await updateAdmin(params);
+      const { data } = await updateArea(params);
+      if (data.code === "00000") {
+        getAcccountDetail();
+      }
+
+      showArea.value = false;
       areaShow.value = true;
+    };
+    const onConfirmCountry = async ({ selectedOptions }) => {
+      if (selectedOptions[0]?.text == selectedOptions[1]?.text) {
+        fieldValue.value = selectedOptions[1]?.text;
+      } else {
+        fieldValue.value = selectedOptions.map((option) => option.text).join('/');
+      }
+      areaValue.value = selectedOptions[1]?.value;
+      const params = {
+        adminId: user.id,
+        areaValue: areaValue.value,
+      };
+      const { data } = await updateArea(params);
       if (data.code === "00000") {
-        showToast(data.message);
-        setTimeout(() => {
-          getAcccountDetail();
-        }, 500);
+        getAcccountDetail();
       }
+      showCountry.value = false;
+      areaShow.value = true;
     };
     // 时区弹窗
     const tzFieldValue = ref("");
@@ -803,14 +904,32 @@ export default {
       checkIsAbroad();
       haveRelationCheck();
     })
-    // 获取回显的值
-    const getAreaName = (e) => {
-      fieldValue.value = e;
-    };
     // 获取时区回显的值
     const getTimezone = (e) => {
       tzFieldValue.value = e;
     };
+
+    
+    // 搜索关键词
+    const searchValue = ref('');
+    const countryData = ref(languageName.value == 'zh' ? countriesData : countriesDataEn);
+    // 搜索数据
+    const valueChange = (index) => {
+      let tempOptions = [];
+      if (searchValue.value) {
+        if (index === 0) {
+          // 国家
+          countryData.value.forEach(item => {
+            if (item.text.includes(searchValue.value)) {
+              tempOptions.push(item);
+            }
+          });
+          countryOptions.value = tempOptions;
+        }
+      } else {
+        countryOptions.value = countryData.value;
+      }
+    };
     return {
       user,
       operUnipay,
@@ -833,15 +952,11 @@ export default {
       accountDetail,
       fieldValue,
       tzFieldValue,
-      kCascaderRef,
       kTimezoneRef,
-      fieldValueInpClk,
       tzFieldValueInpClk,
-      areaPopFinish,
       timezonePopFinish,
       timezoneShowPicker,
       isInWeChat,
-      getAreaName,
       getTimezone,
       isAbroad,
       haveRelation,
@@ -859,6 +974,16 @@ export default {
       onOffNotice,
       changeOnOffNotice,
       timezoneOnConfirm,
+      clickShowArea,
+      showArea,
+      areaOptions,
+      onConfirmArea,
+      showCountry,
+      countryOptions,
+      onConfirmCountry,
+
+      searchValue,
+      valueChange
     };
   }
 };