Bläddra i källkod

feat:“同步2024.07.19“

soobin 1 år sedan
förälder
incheckning
5cc309b026

+ 8 - 0
src/App.vue

@@ -112,6 +112,14 @@ span,
 p {
   // color: #333333;
   font-family: "Arial", sans-serif;
+  font-size: 12px;
+
+  .van-dropdown-menu__title {
+    font-size: 13px;
+    color: #404d74;
+    width: 70px;
+    text-align: center;
+  }
 }
 
 html {

+ 14 - 4
src/assets/language/en.json

@@ -455,7 +455,6 @@
     "notSleeping": "Not sleeping",
     "lastRefreshTime": "Recent refresh time",
     "machineUniqueCode": "Machine Code",
-    "furnaceHeadTemperature": "Furnace head temperature",
     "stirringTemperature": "Temperature two",
     "cornGeneratorTemperature": "Temperature one",
     "cupQuantity": "Cup quantity",
@@ -464,8 +463,9 @@
     "outsideTm": "Outside temperature",
     "outsidehd": "Humidity outside cabinet",
     "noData": "No data available",
-    "temperatureInCabinet": "Temperature in cabinet",
-    "humidityInCabinet": "Humidity in cabinet",
+    "furnaceHeadTemperature": "Furnace temp",
+    "temperatureInCabinet": "Cabinet temp",
+    "humidityInCabinet": "Cabinet humidity",
     "showGoods": "Block or display goods",
     "editCheck": "Are you sure about the change?",
     "unknownError": "Unknown error!",
@@ -474,9 +474,10 @@
     "humidity": "%RH",
     "volume": "Volume",
     "alarmContent": "Alarm content",
+    "time": "Time",
     "alarmContentNoData": "Machine is normal, no alarm.",
     "alarmClock": "Machine alarm!",
-    "eliminateAlarm": "Eliminate",
+    "eliminateAlarm": "Clear",
     "editDevice": "Machine information",
     "seeMore": "See more",
     "stow": "Pack up",
@@ -658,6 +659,7 @@
     "theNumberOfDiscountCodesCannotExceed": "The number of discount codes cannot exceed 200",
     "theValidityPeriodCannotExceedMonths": "The validity period cannot exceed 3 months",
     "discountCannotBeGreaterThan": "Discount cannot be greater than 10",
+    "deductionRollNoZero": "The immediate reduction price cannot be zero",
     "successfulProductionOfDiscountCode": "Application successful",
     "applDiscCode": "Apply for discount code"
   },
@@ -928,6 +930,8 @@
     "orderNo": "Order No",
     "commodity": "commodity",
     "distribution": "Distribution",
+    "seeMore": " See more",
+    "stow": "Pack up",
     "state": "state",
     "paymentMethod": "Payment method",
     "creationTime": "Creation time",
@@ -1402,6 +1406,8 @@
     "corrPhonePlace": "Please enter the correct mobile number",
     "bindWechat": "Bind WeChat",
     "airwallex": "Airwallex",
+    "setTheTimezone": "Set timezone",
+    "setTheTimezonePlace": "Please select a timezone",
     "currencySymbol": "Currency",
     "currencySymbolPlace": "Please enter currency symbol",
     "szPayType": "Sunzee payment",
@@ -1484,6 +1490,10 @@
     "D476": "Humidification ON Time",
     "D477": "Humidification start delay",
     "D478": "Humidification stop delay",
+    "D482": "White candy",
+    "D483": "Red candy",
+    "D484": "Yellow candy",
+    "D485": "Blue candy",
     "M504": "Differential Adjustment",
     "D218": "Sugar Pick Location X Settings",
     "D228": "Stick position X setting",

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

@@ -480,9 +480,10 @@
         "humidity": "%RH",
         "volume": "ボリューム",
         "alarmContent": "アラーム内容",
+        "time": "時間",
         "alarmContentNoData": "マシンは正常、アラームはない",
         "alarmClock": "デバイスアラーム",
-        "eliminateAlarm": "アラームを消去",
+        "eliminateAlarm": "消去",
         "editDevice": "詳細情報",
         "seeMore": "もっと見る",
         "stow": "隠す",
@@ -665,6 +666,7 @@
         "theNumberOfDiscountCodesCannotExceed": "ディスカウントコードの数は200を超えてはなりません",
         "theValidityPeriodCannotExceedMonths": "有効期限は3ヶ月を超えてはいけません",
         "discountCannotBeGreaterThan": "割引は10を超えてはいけません",
+        "deductionRollNoZero": "割り引き価格は0にできません",
         "successfulProductionOfDiscountCode": "ディスカウントコードの申請に成功",
         "applDiscCode": "ディスカウントコードを申請"
     },
@@ -934,6 +936,8 @@
         "business": "ビジネス",
         "orderNo": "注文番号",
         "commodity": "商品",
+        "seeMore": " もっと見る",
+        "stow": " 隠す",
         "distribution": "分配状況",
         "state": "状態",
         "paymentMethod": "支払い方法",
@@ -1427,6 +1431,8 @@
         "syncOldData": "データ同期",
         "modifyLoc": "位置を修正する",
         "airwallex": "エアウォレックス",
+        "setTheTimezone": "タイムゾーンを設定する",
+        "setTheTimezonePlace": "タイムゾーンを選択してください",
         "currencySymbol": "カスタム通貨",
         "currencySymbolPlace": "カスタム通貨を入力してください",
         "szPayType": "申泽支払いプラットフォーム",
@@ -1509,6 +1515,10 @@
         "D476": "加湿ON時間",
         "D477": "加湿開始遅延",
         "D478": "加湿停止遅延",
+        "D482": "White candy",
+        "D483": "Red candy",
+        "D484": "Yellow candy",
+        "D485": "Blue candy",
         "M504": "ヒステリシス制御",
         "D218": "糖の位置X設定",
         "D228": "棒の位置X設定",

+ 40 - 4
src/assets/language/zh.json

@@ -38,6 +38,7 @@
     "weChatScanning": "微信主扫",
     "antiScanningOfAlipay": "支付宝反扫",
     "weChatBackScanning": "微信反扫",
+    "eCNYBackeScanning": "数字人民币反扫",
     "unpaid": "未支付",
     "paid": "已支付",
     "refunding": "退款中",
@@ -128,6 +129,10 @@
     "defaultDownload": "默认下载",
     "doNotDownloadByDefault": "不默认下载",
     "advertisingType": "广告类型",
+    "playTimeStatus": "机器状态",
+    "acquiesce": "默认",
+    "standby": "待机状态",
+    "work": "工作状态",
     "picture": "图片",
     "video": "视频",
     "pictureAddressLabel": "图片地址",
@@ -317,6 +322,7 @@
     "delete": "删除",
     "continueToAddDistributors": "继续添加分销人",
     "submitForApproval": "提交审批",
+    "cancelForApproval": "撤销审批",
     "timeSwitch": "定时开关",
     "addAlarmClock": "添加闹钟",
     "modify": "修改",
@@ -476,6 +482,7 @@
     "degree": "℃",
     "humidity": "%RH",
     "volume": "音量",
+    "time": "时间",
     "alarmContent": "报警内容",
     "alarmContentNoData": "机器正常,无报警",
     "alarmClock": "设备报警!",
@@ -650,7 +657,7 @@
     "days": "天",
     "type": "类型",
     "deductionRoll": "立减券",
-    "discount2": "折",
+    "discount2": "折扣券",
     "deductionPriceLabdel": "立减价格",
     "deductionPricePlaceholder": "请输入立减价格",
     "enterNumber": "输入数字",
@@ -662,12 +669,13 @@
     "theNumberOfDiscountCodesCannotExceed": "优惠码个数不能超过200",
     "theValidityPeriodCannotExceedMonths": "有效期不能超过3个月",
     "discountCannotBeGreaterThan": "折扣不能大于10",
+    "deductionRollNoZero": "立减价格不能为0",
     "successfulProductionOfDiscountCode": "申请成功",
     "applDiscCode": "申请优惠码"
   },
   "distributionSet": {
     "distributionSettings": "分销设置",
-    "total": "共 ",
+    "total": "共",
     "leftTitle": " 条分销设置",
     "rightAdd": "添加设备分销人",
     "equipName": "设备名称",
@@ -675,6 +683,11 @@
     "distProp": "分销比例",
     "applTime": "申请时间",
     "reviewed": "已审核",
+    "agree": "通过",
+    "rejected": "拒绝",
+    "cancel": "撤销",
+    "changeTips":"确认撤销此条分销申请吗?",
+    "cancelSuccess": "撤销成功",
     "apprPend": "待审批",
     "addDist": {
       "title": "添加分销人",
@@ -684,9 +697,11 @@
       "clientIdPlace": "请选择设备编码",
       "myDistProport": "我的分销比例",
       "distInof": "分销信息",
+      "pendingRecord": "待审批记录",
       "platDistRange": "平台分销比例范围为1-100",
-      "distPropRange": "分销比例范围为0-100",
+      "distPropRange": "分销比例范围为1-99",
       "noZero": "平台分销比例最低为1%",
+      "zeroDis": "分账人分销比例不能为0%",
       "notDelMore": "不能再删除了",
       "submitSuccess": "提交成功",
       "submitFailed": "提交失败",
@@ -863,6 +878,7 @@
     "merchantInformation": "商户信息",
     "essentialInformation": "基本信息",
     "withdrawalData": "提现资料",
+    "sqbConfig": "收钱吧配置",
     "region": "地区",
     "accountNumber": "账号",
     "relationAdmin": "关联上级",
@@ -911,6 +927,17 @@
     "modificationSucceeded": "修改成功",
     "joinpayMch": "汇聚账号状态",
     "huifuMch": "汇付账号状态",
+    "deviceId": "设备号",
+    "terminalSn": "终端号",
+    "check": "今日签到状态",
+    "checkIn": "已签到",
+    "checkOut": "未签到",
+    "activateCode": "激活码",
+    "activateCodePlaceholder": "请输入激活码",
+    "activate": "激活",
+    "isActivate": "确认激活?",
+    "activateSucceeded": "激活成功",
+    "activateFailed": "激活失败",
     "tips": "提醒",
     "autoLogin": "是否切换登陆?"
   },
@@ -935,6 +962,8 @@
     "orderNo": "订单编号",
     "commodity": "商品",
     "distribution": "分销情况",
+    "seeMore": " 展开",
+    "stow": " 收起",
     "state": "状态",
     "paymentMethod": "支付方式",
     "creationTime": "创建时间",
@@ -960,6 +989,7 @@
     "weChatScanning": "微信主扫",
     "antiScanningOfAlipay": "支付宝反扫",
     "weChatBackScanning": "微信反扫",
+    "eCNYBackeScanning": "数字人民币反扫",
     "refundSucceeded": "退款成功",
     "userNameLabel": "用户名",
     "userNamePlaceholder": "请输入用户名",
@@ -1205,7 +1235,7 @@
     "proportion": "比例",
     "fail": "不通过",
     "adopt": "通过",
-    "cancel": "取消",
+    "cancel": "撤销",
     "operationSucceeded": "操作成功",
     "taskMessage": "任务消息",
     "toViewAppro": "查看待审批的申请",
@@ -1425,6 +1455,8 @@
     "corrPhonePlace": "请输入正确的手机号",
     "bindWechat": "绑定微信",
     "airwallex": "空中云汇",
+    "setTheTimezone": "设置时区",
+    "setTheTimezonePlace": "请选择时区",
     "currencySymbol": "自定义货币",
     "currencySymbolPlace": "请输入自定义货币",
     "szPayType": "申泽支付平台",
@@ -1507,6 +1539,10 @@
     "D476": "加湿ON时间",
     "D477": "加湿启动延时",
     "D478": "加湿停止延时",
+    "D482": "白糖",
+    "D483": "红糖",
+    "D484": "黄糖",
+    "D485": "蓝糖",
     "M504": "回差调节",
     "D218": "取糖位置X设置",
     "D228": "取棍位置X设置",

+ 17 - 15
src/common/js/utils.js

@@ -11,26 +11,28 @@ import i18n from '../../utils/i18n';
 const t = i18n.global.t;
 // 菜单标识
 export const $M_Menus = {
-  "M1":t("role.deviceManagement"),//设备管理
-  "M2":t("role.deviceView"),//设备查看
-  // "M3":t("role.accountOperation"),//分销设置
-  "M3":t("role.accountOperation"),//账户操作
-  "M4":t("role.orderData"),//报警历史
-  "M5":t("role.advertisingManagement"),//广告管理
-  "M6":t("role.taskMessage"),//任务消息
-  "M7":t("role.discountCode"),//优惠码
+  "M1": t("role.deviceManagement"),//设备管理
+  // "M2":t("role.deviceView"),//设备查看
+  // "M3":t("role.distributionSettings"),//分销设置
+  "M3": t("role.accountOperation"),//账户操作
+  // "M4":t("role.orderData"),//报警历史
+  "M4": t("role.orderData"),//订单数据
+  "M5": t("role.advertisingManagement"),//广告管理
+  "M6": t("role.taskMessage"),//任务消息
+  "M7": t("role.discountCode"),//优惠码
   // "M8":t("role.accountPermission"),//账号权限
-  "M9":t("role.orderExport"),//订单导出
+  "M9": t("role.orderExport"),//订单导出
   // "M10":t("role.shandeSubLedger"),//杉德分账
   "M11":t("role.salesRanking"),//销售排行
   // "M12":t("role.withdrawalAccountNo"),//提现账号
   // "M13":t("role.standbyWithdrawalAccountNo"),//备用提现账号
-  "M14":t("role.dataOverview"),//数据概览
-  "M15":t("role.alarmHistory"),//订单数据
-  "M16":t("role.orderRefund"),//订单退款
-  "M17":t("role.systemOffline"),//系统脱机
+  "M14": t("role.dataOverview"),//数据概览
+  // "M15":t("role.alarmHistory"),//订单数据
+  "M15": t("role.alarmHistory"),//报警历史
+  "M16": t("role.orderRefund"),//订单退款
+  "M17": t("role.systemOffline"),//系统脱机
   // "M18":t("role.labelMan"),//标签管理
-  "M19":t("role.apkMan"),//apk管理
+  "M19": t("role.apkMan"),//apk管理
   // "M20":t("role.merchantMan"),//商户管理
 }
 // 判断值是否是数字 true:数值型的,false:非数值型
@@ -4460,7 +4462,7 @@ export const prefix = (url) => {
 }
 // 获取当前语言
 export function navigatorLanguage() {
-  const navigatorLanguage = (navigator.language || navigator.browserLanguage).toLowerCase()
+  const navigatorLanguage = (navigator.language || navigator.browserLanguage || navigator.languages).toLowerCase()
   const lan = navigatorLanguage.substring(0, 2);
   console.log("当前语言", lan);
   if (lan == 'zh' || lan == 'ja') {

+ 16 - 36
src/components/NavBar.vue

@@ -1,65 +1,45 @@
 <template>
   <!-- 底部横条 -->
-  <!-- <div class="nav-bar van-hairline--top">
-    <ul class="nav-list">
-      <router-link class="nav-list-item active" to="home">
-        <div class="nbicon">
-          <van-image class="navIconImage dailyImage" :src="homeUrl"/>
-          <van-image class="navIconImage activeImage" :src="homeActiveUrl"/>
-        </div>
-        <span>{{$t('navBar.homePage')}}</span>
-      </router-link>
-      <router-link class="nav-list-item" to="device">
-        <div class="nbicon">
-          <van-image class="navIconImage dailyImage" :src="deviceUrl"/>
-          <van-image class="navIconImage activeImage" :src="deviceActiveUrl"/>
-        </div>
-        <span>{{$t('navBar.deviceInformation')}}</span>
-      </router-link>
-      <router-link class="nav-list-item" to="robotranking">
-        <div class="nbicon">
-          <van-image class="navIconImage dailyImage" :src="rankingUrl"/>
-          <van-image class="navIconImage activeImage" :src="rankingActiveUrl"/>
-        </div>
-        <span>{{$t('navBar.machineRanking')}}</span>
-      </router-link>
-      <router-link class="nav-list-item" to="user">
-        <div class="nbicon">
-          <van-image class="navIconImage dailyImage" :src="userUrl"/>
-          <van-image class="navIconImage activeImage" :src="userActiveUrl"/>
-        </div>
-        <span>{{$t('navBar.personalCenter')}}</span>
-      </router-link>
-    </ul>
-  </div> -->
   <van-tabbar route active-color="#2d87c8" inactive-color="#404d74">
     <van-tabbar-item replace to="/home" icon="wap-home">{{ $t('navBar.homePage') }}</van-tabbar-item>
-    <van-tabbar-item replace to="/device" icon="setting">{{ $t('navBar.deviceInformation')}}</van-tabbar-item>
-    <van-tabbar-item replace to="/robotranking" icon="label">{{ $t('navBar.machineRanking')}}</van-tabbar-item>
+    <van-tabbar-item v-if="isDeviceData" replace to="/device" :dot="hasAlarm" icon="setting-o">{{
+      $t('navBar.deviceInformation') }}</van-tabbar-item>
+    <van-tabbar-item replace to="/robotranking" icon="label">{{
+      $t('navBar.machineRanking') }}</van-tabbar-item>
     <van-tabbar-item replace to="/user" icon="contact">{{ $t('navBar.personalCenter') }}</van-tabbar-item>
   </van-tabbar>
 </template>
 
 <script>
-import { onMounted, computed } from "vue";
+import { onMounted, computed, ref } from "vue";
 import { useStore } from "vuex";
+import { getLoginUser } from "../common/js/utils";
 
 export default {
   setup() {
     const store = useStore();
+    const user = getLoginUser();
+
+    // 设备管理权限
+    const isDeviceData = ref(false);
     onMounted(() => {
+      isDeviceData.value = user.menuCodeList.some((item) => {
+        return item === "M1";
+      });
     });
     const count = computed(() => {
       return store.state.cartCount;
     });
 
+
     return {
       count,
+      isDeviceData
     };
   },
 };
 </script>
 
-<style lang="less" scoped >
+<style lang="less" scoped>
 @import "../common/style/mixin";
 </style>

+ 82 - 0
src/components/commom/kTimezone/index.vue

@@ -0,0 +1,82 @@
+<template>
+    <!-- 时区弹窗 -->
+    <van-popup v-model:show="timezonePopshow" round position="bottom">
+        <van-cascader @close="timezonePopshow = false" v-model="cascaderValue" :title="$t('kTimezone.selectTimezone')"
+            :options="options" @finish="onFinish"/>
+    </van-popup>
+</template>
+
+<script>
+import { ref, watch } from "vue";
+export default {
+    setup(props, { emit }) {
+
+        const timezonePopshow = ref(false);
+        const tzFieldValue = ref('');
+        const cascaderValue = ref('');
+        const selectedTimezone = ref(props.selectId || ""); // 存储选中的时区值
+        const selectId = ref(props.selectId || "");
+        // const selectId = ref("");
+        const init = (id) => {
+            selectId.value = id;
+            // 如果有选中的时区
+            if (selectId.value) {
+                selectTimezone();
+            }
+        };
+
+        const options = ref([
+            { text: '上海', value: 'Asia/Shanghai' },
+            { text: '東京', value: 'Asia/Tokyo' },
+            { text: 'NewYork', value: 'America/New_York' },
+            { text: 'Paris', value: 'Europe/Paris' },
+            { text: 'London', value: 'Europe/London' },
+            { text: 'Madrid', value: 'Europe/Madrid' },
+            { text: 'São Paulo', value: 'America/Sao_Paulo' },
+        ]);
+
+
+        // 选择完成时
+        const onFinish = ({ selectedOptions }) => {
+            timezonePopshow.value = false;
+            const selectName = selectedOptions.map((option) => option.text).join("/");
+            const selectValue = selectedOptions[selectedOptions.length - 1].value;
+            selectedTimezone.value = selectValue; // 更新本地变量
+            emit("timezonepopfinish", { selectName, selectId: selectValue });
+        };
+        // 打开弹窗
+        const openPopup = () => {
+            timezonePopshow.value = true;
+        };
+        // 获取选中的时区
+        const selectTimezone = () => {
+            const selectedTimezoneValue = selectId.value;
+            if (selectedTimezoneValue) {
+                const option = options.value.find(item => item.value === selectedTimezoneValue);
+                if (option) {
+                    selectedTimezone.value = option.value; // 初始化本地变量
+                    emit('gettimezone', option.text); // 发送 text 值
+                }
+            }
+        };
+        watch(selectedTimezone, (newValue) => {
+            if (newValue) {
+                emit('gettimezone', options.value.find(o => o.value === newValue).text);
+            }
+        });
+
+        return {
+            timezonePopshow,
+            options,
+            onFinish,
+            cascaderValue,
+            tzFieldValue,
+            init,
+            openPopup,
+            selectTimezone
+        };
+    },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 305 - 0
src/components/typeDownMenu/index.vue

@@ -0,0 +1,305 @@
+<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 :title="machineTypeTitle" v-model="machineType" :options="machineList"
+      @change="machineTypeChange" />
+    <!-- 账号类型 -->
+    <van-dropdown-item v-if="isShowAdminAndCompany()" :title="foreignTypeTitle" v-model="foreignType"
+      :options="foreignList" @change="foreignTypeChange" />
+    <!-- 公司平台 -->
+    <van-dropdown-item v-if="isShowCompany()" :title="companyTypeTitle" v-model="companyType" :options="companyList"
+      @change="companyTypeChange" />
+    <!-- 支付方式 -->
+    <van-dropdown-item :title="paymentTypeTitle" v-model="paymentType" :options="payList" @change="paymentTypeChange" />
+    <!-- 设备筛选 -->
+    <van-dropdown-item v-if="isShowDevice()" :title="deviceTypeTitle" v-model="deviceType" :options="deviceList"
+      @change="deviceTypeChange" />
+    <!-- 订单状态 -->
+    <van-dropdown-item v-if="!isHome" :title="orderStatusTitle" v-model="orderStatus" :options="orderStatusList"
+      @change="orderStatusChange" />
+  </van-dropdown-menu>
+</template>
+
+<script>
+import { onMounted, toRefs, reactive, ref } from "vue";
+import { getAdminList, getEquipmentList } from '@/service/typeSelectList';
+import { getLoginUser } from '@/common/js/utils';
+import { useI18n } from 'vue-i18n';
+
+export default {
+  name: "typeSelectList",
+  components: {},
+  props: {
+    // 是否首页
+    isHome: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  setup(props, { emit }) {
+    const user = getLoginUser(); // 获取登录用户
+
+    const { t } = useI18n();
+    // 支付方式
+    const paymentType = ref(null);
+    // 支付方式标题
+    const paymentTypeTitle = ref(t('typeSelectList.paymentMethod'));
+    // 支付方式列表
+    const payList = ref(user.ifForeign === '0' ? [
+      { 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' },
+    ] : [
+      { 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 },
+    ]);
+    // 选择支付方式
+    const paymentTypeChange = (value) => {
+      paymentTypeTitle.value = payList.value.find(payList => payList.value === value).text;
+      searchParams.payType = value;
+      outputDate();
+    }
+
+
+    // 公司平台
+    const companyType = ref(null);
+    // 公司平台标题
+    const companyTypeTitle = ref(t('typeSelectList.companies'));
+    // 公司平台列表
+    const companyList = [
+      { text: t('typeSelectList.whole'), value: '' },
+      { text: t('typeSelectList.sz'), value: '0' },
+      { text: t('typeSelectList.sc'), value: '1' },
+    ];
+    // 选择公司平台
+    const companyTypeChange = (value) => {
+      companyTypeTitle.value = companyList.find(companyList => companyList.value === value).text;
+      searchParams.companyType = value;
+      outputDate();
+    }
+
+    // 账号类型
+    const foreignType = ref(null);
+    // 账号类型标题
+    const foreignTypeTitle = ref(t('typeSelectList.ifForeignes'));
+    // 账号地区列表
+    const foreignList = [
+      { text: t('typeSelectList.mainland'), value: '0' },
+      { text: t('typeSelectList.overseas'), value: '1' },
+    ];
+    // 选择账号类型
+    const foreignTypeChange = (value) => {
+      foreignTypeTitle.value = foreignList.find(foreignList => foreignList.value === value).text;
+      if (value == "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 },
+        ];
+      }
+      searchParams.ifForeign = value;
+      outputDate();
+    }
+
+    // 设备类型
+    const machineType = ref(null);
+    // 设备类型标题
+    const machineTypeTitle = ref(t('typeSelectList.machines'));
+    // 设备类型列表
+    const machineList = [
+      { text: t('typeSelectList.whole'), value: '' },
+      { text: t('typeSelectList.MG'), value: '0' },
+      { text: t('typeSelectList.POP'), value: '1' },
+      { text: t('typeSelectList.ICE'), value: '2' },
+    ];
+    // 选择设备类型
+    const machineTypeChange = (value) => {
+      machineTypeTitle.value = machineList.find(machineList => machineList.value === value).text;
+      searchParams.machineType = value;
+      outputDate();
+    }
+
+    // 设备筛选
+    const deviceType = ref(null);
+    // 设备筛选标题
+    const deviceTypeTitle = ref(t('typeSelectList.allDevices'));
+    // 设备列表
+    const deviceList = ref([]);
+    // 获取设备列表
+    const getDeviceListFun = async () => {
+      const { data } = await getEquipmentList({ adminId: user.id });
+      if (data.code === '00000') {
+        deviceList.value = data.data.map(item => {
+          return { text: item.name != null ? item.name : item.clientId, value: item.id }
+        });
+        deviceList.value.unshift({ text: t('typeSelectList.allDevices'), value: '' });
+      }
+    }
+    // 设备选择
+    const deviceTypeChange = (value) => {
+      deviceTypeTitle.value = deviceList.value.find(deviceList => deviceList.value === value).text;
+      if (deviceTypeTitle.value != t('typeSelectList.allDevices')) {
+        searchParams.equipmentId = value;
+      } else {
+        searchParams.equipmentId = '';
+      }
+      outputDate();
+    }
+
+    // 订单状态
+    const orderStatus = ref(null);
+    // 订单状态标题
+    const orderStatusTitle = ref(t('typeSelectList.orderStatus'));
+    // 订单状态列表
+    const orderStatusList = [
+      { text: t('typeSelectList.whole'), value: '' },
+      { text: t('typeSelectList.unpaid'), value: 0 },
+      { text: t('typeSelectList.paid'), value: 1 },
+      { text: t('typeSelectList.refunding'), value: 2 },
+      { text: t('typeSelectList.refunded'), value: 3 },
+    ]
+    // 选择订单状态
+    const orderStatusChange = (value) => {
+      orderStatusTitle.value = orderStatusList.find(orderStatusList => orderStatusList.value === value).text;
+      searchParams.status = value;
+      outputDate();
+    }
+
+    // 商户筛选
+    const adminType = ref(null);
+    // 商户筛选标题
+    const adminTypeTitle = ref(t('typeSelectList.thisMerchant'));
+    // 商户列表
+    const adminList = ref([]);
+    // 获取商户列表
+    const getAdminListFun = async () => {
+      const { data } = await getAdminList({ adminId: user.id });
+      if (data.code === '00000') {
+        adminList.value = data.data.map(item => {
+          return { text: item.username, value: item.id }
+        });
+        adminList.value.unshift({ text: t('typeSelectList.allSuboUsers'), value: 'all' });
+        adminList.value.unshift({ text: t('typeSelectList.thisMerchant'), value: 'this' });
+      }
+    }
+    // 选择商户
+    const adminTypeChange = (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;
+      outputDate();
+    }
+
+
+    // 筛选参数
+    let searchParams = reactive({
+      userName: user.username,
+      adminType: '',
+      clientId: '',
+      payType: '',
+      productNo: '',
+      equipmentId: '',
+      companyType: '',
+      machineType: '',
+      ifForeign: '',
+    });
+
+
+    // 是否商户
+    const isShowAdmin = () => { return (user && user.type === 1); }
+    // 是否管理员
+    const isShowCompany = () => { return (user && user.type === 0); }
+    // 是否管理员和公司人员
+    const isShowAdminAndCompany = () => { return (user && user.type < 2); }
+    // 是否商户及子账户
+    const isShowDevice = () => { return (user && (user.type === 2 || user.type === 3)); }
+    // 返回参数
+    const outputDate = () => { emit('upselectdata', searchParams); }
+
+    onMounted(() => {
+      getAdminListFun();
+      getDeviceListFun();
+    });
+    return {
+      ...toRefs(searchParams),
+      // 是否商户
+      isShowAdmin,
+      // 是否管理员
+      isShowCompany,
+      // 是否商户及子账户
+      isShowDevice,
+      // 是否管理员和公司人员
+      isShowAdminAndCompany,
+      // 商家选择
+      adminList,
+      adminType,
+      adminTypeTitle,
+      adminTypeChange,
+
+      // 订单状态
+      orderStatusList,
+      orderStatus,
+      orderStatusTitle,
+      orderStatusChange,
+
+      // 设备选择
+      deviceList,
+      deviceType,
+      deviceTypeTitle,
+      deviceTypeChange,
+
+      // 设备类型选择
+      machineList,
+      machineType,
+      machineTypeTitle,
+      machineTypeChange,
+
+      // 账号类型选择
+      foreignList,
+      foreignType,
+      foreignTypeTitle,
+      foreignTypeChange,
+
+      // 公司平台选择
+      companyList,
+      companyType,
+      companyTypeTitle,
+      companyTypeChange,
+
+      // 支付方式选择
+      payList,
+      paymentType,
+      paymentTypeTitle,
+      paymentTypeChange,
+    };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@import "@/common/style/common.less";
+</style>

+ 3 - 1
src/main.js

@@ -4,7 +4,8 @@ import {
   AddressList, Field, CellGroup, Cell, SwipeCell, Icon, Stepper, Card, Checkbox, CheckboxGroup, Button, Swipe, SwipeItem,
   PullRefresh, List, Tab, Tabs, SubmitBar, Toast, Skeleton, RadioGroup, Radio, NoticeBar, ActionSheet, Cascader, Col, Row,
   Slider, DatePicker, Switch, Calendar, Picker, Uploader, Tag, DropdownMenu, DropdownItem, Notify, ConfigProvider, NavBar,
-  Area, Popover, Collapse, CollapseItem, PickerGroup, TimePicker, BackTop, Progress, Tabbar, TabbarItem, Search
+  Area, Popover, Collapse, CollapseItem, PickerGroup, TimePicker, BackTop, Progress, Tabbar, TabbarItem, Search, TextEllipsis
+
 } from 'vant';
 import { Image as VanImage } from 'vant';
 import App from './App.vue'
@@ -91,6 +92,7 @@ app.use(ActionBarButton)
   .use(Tabbar)
   .use(TabbarItem)
   .use(Search)
+  .use(TextEllipsis)
 
 
 app.use(router)

+ 16 - 3
src/service/distributionSet/index.js

@@ -1,10 +1,23 @@
-import axios from '../../utils/axios';
+import axios from "../../utils/axios";
+import { stringToUrl } from '@/common/js/utils';
 
 // 获取分销列表
 export function Api_getPageProportion(params) {
-  return axios.get(`/SZWL-SERVER/tProportion/pageProportion`,{params});
+  return axios.get(`/SZWL-SERVER/tProportion/pageProportion`, { params });
 }
+
 // 获取单个分销
 export function Api_getDistriDetail(params) {
-  return axios.get(`/SZWL-SERVER/tProportion/getById`,{params});
+  return axios.get(`/SZWL-SERVER/tProportion/getById`, { params });
+}
+
+// 撤销分销申请
+
+export function Api_cancelDistri(params) {
+  return axios.post(`/SZWL-SERVER/tProportionCheck/update?${stringToUrl(params)}`, { params });
+}
+
+// 获取待审核记录
+export function Api_getCheckPending(params) {
+  return axios.get(`/SZWL-SERVER/tProportionCheck/getCheckPending`, { params });
 }

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

@@ -42,4 +42,14 @@ export function getHuifuMch(params) {
 // 切换登陆
 export function autoLoginMerchant(params) {
   return axios.get(`/SZWL-SERVER/tAdmin/autoLogin?${stringToUrl(params)}`);
+}
+
+// 获取收钱吧配置
+export function getSqbConfigApi(params) {
+  return axios.get(`/PAY-SERVER/tSqbConfig/getSqbConfig?${stringToUrl(params)}`);
+}
+
+// 激活收钱吧配置
+export function activeSqbConfigApi(params) {
+  return axios.get(`/PAY-SERVER/tSqbConfig/activate?${stringToUrl(params)}`);
 }

+ 8 - 1
src/service/order/index.js

@@ -25,6 +25,10 @@ export function refundOrder(params) {
 export function refundWechatOrder(params) {
   return axios.post(`/PAY-SERVER/wechatPay/refund`, params);
 }
+// 收钱吧订单退款
+export function refundSqbOrder(params) {
+  return axios.post(`/PAY-SERVER/tOrder/sqbRefund`, params);
+}
 // 订单列表-导出
 export function Api_getOnlineExport(params) {
   return axios.get(`/ORDER-SERVER/tOrder/orderExport?${stringToUrl(params)}`,{responseType:'blob'});
@@ -33,8 +37,11 @@ export function Api_getOnlineExport(params) {
 export function updateIsInvoice(params) {
   return axios.get(`/ORDER-SERVER/tOrder/updateIsInvoice?${stringToUrl(params)}`);
 }
-
 // 订单数据导出
 export function exportOrder(params) {
   return axios.post(`/ORDER-SERVER/tOrder/newOrderExport`, params ,{responseType:'blob'});
 }
+// 发送退款短信提醒
+export function sentMessage(params) {
+  return axios.get(`/ORDER-SERVER/tOrder/sentMessage?${stringToUrl(params)}`);
+}

+ 46 - 53
src/styles/device/index.less

@@ -243,23 +243,18 @@
             padding: 5px 5px;
 
             .contentWord {
-              width: 100%;
+              // width: 100%;
               padding: 10px 10px;
-              // overflow-wrap: break-word;
               color: rgba(64, 77, 116, 1);
-              font-size: 14px;
+              // font-size: 14px;
               text-align: left;
               flex-wrap: wrap; 
-              // white-space: nowrap;
-              // text-overflow: ellipsis;
               line-height: 14px;
               display: flex;
               align-items: center;
-              // justify-content: space-between;
 
-              .word10 {
-                width: 65%
-                // display: block;
+              .word {
+                font-size: 12px;
               }
 
               .word2 {
@@ -301,41 +296,48 @@
               }
 
               .clickable-link {
-                // text-decoration: underline;
                 cursor: pointer;
-                font-size: 14px;
-                width: 80%;
-                line-height: 18px
+                font-size: 12px;
+                width: 240px;
+                line-height: 20px;
               }
 
             }
 
-            .word11 {
-              width: 95%;
-              padding: 10px 10px;
-              // overflow-wrap: break-word;
-              color: rgba(64, 77, 116, 1);
-              font-size: 14px;
-              text-align: left;
-              // white-space: nowrap;
-              // text-overflow: ellipsis;
-              line-height: 14px;
+            .alert-item {
               display: flex;
+              justify-content: space-between; /* 左右分隔排列 */
               align-items: center;
-              // justify-content: space-between;
+              padding: 10px 10px;
+              color: rgba(64, 77, 116, 1);
+              font-size: 13px;
+              line-height: 20px;
 
-              .word12 {
-                width: 65%;
+              .lineCon {
+                width: 0.1px;
+                height: 35px;
+                border: 1px solid #ffffff;
+                transform: scale(0.6);
+                background-color: #ffffff;
               }
+
             }
 
+            .alert-info {
+              flex: 1; /* 左侧部分占据剩余空间 */
+            }
+            
+            .alert-actions {
+              margin-left: 10px; /* 右侧消除按钮与左侧内容之间的间距 */
+            }
+
+
 
             .van-button--primary {
               background-color: #2c87c8;
-              width: 50px;
-              padding: 0 5px;
-              margin: 0 5px 0 0;
-              height: 30px !important;
+              padding: 0 8px;
+              margin: 0 10px 0 0;
+              height: 25px !important;
             }
 
             .layer2 {
@@ -366,26 +368,13 @@
             }
 
             .layer5 {
-              width: 100%;
-
+              // width: 100%;
+              padding: 10px 10px;
               .word5 {
-                // width: 33.33%;
-                overflow-wrap: break-word;
-                color: rgba(64, 77, 116, 1);
-                font-size: 14px;
-                text-align: left;
-                line-height: 13px;
-                display: block;
-                padding: 10px 10px;
-              }
 
-              .word6 {
-                // width: 33.33%;
-                overflow-wrap: break-word;
                 color: rgba(64, 77, 116, 1);
-                font-size: 14px;
-                line-height: 13px;
-                display: block;
+                font-size: 12px;
+                
               }
             }
 
@@ -430,14 +419,12 @@
             }
 
             .editDeviceBtnCon {
-              // color: #2c87c8;
 
               .box2 {
-                width: 18px;
+                width: 20px;
                 height: 20px;
                 background: url("../../assets/order/gotoRight.png") no-repeat;
                 background-size: 100%;
-                margin-top: 2px;
               }
 
               .c-text-14 {
@@ -453,6 +440,10 @@
                 cursor: pointer;
                 /* 设置光标样式 */
               }
+              .l-flex-RC {
+                margin-left: 10px;
+                margin-right: 10px;
+              }
             }
 
             .bd8 {
@@ -614,9 +605,11 @@
 
           .sugarTxt {
             color: rgba(64, 77, 116, 1);
-            font-size: 14px;
-            line-height: 14px;
             padding: 10px 10px;
+            
+            .word {
+              font-size: 12px;
+            }
           }
 
           .bd6 {
@@ -634,7 +627,7 @@
 
             .group2 {
               width: 10px;
-              height: 5px;
+              height: 10px;
               background: url("../../assets/device/deviceSelect.png") center no-repeat;
               background-size: 100%;
 

+ 14 - 2
src/styles/distributionSet/index.less

@@ -60,10 +60,22 @@
             .effective {
                 color: #4dc193;
             }
-        }
 
+            .cancel {
+                color: #f5b33a;
+            }
+
+            .rejected {
+                color: #df5e4c;
+            }
+        }
         .approval {
-            color: #df5e4c;
+            color: #f5b33a;
+        }
+
+        .cancelBtn {
+            height: 25px;
+            padding: 0 5px;
         }
     }
 }

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

@@ -28,9 +28,10 @@
       padding: 0 15px;
 
       .lineCon {
-        width: 1px;
-        height: 20px;
+        width: 0.1px;
+        height: 25px;
         border: 1px solid #B9BAD0;
+        background-color: #B9BAD0;
         transform: scale(0.6);
       }
 
@@ -109,7 +110,6 @@
       background: url("../../assets/home/outer.png") top center no-repeat;
       background-size: 100% 100%;
       width: 100%;
-      margin-top: 20px;
 
       .block5 {
         width: 100%;

+ 76 - 770
src/styles/merchantManage/index.less

@@ -71,7 +71,7 @@
         }
 
         .main4 {
-            width: 100%;
+            // width: 100%;
             justify-content: space-between;
             padding: 15px;
 
@@ -80,12 +80,12 @@
                 background-color: rgba(255, 255, 255, 1);
                 border-radius: 4px;
                 height: 250px;
-                margin: 0 auto;
+                margin: 0 10px;
                 margin-bottom: 20px;
-                width: 100%;
+                // width: 100%;
 
                 .outer2 {
-                    width: 100%;
+                    // width: 100%;
                     padding: 20px;
 
                     .box2 {
@@ -199,16 +199,22 @@
                             margin: 8px 0 0 10px;
                         }
                     }
-                    
+
+
                     .button-container {
                         display: flex;
                         justify-content: center;
 
                         .btn1 {
-                            margin: 0 30px;
-                            padding: 0 20px;
+                            margin: 0 20px;
+                            padding: 0 10px;
+                            width: 100px;
                         }
                     }
+
+                    .van-button__text {
+                        font-size: 12px;
+                    }
                 }
             }
         }
@@ -245,790 +251,84 @@
         overflow: auto;
         overflow-x: hidden;
 
-        .Body {
-            width: 100%;
-            margin-bottom: 39px;
-
-            .Body {
-                width: 100%;
-                margin-bottom: 39px;
+        .tab {
+            .info {
+                width: 98px;
+                height: 13px;
+                overflow-wrap: break-word;
+                color: rgba(64, 77, 116, 1);
+                font-size: 14px;
+                text-align: left;
+                white-space: nowrap;
+                line-height: 14px;
+                display: block;
+                margin: 21px 0 0 32px;
+            }
 
-                .wrap1 {
+            .activate {
+                
+                display: flex;
+                justify-content: center;
+
+                .van-cell {
+                    // width: 250px;
+                    // height: 38px;
+                    // margin: 0 45px;
+                    // padding: 20px 30px;
                     background-color: rgba(255, 255, 255, 1);
-                    z-index: 24;
-                    height: 54px;
-                    width: 100%;
-                    position: relative;
-
-                    .section1 {
-                        width: 100%;
-                        height: 13px;
-                        padding: 34px 80px;
-
-                        .word3 {
-                            width: 56px;
-                            height: 13px;
-                            overflow-wrap: break-word;
-                            color: rgba(77, 106, 221, 1);
-                            color: rgba(135, 135, 166, 1);
-                            font-size: 14px;
-                            font-family: PingFangSC-Semibold;
-                            text-align: center;
-                            white-space: nowrap;
-                            line-height: 14px;
-                            display: block;
-                        }
-
-                        .info1 {
-                            width: 56px;
-                            height: 13px;
-                            overflow-wrap: break-word;
-                            color: rgba(135, 135, 166, 1);
-                            font-size: 14px;
-                            text-align: center;
-                            white-space: nowrap;
-                            line-height: 14px;
-                            display: block;
-                        }
-
-                        .acttive {
-                            position: relative;
-                            color: #2c87c8;
-
-                            &::after {
-                                content: '';
-                                position: absolute;
-                                left: 50%;
-                                margin-left: -20px;
-                                bottom: 0;
-                                width: 40px;
-                                height: 2px;
-                                background-color: #2c87c8;
-                                border-radius: 1px;
-                                bottom: -0.5em;
-                            }
-                        }
-                    }
-
-                    .section2 {
-                        background-color: rgba(77, 106, 221, 1);
-                        border-radius: 1px;
-                        z-index: 27;
-                        position: absolute;
-                        left: 88px;
-                        top: 53px;
-                        width: 40px;
-                        height: 2px;
-                    }
-
-                    .img1 {
-                        z-index: 28;
-                        position: absolute;
-                        left: 0;
-                        top: 52px;
-                        width: 100%;
-                        height: 2px;
-                    }
-                }
-
-                .wrap2 {
-                    width: 313px;
-                    height: 28px;
-                    margin: 20px auto;
-
-                    .info2 {
-                        width: 11px;
-                        height: 28px;
-                        overflow-wrap: break-word;
-                        color: rgba(223, 94, 76, 1);
-                        font-size: 20px;
-                        font-family: PingFangSC-Semibold;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 28px;
-                        display: block;
-                    }
-
-                    .info3 {
-                        width: 199px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 15px;
-                        font-family: PingFangSC-Medium;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 15px;
-                        margin-top: 4px;
-                        display: block;
-                    }
-                }
-
-                .tab2 {
-                    .info3 {
-                        width: 98px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 14px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 14px;
-                        display: block;
-                        margin: 21px 0 0 32px;
-                    }
-
-                    .info4 {
-                        width: 126px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 14px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 14px;
-                        display: block;
-                        margin: 15px 0 0 32px;
-                    }
-
-                    .word4 {
-                        width: 171px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 14px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 14px;
-                        display: block;
-                        margin: 15px 0 0 32px;
-                    }
-
-                    .txt2 {
-                        width: 105px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 14px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 14px;
-                        display: block;
-                        margin: 20px 0 0 32px;
-                    }
-
-                    .word5 {
-                        width: 119px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 14px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 14px;
-                        display: block;
-                        margin: 15px 0 0 32px;
-                    }
-
-                    .word6 {
-                        width: 133px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 14px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 14px;
-                        display: block;
-                        margin: 15px 0 0 32px;
-                    }
-
-                    .txt3 {
-                        width: 98px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 14px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 14px;
-                        display: block;
-                        margin: 15px 0 0 32px;
-                    }
-
-                    .txt4 {
-                        width: 98px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 14px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 14px;
-                        display: block;
-                        margin: 15px 0 0 32px;
-                    }
-
-                    .word7 {
-                        width: 112px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 14px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 14px;
-                        display: block;
-                        margin: 15px 0 0 32px;
-                    }
-
-                    .txt5 {
-                        width: 70px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 14px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 14px;
-                        display: block;
-                        margin: 15px 0 0 32px;
-                    }
-
-                    .word8 {
-                        width: 70px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 14px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 14px;
-                        display: block;
-                        margin: 15px 0 0 32px;
-                    }
-
-
-                    .block5 {
-                        width: 122px;
-                        height: 13px;
-                        margin: 20px 0 0 32px;
-
-                        .txt6 {
-                            width: 70px;
-                            height: 13px;
-                            overflow-wrap: break-word;
-                            color: rgba(64, 77, 116, 1);
-                            font-size: 14px;
-                            text-align: left;
-                            white-space: nowrap;
-                            line-height: 14px;
-                            display: block;
-                        }
-
-                        .word9 {
-                            width: 42px;
-                            height: 13px;
-                            overflow-wrap: break-word;
-                            color: rgba(64, 77, 116, 1);
-                            font-size: 14px;
-                            text-align: left;
-                            white-space: nowrap;
-                            line-height: 14px;
-                            display: block;
-                        }
-                    }
-
-                    .word10 {
-                        width: 98px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 14px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 14px;
-                        display: block;
-                        margin: 15px 0 0 32px;
-                    }
-
-                    .word11 {
-                        width: 70px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 14px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 14px;
-                        display: block;
-                        margin: 15px 0 0 32px;
-                    }
-
-                    .word12 {
-                        width: 56px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 14px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 14px;
-                        display: block;
-                        margin: 15px 0 0 32px;
-                    }
-                }
-
-                .info4 {
-                    width: 313px;
-                    height: 13px;
-                    overflow-wrap: break-word;
-                    color: rgba(64, 77, 116, 1);
-                    font-size: 14px;
-                    text-align: left;
-                    white-space: nowrap;
-                    line-height: 14px;
-                    display: block;
-                    margin: 20px auto;
-                }
-
-                .info5 {
-                    width: 313px;
-                    height: 13px;
-                    overflow-wrap: break-word;
-                    color: rgba(64, 77, 116, 1);
-                    font-size: 14px;
-                    text-align: left;
-                    white-space: nowrap;
-                    line-height: 14px;
-                    display: block;
-                    margin: 20px auto;
-                }
-
-                .wrap3 {
-                    width: 311px;
-                    height: 38px;
-                    margin: 15px 0 0 32px;
-
-                    .word4 {
-                        width: 39px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 13px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 13px;
-                        margin-top: 13px;
-                        display: block;
-                    }
-
-                    .bd1 {
-                        background-color: rgba(255, 255, 255, 1);
-                        border-radius: 2px;
-                        height: 38px;
-                        border: 0.5px solid rgba(185, 186, 208, 1);
-                        width: 247px;
-
-                        .word5 {
-                            width: 39px;
-                            height: 13px;
-                            overflow-wrap: break-word;
-                            color: rgba(168, 168, 197, 1);
-                            font-size: 13px;
-                            text-align: left;
-                            white-space: nowrap;
-                            line-height: 13px;
-                            display: block;
-                            margin: 13px 0 0 6px;
-                        }
-                    }
-                }
-
-                .txt3 {
-                    width: 313px;
-                    height: 13px;
-                    overflow-wrap: break-word;
                     color: rgba(168, 168, 197, 1);
                     font-size: 13px;
-                    text-align: left;
-                    white-space: nowrap;
-                    line-height: 13px;
-                    display: block;
-                    margin: 20px auto;
-                }
-
-                .wrap4 {
-                    width: 311px;
-                    height: 38px;
-                    margin: 15px 0 0 32px;
-
-                    .txt4 {
-                        width: 65px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 13px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 13px;
-                        margin-top: 13px;
-                        display: block;
-                    }
-
-                    .main3 {
-                        background-color: rgba(255, 255, 255, 1);
-                        border-radius: 2px;
-                        height: 38px;
-                        border: 0.5px solid rgba(185, 186, 208, 1);
-                        margin-left: -1px;
-                        width: 247px;
-
-                        .txt5 {
-                            width: 39px;
-                            height: 13px;
-                            overflow-wrap: break-word;
-                            color: rgba(168, 168, 197, 1);
-                            font-size: 13px;
-                            text-align: left;
-                            white-space: nowrap;
-                            line-height: 13px;
-                            display: block;
-                            margin: 13px 0 0 6px;
-                        }
-                    }
-                }
-
-                .wrap5 {
-                    width: 311px;
-                    height: 38px;
-                    margin: 15px 0 0 32px;
-
-                    .info6 {
-                        width: 39px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 13px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 13px;
-                        margin-top: 13px;
-                        display: block;
+                    overflow: visible;
+                    
+    
+                    &::after {
+                        display: none;
                     }
-
-                    .layer1 {
-                        background-color: rgba(255, 255, 255, 1);
-                        border-radius: 2px;
+    
+                    .van-field__control {
+                        // width: 150px;
                         height: 38px;
-                        border: 0.5px solid rgba(185, 186, 208, 1);
-                        width: 247px;
-
-                        .info7 {
-                            width: 39px;
-                            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: 13px 0 0 6px;
-                        }
-                    }
-                }
-
-                .wrap6 {
-                    width: 269px;
-                    height: 18px;
-                    margin: 23px 0 0 32px;
-
-                    .txt6 {
-                        width: 65px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 13px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 13px;
-                        margin-top: 2px;
-                        display: block;
-                    }
-
-                    .ImageText1 {
-                        height: 13px;
-                        width: 29px;
-                        margin: 3px 0 0 83px;
-
-                        .mod1 {
-                            width: 29px;
-                            height: 13px;
-
-                            .wrap7 {
-                                border-radius: 50%;
-                                width: 12px;
-                                height: 12px;
-                                border: 1px solid rgba(77, 106, 221, 1);
-                                margin-top: 1px;
-                            }
-
-                            .TextGroup1 {
-                                height: 13px;
-                                width: 13px;
-
-                                .txt7 {
-                                    width: 13px;
-                                    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;
-                                }
-                            }
-                        }
-                    }
-
-                    .ImageText2 {
-                        height: 18px;
-                        margin-left: 62px;
-                        width: 30px;
-
-                        .box1 {
-                            width: 30px;
-                            height: 18px;
-
-                            .group1 {
-                                border-radius: 50%;
-                                width: 12px;
-                                height: 12px;
-                                border: 1px solid rgba(77, 106, 221, 1);
-                                margin-top: 4px;
-                            }
-
-                            .TextGroup2 {
-                                height: 18px;
-                                width: 13px;
-
-                                .info8 {
-                                    width: 13px;
-                                    height: 18px;
-                                    overflow-wrap: break-word;
-                                    color: rgba(64, 77, 116, 1);
-                                    font-size: 13px;
-                                    text-align: left;
-                                    white-space: nowrap;
-                                    line-height: 18px;
-                                    display: block;
-                                }
-                            }
-                        }
-                    }
-                }
-
-                .wrap8 {
-                    width: 269px;
-                    height: 18px;
-                    margin: 15px 0 0 32px;
-
-                    .word6 {
-                        width: 117px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 13px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 13px;
-                        margin-top: 3px;
-                        display: block;
-                    }
-
-                    .ImageText3 {
-                        height: 13px;
-                        width: 29px;
-                        margin: 3px 0 0 31px;
-
-                        .group2 {
-                            width: 29px;
-                            height: 13px;
-
-                            .main4 {
-                                border-radius: 50%;
-                                width: 12px;
-                                height: 12px;
-                                border: 1px solid rgba(77, 106, 221, 1);
-                                margin-top: 1px;
-                            }
-
-                            .TextGroup3 {
-                                height: 13px;
-                                width: 13px;
-
-                                .info9 {
-                                    width: 13px;
-                                    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;
-                                }
-                            }
-                        }
-                    }
-
-                    .ImageText4 {
-                        height: 18px;
-                        margin-left: 62px;
-                        width: 30px;
-
-                        .layer2 {
-                            width: 30px;
-                            height: 18px;
-
-                            .block1 {
-                                border-radius: 50%;
-                                width: 12px;
-                                height: 12px;
-                                border: 1px solid rgba(77, 106, 221, 1);
-                                margin-top: 4px;
-                            }
-
-                            .TextGroup4 {
-                                height: 18px;
-                                width: 13px;
-
-                                .txt8 {
-                                    width: 13px;
-                                    height: 18px;
-                                    overflow-wrap: break-word;
-                                    color: rgba(64, 77, 116, 1);
-                                    font-size: 13px;
-                                    text-align: left;
-                                    white-space: nowrap;
-                                    line-height: 18px;
-                                    display: block;
-                                }
-                            }
-                        }
-                    }
-                }
-
-                .wrap9 {
-                    width: 311px;
-                    height: 38px;
-                    margin: 15px 0 0 32px;
-
-                    .info10 {
-                        width: 39px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 13px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 13px;
-                        margin-top: 13px;
-                        display: block;
-                    }
-
-                    .mod2 {
-                        background-color: rgba(255, 255, 255, 1);
+                        line-height: 38px;
+                        padding: 6px;
                         border-radius: 2px;
-                        height: 38px;
                         border: 0.5px solid rgba(185, 186, 208, 1);
-                        width: 247px;
-
-                        .word7 {
-                            width: 39px;
-                            height: 13px;
-                            overflow-wrap: break-word;
-                            color: rgba(168, 168, 197, 1);
-                            font-size: 13px;
-                            text-align: left;
-                            white-space: nowrap;
-                            line-height: 13px;
-                            display: block;
-                            margin: 13px 0 0 6px;
-                        }
+    
                     }
-                }
-
-                .wrap10 {
-                    width: 311px;
-                    height: 38px;
-                    margin: 14px 0 0 32px;
-
-                    .word8 {
-                        width: 39px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(64, 77, 116, 1);
-                        font-size: 13px;
-                        text-align: left;
-                        white-space: nowrap;
-                        line-height: 13px;
-                        margin-top: 13px;
-                        display: block;
+    
+                    .van-field__control::-webkit-input-placeholder {
+                        color: rgba(168, 168, 197, 1);
                     }
-
-                    .group3 {
-                        background-color: rgba(255, 255, 255, 1);
-                        border-radius: 2px;
+    
+    
+    
+                    .van-field__label {
                         height: 38px;
-                        border: 0.5px solid rgba(185, 186, 208, 1);
-                        width: 247px;
-
-                        .info11 {
-                            width: 39px;
-                            height: 13px;
-                            overflow-wrap: break-word;
-                            color: rgba(168, 168, 197, 1);
-                            font-size: 13px;
-                            text-align: left;
-                            white-space: nowrap;
-                            line-height: 13px;
-                            display: block;
-                            margin: 13px 0 0 6px;
-                        }
+                        line-height: 38px;
+                        // width: 20px;
                     }
-                }
-
-                .Button1 {
-                    background-color: rgba(77, 106, 221, 1);
-                    border-radius: 17px;
-                    height: 34px;
-                    width: 120px;
-                    margin: 25px 0 0 128px;
 
-                    .word9 {
-                        width: 60px;
-                        height: 13px;
-                        overflow-wrap: break-word;
-                        color: rgba(255, 255, 255, 1);
-                        font-size: 15px;
-                        font-family: PingFangSC-Medium;
-                        text-align: center;
-                        white-space: nowrap;
-                        line-height: 15px;
-                        display: block;
-                        margin: 11px 0 0 30px;
-                    }
                 }
             }
         }
 
+        .txt {
+            width: 313px;
+            height: 13px;
+            overflow-wrap: break-word;
+            color: rgba(168, 168, 197, 1);
+            font-size: 13px;
+            text-align: left;
+            white-space: nowrap;
+            line-height: 13px;
+            display: block;
+            margin: 20px auto;
+        }
+
         .van-form {
 
             .van-cell {
                 width: 313px;
+                // height: 38px;
                 background-color: rgba(255, 255, 255, 1);
                 padding: 0;
                 color: rgba(168, 168, 197, 1);
@@ -1059,6 +359,12 @@
                     color: rgba(168, 168, 197, 1);
                 }
 
+                // .van-cell__value {
+                //     width: 100%;
+                //     flex: 0 auto;
+                // }
+
+
                 .van-field__label {
                     height: 38px;
                     line-height: 38px;

+ 84 - 1
src/styles/orderCenter/index.less

@@ -72,7 +72,7 @@
       background: url("../../assets/home/outer.png") top center no-repeat;
       background-size: 100% 100%;
       width: 100%;
-      margin-top: 20px;
+      // margin-top: 20px;
 
       .block5 {
         width: 100%;
@@ -1210,6 +1210,89 @@
     }
   }
 
+  .orderPopBox {
+    background-color: rgba(255, 255, 255, 1);
+    height: auto;
+    padding: 10px 10px;
+
+
+    .popTopBox {
+      height: 70px;
+
+      .popTopTxtBox {
+
+        .business {
+          overflow-wrap: break-word;
+          color: rgba(64, 77, 116, 1);
+          font-size: 15px;
+          font-family: PingFangSC-Medium;
+          text-align: center;
+          white-space: nowrap;
+          line-height: 15px;
+          display: block;
+        }
+
+        .incomePrice {
+          overflow-wrap: break-word;
+          color: rgba(223, 94, 76, 1);
+          font-size: 20px;
+          font-family: PingFangSC-Semibold;
+          text-align: center;
+          white-space: nowrap;
+          line-height: 20px;
+          display: block;
+          margin-top: 8px;
+        }
+      }
+    }
+
+    .line {
+      background-color: rgba(215, 215, 226, 1);
+      height: 1px;
+      margin: 10px 0;
+    }
+
+    .orderDetailBox {
+      margin-top: 10px;
+      padding: 0 15px;
+
+      .title {
+        width: 100px;
+        overflow-wrap: break-word;
+        color: rgba(135, 135, 166, 1);
+        font-size: 13px;
+        text-align: left;
+        white-space: nowrap;
+        line-height: 16px;
+        display: block;
+      }
+
+      .content {
+        width: 200px;
+        color: rgba(64, 77, 116, 1);
+        font-size: 13px;
+        text-align: right;
+        line-height: 16px;
+      }
+    }
+
+    .van-field__label {
+      width: 100px;
+      color: rgba(135, 135, 166, 1);
+      font-size: 13px;
+      text-align: left;
+    }
+
+    .van-field__control {
+      font-size: 13px;
+    }
+
+    .van-cell {
+      padding: 0 15px;
+      margin-top: 8px;
+    }
+  }
+
   .btnFooter {
     display: flex;
     justify-content: space-between;

+ 3 - 2
src/styles/taskMessage/index.less

@@ -84,12 +84,13 @@
       align-items: center;
 
       .bd3 {
-        width: 87px;
-        height: 16px;
+        // width: 87px;
+        // height: 16px;
 
         .outer4 {
           width: 20px;
           height: 26px;
+          margin-right: 5px;
           background: url("../../assets/alarmHistory/icon.png") top center no-repeat;
           background-size: 100%;
 

+ 1 - 1
src/utils/i18n.js

@@ -30,7 +30,7 @@ export default createI18n({
   legacy: false,
   globalInjection: true,
   // 默认语言
-  locale: localStorage.getItem("curLang"),
+  locale: localStorage.getItem('curLang') ? localStorage.getItem('curLang') : 'en',
   // 关闭控制台警告
   silentFallbackWarn: true,
   messages: {

+ 35 - 0
src/views/advertManage/adSet.vue

@@ -95,6 +95,24 @@
             </van-radio-group>
           </div>
         </div>
+        <div class="van-cell van-field">
+          <div class="van-cell__title van-field__label">
+            <span>{{ $t("advertManage.playTimeStatus") }}:</span>
+          </div>
+          <div class="van-cell__value van-field__value radioBox">
+            <van-radio-group v-model="adInfo.playTimeStatus" direction="horizontal">
+              <van-radio name="0" icon-size="18px">{{
+                $t("advertManage.acquiesce")
+              }}</van-radio>
+              <van-radio name="1" icon-size="18px">{{
+                $t("advertManage.standby")
+              }}</van-radio>
+              <van-radio name="2" icon-size="18px">{{
+                $t("advertManage.work")
+              }}</van-radio>
+            </van-radio-group>
+          </div>
+        </div>
         <div v-if="adInfo.adType === '0'">
           <van-field required v-model="adInfo.url" name="url" :label="`${$t('advertManage.pictureAddressLabel')}:`"
             :placeholder="$t('advertManage.pictureAddressPlaceholder')" :rules="[
@@ -191,6 +209,22 @@ export default {
         name: "P30en",
         id: "P30en",
       },
+      {
+        name: "SI320",
+        id: "SI320",
+      },
+      {
+        name: "SI320en",
+        id: "SI320en",
+      },
+      {
+        name: "SBC320",
+        id: "SBC320",
+      },
+      {
+        name: "SBC320en",
+        id: "SBC320en",
+      },
     ]);
     const busiPopFieldName = reactive({
       text: "name",
@@ -218,6 +252,7 @@ export default {
       url: "",
       mediaPreview: "",
       equipmentType: "",
+      playTimeStatus: "0",
     });
     const pageTitle = ref("");
     onMounted(async () => {

+ 123 - 106
src/views/device/index.vue

@@ -23,9 +23,6 @@
                   </template>
                 </van-popover>
                 <img class="label2" src="../../assets/device/searchIcon.png" @click="searchClick" />
-                <!-- <div class="TextGroup2 flex-col">
-                  <span class="txt3">{{ $t("device.search") }}</span>
-                </div> -->
               </div>
             </div>
           </div>
@@ -71,100 +68,94 @@
                     </div>
                   </div>
                   <div v-if="item.hasTodayAlarm" :class="{ 'flash-icon': showAlert }" class="box4 o-mr-5"></div>
-                  <div v-if="!item.hasTodayAlarm" class="layer2 o-mr-5" 
-                  :class="{ deviceOn: item.eqeStatus === 1, layerLeft: item.hasTodayAlarm,}">
+                  <div v-if="!item.hasTodayAlarm" class="layer2 o-mr-5"
+                    :class="{ deviceOn: item.eqeStatus === 1, layerLeft: item.hasTodayAlarm, }">
                   </div>
                 </div>
-                <span class="txt1 o-mt-10">{{ $t("device.affiliatedMerchants") }}:{{ item.adminUserName }}</span>
                 <span class="txt1 o-mt-10">{{ $t("device.machineUniqueCode") }}:{{ item.clientId }}</span>
+                <!--机器参数-->
+                <span v-if="(item.machineType == '0' || item.machineType == null) && item.equimentType != 'P30'"
+                  class="txt1 o-mt-10">
+                  {{ $t("device.temperatureInCabinet") + ':' + item.cabinetTm
+        + $t("device.degree") }}
+                </span>
+                <span v-if="(item.machineType == '0' || item.machineType == null) && item.equimentType != 'P30'"
+                  class="txt1 o-mt-10">
+                  {{ $t("device.humidityInCabinet") + ':' + item.cabinetHd
+        + $t("device.humidity") }}
+                </span>
+                <span v-if="(item.machineType == '0' || item.machineType == null) && item.equimentType != 'P30'"
+                  class="txt1 o-mt-10">
+                  {{ $t("device.furnaceHeadTemperature") + ':' +
+        item.furnaceTm
+        + $t("device.degree") }}
+                </span>
+                <span v-if="item.machineType == '1' && item.equimentType == 'P30'" class="txt1 o-mt-10">
+                  {{ $t("device.cornGeneratorTemperature") + ':' + item.cabinetTm + $t("device.degree") }}
+                </span>
+                <span v-if="item.machineType == '1' && item.equimentType == 'P30'" class="txt1 o-mt-10">
+                  {{ $t("device.stirringTemperature") + ':' + item.cabinetHd + $t("device.degree") }}
+                </span>
+                <span v-if="item.machineType == '1' && item.equimentType == 'P30'" class="txt1 o-mt-10">
+                  {{ $t("device.cupQuantity") + ':' + item.furnaceTm }}
+                </span>
                 <img v-if="item.checkType" class="pic1" referrerpolicy="no-referrer" src="../../assets/home/line.png" />
                 <div class="contentBottomCon" v-if="item.checkType">
+                  <!-- 所属商家 -->
+                  <div v-if="user.type < 2" class="contentWord kBordBott">{{ $t("device.affiliatedMerchants") }}:{{
+        item.adminUserName }}
+                  </div>
                   <!-- 睡眠状态 -->
                   <div class="contentWord kBordBott">
-                    <span class="">{{ $t("device.sleepState") }}:{{ item.isSleep ? $t("device.sleeping"): $t("device.notSleeping")}}</span>
+                    <span class="word o-mr-10">{{ $t("device.sleepState") }}:{{ item.isSleep ? $t("device.sleeping") :
+        $t("device.notSleeping") }}</span>
+                    <van-switch active-color="#2d87c8" :model-value="item.isSleep" size="18px" @click="changeSleep(item)" />
                   </div>
+                  <!-- 睡眠描述 -->
                   <div v-if="item.isSleep" class="contentWord kBordBott">
-                    <span class="">{{ $t("device.sleepDesc") }}:</span>
+                    <span class="word">{{ $t("device.sleepDesc") }}:</span>
                     <van-field colon center class="word2" v-model="item.sleepDesc" v-if="!sleepDescBoxShow"
                       :placeholder="$t('device.sleepDescPlace')" label-width="auto">
                       <template #button class="button_1">
-                        <van-button type="primary" @click="sleepDescChg(item.sleepDesc, item.id)">{{
-        $t("device.confirm") }}
+                        <van-button type="primary" @click="sleepDescChg(item.sleepDesc, item.id)">
+                          {{ $t("device.confirm") }}
                         </van-button>
-                        <van-button type="primary" @click="editSleepDesc()">{{ $t("device.cancel")
-                          }}</van-button>
+                        <van-button type="primary" @click="editSleepDesc()">{{ $t("device.cancel") }}</van-button>
                       </template>
                     </van-field>
-                    <span class="word10 l-flex-RC" v-if="sleepDescBoxShow">{{ item.sleepDesc == null ?
-        $t("device.SuspendBusiness") :
-        item.sleepDesc }}
-                      <van-icon name="edit" size="18" class="editIcon o-pl-5" @click="editSleepDesc()" />
-                    </span>
+                    <div class="l-flex-RC" v-else>
+                      <span class="word o-mr-10">{{ item.sleepDesc == null ? $t("device.SuspendBusiness") : item.sleepDesc
+                        }}</span>
+                      <van-button type="primary" @click="editSleepDesc()">{{ $t("device.modify") }}</van-button>
+                    </div>
                   </div>
                   <span v-if="item.machineType == null || item.machineType == '0'"
                     class="contentWord kBordBott l-flex-RC">
-                    <span>{{ $t("device.clickRestart") }}:</span>
+                    <span class="word">{{ $t("device.clickRestart") }}:</span>
                     <van-button @click="restartHead(item.id)" type="primary">{{ $t("device.restartHead") }}</van-button>
                   </span>
                   <!-- 炉头状态 -->
                   <div class="contentWord kBordBott" v-if="item.machineType == null || item.machineType == '0'">
-                    <span>{{ (item.machineType == '0' || item.machineType == null) ? $t("device.furnHeadStatus") :
+                    <span class="word">
+                      {{ (item.machineType == '0' || item.machineType == null) ? $t("device.furnHeadStatus") :
         $t("device.deviceStatus") }}:
-                      {{ item.eqeStatus === 1 ? $t("device.opened") : $t("device.closed") }}</span>
+                      {{ item.eqeStatus === 1 ? $t("device.opened") : $t("device.closed") }}
+                    </span>
                     <div class="o-ml-10">
                       <van-button @click="openCloseHead(item.id, 1)" type="primary">{{ $t("device.open") }}</van-button>
                       <van-button @click="openCloseHead(item.id, 0)" type="primary">{{ $t("device.close")
                         }}</van-button>
                     </div>
                   </div>
-                  <!-- <span class="txt5 o-ptb-10 kBordBott l-flex-RC"><span>远程开门:</span>
-                    <van-button type="primary">开门</van-button>
-                  </span> -->
-
-                  <!-- 设备地址 -->
-                  <!-- <span class="txt1 o-ptb-7">{{ item.fullName }}</span> -->
-                  <!-- 定位: -->
-                  <!-- <div>
-                    <span v-if="item.latitude" class="txt5 o-ptb-7 kBordBott l-flex-RC">
-                      <span class="info1">{{
-                        $t("device.position") }}:</span>
-                      <van-button @click="viewPosiClk(item)" type="primary">{{
-                        $t("device.view")
-                      }}</van-button>
-                    </span>
-                  </div> -->
 
                   <!-- 定位: -->
                   <span v-if="item.latitude" class="contentWord kBordBott l-flex-RC">
-                    <span>{{ $t("device.position") }}:</span>
+                    <span class="word">{{ $t("device.position") }}:</span>
                     <a class="clickable-link" @click="viewPosiClk(item)">{{ item.fullName }}</a>
                   </span>
-                  <!-- 机器参数 -->
-                  <van-row class="layer5 kBordBott" justify="space-between"
-                    v-if="(item.machineType == '0' || item.machineType == null) && item.equimentType != 'P30'">
-                    <van-col class="word5" style="">{{ $t("device.furnaceHeadTemperature") }}:{{
-        item.furnaceTm
-      }}{{ $t("device.degree") }}</van-col>
-                    <van-col class="word5" style="">{{ $t("device.temperatureInCabinet") }}:{{
-        item.cabinetTm
-      }}{{ $t("device.degree") }}</van-col>
-                    <van-col class="word5" style="">{{ $t("device.humidityInCabinet") }}:{{
-        item.cabinetHd
-      }}{{ $t("device.humidity") }}</van-col>
-                  </van-row>
-                  <van-row class="layer5 kBordBott" justify="space-between" v-if="item.machineType == '1'">
-                    <van-col class="word5" style="">{{ $t("device.cornGeneratorTemperature") }}:{{
-        item.cabinetHd
-      }}{{ $t("device.degree") }}</van-col>
-                    <van-col class="word5" style="">{{ $t("device.stirringTemperature") }}:{{
-        item.cabinetTm
-      }}{{ $t("device.degree") }}</van-col>
-                    <van-col class="word5" style="">{{ $t("device.cupQuantity") }}:{{ item.furnaceTm
-                      }}</van-col>
-                  </van-row>
                   <template v-if="item.isMaterialUse === '1' && (item.machineType == '0' || item.machineType == null)">
                     <van-row justify="space-between" class="sugarTxt kBordBott">
-                      <van-col style="">
+                      <van-col>
                         {{ $t("device.whiteSugar") }}:{{ Format_calcuDecial(item.whiteSugar) }}%
                       </van-col>
                       <van-col>
@@ -173,7 +164,7 @@
                       <van-col>
                         {{ $t("device.yellowSugar") }}:{{ Format_calcuDecial(item.yellowSugar) }}%
                       </van-col>
-                      <van-col style="">
+                      <van-col>
                         {{ $t("device.blueSugar") }}:{{ Format_calcuDecial(item.blueSugar) }}%
                       </van-col>
                     </van-row>
@@ -209,23 +200,25 @@
                   <span v-if="item.machineType != '2'" class="contentWord kBordBott">{{ $t("device.volume") }}:{{
         item.volume }}</span>
                   <!-- 报警内容 -->
-                  <div class="contentWord kBordBott l-flex-RC">
-                    <span>{{ $t("device.alarmContent") }}:</span>
-                    <span class="word3">{{
-        item.alarmList && item.alarmList[0] && item.alarmList[0].alarmContent
-          ? showDateTime(item.alarmList[0].occurrenceTime) + " " + item.alarmList[0].alarmContent
-          : $t("device.alarmContentNoData")
-      }}
-                    </span>
-                    <van-button v-if="item.alarmList && item.alarmList[0] && item.alarmList[0].alarmContent"
-                      type="primary" color="#07c160" :text="$t('device.eliminateAlarm')"
-                      @click="clearAlarm(item.alarmList[0], item)"></van-button>
+                  <div class="alert-item kBordBott" v-for="itemAlarm in item.alarmList" :key="itemAlarm">
+                    <div class="alert-info o-pr-5">
+                      <span style="display: block;">{{ $t("device.time") }} : {{ showDateTime(itemAlarm.occurrenceTime)
+                        }}
+                      </span>
+                      <span>{{ $t("device.alarmContent") }} : {{ itemAlarm.alarmContent }}</span>
+                    </div>
+                    <div class="lineCon"></div>
+                    <div class="alert-actions">
+                      <van-button type="primary" color="#07c160" style="margin: 0 10px;"
+                        :text="$t('device.eliminateAlarm')"
+                        @click="clearAlarm(itemAlarm, item, item.alarmList)"></van-button>
+                    </div>
                   </div>
                   <div class="editDeviceBtnCon l-flex-center o-mt-10">
                     <div class="l-flex-RC" @click="deviceSet(item)">
                       <span class="c-text-14">{{
-                        $t("device.editDevice")
-                        }}</span>
+        $t("device.editDevice")
+      }}</span>
                       <div class="box2 flex-col"></div>
                     </div>
                     <div class="l-flex-RC o-ml-30" @click="deviceOprShow(item)">
@@ -265,7 +258,7 @@ import {
   Api_postMachineNum,
 } from "../../service/home";
 import { onMounted, reactive, toRefs, ref, onActivated } from "vue";
-import { showFailToast, showSuccessToast, showToast, showDialog, showConfirmDialog } from "vant";
+import { showFailToast, showSuccessToast, showToast, showConfirmDialog } from "vant";
 import sHeader from "../../components/SimpleHeader";
 import { getLoginUser, Format_calcuDecial, styleUrl } from "../../common/js/utils";
 import {
@@ -274,6 +267,7 @@ import {
   Api_getReplenishment,
   changeSleepDesc,
   setFurnace,
+  sleepEquipment,
 } from "../../service/device/index";
 import deviceSearch from "./deviceSearch";
 import deviceOper from "./deviceOper";
@@ -308,7 +302,6 @@ export default {
     onActivated(() => {
       // 当组件被激活时,可能是从 keep-alive 缓存中激活的
       // 这时重新添加滚动事件监听器
-      console.log("进入时的位置", verticalScrollPosition.value);
       document.documentElement.scrollTop = verticalScrollPosition.value;
       document.body.scrollTop = verticalScrollPosition.value;
       window.scrollY = verticalScrollPosition.value;
@@ -318,7 +311,6 @@ export default {
 
     onBeforeRouteLeave(() => {
       verticalScrollPosition.value = document.documentElement.scrollTop || document.body.scrollTop || window.scrollY;
-      console.log("离开时的位置", verticalScrollPosition.value);
     })
 
     // 在组件卸载前清除定时器
@@ -374,9 +366,6 @@ export default {
       searchParams.current = 1;
       if (user) {
         searchParams.id = user.id;
-        // if (user.isAdmined) {
-        //   searchParams.adminName = user.username;
-        // }
         getList();
       }
     };
@@ -451,7 +440,7 @@ export default {
       oprRef.value.showOper(e);
     };
     // 消除报警
-    const clearAlarm = async (e, e1) => {
+    const clearAlarm = async (e, e1, e2) => {
       const params = {
         id: e.id,
         name: e.name,
@@ -469,14 +458,15 @@ export default {
       if (data.code) {
         showSuccessToast(t("device.successfullyEliminatedTheAlarm"));
         setTimeout(() => {
-          e.alarmContent = "";
-          e1.hasTodayAlarm = false;
+          e2 = e2.filter((item) => item.id !== e.id);
+          list.value[list.value.findIndex((item) => item.id === e1.id)].alarmList = e2;
+          if (e2.length === 0) {
+            e1.hasTodayAlarm = false;
+          }
         }, 1000);
-        console.log("e", e);
       } else {
         showFailToast(data.message);
       }
-      console.log("/tEquipment/eliminate", e);
     };
     const showDateTime = (date) => {
       if (!date) {
@@ -488,7 +478,6 @@ export default {
 
     // 点击查看定位
     const viewPosiClk = (row) => {
-      console.log("row 是 >>>", row);
       if (row.latitude) {
         router.push({
           path: "viewPosition",
@@ -505,20 +494,25 @@ export default {
 
     // 点击补料
     const replenishmentClk = (row) => {
-      console.log("row >>>", row);
-      Api_getReplenishment({ equipmentId: row.id }).then((res) => {
-        console.log("res >>>", res);
-        // Toast(res.data.message);
-        showDialog({
-          message: t('device.sentSuccessfully'),
-        }).then(() => {
-          //返回上一页
-          router.go(0);
+      showConfirmDialog({
+        title: t('user.tips'),
+        message: t('device.isReplenishment'),
+      }).then(async () => {
+        const { data } = await Api_getReplenishment({
+          equipmentId: row.id
         });
-        setTimeout(() => {
-          getList();
-        }, 500);
-      });
+        if (data.code) {
+          showSuccessToast(t("device.sentSuccessfully"));
+          setTimeout(() => {
+            // router.go(0);
+            init();
+          }, 1500);
+        } else {
+          showFailToast(data.message);
+        }
+      }).catch(() => {
+        return;
+      })
     };
     // 操作弹窗完成的回调
     const operFinish = () => {
@@ -549,7 +543,6 @@ export default {
     }
     // 点击睡眠描述的确定按钮
     const sleepDescChg = async (sleepDesc, id) => {
-      console.log(sleepDesc);
       if (!sleepDesc) {
         showToast(t("device.sleepDescPlace"));
       } else {
@@ -560,9 +553,6 @@ export default {
         if (data.code === "00000") {
           sleepDescBoxShow.value = true;
           showToast(data.message);
-          // setTimeout(() => {
-          //   gettAdminGetRelation();
-          // }, 500);
         }
       }
     }
@@ -593,6 +583,34 @@ export default {
       }
     }
 
+    // 睡眠切换
+    const changeSleep = (item) => {
+      let eqeStatus = 1;
+      showConfirmDialog({
+        title: t('user.tips'),
+        message: t("device.changeSleep"),
+      }).then(async () => {
+        if (item.isSleep) {
+          eqeStatus = 0;
+        }
+        const { data } = await sleepEquipment({
+          equipmentId: item.id,
+          eqeStatus,
+        });
+        if (data.code) {
+          showSuccessToast(t("device.changeSleepSuccess"));
+          setTimeout(() => {
+            // router.go(0);
+            init();
+          }, 1000);
+        } else {
+          showFailToast(data.message);
+        }
+      }).catch(() => {
+        return;
+      })
+    };
+
     // 重启炉头
     const restartHead = (id) => {
       showConfirmDialog({
@@ -617,8 +635,6 @@ export default {
     };
     // 开启/关闭炉头
     const openCloseHead = (id, status) => {
-      console.log("id", id);
-      console.log("status", status);
       showConfirmDialog({
         title: t('user.tips'),
         message: (status == 1 ? t("device.openFurnaceHeadTips") : t("device.closeFurnaceHeadTips")),
@@ -666,6 +682,7 @@ export default {
       editSleepDesc,
       sleepDescBoxShow,
       sleepDescChg,
+      changeSleep,
       backTop,
       user,
       labelList,

+ 167 - 0
src/views/discountCode/codeExport.vue

@@ -0,0 +1,167 @@
+<template>
+  <!-- 优惠码 - 导出弹窗 -->
+  <div class="codeSearch flex-col">
+    <van-popup v-model:show="sheetShow" round class="codeSearchPopup">
+      <div class="content">
+        <van-form @submit="onSubmit">
+          <van-field v-model="code" name="code" :label="$t('discountCode.discountCodeNoLabel')"
+            :placeholder="$t('discountCode.discountCodeNoPlaceholder')" />
+          <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('discountCode.creationTime') }}</label>
+            </div>
+            <div class="van-cell__value van-field__value">
+              <div class="van-field__body">
+                <input type="text" class="van-field__control" :placeholder="$t('discountCode.startTime')"
+                  style="text-align: center; width: 50%;" v-model="createStratDate" @click="createStratDateClick()" />
+                <span>{{ $t('discountCode.to') }}</span>
+                <input type="text" class="van-field__control" :placeholder="$t('discountCode.endTime')"
+                  style="text-align: center; width: 50%;" v-model="createEndDate" @click="createEndDateClick()" />
+              </div>
+            </div>
+          </div>
+          <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('discountCode.usageTime') }}</label>
+            </div>
+            <div class="van-cell__value van-field__value">
+              <div class="van-field__body">
+                <input type="text" class="van-field__control" :placeholder="$t('discountCode.startTime')"
+                  style="text-align: center; width: 50%;" v-model="useStratDate" @click="useStratDateClick()" />
+                <span>{{ $t('discountCode.to') }}</span>
+                <input type="text" class="van-field__control" :placeholder="$t('discountCode.endTime')"
+                  style="text-align: center; width: 50%;" v-model="useEndDate" @click="useEndDateClick()" />
+              </div>
+            </div>
+          </div>
+          <!-- 操作 -->
+          <van-row justify="space-around" style="padding: 1em;">
+            <van-button span="5" round type="primary" style="height: 2em; padding: 0 2em;" native-type="submit">{{
+      $t('discountCode.export') }}
+            </van-button>
+          </van-row>
+        </van-form>
+      </div>
+    </van-popup>
+    <van-popup v-model:show="createStratDateShow" round position="bottom">
+      <van-date-picker :title="$t('discountCode.selectFullTime')" v-model="startTime"
+        @confirm="createStratDateConFirm($event)" @cancel="createStratDateShow = false" :min-date="minDate"
+        :max-date="maxDate" />
+    </van-popup>
+    <van-popup v-model:show="createEndDateShow" round position="bottom">
+      <van-date-picker :title="$t('discountCode.selectFullTime')" v-model="endTime"
+        @confirm="createEndDateConFirm($event)" @cancel="createEndDateShow = false" :min-date="minDate"
+        :max-date="maxDate" />
+    </van-popup>
+    <van-popup v-model:show="useStratDateShow" round position="bottom">
+      <van-date-picker :title="$t('discountCode.selectFullTime')" v-model="startTime"
+        @confirm="useStratDateConFirm($event)" @cancel="useStratDateShow = false" :min-date="minDate"
+        :max-date="maxDate" />
+    </van-popup>
+    <van-popup v-model:show="useEndDateShow" round position="bottom">
+      <van-date-picker :title="$t('discountCode.selectFullTime')" v-model="endTime"
+        @confirm="useEndDateConFirm($event)" @cancel="useEndDateShow = false" :min-date="minDate" :max-date="maxDate" />
+    </van-popup>
+  </div>
+</template>
+
+<script>
+import { ref } from 'vue';
+import dateUtil from "@/utils/dateUtil";
+import { styleUrl } from "@/common/js/utils";
+
+export default {
+  name: 'codeSearch',
+  components: {},
+  setup(prop, context) {
+    const sheetShow = ref(false);
+
+    // 创建一个Date对象,表示当前时间
+    const dateTime = new Date();
+    // 获取当前时间的年份
+    const currentYear = dateTime.getFullYear();
+    // 获取当前时间的月份(注意,月份是从0开始的,所以要加1)
+    const currentMonth = dateTime.getMonth() + 1;
+    // 获取当前时间的日期
+    const currentDate = dateTime.getDate();
+
+    const startTime = ref([currentYear, currentMonth, currentDate]);
+    const endTime = ref([currentYear, currentMonth, currentDate]);
+    const minDate = new Date(2022, 0, 1);
+    const maxDate = new Date();
+    const showExport = () => { sheetShow.value = true; };
+    const code = ref('');
+    //加载样式
+    styleUrl('discountCode');
+    // 创建开始时间
+    const createStratDate = ref('');
+    const createStratDateShow = ref(false);
+    const createStratDateClick = () => { createStratDateShow.value = true; }
+    const createStratDateConFirm = ({ selectedValues }) => { createStratDate.value = selectedValues.join("-") + " 00:00:00"; createStratDateShow.value = false; }
+    // const createStratDateCancel = () => { createStratDate.value = dateUtil.formateDate(new Date(createStratDate.value), "yyyy-MM-dd hh:mm:ss"); createStratDateShow.value = false; }
+    // 创建结束时间
+    const createEndDate = ref('');
+    const createEndDateShow = ref(false);
+    const createEndDateClick = () => { createEndDateShow.value = true; }
+    const createEndDateConFirm = ({ selectedValues }) => { createEndDate.value = selectedValues.join("-") + " 23:59:59"; createEndDateShow.value = false; }
+    // const createEndDateCancel = () => { createEndDate.value = dateUtil.formateDate(new Date(createEndDate.value), "yyyy-MM-dd hh:mm:ss"); createEndDateShow.value = false; }
+    // 使用起始时间
+    const useStratDate = ref('');
+    const useStratDateShow = ref(false);
+    const useStratDateClick = () => { useStratDateShow.value = true; }
+    const useStratDateConFirm = ({ selectedValues }) => { useStratDate.value = selectedValues.join("-") + " 00:00:00"; useStratDateShow.value = false; }
+    // const useStratDateCancel = () => { useStratDate.value = dateUtil.formateDate(new Date(useStratDate.value), "yyyy-MM-dd hh:mm:ss"); useStratDateShow.value = false; }
+    // 使用结束时间
+    const useEndDate = ref('');
+    const useEndDateShow = ref(false);
+    const useEndDateClick = () => { useEndDateShow.value = true; }
+    const useEndDateConFirm = ({ selectedValues }) => { useEndDate.value = selectedValues.join("-") + " 23:59:59"; useEndDateShow.value = false; }
+    // const useEndDateCancel = () => { useEndDate.value = dateUtil.formateDate(new Date(useEndDate.value), "yyyy-MM-dd hh:mm:ss"); useEndDateShow.value = false; }
+
+    // 提交搜索表单触发搜索
+    const onSubmit = () => {
+      const searchParam = {};
+      if (code.value !== '') { searchParam.code = code.value; }
+      if (createStratDate.value !== '') { searchParam.createStratDate = dateUtil.formateDate(new Date(createStratDate.value), "yyyy/MM/dd hh:mm:ss"); }
+      if (createEndDate.value !== '') { searchParam.createEndDate = dateUtil.formateDate(new Date(createEndDate.value), "yyyy/MM/dd hh:mm:ss"); }
+      if (useStratDate.value !== '') { searchParam.useStratDate = dateUtil.formateDate(new Date(useStratDate.value), "yyyy/MM/dd hh:mm:ss"); }
+      if (useEndDate.value !== '') { searchParam.useEndDate = dateUtil.formateDate(new Date(useEndDate.value), "yyyy/MM/dd hh:mm:ss"); }
+      context.emit('exportCode', searchParam);
+      sheetShow.value = false;
+    }
+    return {
+      sheetShow,
+      minDate,
+      maxDate,
+      startTime,
+      endTime,
+      
+      showExport,
+      code,
+      createStratDate,
+      createStratDateShow,
+      createStratDateClick,
+      createStratDateConFirm,
+      // createStratDateCancel,
+      createEndDate,
+      createEndDateShow,
+      createEndDateClick,
+      createEndDateConFirm,
+      // createEndDateCancel,
+      useStratDate,
+      useStratDateShow,
+      useStratDateClick,
+      useStratDateConFirm,
+      // useStratDateCancel,
+      useEndDate,
+      useEndDateShow,
+      useEndDateClick,
+      useEndDateConFirm,
+      // useEndDateCancel,
+      onSubmit
+    };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 29 - 10
src/views/discountCode/codeSearch.vue

@@ -37,27 +37,30 @@
           <!-- 操作 -->
           <van-row justify="space-around" style="padding: 1em;">
             <van-button span="5" round type="primary" style="height: 2em; padding: 0 2em;" native-type="submit">{{
-              $t('discountCode.clickQuery') }}
+      $t('discountCode.clickQuery') }}
             </van-button>
           </van-row>
         </van-form>
       </div>
     </van-popup>
     <van-popup v-model:show="createStratDateShow" round position="bottom">
-      <van-date-picker :title="$t('discountCode.selectFullTime')" @confirm="createStratDateConFirm($event)"
-        @cancel="createStratDateShow = false" :min-date="minDate" />
+      <van-date-picker :title="$t('discountCode.selectFullTime')" v-model="startTime"
+        @confirm="createStratDateConFirm($event)" @cancel="createStratDateShow = false" :min-date="minDate"
+        :max-date="maxDate" />
     </van-popup>
     <van-popup v-model:show="createEndDateShow" round position="bottom">
-      <van-date-picker :title="$t('discountCode.selectFullTime')" @confirm="createEndDateConFirm($event)"
-        @cancel="createEndDateShow = false" :min-date="minDate" />
+      <van-date-picker :title="$t('discountCode.selectFullTime')" v-model="endTime"
+        @confirm="createEndDateConFirm($event)" @cancel="createEndDateShow = false" :min-date="minDate"
+        :max-date="maxDate" />
     </van-popup>
     <van-popup v-model:show="useStratDateShow" round position="bottom">
-      <van-date-picker :title="$t('discountCode.selectFullTime')" @confirm="useStratDateConFirm($event)"
-        @cancel="useStratDateShow = false" :min-date="minDate" />
+      <van-date-picker :title="$t('discountCode.selectFullTime')" v-model="startTime"
+        @confirm="useStratDateConFirm($event)" @cancel="useStratDateShow = false" :min-date="minDate"
+        :max-date="maxDate" />
     </van-popup>
     <van-popup v-model:show="useEndDateShow" round position="bottom">
-      <van-date-picker :title="$t('discountCode.selectFullTime')" @confirm="useEndDateConFirm($event)"
-        @cancel="useEndDateShow = false" :min-date="minDate" />
+      <van-date-picker :title="$t('discountCode.selectFullTime')" v-model="endTime"
+        @confirm="useEndDateConFirm($event)" @cancel="useEndDateShow = false" :min-date="minDate" :max-date="maxDate" />
     </van-popup>
   </div>
 </template>
@@ -72,7 +75,20 @@ export default {
   components: {},
   setup(prop, context) {
     const sheetShow = ref(false);
-    const minDate = new Date(2018, 1, 1);
+    // 创建一个Date对象,表示当前时间
+    const dateTime = new Date();
+    // 获取当前时间的年份
+    const currentYear = dateTime.getFullYear();
+    // 获取当前时间的月份(注意,月份是从0开始的,所以要加1)
+    const currentMonth = dateTime.getMonth() + 1;
+    // 获取当前时间的日期
+    const currentDate = dateTime.getDate();
+
+    const startTime = ref([currentYear, currentMonth, currentDate]);
+    const endTime = ref([currentYear, currentMonth, currentDate]);
+
+    const minDate = new Date(2022, 0, 1);
+    const maxDate = new Date();
     const showSearch = () => { sheetShow.value = true; };
     const code = ref('');
     //加载样式
@@ -115,7 +131,10 @@ export default {
     }
     return {
       sheetShow,
+      startTime,
+      endTime,
       minDate,
+      maxDate,
       showSearch,
       code,
       createStratDate,

+ 22 - 7
src/views/discountCode/index.vue

@@ -16,8 +16,9 @@
           <div class="flex-col">
             <div class="flex-row justify-between bd3">
               <div class="flex-col outer4"></div>
-              <span class="flex-col txt2">{{ $t('discountCode.total') }}<span class="discountNumber">{{ discountCodeTotal
-              }}</span>{{ $t('discountCode.discountCodesInTotal') }}</span>
+              <span class="flex-col txt2">{{ $t('discountCode.total') }}<span class="discountNumber">{{
+      discountCodeTotal
+    }}</span>{{ $t('discountCode.discountCodesInTotal') }}</span>
             </div>
           </div>
           <div class="flex-col">
@@ -29,9 +30,9 @@
         <div class="tabButtomBox flex-row">
           <div class="tabBox flex-row">
             <span :class="{ active: isUse === '0' }" @click="setIsUse('0')" style="cursor: pointer;">{{
-              $t('discountCode.notUsed') }}</span>
+      $t('discountCode.notUsed') }}</span>
             <span :class="{ active: isUse === '1' }" @click="setIsUse('1')" style="cursor: pointer;">{{
-              $t('discountCode.used') }}</span>
+      $t('discountCode.used') }}</span>
           </div>
           <div v-if="isDelete" class="buttomBox flex-row">
             <div @click="cancelClk" class="buttonItem" style="color: #9696b1;">
@@ -47,7 +48,8 @@
           <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 class="buttonItem" @click="exportClick()" style="color: #45be2d">{{ $t('discountCode.export') }}</div> -->
+            <div class="buttonItem" @click="clickExport" style="color: #45be2d">{{ $t('discountCode.export') }}</div>
           </div>
         </div>
         <div class="intervalRow"></div>
@@ -111,6 +113,7 @@
       </van-list>
     </div>
     <codeSearch ref="searchRef" @search="search($event)"></codeSearch>
+    <codeExport ref="exportRef" @exportCode="exportCode($event)"></codeExport>
   </div>
 </template>
 
@@ -121,6 +124,7 @@ import { getdiscountCodeList, discountCodeExport, deleteCode } from "@/service/d
 import { showFailToast, showToast, showConfirmDialog } from "vant";
 import { getLoginUser, $M_ExportFile, styleUrl } from "@/common/js/utils";
 import codeSearch from './codeSearch.vue';
+import codeExport from "./codeExport.vue";
 import dateUtil from "@/utils/dateUtil";
 import { useRouter } from "vue-router";
 import { useI18n } from "vue-i18n";
@@ -131,6 +135,7 @@ export default {
     const { t } = useI18n();
     const router = useRouter();
     const searchRef = ref(null);
+    const exportRef = ref(null);
     const user = getLoginUser();
     const loading = ref(false); // 加载状态
     const error = ref(false); // 错误状态
@@ -160,6 +165,11 @@ export default {
       searchParams = Object.assign(searchParams, data);
       searchGetList();
     };
+    // 导出弹窗触发导出
+    const exportCode = (data) => {
+      searchParams = Object.assign(searchParams, data);
+      exportClick();
+    };
     // 查询列表
     const searchGetList = () => {
       discountCodeList.value = [];
@@ -187,6 +197,8 @@ export default {
     };
     // 搜索点击
     const searchClick = () => { searchRef.value.showSearch(); };
+    // 导出点击
+    const clickExport = () => { exportRef.value.showExport(); }
     // 切换tab
     const setIsUse = (data) => { searchParams.isUse = data; searchGetList(); }
     // 点击优惠码
@@ -279,6 +291,7 @@ export default {
 
     return {
       searchRef,
+      exportRef,
       loading,
       error,
       finished,
@@ -292,7 +305,7 @@ export default {
       disCountCodeClick,
       showDate,
       showDateTime,
-      exportClick,
+      // exportClick,
       payCode,
       isExpired,
       isDelete,
@@ -301,9 +314,11 @@ export default {
       selectTotals,
       cancelClk,
       user,
+      clickExport,
+      exportCode,
     };
   },
-  components: { sHeader, codeSearch },
+  components: { sHeader, codeSearch, codeExport },
 };
 </script>
 

+ 7 - 3
src/views/discountCode/payCode.vue

@@ -32,8 +32,8 @@
           <div class="van-cell__title van-field__label"><span>{{ $t('discountCode.type') }}</span></div>
           <div class="van-cell__value van-field__value radioBox">
             <van-radio-group v-model="type" direction="horizontal">
-              <van-radio name="1" icon-size="18px">{{ $t('discountCode.deductionRoll') }}</van-radio>
               <van-radio name="0" icon-size="18px">{{ $t('discountCode.discount2') }}</van-radio>
+              <van-radio name="1" icon-size="18px">{{ $t('discountCode.deductionRoll') }}</van-radio>
             </van-radio-group>
           </div>
         </div>
@@ -92,7 +92,7 @@ export default {
       codeNum: '', // 优惠码
       number: '', // 优惠码个数
       month: '', // 有效期
-      type: '1', // 优惠卷类型
+      type: '0', // 优惠卷类型
       discount: '', // 折扣
       frpCode: 'WEIXIN_NATIVE', // 支付方式
     });
@@ -110,7 +110,7 @@ export default {
       payCodeType.value = false;
       payParams.number = '';
       payParams.month = '';
-      payParams.type = '1';
+      payParams.type = '0';
       payParams.discount = '';
       payParams.frpCode = 'WEIXIN_NATIVE';
       if (user) {
@@ -135,6 +135,10 @@ export default {
       if (parseInt(payParams.number) > 200) { showToast(t('discountCode.theNumberOfDiscountCodesCannotExceed')); return; }
       if (parseInt(payParams.month) > 3) { showToast(t('discountCode.theValidityPeriodCannotExceedMonths')); return; }
       if (payParams.type === '0' && parseInt(payParams.discount) > 10) { showToast(t('discountCode.discountCannotBeGreaterThan')); return; }
+      if (payParams.type === '1' && payParams.discount == 0) {
+        showToast(t('discountCode.deductionRollNoZero'));
+        return;
+      }
       console.log("payParams", payParams);
       const { data } = await addCode(Object.assign({}, payParams));
       if (payParams.type === '0' && payParams.discount === '0' && promoCodeOpen.value != '0') {

+ 206 - 68
src/views/distributionSet/detail.vue

@@ -1,35 +1,100 @@
 <template>
   <div class="distributionDetailIdx">
     <s-header :name="title" :noback="false"></s-header>
-    <van-form show-error-message @submit="onSubmit">
-      <div class="cust_vantBorder">
-        <div class="kBordBott">
-          <template v-if="clientId">
-            <van-field disabled colon :border="false" v-model="cofficentForm.clientId" clearable label-width="110"
-              name="clientId" :label="$t('distributionSet.addDist.clientId')"
-              :placeholder="$t('distributionSet.addDist.autoBrought')" />
-          </template>
-          <template v-else>
-            <van-field colon :border="false" required @click-input="busiInpClk" readonly clearable label-width="110"
-              v-model="cofficentForm.clientId" :placeholder="$t('distributionSet.addDist.clientIdPlace')"
-              :label="$t('distributionSet.addDist.clientId')" name="clientId"
-              :rules="[{ required: true, message: $t('distributionSet.addDist.clientIdPlace') }]">
-              <template #right-icon>
-                <div class="l-flex-RC">
-                  <van-icon v-if="cofficentForm.clientId" @click="cofficentForm.clientId = ''" class="o-mr-6"
-                    name="clear" />
-                  <van-icon @click="busiInpClk" name="arrow-down" />
-                </div>
-              </template>
-            </van-field>
-          </template>
-          <div class="l-flex-RC o-p-5 c-text-13 c-text-b">
-            <div style="padding: var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);">
-              {{ $t('distributionSet.addDist.distInof') }}
+    <div class="cust_vantBorder">
+      <div class="kBordBott">
+        <template v-if="clientId">
+          <van-field disabled colon :border="false" v-model="cofficentForm.clientId" clearable label-width="110"
+            name="clientId" :label="$t('distributionSet.addDist.clientId')"
+            :placeholder="$t('distributionSet.addDist.autoBrought')" />
+        </template>
+        <template v-else>
+          <van-field colon :border="false" required @click-input="busiInpClk" readonly clearable label-width="110"
+            v-model="cofficentForm.clientId" :placeholder="$t('distributionSet.addDist.clientIdPlace')"
+            :label="$t('distributionSet.addDist.clientId')" name="clientId"
+            :rules="[{ required: true, message: $t('distributionSet.addDist.clientIdPlace') }]">
+            <template #right-icon>
+              <div class="l-flex-RC">
+                <van-icon v-if="cofficentForm.clientId" @click="cofficentForm.clientId = ''" class="o-mr-6"
+                  name="clear" />
+                <van-icon @click="busiInpClk" name="arrow-down" />
+              </div>
+            </template>
+          </van-field>
+        </template>
+        <div class="l-flex-RC o-p-5 c-text-13 c-text-b">
+          <div v-if="proportionCheck"
+            style="padding: var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);">
+            {{ $t('distributionSet.addDist.pendingRecord') }}
+          </div>
+          <div v-else style="padding: var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);">
+            {{ $t('distributionSet.addDist.distInof') }}
+          </div>
+        </div>
+      </div>
+      <div v-if="proportionCheck">
+        <div class="l-flex-RC" style="padding: var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);">
+          <div class="c-text-13">
+            &nbsp;&nbsp;{{ $t('device.proportionOfPlatformDistributionLabel') }}:
+          </div>
+          <div class="c-text-14 c-text-b c-text-color">{{ proportionCheck.adminProportion }}%</div>
+        </div>
+        <div class="l-flex-RC" style="padding: var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);">
+          <div class="c-text-13">
+            &nbsp;&nbsp;{{ $t('distributionSet.addDist.myDistProport') }}:
+          </div>
+          <div class="c-text-14 c-text-b c-text-color">{{ proportionCheck.proportion }}%</div>
+        </div>
+        <div v-if="proportionCheck.agencyId" class="l-flex-RC" style="padding: var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);">
+          <div class="l-flex-RC o-pr-20">
+            <div class="c-text-13">
+              &nbsp;&nbsp;{{ $t('device.accountNoOfDistributorLabel') }}:
+            </div>
+            <div class="c-text-14 c-text-b c-text-color">{{ proportionCheck.agencyName }}</div>
+          </div>
+          <div class="l-flex-RC">
+            <div class="c-text-13" >
+              &nbsp;&nbsp;{{ $t('device.distributionProportionLabel') }}:
+            </div>
+            <div class="c-text-14 c-text-b c-text-color">{{ proportionCheck.agencyProportion }}%</div>
+          </div>
+        </div>
+        <div v-if="proportionCheck.merchantId" class="l-flex-RC" style="padding: var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);">
+          <div class="l-flex-RC o-pr-20">
+            <div class="c-text-13">
+              &nbsp;&nbsp;{{ $t('device.accountNoOfDistributorLabel') }}:
             </div>
-            <!-- <div class="c-text-13 c-text-b" style="color: #A8A8C5;">{{ $t('distributionSet.addDist.distInof') }}
-            </div> -->
+            <div class="c-text-14 c-text-b c-text-color">{{ proportionCheck.merchantName }}</div>
           </div>
+          <div class="l-flex-RC">
+            <div class="c-text-13" >
+              &nbsp;&nbsp;{{ $t('device.distributionProportionLabel') }}:
+            </div>
+            <div class="c-text-14 c-text-b c-text-color">{{ proportionCheck.merchantProportion }}%</div>
+          </div>
+        </div>
+        <div v-if="proportionCheck.personageId" class="l-flex-RC" style="padding: var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);">
+          <div class="l-flex-RC o-pr-20">
+            <div class="c-text-13">
+              &nbsp;&nbsp;{{ $t('device.accountNoOfDistributorLabel') }}:
+            </div>
+            <div class="c-text-14 c-text-b c-text-color">{{ proportionCheck.personageName }}</div>
+          </div>
+          <div class="l-flex-RC">
+            <div class="c-text-13" >
+              &nbsp;&nbsp;{{ $t('device.distributionProportionLabel') }}:
+            </div>
+            <div class="c-text-14 c-text-b c-text-color">{{ proportionCheck.personageProportion }}%</div>
+          </div>
+        </div>
+        <div style="margin: 50px;">
+          <van-button round block type="primary" @click="cancelDistri(proportionCheck.id)">
+            {{ $t('device.cancelForApproval') }}
+          </van-button>
+        </div>
+      </div>
+      <div v-else>
+        <van-form show-error-message @submit="onSubmit">
           <div class="noPaddingTopCell l-flex-RC">
             <van-field type="digit" colon :border="false" required v-model="cofficentForm.distProp" clearable
               label-width="110" name="distProp" :label="$t('device.proportionOfPlatformDistributionLabel')"
@@ -38,41 +103,43 @@
             <span class="o-pl-10 c-text-18 c-text-b" style="color: #434D74;">%</span>
           </div>
           <div class="l-flex-RC">
-            <div class="c-text-14" style="padding: var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);">
+            <div class="c-text-13"
+              style="padding: var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);">
               &nbsp;&nbsp;{{ $t('distributionSet.addDist.myDistProport') }}:
             </div>
             <div class="c-text-13 c-text-b c-text-color">{{ myDistProp }}%</div>
           </div>
-        </div>
-        <div v-for="(item, index) in distPropList" :key="index" class="kBordBott">
-          <van-field colon :border="false" required v-model="item.name1" clearable label-width="110" name="name1"
-            :label="$t('device.accountNoOfDistributorLabel')"
-            :placeholder="$t('device.accountNoOfDistributorPlaceholder')"
-            :rules="[{ required: true, message: $t('device.accountNoOfDistributorPlaceholder') }]" />
-          <div class="l-flex-between noPaddingRCell">
-            <div class="l-flex-RC">
-              <van-field type="digit" colon :border="false" required v-model="item.name2" clearable label-width="110"
-                name="name2" :label="$t('device.distributionProportionLabel')"
-                :placeholder="$t('device.distributionProportionPlaceholder')"
-                :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 @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 v-for="(item, index) in distPropList" :key="index" class="kBordBott">
+            <van-field colon :border="false" required v-model="item.name1" clearable label-width="110" name="name1"
+              :label="$t('device.accountNoOfDistributorLabel')"
+              :placeholder="$t('device.accountNoOfDistributorPlaceholder')"
+              :rules="[{ required: true, message: $t('device.accountNoOfDistributorPlaceholder') }]" />
+            <div class="l-flex-between noPaddingRCell">
+              <div class="l-flex-RC">
+                <van-field type="digit" colon :border="false" required v-model="item.name2" clearable label-width="110"
+                  name="name2" :label="$t('device.distributionProportionLabel')"
+                  :placeholder="$t('device.distributionProportionPlaceholder')"
+                  :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 @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>
             </div>
           </div>
-        </div>
-      </div>
-      <div v-if="distPropList.length <= 2" @click="toAdd" class="kBordBott l-flex-center o-ptb-20 c-text-14 c-text-w6">
-        +{{ $t('device.continueToAddDistributors') }}
-      </div>
-      <div style="margin: 16px;">
-        <van-button round block type="primary" native-type="submit">
-          {{ $t('device.submitForApproval') }}
-        </van-button>
+          <div v-if="distPropList.length <= 2" @click="toAdd"
+            class="kBordBott l-flex-center o-ptb-20 c-text-14 c-text-w6">
+            +{{ $t('device.continueToAddDistributors') }}
+          </div>
+          <div style="margin: 50px;">
+            <van-button round block type="primary" native-type="submit">
+              {{ $t('device.submitForApproval') }}
+            </van-button>
+          </div>
+        </van-form>
       </div>
-    </van-form>
+    </div>
     <!-- 设备编码选择框 -->
     <van-popup v-model:show="busiPopShow" position="bottom">
       <van-picker :title="$t('distributionSet.addDist.clientIdPlace')" :columns="busiPopList"
@@ -83,28 +150,31 @@
 
 <script>
 import { getEquipmentList } from '@/service/typeSelectList';
-import { Api_getDistriDetail } from "@/service/distributionSet";
+import { Api_getDistriDetail, Api_getCheckPending, Api_cancelDistri } from "@/service/distributionSet";
 import { saveProportion, getProportion } from '@/service/device';
 import sHeader from "@/components/SimpleHeader";
-import { showToast } from 'vant';
 import { computed, onMounted, reactive, ref } from 'vue';
 import { getLoginUser } from "@/common/js/utils";
 import { useRoute, useRouter } from "vue-router";
 import { useI18n } from 'vue-i18n';
 import { styleUrl } from '../../common/js/utils';
+import { showToast, showConfirmDialog, showSuccessToast, showFailToast } from "vant";
+
 export default {
   components: { sHeader },
   setup() {
     const route = useRoute();
     // 定义设备id,如果路由中有,那就是设备编辑里面进来的
     const clientId = ref('');
+    // 待审核记录
+    const proportionCheck = ref(null);
+    const id = route.query.id || '';
+    const type = route.query.type || '';
     onMounted(() => {
       // 加载样式
       styleUrl('distributionSet');
 
       clientId.value = route.query.clientId || '';
-      const id = route.query.id || '';
-      const type = route.query.type || '';
       cofficentForm.clientId = clientId.value;
       // 如果没有携带编码进来,那就请求接口让用户选择机器编码
       if (!clientId.value) {
@@ -117,7 +187,9 @@ export default {
           // 如果设备操作里进来的
           getProportionFun(2, clientId.value);
         }
+        getCheckPending();
       }
+      console.log("待审核记录1", proportionCheck.value);
     });
     // 获取分销详情填充信息
     // 获取分销信息填充
@@ -128,7 +200,7 @@ export default {
       } else {
         res = await getProportion({ adminId: user.id, clientId: id });
       }
-      console.log('res', res)
+      // console.log('res', res)
       const data = res.data;
       if (data.code === '00000') {
         cofficentForm.clientId = data.data.clientId;
@@ -149,7 +221,7 @@ export default {
           distPropList[2]['name1'] = data.data.personageName;
           distPropList[2]['name2'] = data.data.personageProportion;
         }
-        console.log('distPropList1111', distPropList)
+        // console.log('distPropList1111', distPropList)
       }
     }
     const { t } = useI18n();
@@ -180,6 +252,21 @@ export default {
         showToast(t('distributionSet.addDist.noZero'));
         return;
       }
+      if (distPropList.length > 0) {
+        if (distPropList[0] && distPropList[0]['name2'] == '0') {
+          showToast(t('distributionSet.addDist.zeroDis'));
+          return;
+        }
+        if (distPropList[1] && distPropList[1]['name2'] == '0') {
+          showToast(t('distributionSet.addDist.zeroDis'));
+          return;
+        }
+        if (distPropList[2] && distPropList[2]['name2'] == '0') {
+          showToast(t('distributionSet.addDist.zeroDis'));
+          return;
+        }
+      }
+      console.log("分销比例", cofficentForm.distProp)
       let param = {
         adminId: user.id,
         clientId: cofficentForm.clientId,
@@ -195,10 +282,15 @@ export default {
       }
       saveProportion(param).then(res => {
         if (res.data.code === '00000') {
-          showToast(res.data.data);
+          showToast(t('distributionSet.addDist.submitSuccess'));
           setTimeout(() => {
             router.back();
           }, 1000);
+        } else if (res.data.code === 'B0001') {
+          // showToast(t('distributionSet.addDist.hasExamine'));
+          showToast(res.data.message);
+        } else {
+          showToast(t('distributionSet.addDist.submitFailed'));
         }
       })
     };
@@ -211,10 +303,10 @@ export default {
     }
     // 点击删除
     const toDele = (idx) => {
-      if (distPropList.length === 1) {
-        showToast(t('distributionSet.addDist.distPropRange'));
-        return;
-      }
+      // if (distPropList.length === 1) {
+      //   showToast(t('distributionSet.addDist.distPropRange'));
+      //   return;
+      // }
       distPropList.splice(idx, 1);
     }
     // 分销比例规则
@@ -229,7 +321,7 @@ export default {
         busiPopList.value = data.data.map(item => {
           return { name: item.name != null ? item.name : item.clientId, clientId: item.clientId }
         });
-        console.log(busiPopList.value);
+        // console.log(busiPopList.value);
       }
     }
     // 设备编码选择框
@@ -244,16 +336,60 @@ export default {
     };
     // 点击确定按钮
     const busiPopConfirm = ({ selectedOptions }) => {
-      console.log(selectedOptions[0]);
+      // console.log(selectedOptions[0]);
       busiPopShow.value = false;
       cofficentForm.clientId = selectedOptions[0].clientId;
 
       // 重新获取当前设备的分销情况
       getProportionFun(2, selectedOptions[0].clientId);
+      getCheckPending();
     };
     const busiPopCancel = () => {
       busiPopShow.value = false;
     };
+
+    // 获取已提交的审核记录
+    const getCheckPending = async () => {
+      const { data } = await Api_getCheckPending({ adminId: user.id, clientId: cofficentForm.clientId });
+      if (data.code === '00000') {
+        // 存在审核记录,则不能再提交
+        proportionCheck.value = data.data;
+        console.log("待审核记录", proportionCheck.value);
+      }
+    }
+
+    // 撤销分销申请
+    const cancelDistri = (value) => {
+      showConfirmDialog({
+        title: t('user.tips'),
+        message: t('distributionSet.changeTips'),
+      }).then(async () => {
+        const { data } = await Api_cancelDistri({ id: value });
+        if (data.code == "00000") {
+          showSuccessToast(t('distributionSet.cancelSuccess'));
+          setTimeout(() => {
+            proportionCheck.value = [];
+            if (!clientId.value) {
+              getDeviceListFun();
+            } else {
+              if (id) {
+                // 如果是从分销列表进来的
+                getProportionFun(1, id, type);
+              } else {
+                // 如果设备操作里进来的
+                getProportionFun(2, clientId.value);
+              }
+              getCheckPending();
+            }
+          }, 1000);
+        } else {
+          showFailToast(data.message);
+        }
+      }).catch((error) => {
+        console.error(error);
+      })
+    }
+
     return {
       onSubmit,
       cofficentForm,
@@ -270,6 +406,8 @@ export default {
       busiPopConfirm,
       busiPopCancel,
       clientId,
+      proportionCheck,
+      cancelDistri,
     };
   }
 }

+ 54 - 8
src/views/distributionSet/index.vue

@@ -23,7 +23,7 @@
       <van-pull-refresh disabled v-model="refreshing" @refresh="onRefresh">
         <van-list v-model="loading" :finished="finished" :finished-text="$t('common.noMoreTxt')" @load="onLoad"
           :offset="300" :immediate-check="false">
-          <div v-for="item in tableData" :key="item.id" @click="toDetail(item)"
+          <div v-for="item in tableData" :key="item.id"
             class="o-plr-14 o-ptb-16 contentCon kBordBott">
             <div class="content l-flex-between">
               <div>
@@ -32,7 +32,16 @@
                   item.equipmentName
                 }}</span>
               </div>
-              <van-icon color="#B9BAD0" size="20" name="arrow" />
+              <!-- <van-icon color="#B9BAD0" size="20" name="arrow" /> -->
+            </div>
+            <div v-if="item.proportion" class="content l-flex-RC">
+              <div class="l-flex-RC">
+                <span class="titleName c-text-13">机主</span>
+              </div>
+              <div class="o-ml-30">
+                <span class="titleName c-text-13">{{ $t('distributionSet.distProp') }}:</span>
+                <span class="valueName c-text-13">{{ item.proportion }}%</span>
+              </div>
             </div>
             <div v-if="item.agencyProportion" class="content l-flex-RC">
               <div class="l-flex-RC">
@@ -70,15 +79,24 @@
                 <span class="valueName c-text-13">{{ item.personageProportion }}%</span>
               </div>
             </div>
-            <div class="content l-flex-RC">
+            <div class="content l-flex-between">
               <div>
                 <span class="titleName c-text-13">{{ $t('distributionSet.applTime') }}:</span>
                 <span class="valueName c-text-13">{{
-                  Format_time(item.createDate, "YYYY-MM-DD HH:MM")
+                  Format_time(item.createDate)
                 }}</span>
               </div>
-              <div v-if="tabActive === 1" class="effective c-text-15 c-text-w5 o-ml-20">
-                {{ $t('distributionSet.reviewed') }}
+              <van-button @click="cancelDistribution(item.id)" v-if="item.checkType === '0'" class="cancelBtn" type="warning" icon="revoke">
+                {{ $t('distributionSet.cancel') }}
+              </van-button>
+              <div v-if="item.checkType === '1'" class="effective c-text-15 c-text-w5 o-ml-20">
+                {{ $t('distributionSet.agree') }}
+              </div>
+              <div v-if="item.checkType === '2'" class="cancel c-text-15 c-text-w5 o-ml-20">
+                {{ $t('distributionSet.cancel') }}
+              </div>
+              <div v-if="item.checkType === '3'" class="rejected c-text-15 c-text-w5 o-ml-20">
+                {{ $t('distributionSet.rejected') }}
               </div>
             </div>
             <div v-if="tabActive === 0" class="approval c-text-15 c-text-w5 o-mt-6">
@@ -95,19 +113,21 @@
 // 导入公用方法
 import { Format_time } from "../../common/js/utils";
 // 导入接口
-import { Api_getPageProportion } from "../../service/distributionSet";
+import { Api_getPageProportion, Api_cancelDistri } from "../../service/distributionSet";
 import { onMounted, toRefs, ref, reactive } from "vue";
 import sHeader from "../../components/SimpleHeader";
 import { useRouter } from "vue-router";
 import { getLoginUser, styleUrl } from "../../common/js/utils";
 import kTabs from "../../components/commom/kTabs/index.vue";
 import { useI18n } from 'vue-i18n';
+import { showConfirmDialog, showSuccessToast, showFailToast } from "vant";
 
 export default {
   components: { sHeader, kTabs },
   setup() {
     const { t } = useI18n();
     const router = useRouter();
+
     const total =  ref(0);
     // 点击去详情
     const toDetail = (e) => {
@@ -193,7 +213,6 @@ export default {
           });
         }
         ruleData.tableData.push(...data.records);
-        console.log(ruleData.tableData);
         // 加载状态结束
         loading.value = false;
         // // 总共
@@ -204,6 +223,32 @@ export default {
       });
     };
 
+    // 撤销分销申请
+    const cancelDistribution = (id)=> {
+      const params = {
+        id: id,
+      }
+      showConfirmDialog({
+        title: t('user.tips'),
+        message: t('distributionSet.changeTips'),
+      }).then(async() => {
+        const { data } = await Api_cancelDistri(params);
+        if (data.code == "00000") {
+          showSuccessToast(t('distributionSet.cancelSuccess'));
+          setTimeout(() => {
+            ruleData.tableData = [];
+            pageNo.value = 1;
+            pageSize.value = 20;
+            getList();
+          }, 1000);
+        } else {
+          showFailToast(data.message);
+        }
+      }).catch((error) => {
+        console.error(error);
+      })
+    }
+
     return {
       toDetail,
       pageNo,
@@ -220,6 +265,7 @@ export default {
       tabList,
       Format_time,
       total,
+      cancelDistribution,
     };
   },
 };

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

@@ -33,7 +33,7 @@
       </div>
       <!-- 时间选择 -->
       <dateSelectList v-if="showDataDiv" @update="update($event)"></dateSelectList>
-      <typeSelectList v-if="showDataDiv" :isHome="true" @upselectdata="upselectdata($event)"></typeSelectList>
+      <typeDownMenu v-if="showDataDiv" :isHome="true" @upselectdata="upselectdata($event)"></typeDownMenu>
       <!-- 订单数据 -->
       <div v-if="showDataDiv" class="o-plr-8 o-pt-10">
         <div class="outer5 flex-col" @click="pushOrderCenter">
@@ -68,8 +68,8 @@
         </div>
       </div>
       <!-- 时间 -->
-      <div v-if="showDataDiv" class="c-text-c c-text-18">
-        {{ Format_time(dateSelect.startDate, 'YYYY-MM-DD') }}--{{ Format_time(dateSelect.endDate, 'YYYY-MM-DD') }}
+      <div v-if="showDataDiv" class="c-text-c" style="font-size: 18px; margin-top: 5px;">
+        {{ Format_time(dateSelect.startDate, 'YYYY/MM/DD') }}-{{ Format_time(dateSelect.endDate, 'YYYY/MM/DD') }}
       </div>
       <!-- ECharts
       <template v-if="showDataDiv && !noData(salesVolume, salesNumber)">
@@ -133,7 +133,7 @@ import kDialog from "../../components/commom/kDialog/index.vue";
 import { onMounted, ref, nextTick } from "vue";
 import sHeader from "../../components/SimpleHeader";
 import dateSelectList from "../../components/dateSelectList";
-import typeSelectList from "../../components/typeSelectList";
+import typeDownMenu from "../../components/typeDownMenu";
 import { getLoginUser, $M_Menus, Format_time, styleUrl, getLocal, setLocal, navigatorLanguage } from "../../common/js/utils";
 import { useRouter } from "vue-router";
 import {
@@ -152,7 +152,7 @@ export default {
   components: {
     sHeader,
     dateSelectList,
-    typeSelectList,
+    typeDownMenu,
     kDialog,
     kNoData,
   },

+ 172 - 135
src/views/merchantManage/set.vue

@@ -3,159 +3,160 @@
   <div class="merchantSetPage flex-col">
     <s-header :name="$t('merchantManage.merchantInformation')" :noback="false"></s-header>
     <div class="merchantSetBox">
-      <div class="Body flex-col">
-        <div class="Body flex-col">
-          <div class="wrap1 flex-col">
-            <div class="section1 flex-row justify-between">
-              <span class="word3" :class="{ acttive: tabType === '0' }" @click="tabType = '0'">{{
-                $t('merchantManage.essentialInformation') }}</span>
-              <span class="info1" :class="{ acttive: tabType === '1' }" @click="tabType = '1'">{{
-                $t('merchantManage.withdrawalData') }}</span>
+      <van-tabs v-model:active="active">
+        <van-tab :title="$t('merchantManage.essentialInformation')">
+          <van-form @submit="onSubmit">
+            <div class="van-cell van-field">
+              <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.accountNumber') }}</span>
+              </div>
+              <div class="van-field__value o-pt-8" style="text-align: left;">
+                <span> {{ adminObj.username }}</span>
+              </div>
             </div>
-            <!-- <div class="section2 flex-col"></div> -->
-            <img class="img1" referrerpolicy="no-referrer" src="../../assets/line.png" />
-          </div>
-          <div v-if="tabType === '0'">
-            <!-- <div class="wrap2 l-flex-RC">
-              <span class="info2">*</span>
-              <span class="info3">{{ $t('merchantManage.region') }}:
-              </span>
-            </div> -->
-
-            <!-- <span class="info5">{{ $t('merchantManage.subscriptionAdministrator') }}:</span> -->
-            <van-form @submit="onSubmit">
-              <div class="van-cell van-field">
-                <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.accountNumber') }}</span>
-                </div>
-                <div class="van-field__value o-pt-8" style="text-align: left;">
-                  <span> {{ adminObj.username }}</span>
-                </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" clearable
+              :label="$t('merchantManage.passwordLabel')" :placeholder="$t('merchantManage.passwordPlaceholder')" />
+            <span class="txt">{{ $t('merchantManage.leavBlanToIndiNoModi') }}</span>
+            <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')"
+              :placeholder="$t('merchantManage.mailboxPlaceholder')" />
+            <van-field v-model="adminObj.phone" name="password" :label="$t('merchantManage.telephone')"
+              :placeholder="$t('merchantManage.telephonePlaceholder')" />
+            <van-field v-model="adminObj.tradeMerchantNo" name="password"
+              :label="$t('merchantManage.merchantFilingNumberLabel')"
+              :placeholder="$t('merchantManage.merchantFilingNumberPlaceholder')" />
+            <div class="van-cell van-field">
+              <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.domesticOrNot') }}:</span>
               </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" 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" clearable
-                :label="$t('merchantManage.confirmPasswordLabel')"
-                :placeholder="$t('merchantManage.confirmPasswordPlaceholder')" />
-              <van-field v-model="adminObj.email" name="password" :label="$t('merchantManage.mailbox')"
-                :placeholder="$t('merchantManage.mailboxPlaceholder')" />
-              <van-field v-model="adminObj.phone" name="password" :label="$t('merchantManage.telephone')"
-                :placeholder="$t('merchantManage.telephonePlaceholder')" />
-              <van-field v-model="adminObj.tradeMerchantNo" name="password"
-                :label="$t('merchantManage.merchantFilingNumberLabel')"
-                :placeholder="$t('merchantManage.merchantFilingNumberPlaceholder')" />
+              <div class="van-cell__value van-field__value radioBox">
+                <van-radio-group v-model="adminObj.ifForeign" direction="horizontal">
+                  <van-radio name="0" icon-size="18px">{{ $t('merchantManage.yes') }}</van-radio>
+                  <van-radio name="1" icon-size="18px">{{ $t('merchantManage.no') }}</van-radio>
+                </van-radio-group>
+              </div>
+            </div>
+            <div v-if="adminType === 0 || adminType === 1">
               <div class="van-cell van-field">
-                <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.domesticOrNot') }}:</span></div>
+                <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.discountCode') }}</span>
+                </div>
                 <div class="van-cell__value van-field__value radioBox">
-                  <van-radio-group v-model="adminObj.ifForeign" direction="horizontal">
+                  <van-radio-group v-model="adminObj.promoCodeOpen" direction="horizontal">
                     <van-radio name="0" icon-size="18px">{{ $t('merchantManage.yes') }}</van-radio>
                     <van-radio name="1" icon-size="18px">{{ $t('merchantManage.no') }}</van-radio>
                   </van-radio-group>
                 </div>
               </div>
-              <div v-if="adminType === 0 || adminType === 1">
-                <div class="van-cell van-field">
-                  <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.discountCode') }}</span>
-                  </div>
-                  <div class="van-cell__value van-field__value radioBox">
-                    <van-radio-group v-model="adminObj.promoCodeOpen" direction="horizontal">
-                      <van-radio name="0" icon-size="18px">{{ $t('merchantManage.yes') }}</van-radio>
-                      <van-radio name="1" icon-size="18px">{{ $t('merchantManage.no') }}</van-radio>
-                    </van-radio-group>
-                  </div>
+              <div class="van-cell van-field">
+                <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.paymentPlatform')
+                    }}</span>
+                </div>
+                <div class="van-cell__value van-field__value radioBox">
+                  <van-radio-group v-model="adminObj.payPlatform" direction="horizontal">
+                    <van-radio name="0" icon-size="18px">{{ $t('merchantManage.convergence') }}</van-radio>
+                    <van-radio name="1" icon-size="18px">{{ $t('merchantManage.huifuPaymnt') }}</van-radio>
+                  </van-radio-group>
                 </div>
-                <div class="van-cell van-field">
-                  <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.paymentPlatform') }}</span>
-                  </div>
-                  <div class="van-cell__value van-field__value radioBox">
-                    <van-radio-group v-model="adminObj.payPlatform" direction="horizontal">
-                      <van-radio name="0" icon-size="18px">{{ $t('merchantManage.convergence') }}</van-radio>
-                      <van-radio name="1" icon-size="18px">{{ $t('merchantManage.huifuPaymnt') }}</van-radio>
-                    </van-radio-group>
-                  </div>
+              </div>
+              <div class="van-cell van-field">
+                <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.isDistribution')
+                    }}</span>
                 </div>
-                <div class="van-cell van-field">
-                  <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.isDistribution') }}</span>
-                  </div>
-                  <div class="van-cell__value van-field__value radioBox">
-                    <van-radio-group v-model="adminObj.isDistribution" direction="horizontal">
-                      <van-radio name="0" icon-size="18px">{{ $t('merchantManage.hidden') }}</van-radio>
-                      <van-radio name="1" icon-size="18px">{{ $t('merchantManage.reveal') }}</van-radio>
-                    </van-radio-group>
-                  </div>
+                <div class="van-cell__value van-field__value radioBox">
+                  <van-radio-group v-model="adminObj.isDistribution" direction="horizontal">
+                    <van-radio name="0" icon-size="18px">{{ $t('merchantManage.hidden') }}</van-radio>
+                    <van-radio name="1" icon-size="18px">{{ $t('merchantManage.reveal') }}</van-radio>
+                  </van-radio-group>
                 </div>
               </div>
-              <van-row justify="space-around" style="padding: 1em;">
-                <van-button span="5" round type="primary" style="height: 2em; padding: 0 2em;" native-type="submit">{{
-                  $t('merchantManage.modificationSubmission') }}
-                </van-button>
-              </van-row>
-            </van-form>
-          </div>
-          <div v-if="tabType === '1'" class="tab2">
-            <div class="kBordBott o-w o-pb-10">
-              <span class="info3">{{ $t('merchantManage.merchantType') }}:{{ adminMchObj.altMerchantType == 10 ? "个人" :
-                (adminMchObj.altMerchantType == 12 ? "企业" : "") }}</span>
-              <span class="info4">{{ $t('merchantManage.contactName') }}:{{ adminMchObj.busiContactName }}</span>
-              <span class="word4">{{ $t('merchantManage.cellPhone') }}:{{ adminMchObj.busiContactMobileNo }}</span>
             </div>
-            <div class="kBordBott o-w o-pb-10">
+            <van-row justify="space-around" style="padding: 10px; margin: 20px 0;">
+              <van-button span="5" round type="primary" style="height: 2em; padding: 0 2em;" native-type="submit">{{
+      $t('merchantManage.modificationSubmission') }}
+              </van-button>
+            </van-row>
+          </van-form>
+        </van-tab>
+        <van-tab :title="$t('merchantManage.withdrawalData')" class="tab">
+          <div class="kBordBott o-w o-pb-10">
+            <span class="info">{{ $t('merchantManage.merchantType') }}:{{ adminMchObj.altMerchantType == 10 ?
+      "个人" :
+      (adminMchObj.altMerchantType == 12 ? "企业" : "") }}</span>
+            <span class="info">{{ $t('merchantManage.contactName') }}:{{ adminMchObj.busiContactName }}</span>
+            <span class="info">{{ $t('merchantManage.cellPhone') }}:{{ adminMchObj.busiContactMobileNo }}</span>
+          </div>
+          <div class="kBordBott o-w o-pb-10">
 
-              <span class="txt2">{{ $t('merchantManage.nameOfLegalPerson/Individual') }}:{{ adminMchObj.legalPerson
+            <span class="info">{{ $t('merchantManage.nameOfLegalPerson/Individual') }}:{{ adminMchObj.legalPerson
               }}</span>
-              <span class="word5">{{ $t('merchantManage.phoneNumberOfLegalPerson/Individual') }}:{{ adminMchObj.phoneNo
+            <span class="info">{{ $t('merchantManage.phoneNumberOfLegalPerson/Individual') }}:{{
+      adminMchObj.phoneNo
+    }}</span>
+            <span class="info">{{ $t('merchantManage.legalPerson/IndividualIDNumber') }}:{{ adminMchObj.idCardNo
               }}</span>
-              <span class="word6">{{ $t('merchantManage.legalPerson/IndividualIDNumber') }}:{{ adminMchObj.idCardNo
+            <span class="info">{{ $t('merchantManage.validityOfIDCard') }}:{{ adminMchObj.idCardExpiry }}</span>
+            <span v-if="adminMchObj.altMerchantType == 12" class="info">{{
+      $t('merchantManage.businessLicenseCode')
+    }}:{{ adminMchObj.licenseNo }}</span>
+            <span v-if="adminMchObj.altMerchantType == 12" class="info">{{
+      $t('merchantManage.validityOfBusinessLicense') }}:{{ adminMchObj.licenseExpiry
               }}</span>
-              <span class="txt3">{{ $t('merchantManage.validityOfIDCard') }}:{{ adminMchObj.idCardExpiry }}</span>
-              <span v-if="adminMchObj.altMerchantType == 12" class="txt4">{{ $t('merchantManage.businessLicenseCode')
-              }}:{{ adminMchObj.licenseNo }}</span>
-              <span v-if="adminMchObj.altMerchantType == 12" class="word7">{{
-                $t('merchantManage.validityOfBusinessLicense') }}:{{ adminMchObj.licenseExpiry
-  }}</span>
-              <span class="txt5">{{ $t('merchantManage.natureOfBusiness') }}:{{ adminMchObj.manageScope }}</span> <span
-                class="word8">{{ $t('merchantManage.businessAddress') }}:{{ adminMchObj.manageAddr }}</span>
-            </div>
+            <span class="info">{{ $t('merchantManage.natureOfBusiness') }}:{{ adminMchObj.manageScope }}</span>
+            <span class="info">{{ $t('merchantManage.businessAddress') }}:{{ adminMchObj.manageAddr }}</span>
+          </div>
 
-            <div class="block5 flex-row justify-between">
-              <span class="txt6">{{ $t('merchantManage.accountType') }}
-                :{{ 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') }}:{{ joinpayState }}</span>
-              <span class="word12">{{ $t('merchantManage.huifuMch') }}:{{ huifuState }}</span>
+          <div class="kBordBott">
+            <span class="info">{{ $t('merchantManage.accountType') }}
+              :{{ adminMchObj.bankAccountType === 1 ? $t('merchantManage.debitCard') :
+      (adminMchObj.bankAccountType
+        ===
+        4
+        ? $t('merchantManage.corporateAccount') : "") }}</span>
+            <span class="info">{{ $t('merchantManage.bankAccountName') }}:{{ adminMchObj.bankAccountName }}</span>
+            <span class="info">{{ $t('merchantManage.bankAccount') }}:{{ adminMchObj.bankAccountNo }}</span>
+            <span v-if="adminMchObj.bankAccountType == 4" class="info">{{ $t('merchantManage.bankNo') }}:{{
+      adminMchObj.bankChannelNo }}</span>
+          </div>
+          <div v-if="adminType < 2">
+            <span class="info">{{ $t('merchantManage.joinpayMch') }}:{{ joinpayState }}</span>
+            <span class="info">{{ $t('merchantManage.huifuMch') }}:{{ huifuState }}</span>
+          </div>
+        </van-tab>
+        <van-tab :title="$t('merchantManage.sqbConfig')" class="tab">
+          <div v-if="sqbConfig" class="kBordBott o-w o-pb-10">
+            <span class="info">{{ $t('merchantManage.deviceId') }}:{{ sqbConfig.deviceId }}</span>
+            <span class="info">{{ $t('merchantManage.terminalSn') }}:{{ sqbConfig.terminalSn }}</span>
+            <span class="info">{{ $t('merchantManage.check') }}:{{ sqbConfig.checkin == '1' ?
+      $t('merchantManage.checkIn') : $t('merchantManage.checkOut') }}</span>
+          </div>
+          <div v-else>
+            <div class="activate o-pt-20">
+              <van-cell-group inset>
+                <van-field label-align="center" v-model="activateCode" :label="$t('merchantManage.activateCode')" :placeholder="$t('merchantManage.activateCodePlaceholder')" />
+              </van-cell-group>
             </div>
+            <van-row justify="space-around" style=" margin: 20px 0;">
+              <van-button span="5" round type="primary" style="height: 30px; padding: 0 30px;" @click="activeConfig">{{
+                $t('merchantManage.activate') }}
+              </van-button>
+            </van-row>
           </div>
-        </div>
-      </div>
+        </van-tab>
+      </van-tabs>
     </div>
   </div>
 </template>
 <script>
 import { onMounted, ref } from "vue";
 import sHeader from "@/components/SimpleHeader";
-import { getAdmin, getRelation, getAdminMch, updateAdmin, getHuifuMch, getRelationAdminId } from "@/service/merchantManage";
-import { showFailToast, showSuccessToast } from "vant";
+import { getAdmin, getRelation, getAdminMch, updateAdmin, getHuifuMch, getRelationAdminId, getSqbConfigApi, activeSqbConfigApi } from "@/service/merchantManage";
+import { showConfirmDialog, showFailToast, showSuccessToast, showToast } from "vant";
 import { useRoute } from "vue-router";
 import { getLoginUser, styleUrl } from "@/common/js/utils";
 import { useI18n } from "vue-i18n";
@@ -165,6 +166,7 @@ export default {
   setup() {
     // 引入语言
     const { t } = useI18n();
+    const active = ref(0);
     const tabType = ref('0');
     const user = getLoginUser();
     const adminType = ref(user.type);
@@ -177,6 +179,11 @@ export default {
     const ifForeign = ref('0');
     const huifuState = ref('未入驻');
     const joinpayState = ref('未入驻');
+    // 收钱吧配置
+    const sqbConfig = ref();
+    // 激活码
+    const activateCode = ref('');
+
     onMounted(async () => {
       // 加载样式
       styleUrl('merchantManage');
@@ -185,6 +192,7 @@ export default {
       getRelationFun();
       getAdminMchFun();
       getHuifuMchFun();
+      getSqbConfig();
 
     });
     const getAdminFun = async () => {
@@ -201,8 +209,6 @@ 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 });
@@ -217,8 +223,6 @@ export default {
       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 == '签约成功') {
@@ -235,8 +239,6 @@ export default {
           }
         }
       }
-      // console.log('getAdminMchFun', data);
-      // console.log('adminMchObj', adminMchObj.value.signStatus);
     }
     const getHuifuMchFun = async () => {
       const { data } = await getHuifuMch({ adminId: merchantId.value });
@@ -253,8 +255,18 @@ export default {
 
         }
       }
-      // console.log('getHuifuMchFun', data);
     }
+
+    // 获取收钱吧配置
+    const getSqbConfig = async () => {
+      const { data } = await getSqbConfigApi({ adminId: merchantId.value });
+      if (data.code === "00000") {
+        if (data.data != null) {
+          sqbConfig.value = data.data;
+          console.log("sqbConfig", sqbConfig.value);
+        }
+      }
+    };
     const onSubmit = async () => {
       try {
         if (relationObj.value.relationUsername != null) {
@@ -265,7 +277,6 @@ export default {
             }
           }
         }
-        // console.log("relationAdminId --> ", adminObj.value.relationAdminId);
         const params = {
           id: adminObj.value.id,
           name: adminObj.value.name,
@@ -276,6 +287,7 @@ export default {
           email: adminObj.value.email,
           tradeMerchantNo: adminObj.value.tradeMerchantNo,
         };
+        console.log('adminObj', adminObj.value);
         if (adminType.value === 0 || adminType.value === 1) {
           params.promoCodeOpen = adminObj.value.promoCodeOpen;
           params.applyStartTime = adminObj.value.applyStartTime;
@@ -291,11 +303,11 @@ export default {
             showFailToast(t('merchantManage.theTwoPasswordsAreDifferent'));
           }
         }
+        console.log('params', params);
         const { data } = await updateAdmin(params);
         if (data.code === "00000") {
           showSuccessToast(t('merchantManage.modificationSucceeded'));
           setTimeout(() => {
-            // router.go(0);
             getAdminFun();
           }, 1500);
         } else { showFailToast(data.message); }
@@ -305,6 +317,27 @@ export default {
         console.error('提交管理员信息失败', error);
       }
     }
+
+    // 激活收钱吧配置
+    const activeConfig = () => {
+      if (activateCode.value == null || activateCode.value == '') {
+        showToast(t('merchantManage.activateCodePlaceholder'));
+        return;
+      }
+      showConfirmDialog({
+        title: t('merchantManage.tips'),
+        message: t('merchantManage.isActivate'),
+      }).then(async() => {
+        const { data } = await activeSqbConfigApi({adminId: merchantId.value, code: activateCode.value});
+        if (data.data != null) {
+          showSuccessToast(t('merchantManage.activateSucceeded'));
+        } else {
+          showFailToast(t('merchantManage.activateFailed'));
+        }
+      }).catch((error) => {
+        console.error(error);
+      })
+    }
     return {
       tabType,
       adminType,
@@ -315,6 +348,10 @@ export default {
       onSubmit,
       joinpayState,
       huifuState,
+      active,
+      sqbConfig,
+      activeConfig,
+      activateCode,
     };
   },
 };

+ 121 - 77
src/views/orderCenter/index.vue

@@ -25,7 +25,7 @@
         </div>
         <!-- <img class="img1" referrerpolicy="no-referrer" src="@/assets/line.png" /> -->
         <dateSelectList @update="update($event)"></dateSelectList>
-        <typeSelectList @upselectdata="upselectdata($event)"></typeSelectList>
+        <typeDownMenu @upselectdata="upselectdata($event)"></typeDownMenu>
         <div v-if="!noData(salesVolume, salesNumber, orderNumber)" class="o-plr-8 o-pt-15">
           <div class="outer5 flex-col">
             <div class="block5 flex-col">
@@ -56,8 +56,9 @@
         </div>
         <kNoData v-else></kNoData>
         <!-- 时间 -->
-        <div class="c-text-c c-text-18 o-ptb-5" v-if="searchParams.startDate != '' || searchParams.endDate != ''">
-          {{ Format_time(searchParams.startDate, 'YYYY-MM-DD') }}--{{ Format_time(searchParams.endDate, 'YYYY-MM-DD') }}
+        <div class="c-text-c" style="font-size: 18px; margin-top: 5px;">
+          {{ Format_time(searchParams.startDate, 'YYYY/MM/DD') }}-{{ Format_time(searchParams.endDate, 'YYYY/MM/DD')
+          }}
         </div>
         <div class="group7 flex-col justify-center">
           <div class="main9 flex-col justify-between">
@@ -145,82 +146,100 @@
     <orderSearch ref="searchRef" @search="search($event)"></orderSearch>
     <!-- 退款弹窗 -->
     <van-popup v-model:show="refundType" position="bottom" round closeable>
-      <div class="refundBox flex-col">
-        <div class="section1 flex-col">
-          <div class="group3 flex-col">
-            <div class="TextGroup1 l-flex-center">
-              <div class="outer1 flex-col">
-                <!-- <span class="txt4">这里是设备名称</span> -->
-                <span class="info1">{{ $t('orderCenter.business') }}</span>
-                <span class="txt5">+ {{ refundObject.refundAmount == null ? refundObject.price.toFixed(2) :
+      <div class="orderPopBox flex-col">
+        <!-- <div class="section1 flex-col"> -->
+        <!-- <div class="group3 flex-col"> -->
+        <div class="popTopBox l-flex-center">
+          <div class="popTopTxtBox flex-col">
+            <!-- <span class="txt4">这里是设备名称</span> -->
+            <span class="business">{{ $t('orderCenter.business') }}</span>
+            <span class="incomePrice">+ {{ refundObject.refundAmount == null ? refundObject.price.toFixed(2) :
       (refundObject.price - refundObject.refundAmount).toFixed(2) }}</span>
-              </div>
-            </div>
-            <div class="layer1 flex-col"></div>
-            <!-- <div class="layer2 flex-row justify-between">
+          </div>
+        </div>
+        <div class="line flex-col"></div>
+        <!-- <div class="layer2 flex-row justify-between">
               <span class="info2">{{ $t('orderCenter.accountBalance') }}</span>
               <span class="txt6">{{ accountDetail.altAvilBalance }}</span>
             </div> -->
-            <div class="layer3 flex-row justify-between">
-              <span class="word2">{{ $t('orderCenter.orderNo') }}</span>
-              <span class="info3">{{ refundObject.sn }}</span>
-            </div>
-            <div v-if="refundObject.status != 0 && user.ifForeign === '0'" class="layer3 flex-row justify-between">
-              <span class="word2">{{ $t('orderCenter.orderSerialNumberLabel') }}</span>
-              <span class="info3">{{ refundObject.trxNo }}</span>
-            </div>
-            <div class="layer3 flex-row justify-between">
-              <span class="word2">{{ $t('orderCenter.commodity') }}</span>
-              <span class="info3">{{ refundObject.productName }}</span>
-            </div>
-            <div class="layer3 flex-row justify-between">
-              <span class="word2">{{ $t('orderCenter.distribution') }}</span>
-              <span class="info3">{{ showSubcom(refundObject) }}</span>
-            </div>
-            <div class="layer3 flex-row justify-between">
-              <span class="word2">{{ $t('orderCenter.equipmentNo') }}</span>
-              <span class="info3">{{ refundObject.clientId }}</span>
-            </div>
-            <div class="layer3 flex-row justify-between">
-              <span class="word2">{{ $t('orderCenter.state') }}</span>
-              <span class="info3">{{ showStatus(refundObject) }}</span>
-            </div>
-            <div class="layer3 flex-row justify-between">
-              <span class="word2">{{ $t('orderCenter.paymentMethod') }}</span>
-              <span class="info3">{{ showPayType(refundObject) }}</span>
-            </div>
-            <div class="layer3 flex-row justify-between">
-              <span class="word2">{{ refundObject.status === 1 ? $t('orderCenter.paymentTime') : refundObject.status ===
-      3 ?
-      $t('orderCenter.refundTime') : $t('orderCenter.creationTime') }}</span>
-              <span class="info3">{{ showOrderTime(refundObject, 1) }}</span>
-            </div>
-            <div v-if="refundObject.status === 3" class="layer3 flex-row justify-between">
-              <span class="word2">{{ $t('orderCenter.refunded') }}</span>
-              <span class="info3">{{ refundObject.refundAmount }}</span>
-            </div>
-            <div v-if="refundObject.status === 3 && orderType == '3'" class="layer3 flex-row justify-between">
-              <span class="word2">退款原因</span>
-              <span class="info3">{{ refundObject.refundReason }}</span>
-            </div>
-            <div class="layer6 flex-row justify-between l-flex-center"
-              v-if="(refundObject.status != 0 && refundObject.status != 2) && orderType == '3'">
-              <span class="word6 o-mr-40">是否开发票</span>
-              <van-radio-group v-model="isInvoice" direction="horizontal">
-                <van-radio :name="1">是</van-radio>
-                <van-radio :name="0">否</van-radio>
-              </van-radio-group>
-              <van-button color="#4d6add" type="primary" size="small" class="o-p-20"
-                @click="updateInvoice(refundObject.id)" style="padding: 10px; margin-left: 20px;">更新</van-button>
-            </div>
-            <!-- 发起退款 -->
-            <!-- 非已付款订单,线下订单要隐藏按钮 -->
-            <van-button size="small"
-              v-if="(refundObject.status === 1 && user.ifForeign === '0' && isRefund) || (refundObject.status === 1 && user.ifForeign === '1' && refundObject.isAir === '1')"
-              @click="noticeClk(refundObject)" round type="primary" style="margin-top: 20px;">
-              {{ $t('orderCenter.initiateRefund') }}
-            </van-button>
+        <div class="orderDetailBox flex-row justify-between">
+          <span class="title">{{ $t('orderCenter.orderNo') }}</span>
+          <!-- <span class="content">{{ refundObject.sn }}</span> -->
+          <van-text-ellipsis class="content" :content="refundObject.sn" :expand-text="$t('orderCenter.seeMore')" :collapse-text="$t('orderCenter.stow')" />
+        </div>
+        <div v-if="refundObject.status != 0 && user.ifForeign === '0'" class="orderDetailBox flex-row justify-between">
+          <span class="title">{{ $t('orderCenter.orderSerialNumberLabel') }}</span>
+          <!-- <span class="content">{{ refundObject.trxNo }}</span> -->
+          <van-text-ellipsis class="content" :content="refundObject.trxNo" :expand-text="$t('orderCenter.seeMore')" :collapse-text="$t('orderCenter.stow')" />
+        </div>
+        <div class="orderDetailBox flex-row justify-between">
+          <span class="title">{{ $t('orderCenter.commodity') }}</span>
+          <!-- <span class="content">{{ refundObject.productName }}</span> -->
+          <van-text-ellipsis class="content" :content="refundObject.productName" :expand-text="$t('orderCenter.seeMore')" :collapse-text="$t('orderCenter.stow')" />
+        </div>
+        <div v-if="user.ifForeign === '0' && user.isDistribution === '1'" class="orderDetailBox flex-row justify-between">
+          <span class="title">{{ $t('orderCenter.distribution') }}</span>
+          <span class="content">{{ showSubcom(refundObject) }}</span>
+        </div>
+        <div class="orderDetailBox flex-row justify-between">
+          <span class="title">{{ $t('orderCenter.equipmentNo') }}</span>
+          <!-- <span class="content">{{ refundObject.clientId }}</span> -->
+          <van-text-ellipsis class="content" :content="refundObject.clientId" :expand-text="$t('orderCenter.seeMore')" :collapse-text="$t('orderCenter.stow')" />
+        </div>
+        <div class="orderDetailBox flex-row justify-between">
+          <span class="title">{{ $t('orderCenter.state') }}</span>
+          <span class="content">{{ showStatus(refundObject) }}</span>
+        </div>
+        <div class="orderDetailBox flex-row justify-between">
+          <span class="title">{{ $t('orderCenter.paymentMethod') }}</span>
+          <!-- <span class="content">{{ showPayType(refundObject) }}</span> -->
+          <van-text-ellipsis class="content" :content="showPayType(refundObject)" :expand-text="$t('orderCenter.seeMore')" :collapse-text="$t('orderCenter.stow')" />
+        </div>
+        <div class="orderDetailBox flex-row justify-between">
+          <span class="title">
+            {{ refundObject.status === 1 ? $t('orderCenter.paymentTime') : refundObject.status === 3 ?
+      $t('orderCenter.refundTime') : $t('orderCenter.creationTime') }}
+          </span>
+          <!-- <span class="content">{{ showOrderTime(refundObject, 1) }}</span> -->
+          <van-text-ellipsis class="content" :content="showOrderTime(refundObject, 1)" :expand-text="$t('orderCenter.seeMore')" :collapse-text="$t('orderCenter.stow')" />
+        </div>
+        <div v-if="refundObject.status === 3" class="orderDetailBox flex-row justify-between">
+          <span class="title">{{ $t('orderCenter.refunded') }}</span>
+          <span class="content">{{ refundObject.refundAmount }}</span>
+        </div>
+        <div v-if="refundObject.status === 3 && orderType == '3'" class="orderDetailBox flex-row justify-between">
+          <span class="title">退款原因</span>
+          <span class="content">{{ refundObject.refundReason }}</span>
+        </div>
+        <div class="orderDetailBox flex-row justify-between l-flex-center"
+          v-if="(refundObject.status != 0 && refundObject.status != 2) && orderType == '3'">
+          <span class="title">是否开发票</span>
+          <van-radio-group v-model="isInvoice" direction="horizontal">
+            <van-radio :name="1">是</van-radio>
+            <van-radio :name="0">否</van-radio>
+          </van-radio-group>
+          <van-button color="#2c87c8" type="primary" size="small" class="o-p-20" @click="updateInvoice(refundObject.id)"
+            style="padding: 10px; margin-left: 20px;">更新</van-button>
+        </div>
+        <van-field v-if="refundObject.status === 1 && user.ifForeign === '0' && user.type < 2 && orderType != '3'"
+          v-model="customerPhone" center label="联系方式" placeholder="消费者联系方式,没有则不填">
+        </van-field>
+        <!-- 发起退款 -->
+        <!-- 非已付款订单,线下订单要隐藏按钮 -->
+        <div style="display: flex; justify-content: center; padding-bottom: 20px;">
+          <van-button size="small"
+            v-if="refundObject.status === 1 && user.ifForeign === '0' && user.type < 2 && orderType != '3'"
+            @click="sentRefundMessage(refundObject)" round type="primary" style="padding: 15px 15px; margin-top: 20px;"
+            color="#4dc193">
+            退款提醒
+          </van-button>
+          <div v-if="refundObject.status === 1 && user.ifForeign === '0' && user.type < 2" style="width: 20px;">
           </div>
+          <van-button size="small"
+            v-if="refundObject.status === 1 && user.ifForeign === '0' && isRefund"
+            @click="noticeClk(refundObject)" round type="primary" style="padding: 15px 15px; margin-top: 20px;">
+            {{ $t('orderCenter.initiateRefund') }}
+          </van-button>
         </div>
       </div>
     </van-popup>
@@ -271,18 +290,18 @@ import kNoData from "../../components/commom/kNoData/index.vue";
 import { onMounted, reactive, ref } from "vue";
 import sHeader from "../../components/SimpleHeader";
 import orderSearch from "./orderSearch.vue";
-import { getOrderList, refundOrder, refundWechatOrder, updateIsInvoice, exportOrder } from "../../service/order/index";
+import { getOrderList, refundOrder, refundWechatOrder, updateIsInvoice, sentMessage, exportOrder, refundSqbOrder } from "../../service/order/index";
 import { showFailToast, showToast, showLoadingToast } from "vant";
 import { getLoginUser, $M_IsDate, Format_time, $M_ExportFile, styleUrl } from "../../common/js/utils";
 import { getHuifuId } from "../../service/huifuMch/index";
 import dateUtil from "../../utils/dateUtil";
 import dateSelectList from "../../components/dateSelectList";
-import typeSelectList from "../../components/typeSelectList";
+import typeDownMenu from "../../components/typeDownMenu";
 import { getStatistics } from "../../service/home";
 import { useI18n } from "vue-i18n";
 export default {
   name: "order",
-  components: { sHeader, orderSearch, dateSelectList, typeSelectList, kNoData, kDialog },
+  components: { sHeader, orderSearch, dateSelectList, typeDownMenu, kNoData, kDialog },
   setup() {
     // 批量修改弹窗
     const kDialogRef = ref(null);
@@ -421,6 +440,26 @@ export default {
         return;
       });
     }
+    const customerPhone = ref(''); // 消费者号码
+    // 发送退款提醒短信
+    const sentRefundMessage = async (row) => {
+      const params = {
+        id: row.id,
+        customerPhone: customerPhone.value,
+      }
+      showConfirmDialog({
+        message: '是否确认发送短信?',
+      }).then(async () => {
+        const { data } = await sentMessage(params);
+        if (data.code) {
+          showSuccessToast(data.data);
+        } else {
+          showFailToast(data.data);
+        }
+      }).catch(() => {
+        return;
+      });
+    }
     // 退款操作
     const refundAjax = async () => {
       try {
@@ -428,6 +467,8 @@ export default {
         let data = null;
         if (orderType.value === '3') {
           data = await refundWechatOrder(cofficentForm);
+        } else if (orderType.value === '4') {
+          data = await refundSqbOrder(cofficentForm);
         } else {
           data = await refundOrder(cofficentForm);
         }
@@ -810,6 +851,7 @@ export default {
       { text: t('orderCenter.antiScanningOfAlipay'), values: "ALIPAY_CARD" },
       { text: t('orderCenter.weChatBackScanning'), values: "WEIXIN_CARD" },
       { text: t('orderCenter.weChatBackScanning'), values: "WEIXIN_PAYCODE" },
+      { text: t('orderCenter.eCNYBackeScanning'), values: 'ECNY_CARD' },
     ];
     // 弹窗支付上述
     const showPayType = (item) => {
@@ -891,6 +933,8 @@ export default {
       kDialogRef,
       noticeClk,
       confirmClk,
+      sentRefundMessage,
+      customerPhone,
       cofficentForm,
       accountDetail,
       Format_time,

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

@@ -130,32 +130,6 @@ export default {
         });
       }
     };
-    // 获取角色下拉列表
-    // const getSysRoleListFun = async () => {
-    //   const { data } = await getSysRoleList();
-    //   if (data.code === "00000") {
-    //     roleOptions.value = data.data.map((item) => {
-    //       return { text: item.label, value: item.value };
-    //     });
-    //   } else {
-    //     Toast.fail(data.message);
-    //   }
-    // };
-    // 获取机器下拉
-    // const getEquipmentListFun = async () => {
-    //   const { data } = await getEquipmentList({ adminId: user.id });
-    //   if (data.code === "00000") {
-    //     equipmentIdsOptions.value = data.data.map((item) => {
-    //       return { text: item.name, value: item.id };
-    //     });
-    //     equipmentIdsOptions.value.unshift({
-    //       text: t("role.whole"),
-    //       value: "all",
-    //     });
-    //   } else {
-    //     Toast.fail(data.message);
-    //   }
-    // };
 
     const onSubmit = async () => {
       if (roleItem) {

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

@@ -8,7 +8,7 @@
           <div class="flex-row justify-between bd3">
             <div class="flex-col outer4"></div>
             <span class="flex-col txt2">{{ $t('role.total') }}<span class="discountNumber">{{ accountPerList.length
-            }}</span>{{ $t('role.inTotal') }}</span>
+                }}</span>{{ $t('role.inTotal') }}</span>
           </div>
         </div>
         <div class="flex-col">
@@ -27,7 +27,7 @@
               <div class="itemRow">{{ item.roleName }}</div>
               <div class="itemRow" style="color: #8787a6;">
                 <span v-for="(role, rindex) in item.menuCodesJson" :key="rindex" class="roleItem">{{ showRole(role)
-                }}</span>
+                  }}</span>
               </div>
             </div>
             <div class="operBox">

+ 26 - 21
src/views/taskMessage/equipment/index.vue

@@ -4,19 +4,23 @@
     <s-header :name="$t('taskMessage.taskMessage')" :noback="false"></s-header>
     <div class="taskMessageBox flex-col">
       <van-list v-model:loading="loading" v-model:error="error" :error-text="$t('common.reqFailClkReload')"
-        :finished="finished" :finished-text="$t('common.noMoreTxt')" offset="300" :immediate-check="false" @load="onLoad">
+        :finished="finished" :finished-text="$t('common.noMoreTxt')" offset="300" :immediate-check="false"
+        @load="onLoad">
         <div class="searchRow flex-row justify-between">
           <div class="flex-col">
             <div class="flex-row justify-between bd3">
               <div class="flex-col outer4 equipmentIcon"></div>
               <span class="flex-col txt2">{{ $t("taskMessage.total")
-              }}<span class="discountNumber">{{ alarmHistoryTotal }}</span>{{ $t("taskMessage.recordsInTotal") }}</span>
+                }}<span class="discountNumber">{{ alarmHistoryTotal }}</span>{{ $t("taskMessage.recordsInTotal")
+                }}</span>
             </div>
           </div>
           <div class="l-flex-RC">
+            <!-- 查看待审批的申请 -->
             <div @click="reviewedClk" class="label3 o-mr-30">
               {{ $t("taskMessage.toViewAppro") }}
             </div>
+            <!-- 搜索图片 -->
             <div @click="noticeClk" class="main5 l-flex-RC">
               <img class="label2 o-mr-5" src="../../../assets/device/searchIcon.png" />
               <span class="txt3">{{ $t("taskMessage.search") }}</span>
@@ -27,7 +31,8 @@
           <div v-for="(item, index) in alarmHistoryList" :key="index" class="listItem">
             <div class="itemBox">
               <div class="itemRow">
-                <span class="itemTitle">{{ $t("taskMessage.affiliatedMerchants") }}:&nbsp;</span>{{ item.adminUserName }}
+                <span class="itemTitle">{{ $t("taskMessage.affiliatedMerchants") }}:&nbsp;</span>{{ item.adminUserName
+                }}
               </div>
               <div class="itemRow">
                 <span class="itemTitle">{{ $t("taskMessage.equipmentNo") }}:&nbsp;</span>{{ item.clientId }}
@@ -37,16 +42,17 @@
               </div>
               <div class="itemRow" v-if="item.statusType === 1">
                 <span class="itemTitle">{{ $t("taskMessage.state") }}:&nbsp;</span><span style="color: red">{{
-                  showItemType(item.statusType)
-                }}</span>
+      showItemType(item.statusType)
+    }}</span>
               </div>
               <div class="itemRow">
                 <span class="itemTitle">{{ $t("taskMessage.applicationTime") }}:&nbsp;</span>{{
-                  showDateTime(item.createDate) }}
+      showDateTime(item.createDate) }}
               </div>
               <div class="itemRow" v-if="item.statusType !== 1">
-                <span class="itemTitle">{{ $t("taskMessage.approvalTime") }}:&nbsp;</span>{{ showDateTime(item.modifyDate)
-                }}
+                <span class="itemTitle">{{ $t("taskMessage.approvalTime") }}:&nbsp;</span>{{
+      showDateTime(item.modifyDate)
+    }}
               </div>
               <div v-if="item.statusType === 1 && isOper" class="itemRow"
                 style="display: flex; justify-content: flex-end">
@@ -72,11 +78,11 @@
               </div>
               <div class="itemRow" style="display: flex; justify-content: flex-end">
                 <span v-if="item.statusType === 2" style="color: #ff0000">{{
-                  showItemType(item.statusType)
-                }}</span>
+      showItemType(item.statusType)
+    }}</span>
                 <span v-if="item.statusType === 3" style="color: #4fc08d">{{
-                  showItemType(item.statusType)
-                }}</span>
+      showItemType(item.statusType)
+    }}</span>
               </div>
             </div>
           </div>
@@ -89,21 +95,21 @@
       <template #content>
         <div class="cust_vantBorder">
           <van-field clearable v-model="searchForm.equipmentNo" :placeholder="$t('taskMessage.equipmentInit.searchPop.equipmentNoPlace')
-            " :label="$t('taskMessage.equipmentInit.searchPop.equipmentNo')" />
+      " :label="$t('taskMessage.equipmentInit.searchPop.equipmentNo')" />
           <van-field clearable v-model="searchForm.managementSystemID" :placeholder="$t('taskMessage.equipmentInit.searchPop.managementSystemIDPlace')
-            " :label="$t('taskMessage.equipmentInit.searchPop.managementSystemID')
-    " />
+      " :label="$t('taskMessage.equipmentInit.searchPop.managementSystemID')
+      " />
           <van-field clearable v-model="searchForm.merchantName" :placeholder="$t('taskMessage.equipmentInit.searchPop.merchantNamePlace')
-            " :label="$t('taskMessage.equipmentInit.searchPop.merchantName')" />
+      " :label="$t('taskMessage.equipmentInit.searchPop.merchantName')" />
           <van-field @click-input="busiInpClk" readonly clearable v-model="searchForm.stateName"
             :placeholder="$t('taskMessage.equipmentInit.searchPop.statePlace')"
             :label="$t('taskMessage.equipmentInit.searchPop.state')">
             <template #right-icon>
               <div class="l-flex-RC">
                 <van-icon v-if="searchForm.stateName" @click="
-                  searchForm.stateName = '';
-                searchForm.state = '';
-                " class="o-mr-6" name="clear" />
+      searchForm.stateName = '';
+    searchForm.state = '';
+    " class="o-mr-6" name="clear" />
                 <van-icon @click="busiInpClk" name="arrow-down" />
               </div>
             </template>
@@ -325,5 +331,4 @@ export default {
 
 <style lang="less" scoped>
 @import "../../../common/style/common.less";
-</style>
-  
+</style>

+ 91 - 21
src/views/user.vue

@@ -100,29 +100,32 @@
               <van-icon name="edit" class="editIcon" @click="editClk(3)" />
             </div>
           </div>
-          <!-- 关联上级 -->
-          <!-- <div v-if="isInland && user.type == '2'">
-            <div v-if="!relationType" class="userInfo l-flex-between">
-              <span class="userInfoLeft">{{ $t("user.associateParent") }}: </span>
-              <div>
-                <van-field class="relationClass" v-model="cofficentForm.associateParent"
-                  :placeholder="$t('user.associateParentPlace')">
-                  <template #button>
-                    <van-button type="primary" @click="mailboxChg(cofficentForm.associateParent, 1)">{{
-                      $t("user.confirmLog") }}
-                    </van-button>
-                  </template>
-                </van-field>
+          <!-- 时区 -->
+          <div v-if="user.type > 1">
+            <div v-if="!timezoneShow" class="userInfo l-flex-between">
+              <span class="userInfoLeft">{{ $t("user.setTheTimezone") }}: </span>
+              <div class="cust_vantBorder">
+                <div class="filedInpPad">
+                  <van-field @click-input="tzFieldValueInpClk" readonly clearable v-model="tzFieldValue"
+                    :placeholder="$t('user.setTheTimezonePlace')">
+                    <template #right-icon>
+                      <div class="l-flex-RC">
+                        <van-icon v-if="tzFieldValue" @click="tzFieldValue = ''; accountDetail.timeZone = '';"
+                          class="o-mr-6" name="clear" />
+                        <van-icon @click="tzFieldValueInpClk" name="arrow-down" />
+                      </div>
+                    </template>
+                  </van-field>
+                </div>
               </div>
-              <van-icon name="edit" class="editIcon" @click="editClk(1)" />
+              <van-icon name="edit" class="editIcon" @click="editClk(7)" />
             </div>
             <div v-else class="userInfo l-flex-between">
-              <span class="userInfoLeft">{{ $t("user.associateParent") }}: </span>
-              <span>{{ relationAdminName }}</span>
-              <van-icon name="edit" class="editIcon" @click="editClk(1)" />
+              <span class="userInfoLeft">{{ $t("user.setTheTimezone") }}: </span>
+              <span>{{ tzFieldValue }}</span>
+              <van-icon name="edit" class="editIcon" @click="editClk(7)" />
             </div>
-          </div> -->
-
+          </div>
           <!-- 自定义货币符号 -->
           <div v-if="!symbolShow" class="userInfo l-flex-between">
             <span class="userInfoLeft">{{ $t("user.currencySymbol") }}: </span>
@@ -197,7 +200,7 @@
           </div>
 
           <!-- 提现帐号 -->
-          <div v-if="isInland && user.type == '2'" class="taskListRow flex-col" @click="pushPageList('/settlement')">
+          <div v-if="isInland && user.type > '1'" class="taskListRow flex-col" @click="pushPageList('/settlement')">
             <div class="taskIcon joinPayMchIcon"></div>
             <div class="taskRight">
               <div class="taskTitle">{{ $t("user.settlementAccount") }}</div>
@@ -254,12 +257,17 @@
     <!-- 地区弹窗 -->
     <kCascader @getareaname="getAreaName" :selectId="accountDetail.areaId" @areapopfinish="areaPopFinish"
       ref="kCascaderRef"></kCascader>
+    <!-- 时区弹窗 -->
+    <kTimezone @gettimezone="getTimezone" :selectId="accountDetail.timezone" @timezonepopfinish="timezonePopFinish"
+      ref="kTimezoneRef"></kTimezone>
   </div>
 </template>
 
 <script>
 // 导入地区弹窗
 import kCascader from "@/components/commom/kCascader/index.vue";
+// 导入时区弹窗
+import kTimezone from "@/components/commom/kTimezone/index.vue";
 // 导入接口
 import { getAdmin } from "@/service/merchantManage";
 import { updateAdmin } from "@/service/merchantManage";
@@ -279,7 +287,7 @@ import { useI18n } from "vue-i18n";
 import { styleUrl } from "../common/js/utils";
 
 export default {
-  components: { sHeader, kDialog, kCascader },
+  components: { sHeader, kDialog, kCascader, kTimezone },
   setup() {
     // 引入语言
     const { t } = useI18n();
@@ -287,6 +295,8 @@ export default {
     const accountDetail = ref({});
     // 控制地区显示隐藏
     const areaShow = ref(true);
+    // 控制时区显示隐藏
+    const timezoneShow = ref(true);
     // 控制手机显示隐藏
     const phoneNumberShow = ref(true);
     // 控制邮箱显示隐藏
@@ -318,6 +328,7 @@ export default {
       phone: accountDetail.value.phone,
       area: "",
       currencySymbol: accountDetail.value.currencySymbol,
+      timeZone: accountDetail.value.timeZone,
     });
     // 
     const params = reactive({
@@ -334,6 +345,7 @@ export default {
           phoneNumberShow.value = true;
           areaShow.value = true;
           symbolShow.value = true;
+          timezoneShow.value = true;
           break;
         case 2:
           cofficentForm.mailBox = accountDetail.value.email;
@@ -342,6 +354,7 @@ export default {
           phoneNumberShow.value = true;
           areaShow.value = true;
           symbolShow.value = true;
+          timezoneShow.value = true;
           break;
         case 3:
           cofficentForm.phone = accountDetail.value.phone;
@@ -350,6 +363,7 @@ export default {
           phoneNumberShow.value = !phoneNumberShow.value;
           areaShow.value = true;
           symbolShow.value = true;
+          timezoneShow.value = true;
           break;
         case 4:
           cofficentForm.area = accountDetail.value.area;
@@ -358,6 +372,7 @@ export default {
           phoneNumberShow.value = true;
           areaShow.value = !areaShow.value;
           symbolShow.value = true;
+          timezoneShow.value = true;
           break;
         case 5:
           cofficentForm.currencySymbol = accountDetail.value.currencySymbol;
@@ -366,6 +381,16 @@ export default {
           phoneNumberShow.value = true;
           areaShow.value = true;
           symbolShow.value = !symbolShow.value;
+          timezoneShow.value = true;
+          break;
+        case 7:
+          cofficentForm.timeZone = accountDetail.value.timeZone;
+          relationType.value = true;
+          mailboxShow.value = true;
+          phoneNumberShow.value = true;
+          areaShow.value = true;
+          symbolShow.value = true;
+          timezoneShow.value = !timezoneShow.value;
           break;
       }
     };
@@ -464,6 +489,8 @@ export default {
           onOffNotice.value = true;
         }
         kCascaderRef.value.init(accountDetail.value.areaId);
+        // 查询时区回显
+        kTimezoneRef.value.init(accountDetail.value.timeZone)
       });
     };
     // 获取申泽支付平台
@@ -709,6 +736,37 @@ export default {
         }, 500);
       }
     };
+    // 时区弹窗
+    const tzFieldValue = ref("");
+    const kTimezoneRef = ref(null);
+    // 点击时区输入框
+    const tzFieldValueInpClk = () => {
+      kTimezoneRef.value.openPopup();
+    };
+    // 选择时区完成
+    const timezonePopFinish = async (e) => {
+      tzFieldValue.value = e.selectName;
+      accountDetail.value.timeZone = e.selectId;
+      const params = {
+        id: user.id,
+        timeZone: e.selectId,
+      };
+      const { data } = await updateAdmin(params);
+      timezoneShow.value = true;
+      if (data.code === "00000") {
+        showToast(data.message);
+        setTimeout(() => {
+          getAcccountDetail();
+        }, 500);
+      }
+    };
+
+    const timezoneShowPicker = ref(false);
+    const timezoneOnConfirm = ({ selectedOptions }) => {
+      timezoneShowPicker.value = false;
+      tzFieldValue.value = selectedOptions[0].text;
+    };
+
     const isInWeChat = ref(false);
     const checkInWechat = () => {
       const ua = window.navigator.userAgent.toLowerCase();
@@ -749,6 +807,10 @@ export default {
     const getAreaName = (e) => {
       fieldValue.value = e;
     };
+    // 获取时区回显的值
+    const getTimezone = (e) => {
+      tzFieldValue.value = e;
+    };
     return {
       user,
       operUnipay,
@@ -767,13 +829,20 @@ export default {
       cofficentForm,
       params,
       areaShow,
+      timezoneShow,
       accountDetail,
       fieldValue,
+      tzFieldValue,
       kCascaderRef,
+      kTimezoneRef,
       fieldValueInpClk,
+      tzFieldValueInpClk,
       areaPopFinish,
+      timezonePopFinish,
+      timezoneShowPicker,
       isInWeChat,
       getAreaName,
+      getTimezone,
       isAbroad,
       haveRelation,
       checkIsAbroad,
@@ -789,6 +858,7 @@ export default {
       changeOrderNotice,
       onOffNotice,
       changeOnOffNotice,
+      timezoneOnConfirm,
     };
   }
 };