Преглед на файлове

feat:“同步2024.04.12”

soobin преди 1 година
родител
ревизия
ab4e2a3b4e
променени са 38 файла, в които са добавени 704 реда и са изтрити 345 реда
  1. BIN
      src/assets/device/alarm.png
  2. 56 41
      src/assets/language/en.json
  3. 18 3
      src/assets/language/ja.json
  4. 22 6
      src/assets/language/zh.json
  5. BIN
      src/assets/order/spunSugar/goods/A71.png
  6. BIN
      src/assets/order/spunSugar/goods/A72.png
  7. BIN
      src/assets/order/spunSugar/goods/A73.png
  8. BIN
      src/assets/order/spunSugar/goods/A74.png
  9. BIN
      src/assets/order/spunSugar/goods/A75.png
  10. BIN
      src/assets/order/spunSugar/goods/A76.png
  11. BIN
      src/assets/order/spunSugar/goods/A77.png
  12. BIN
      src/assets/order/spunSugar/goods/A78.png
  13. BIN
      src/assets/order/spunSugar/goods/A79.png
  14. BIN
      src/assets/order/spunSugar/goods/A80.png
  15. BIN
      src/assets/order/spunSugar/goods/A81.png
  16. BIN
      src/assets/order/spunSugar/goods/A82.png
  17. BIN
      src/assets/order/spunSugar/goods/A83.png
  18. BIN
      src/assets/order/spunSugar/goods/A84.png
  19. 139 32
      src/components/dateSelectList/index.vue
  20. 2 2
      src/components/typeSelectList/index.less
  21. 8 0
      src/service/order/index.js
  22. 122 46
      src/styles/device/index.less
  23. 18 15
      src/styles/orderCenter/index.less
  24. 1 0
      src/styles/user/index.less
  25. 1 1
      src/views/advertManage/index.vue
  26. 2 2
      src/views/alarmHistory/index.vue
  27. 8 7
      src/views/device/deviceOper.vue
  28. 4 0
      src/views/device/deviceSet.vue
  29. 172 122
      src/views/device/index.vue
  30. 9 6
      src/views/device/openDoor.vue
  31. 1 1
      src/views/device/paramsSet/paramsSetInfo.vue
  32. 2 2
      src/views/discountCode/index.vue
  33. 1 1
      src/views/home/index.vue
  34. 108 47
      src/views/orderCenter/index.vue
  35. 2 7
      src/views/orderCenter/orderSearch.vue
  36. 6 2
      src/views/robotRanking.vue
  37. 1 1
      src/views/taskMessage/equipment/index.vue
  38. 1 1
      src/views/taskMessage/proportion/index.vue

BIN
src/assets/device/alarm.png


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

@@ -9,7 +9,16 @@
     "yesterday": "Yesterday",
     "thisWeek": "Week",
     "thisMonth": "Month",
-    "other": "Other"
+    "other": "Other",
+    "timeType": "Select statistical type",
+    "monthDate": "Statistical date",
+    "monthStartDate": "Start date",
+    "monthEndDate": "End date",
+    "nextStep": "Next",
+    "dayType": "Daily statistics",
+    "monthType": "Monthly statistics",
+    "monthTip1": "The time span cannot exceed six months",
+    "monthTip2": "The end time cannot be later than the start time"
   },
   "typeSelectList": {
     "thisMerchant": "This Merchant",
@@ -187,9 +196,9 @@
     }
   },
   "alarmHistory": {
-    "equipmentNoLabel": "Equipment No",
-    "equipmentNoPlaceholder": "Please enter the equipment number",
-    "equipmentNameLabel": "Equipment name",
+    "equipmentNoLabel": "Machine No",
+    "equipmentNoPlaceholder": "Please enter the Machine number",
+    "equipmentNameLabel": "Machine name",
     "equipmentNamePlaceholder": "Please enter the Machine name",
     "alarmTime": "Alarm time",
     "to": "to",
@@ -204,8 +213,8 @@
     "recordsTotal": " Records",
     "search": "search",
     "affiliatedMerchants": "Affiliated merchants",
-    "equipmentNo": "Equipment No",
-    "equipmentName": "Equipment name",
+    "equipmentNo": "Machine No",
+    "equipmentName": "Machine name",
     "creationTime": "Alarm time",
     "alarmContent": "Alarm content",
     "allDevices": "All devices"
@@ -289,13 +298,14 @@
     "to": " to ",
     "attention": "(Note: the number of bits is incorrect, updating may cause machine anomalies)",
     "submitUpdates": "Submit Updates",
+    "nameLength":"The name of the machine should not exceed 25 words",
     "modificationSucceeded": "Modification succeeded",
     "existsFailed": "The machine name already exists",
     "editFailed": "Modification failure",
     "noParameterData": "No parameter data is available !",
     "addDistributor": "Add Distributor",
-    "equipmentNoLabel": "Equipment No",
-    "equipmentNoPlaceholder": "Please enter the equipment number",
+    "equipmentNoLabel": "Machine No",
+    "equipmentNoPlaceholder": "Please enter the Machine number",
     "proportionOfPlatformDistributionLabel": "Proportion of platform distribution",
     "proportionOfPlatformDistributionPlaceholder": "Please enter the distribution proportion of the platform",
     "merchantDistributionProportionLabel": "Merchant distribution proportion",
@@ -325,9 +335,12 @@
     "sunday": "Sun",
     "deletionSucceeded": "Deletion succeeded",
     "commonOperations": "Remote operation",
-    "equipmentNo": "Equipment No",
+    "equipmentNo": "Machine No",
     "restart": "Reset machine",
     "restartFurnaceHead": "Restart furnace head",
+    "restartFurnaceHeadTips": "Are you sure you want to restart the furnace head?",
+    "openFurnaceHeadTips": "Are you sure you want to open the furnace head?",
+    "closeFurnaceHeadTips":"Are you sure you want to close the furnace head?",
     "sleep": "sleep",
     "openCloseFurnaceHead": "Open/close furnace head",
     "openFurnHead": "Open furnace head",
@@ -344,7 +357,7 @@
     "openRemindOut": "Are you sure you want to switch the outer door?",
     "openRemindIn": "Are you sure you want to switch the Inner door?",
     "modulation": "modulation",
-    "equipmentRecharge": "Equipment recharge",
+    "equipmentRecharge": "Machine recharge",
     "parameterSetting": "Parameter setting",
     "operationConfirmation": "Operation confirmation",
     "pleaseConfirmAgainWhetherToOperate": "Please confirm again whether to operate",
@@ -360,24 +373,26 @@
     "open": "open",
     "close": "close",
     "success": "success",
+    "clickRestart": "One click restart furnace head",
+    "restartHead": "Restart",
     "sysOffSuccess": "System offline successfully",
     "remoteDoorOpeningSucceeded": "Remote door opening succeeded",
     "enterAnyInformationToSearch": "Enter any information to search",
-    "equipmentCodeLabel": "Equipment code",
-    "equipmentCodePlaceholder": "Please enter the equipment code",
-    "equipmentNameLabel": "Equipment name",
+    "equipmentCodeLabel": "Machine code",
+    "equipmentCodePlaceholder": "Please enter the Machine code",
+    "equipmentNameLabel": "Machine name",
     "equipmentNamePlaceholder": "Please enter the Machine name",
     "merchantNameLabel": "Merchant name",
     "merchantNamePlaceholder": "Please enter the merchant name",
-    "equipmentTypeLabel": "Equipment type",
+    "equipmentTypeLabel": "Machine type",
     "equipmentTypePlaceholder": "Please select a Machine type",
     "companyTypeLabel": "Company type",
     "companyTypePlaceholder": "Please select a companytype",
-    "equipmentModelLabel": "Equipment model",
+    "equipmentModelLabel": "Machine model",
     "equipmentModelPlaceholder": "Please select a Machine model",
     "powerOnStatus": "Power on status",
     "pleaseSelectThePowerOnStatus": "Please select the power on status",
-    "equipmentStatus": "Equipment Status",
+    "equipmentStatus": "Machine Status",
     "pleaseSelectTheDeviceStatus": "Please select the Machine status",
     "emptyingConditions": "Clear condition",
     "clickSearch": "Click search",
@@ -392,14 +407,14 @@
     "deactivate": "Deactivate",
     "deviceInformation": "Machine Information",
     "essentialInformation": "Basic Information",
-    "equipmentCode": "Equipment Code",
-    "equipmentRemarksLabel": "Equipment Remarks",
+    "equipmentCode": "Machine Code",
+    "equipmentRemarksLabel": "Machine Remarks",
     "equipmentRemarksPlaceholder": "Please enter Machine notes",
     "affiliatedMerchant": "Business Owner",
     "affiliatedArea": "Affiliated Area",
     "machineType": "Machine Type",
     "expirationTime": "Expiration Time",
-    "equipmentLabel": "Equipment Label",
+    "equipmentLabel": "Machine Label",
     "edit": "edit",
     "nameOfOperatorLabel": "Operator Name",
     "nameOfOperatorPlaceholder": "Please enter the name of the operator",
@@ -430,7 +445,7 @@
     "dataOverview": "Data Overview",
     "search": "search",
     "totalNumberOfRuns": "Total number of runs",
-    "totalNumberOfEquipment": "Total number of equipment",
+    "totalNumberOfEquipment": "Total number of Machine",
     "affiliatedMerchants": "Business Owner",
     "sleepState": "Sleep State",
     "sleeping": "sleeping zzZ",
@@ -438,8 +453,8 @@
     "lastRefreshTime": "Recent refresh time",
     "machineUniqueCode": "Machine Code",
     "furnaceHeadTemperature": "Furnace head temperature",
-    "stirringTemperature": "Stirring temperature",
-    "cornGeneratorTemperature": "Corn generator temperature",
+    "stirringTemperature": "Temperature two",
+    "cornGeneratorTemperature": "Temperature one",
     "cupQuantity": "Cup quantity",
     "numberOneTm": "NO.1000",
     "candyGeneratorTm": "Generator temperature",
@@ -491,7 +506,7 @@
     "modifyPrice": "Modify Price",
     "modifyPricePage": {
       "title": "Commodity price adjustment",
-      "equipmentName": "Equipment name",
+      "equipmentName": "Machine name",
       "total": "Total: ",
       "goods": " goods",
       "batchModify": "Batch modification",
@@ -514,12 +529,12 @@
     "deleteDevice": "Delete Machine",
     "viewLogs": "View logs",
     "noPosition": "No positioning",
-    "equipLocation": "Equipment location",
+    "equipLocation": "Machine location",
     "position": "Position",
     "viewPositioning": "View positioning",
     "view": "view",
     "oneKeyFeed": "One key feeding",
-    "replenishment": "Replenishment",
+    "replenishment": "Replenish",
     "whiteSugar": "WhiteSugar",
     "redSugar": "RedSugar",
     "yellowSugar": "YellowSugar",
@@ -552,12 +567,12 @@
     },
     "showGoodsPage": {
       "title": "Goods display setting",
-      "equipmentName": "Equipment name"
+      "equipmentName": "Machine name"
     },
     "devicePasswordPage": {
       "title": "Changing Machine password",
-      "equipmentName": "Equipment name",
-      "deivcePwd": "Equipment password",
+      "equipmentName": "Machine name",
+      "deivcePwd": "Machine password",
       "adminPassword": "Administrator password",
       "guestPassword": "Secondary administrator password",
       "checkDeivcePwd": "Confirm password",
@@ -637,8 +652,8 @@
     "distributionSettings": "Distribution Settings",
     "total": "Total",
     "leftTitle": "Distribution settings",
-    "rightAdd": "Add equipment distributor",
-    "equipName": "Equipment name",
+    "rightAdd": "Add Machine distributor",
+    "equipName": "Machine name",
     "partners": "Partners",
     "distProp": "Distribution proportion",
     "applTime": "Application time",
@@ -647,9 +662,9 @@
     "addDist": {
       "title": "Add Distributor",
       "editTitle": "Edit Distributor",
-      "clientId": "Equipment code",
+      "clientId": "Machine code",
       "autoBrought": "Automatically brought out",
-      "clientIdPlace": "Please select the equipment code",
+      "clientIdPlace": "Please select the Machine code",
       "myDistProport": "My distribution proportion",
       "distInof": "Distribution Information",
       "platDistRange": "The distribution proportion range of the platform is 1-100",
@@ -888,8 +903,8 @@
     "numberOfOrders": "Order quantity",
     "orderDetails": "order details",
     "exportToExcel": "Export to Excel",
-    "equipmentNo": "Equipment No",
-    "equipmentName": "Equipment Name",
+    "equipmentNo": "Machine No",
+    "equipmentName": "Machine Name",
     "tradeName": "Trade name",
     "dividingDomesticService": "Dividing domestic service",
     "business": "business",
@@ -926,7 +941,7 @@
     "orderNoPlaceholder": "Please enter the order number",
     "orderSerialNumberLabel": "Order serial number",
     "orderSerialNumberPlaceholder": "Please enter the order serial number",
-    "equipmentNoPlaceholder": "Please enter the equipment number",
+    "equipmentNoPlaceholder": "Please enter the Machine number",
     "orderDate": "Order Date",
     "startTime": "start time",
     "to": "to",
@@ -948,7 +963,7 @@
     "dataOverview": "Data overview",
     "groupType": "Group Type",
     "merchant": "Merchant",
-    "equipment": "equipment",
+    "equipment": "Machine",
     "orderDetails": "order details",
     "clickFilter": "Click Filter",
     "exportToExcel": "Export to Excel",
@@ -1119,12 +1134,12 @@
     }
   },
   "taskMessage": {
-    "equipmentInitializationApproval": "Equipment initialization approval",
+    "equipmentInitializationApproval": "Machine initialization approval",
     "total": "Total ",
     "recordsInTotal": " Records",
     "search": "search",
     "affiliatedMerchants": "Affiliated merchants",
-    "equipmentNo": "Equipment No",
+    "equipmentNo": "Machine No",
     "managementSystemID": "Management system ID",
     "state": "state",
     "applicationTime": "Application time",
@@ -1139,7 +1154,7 @@
     "contactName": "Contact Name",
     "contactPhoneNumber": "Contact phone number",
     "distributionApplicationApproval": "Distribution application approval",
-    "equipmentName": "Equipment name",
+    "equipmentName": "Machine name",
     "owner": "owner",
     "platform": "platform",
     "machineOwner": "Machine owner",
@@ -1157,8 +1172,8 @@
     "equipmentInit": {
       "searchPop": {
         "title": "Please enter any of the following criteria to query",
-        "equipmentNo": "Equipment code",
-        "equipmentNoPlace": "Please enter the equipment code",
+        "equipmentNo": "Machine code",
+        "equipmentNoPlace": "Please enter the Machine code",
         "managementSystemID": "Management system ID",
         "managementSystemIDPlace": "Please enter the Management system ID",
         "merchantName": "Merchant name",

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

@@ -9,7 +9,16 @@
         "yesterday": "昨日",
         "thisWeek": "今週",
         "thisMonth": "今月",
-        "other": "その他"
+        "other": "その他",
+        "timeType": "統計タイプを選択します",
+        "monthDate": "日付を集計します",
+        "monthStartDate": "開始日です",
+        "monthEndDate": "終了期日",
+        "nextStep": "次のステップです",
+        "dayType": "日毎に集計する",
+        "monthType": "月ごとに集計します",
+        "monthTip1": "期間は半年以内です",
+        "monthTip2": "終了時間が開始時間より小さくなってはいけません"
     },
     "typeSelectList": {
         "thisMerchant": "この店舗",
@@ -289,6 +298,7 @@
         "to": "に",
         "attention": "(注意:桁数が正しくない場合、更新によりマシンに異常が発生する可能性があります)",
         "submitUpdates": "更新を提出",
+        "nameLength":"装置名は25文字以内です",
         "modificationSucceeded": "変更に成功",
         "existsFailed": "デバイス名はすでに存在します",
         "editFailed": "変更に失敗",
@@ -328,6 +338,9 @@
         "equipmentNo": "デバイス番号",
         "restart": "リセット",
         "restartFurnaceHead": "釜の再起動",
+        "restartFurnaceHeadTips": "釜の再起動を確認しますか?",
+        "openFurnaceHeadTips": "釜のオンを確認しますか?",
+        "closeFurnaceHeadTips": "釜のオフを確認しますか?",
         "sleep": "スリープ",
         "openCloseFurnaceHead": "釜のオン/オフ",
         "openFurnHead": "釜オン",
@@ -359,6 +372,8 @@
         "sleepSuccessfully": "スリープ完了",
         "open": "OPEN",
         "close": "CLOSE",
+        "clickRestart": "炉頭を再稼働します",
+        "restartHead": "再起動します",
         "success": "完了",
         "sysOffSuccess": "システムオフライン完了",
         "remoteDoorOpeningSucceeded": "遠隔ドア開け完了",
@@ -446,8 +461,8 @@
         "furnaceHeadTemperature": "釜の温度",
         "temperatureInCabinet": "内部温度",
         "humidityInCabinet": "内部湿度",
-        "stirringTemperature": "撹拌温度",
-        "cornGeneratorTemperature": "コーンジェネレータ温度",
+        "stirringTemperature": "温度2です",
+        "cornGeneratorTemperature": "温度1です",
         "cupQuantity": "カップの残量",
         "numberOneTm": "NO.1000",
         "candyGeneratorTm": "ジェネレーター温度",

+ 22 - 6
src/assets/language/zh.json

@@ -9,7 +9,16 @@
     "yesterday": "昨日",
     "thisWeek": "本周",
     "thisMonth": "本月",
-    "other": "其他"
+    "other": "其他",
+    "timeType": "选择统计类型",
+    "monthDate": "统计日期",
+    "monthStartDate": "开始日期",
+    "monthEndDate": "结束日期",
+    "nextStep": "下一步",
+    "dayType": "按日统计",
+    "monthType": "按月统计",
+    "monthTip1": "时间跨度不能超过半年",
+    "monthTip2": "结束时间不能小于开始时间"
   },
   "typeSelectList": {
     "thisMerchant": "本商户",
@@ -289,6 +298,7 @@
     "to": "为",
     "attention": "(注意:位数不正确,更新可能会造成机器异常)",
     "submitUpdates": "提交更新",
+    "nameLength":"设备名称不超过25个字",
     "modificationSucceeded": "修改成功",
     "existsFailed": "设备名称已存在",
     "editFailed": "修改失败",
@@ -328,6 +338,11 @@
     "equipmentNo": "设备编号",
     "restart": "机器复位",
     "restartFurnaceHead": "重启炉头",
+    "restartFurnaceHeadTips": "是否重启炉头?",
+    "openFurnaceHeadTips": "是否开启炉头?",
+    "closeFurnaceHeadTips":"是否关闭炉头?",
+    "clickRestart": "一键重启炉头",
+    "restartHead": "重启",
     "sleep": "睡眠",
     "openCloseFurnaceHead": "开启/关闭炉头",
     "openFurnHead": "开启炉头",
@@ -443,9 +458,9 @@
     "furnaceHeadTemperature": "炉头温度",
     "temperatureInCabinet": "柜内温度",
     "humidityInCabinet": "柜内湿度",
-    "stirringTemperature": "搅拌温度",
-    "cornGeneratorTemperature": "玉米发生器温度",
-    "cupQuantity": "杯子剩余量",
+    "stirringTemperature": "温度",
+    "cornGeneratorTemperature": "温度",
+    "cupQuantity": "杯子量",
     "numberOneTm": "NO.1000",
     "candyGeneratorTm": "发生器温度",
     "outsideTm": "柜外温度",
@@ -927,8 +942,9 @@
     "userNameLabel": "用户名",
     "userNamePlaceholder": "请输入用户名",
     "orderNoPlaceholder": "请输入订单编号",
-    "orderSerialNumberLabel": "订单流水号",
-    "orderSerialNumberPlaceholder": "请输入订单流水号",
+    "refundTime": "退款时间",
+    "orderSerialNumberLabel": "商户单号",
+    "orderSerialNumberPlaceholder": "请输入商户单号",
     "equipmentNoPlaceholder": "请输入设备编号",
     "orderDate": "订单日期",
     "startTime": "开始时间",

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


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


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


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


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


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


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


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


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


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


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


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


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


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


+ 139 - 32
src/components/dateSelectList/index.vue

@@ -2,24 +2,36 @@
   <div class="dateSelectListBox flex-col">
     <div class="Tabs1 flex-col">
       <div class="timeTabBox">
-        <div class="timeTab" :class="{ active: timeType === '0' }" @click="timeChange('0')">{{$t('dateSelectList.today')}}</div>
-        <div class="timeTab" :class="{ active: timeType === '1' }" @click="timeChange('1')">{{$t('dateSelectList.yesterday')}}</div>
-        <div class="timeTab" :class="{ active: timeType === '2' }" @click="timeChange('2')">{{$t('dateSelectList.thisWeek')}}</div>
-        <div class="timeTab" :class="{ active: timeType === '3' }" @click="timeChange('3')">{{$t('dateSelectList.thisMonth')}}</div>
+        <div class="timeTab" :class="{ active: timeType === '0' }" @click="timeChange('0')">
+          {{ $t('dateSelectList.today') }}</div>
+        <div class="timeTab" :class="{ active: timeType === '1' }" @click="timeChange('1')">
+          {{ $t('dateSelectList.yesterday') }}</div>
+        <div class="timeTab" :class="{ active: timeType === '2' }" @click="timeChange('2')">
+          {{ $t('dateSelectList.thisWeek') }}</div>
+        <div class="timeTab" :class="{ active: timeType === '3' }" @click="timeChange('3')">
+          {{ $t('dateSelectList.thisMonth') }}</div>
         <div class="timeTab" :class="{ active: timeType === '4' }" @click="timeChange('4')">
-          {{$t('dateSelectList.other')}}
+          {{ $t('dateSelectList.other') }}
           <div class="block3 flex-col"></div>
         </div>
         <!-- 日期选择 -->
-        <van-calendar
-          color="#2c87c8"
-          v-model:show="calendarShow"
-          type="range"
-          :show-confirm="false"
-          :allow-same-day="true"
-          :min-date="minDate"
-          @confirm="calendarConfirm"
-        />
+        <van-calendar color="#2c87c8" v-model:show="calendarShow" type="range" :show-confirm="false"
+          :allow-same-day="true" :min-date="minDate" @confirm="calendarConfirm" />
+        <!-- 选择统计类型 -->
+        <van-popup v-model:show="timeTypeShow" position="bottom">
+          <van-picker :title="$t('dateSelectList.timeType')" :columns="timeTypeList" @confirm="timeTypeConfirm"
+            @cancel="timeTypeCancel" />
+        </van-popup>
+        <!-- 按月统计 -->
+        <van-popup v-model:show="monthDateShow" position="bottom">
+          <van-picker-group :title="$t('dateSelectList.monthDate')"
+            :tabs="[$t('dateSelectList.monthStartDate'), $t('dateSelectList.monthEndDate')]"
+            :next-step-text="$t('dateSelectList.nextStep')" @confirm="monthDateConfirm" @cancel="monthDateCancel"
+            position="bottom">
+            <van-date-picker v-model="monthStartDate" :min-date="minDate" :columns-type="monthDateType" />
+            <van-date-picker v-model="monthEndDate" :min-date="minDate" :columns-type="monthDateType" />
+          </van-picker-group>
+        </van-popup>
       </div>
     </div>
   </div>
@@ -28,22 +40,30 @@
 <script>
 import { ref } from "vue";
 import dateUtil from "../../utils/dateUtil";
-import {styleUrl} from "../../common/js/utils";
+import { styleUrl } from "../../common/js/utils";
+import { getLoginUser } from "@/common/js/utils";
+import { showToast } from "vant";
+import { useI18n } from 'vue-i18n';
+
 
 export default {
   name: "dateSelectList",
   components: {},
-  setup(props, {emit}) {
+  setup(props, { emit }) {
     // 加载样式
     styleUrl('dateSelectList');
+    const { t } = useI18n();
     const minDate = new Date(2018, 1, 1);
+    const user = getLoginUser();
     // 时间类型
     const timeType = ref("0");
+    // 统计类型
+    const chartType = ref("0");
     // 时间类型切换
     const timeChange = (data) => {
       timeType.value = data;
       // 当时时间类型切换为其他时间弹出日期控件
-      (data === "4") ? calendarShow.value = true : outputDate();
+      (data === "4") ? timeTypeShow.value = true : outputDate();
     };
     let calendarDate = [];
     const calendarShow = ref(false);
@@ -84,6 +104,11 @@ export default {
       // 本周
       if (timeType.value === "2") {
         const curr = new Date();
+        const dayOfWeek = curr.getDay();
+        // 如果是周日,将当前日期设置到本周的周一
+        if (dayOfWeek === 0 && user.ifForeign != '1') {
+          curr.setDate(curr.getDate() - 6); // 将当前日期设置为本周的周一
+        }
         const firstday = new Date(
           curr.setDate(curr.getDate() - curr.getDay() + 1)
         );
@@ -113,35 +138,117 @@ export default {
       }
       // 其他时间
       if (timeType.value === "4") {
-        const firstday = Date.parse(calendarDate[0]);
-        const lastday = Date.parse(calendarDate[1]);
-        const diffDate = Math.abs(firstday - lastday);
-        const totalDays = Math.floor(diffDate / (1000 * 3600 * 24));
-        if (totalDays === 0) {
-          params.chartType = "day";
-        } else if (dateUtil.isSameWeek(calendarDate[0], calendarDate[1])) {
-          params.chartType = "week";
+        let startTime = null;
+        let endTime = null;
+        if (chartType.value == '1') {
+          // 按日统计
+          const firstday = Date.parse(calendarDate[0]);
+          const lastday = Date.parse(calendarDate[1]);
+          const diffDate = Math.abs(firstday - lastday);
+          const totalDays = Math.floor(diffDate / (1000 * 3600 * 24));
+          if (totalDays === 0) {
+            params.chartType = "day";
+          } else {
+            params.chartType = "month";
+          }
+          timeTypeShow.value = false;
+          startTime = calendarDate[0];
+          endTime = calendarDate[1];
+          params.startDate =
+            dateUtil.formateDate(startTime, "yyyy-MM-dd") + " 00:00:00";
+          params.endDate =
+            dateUtil.formateDate(endTime, "yyyy-MM-dd") + " 23:59:59";
         } else {
-          params.chartType = "month";
+          // 按月统计
+          params.chartType = "year";
+          startTime = new Date(monthStartDate.value[0] + '-' + monthStartDate.value[1] + '-01');
+          endTime = new Date(monthEndDate.value[0] + '-' + monthEndDate.value[1] + '-01');
+          console.log("startTime", startTime);
+          console.log("endTime", endTime);
+          endTime.setMonth(endTime.getMonth() + 1);
+          params.startDate =
+            dateUtil.formateDate(startTime, "yyyy-MM-dd") + " 00:00:00";
+          params.endDate =
+            dateUtil.formateDate(endTime, "yyyy-MM-dd") + " 00:00:00";
+          timeTypeShow.value = false;
         }
-        params.startDate =
-          dateUtil.formateDate(calendarDate[0], "yyyy-MM-dd") + " 00:00:00";
-        params.endDate =
-          dateUtil.formateDate(calendarDate[1], "yyyy-MM-dd") + " 23:59:59";
       }
       emit('update', params);
     };
+    // 统计类型
+    const timeTypeShow = ref(false);
+    const timeTypeList = [
+      { text: t('dateSelectList.dayType'), value: "1" },
+      { text: t('dateSelectList.monthType'), value: "2" },
+    ];
+    const timeTypeConfirm = ({ selectedOptions }) => {
+      console.log('selectedOptions[0].text', selectedOptions[0].value);
+      // 按日统计
+      chartType.value = selectedOptions[0].value;
+      if (selectedOptions[0].value == '1') {
+        calendarShow.value = true;
+      } else {
+        monthDateShow.value = true;
+      }
+
+    }
+    const timeTypeCancel = () => { timeTypeShow.value = false; }
+    // 按月统计
+    // 创建一个Date对象,表示当前时间
+    const currentDate = new Date();
+    // 获取当前时间的年份
+    const currentYear = currentDate.getFullYear();
+    // 获取当前时间的月份(注意,月份是从0开始的,所以要加1)
+    const currentMonth = currentDate.getMonth() + 1;
+    const monthDateShow = ref(false);
+    const monthStartDate = ref([currentYear, currentMonth]);
+    const monthEndDate = ref([currentYear, currentMonth]);
+    const monthDateType = ['year', 'month'];
+    const monthDateConfirm = () => {
+      console.log('monthStartDate', monthStartDate.value);
+      console.log('monthEndDate', monthEndDate.value);
+      const date1 = new Date(monthStartDate.value[0] + '-' + monthStartDate.value[1] + '-01');
+      const date2 = new Date(monthEndDate.value[0] + '-' + monthEndDate.value[1] + '-01');
+      // 将日期对象转换为毫秒数
+      const time1 = date1.getTime();
+      const time2 = date2.getTime();
+      // 计算时间跨度的绝对值
+      const timeDiff = Math.abs(time1 - time2);
+      // 计算半年的毫秒数(假设半年为 365 天的一半)
+      const halfYearInMilliseconds = 365 * 24 * 60 * 60 * 1000 / 2;
+      if (timeDiff > halfYearInMilliseconds) {
+        showToast(t('dateSelectList.monthTip1'));
+        return;
+      }
+      if (date1 > date2) {
+        showToast(t('dateSelectList.monthTip2'));
+        return;
+      }
+      monthDateShow.value = false;
+      outputDate();
+    }
+    const monthDateCancel = () => { monthDateShow.value = false; }
     return {
       minDate,
       timeType,
       timeChange,
       calendarShow,
-      calendarConfirm
+      calendarConfirm,
+      timeTypeShow,
+      timeTypeList,
+      timeTypeConfirm,
+      timeTypeCancel,
+      monthDateShow,
+      monthStartDate,
+      monthDateType,
+      monthEndDate,
+      monthDateConfirm,
+      monthDateCancel,
     };
   },
 };
 </script>
 
-<style lang="less" scoped >
+<style lang="less" scoped>
 @import "../../common/style/common";
 </style>

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

@@ -2,7 +2,7 @@
   .main6 {
     width: auto;
     height: 16px;
-    margin: 18px 15px 0 15px;
+    margin: 18px 15px 10px 15px;
     justify-content: space-around;
     display: flex;
     flex-wrap: wrap;
@@ -25,7 +25,7 @@
         text-overflow: ellipsis;
         white-space: nowrap;
         padding: 0 8px;
-        font-size: 14px;
+        font-size: 12px;
       }
     }
 

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

@@ -21,7 +21,15 @@ export function getProductList(params) {
 export function refundOrder(params) {
     return axios.post(`/SZWL-SERVER/tOrder/refund`, params);
 }
+// 微信退款
+export function refundWechatOrder(params) {
+  return axios.post(`/PAY-SERVER/wechatPay/refund`, params);
+}
 // 订单列表-导出
 export function Api_getOnlineExport(params) {
   return axios.get(`/ORDER-SERVER/tOrder/orderExport?${stringToUrl(params)}`,{responseType:'blob'});
 }
+// 获取订单列表
+export function updateIsInvoice(params) {
+  return axios.get(`/ORDER-SERVER/tOrder/updateIsInvoice?${stringToUrl(params)}`);
+}

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

@@ -197,10 +197,27 @@
               }
             }
 
+            .flash-icon {
+              animation: blink-animation 0.5s infinite; // 定义闪烁动画,1s表示1秒,infinite表示无限循环
+            }
+
+            @keyframes blink-animation {
+              0% {
+                opacity: 1; // 初始状态完全显示
+              }
+              50% {
+                opacity: 0; // 中间状态隐藏
+              }
+              100% {
+                opacity: 1; // 结束状态完全显示
+              }
+            }
+
             .box4 {
-              width: 24px;
+              width: 20px;
               height: 20px;
               background: url("../../assets/device/alarm.png") 100% no-repeat;
+              background-size: 100%;
             }
           }
 
@@ -211,84 +228,141 @@
             display: flex;
             align-items: center;
           }
+          
+          .pic1 {
+            width: 100%;
+            height: 2px;
+            // margin-top: 19px;
+          }
 
           .contentBottomCon {
-            .van-button--primary {
-              background-color: #2c87c8;
-              width: 50px;
-              padding: 0 0;
-              margin: 0 8px 0 0;
-              height: 30px !important;
-            }
 
-            .pic1 {
-              width: 100%;
-              height: 2px;
-              margin-top: 19px;
-            }
+            background-color: #e7e7e7;
+            border-radius: 15px;
+            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影效果 */
+            padding: 5px 5px;
 
-            .layer2 {
-              width: 100%;
-            }
-
-            .layer3 {
+            .contentWord {
               width: 100%;
+              padding: 10px 10px;
+              // overflow-wrap: break-word;
+              color: rgba(64, 77, 116, 1);
+              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;
 
-              .word1 {
-                text-overflow: ellipsis;
-                width: 100%;
-                font-size: 14px;
-
+              .word10 {
+                width: 65%
+                // display: block;
               }
 
               .word2 {
-                width: 100%;
+                width: 75%;
                 padding: 0 0;
 
+                .van-cell--center {
+                  background-color: #e7e7e7;
+                }
+
                 .van-field__control {
                   border: 0.5px solid #ccc;
+                  background-color: #fff;
+                  padding: 2px 5px;
+                  border-radius: 3px;
+                  // width: 40%;
                   /* 添加边框 */
                 }
+
+                .van-field__body {
+                  background-color: #e7e7e7;
+                }
               }
 
               .word3 {
-                color: rgba(64, 77, 116, 1);
-                width: 70%;
+                width: 50%;
+                padding: 0 0;
+                margin-right: 10px;
+                line-height: 20px;
               }
 
               .editIcon {
-                color: #2c87c8;
-                padding: 0 0 0px 5px;
+                color: #4d6add;
+                // padding: 0 0 0 5px;
+              }
+              
+              .btn {
+                justify-content: flex-end;
+              }
+
+              .clickable-link {
+                // text-decoration: underline;
+                cursor: pointer;
+                font-size: 14px;
+                width: 80%;
+                line-height: 18px
               }
+
             }
 
-            .word4 {
-              width: 100%;
-              overflow-wrap: break-word;
+            .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;
+              // white-space: nowrap;
+              // text-overflow: ellipsis;
               line-height: 14px;
+              display: flex;
+              align-items: center;
+              // justify-content: space-between;
+
+              .word12 {
+                width: 65%;
+              }
             }
 
-            .clickable-link {
-              text-decoration: underline;
-              cursor: pointer;
-              font-size: 14px;
-              width: 85%;
+
+            .van-button--primary {
+              background-color: #2c87c8;
+              width: 50px;
+              padding: 0 5px;
+              margin: 0 5px 0 0;
+              height: 30px !important;
             }
 
-            // .clickable-link:active {
-            //   color: rgb(26, 49, 117);
-            // }
-            .replenishment {
-              text-decoration: underline;
-              cursor: pointer;
-              font-size: 14px;
-              color: #4d6add;
+            .layer2 {
+              width: 100%;
+            }
+
+            .layer3 {
+              width: 100%;
+              display: flex;
+              align-items: center;
+
+              .word1 {
+                text-overflow: ellipsis;
+                width: 100%;
+                font-size: 14px;
+
+              }
+
+              .word3 {
+                color: rgba(64, 77, 116, 1);
+                width: 70%;
+              }
+
+              .editIcon {
+                color: #2c87c8;
+                padding: 0 0 0px 5px;
+              }
             }
 
             .layer5 {
@@ -302,6 +376,7 @@
                 text-align: left;
                 line-height: 13px;
                 display: block;
+                padding: 10px 10px;
               }
 
               .word6 {
@@ -540,7 +615,8 @@
           .sugarTxt {
             color: rgba(64, 77, 116, 1);
             font-size: 14px;
-            line-height: 13px;
+            line-height: 14px;
+            padding: 10px 10px;
           }
 
           .bd6 {

+ 18 - 15
src/styles/orderCenter/index.less

@@ -471,15 +471,14 @@
             .word11 {
               // height: 14px;
               width: 4.5rem;
-              overflow-wrap: break-word;
+              // overflow-wrap: break-word;
               color: rgba(64, 77, 116, 1);
-              font-size: 14px;
-              white-space: nowrap;
+              font-size: 12px;
+              // white-space: nowrap;
               line-height: 18px;
-              margin-top: 5px;
-              overflow: hidden;
-              text-overflow: ellipsis;
-              white-space: nowrap;
+              // margin-top: 5px;
+              // overflow: hidden;
+              // text-overflow: ellipsis;
               display: block;
             }
 
@@ -493,8 +492,9 @@
               width: 4.375rem;
               overflow-wrap: break-word;
               color: rgba(64, 77, 116, 1);
-              font-size: 14px;
-              line-height: 17px;
+              font-size: 12px;
+              line-height: 15px;
+              margin-top: 5px;
               display: block;
               overflow: hidden;
               text-overflow: ellipsis;
@@ -1232,8 +1232,8 @@
 
 
 
-  .cust_vantBorder {
-    display: flex;
+  .refundBox {
+    display: block;
     justify-content: flex-end;
     /* 水平方向上右对齐 */
     align-items: center;
@@ -1243,10 +1243,12 @@
 
     .van-card {
       background-color: #ffff;
-      width: 100%;
+      width: 95%;
+      margin: 0 5px;
     }
 
     .van-card__thumb {
+      margin-top: 10px;
       width: 60px;
       height: 60px;
     }
@@ -1261,7 +1263,7 @@
 
     .van-card__footer {
       position: absolute;
-      top: 25px;
+      top: 35px;
       right: 15px;
       // width: 20px;
       overflow-wrap: break-word;
@@ -1274,8 +1276,9 @@
 
     .card01 {
       display: flex;
+      margin: 0 15px;
       width: 90%;
-      height: 90px;
+      height: auto;
     }
 
     .van-card__content {
@@ -1283,7 +1286,7 @@
     }
 
     .van-card__bottom {
-      margin-bottom: 25px;
+      margin-bottom: 15px;
     }
 
     .inputAmount {

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

@@ -261,6 +261,7 @@
 
                     .taskTitle {
                         line-height: 53px;
+                        font-size: 14px;
                     }
                 }
             }

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

@@ -199,7 +199,7 @@ export default {
     };
     const showDateTime = (date) => {
       return date
-        ? dateUtil.formateDate(new Date(date), "yyyy-MM-dd hh:mm:ss")
+        ? dateUtil.formateDate(new Date(date), "yyyy/MM/dd hh:mm:ss")
         : "";
     };
     const adUpdate = (item) => {

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

@@ -145,12 +145,12 @@ export default {
     };
     const showDateTime = (date) => {
       // return date
-      //   ? dateUtil.formateDate(new Date(date), "yyyy-MM-dd hh:mm:ss")
+      //   ? dateUtil.formateDate(new Date(date), "yyyy/MM/dd hh:mm:ss")
       //   : "";
       if (!date) {
         return "";
       }
-      const currentDate = new Date(dateUtil.formateDate(new Date(date), "yyyy-MM-dd hh:mm:ss"));
+      const currentDate = new Date(dateUtil.formateDate(new Date(date), "yyyy/MM/dd hh:mm:ss"));
       return dateUtil.timeZoneDate(currentDate);
     };
     const showDeviceName = (id) => {

+ 8 - 7
src/views/device/deviceOper.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 设备常见操作弹窗 -->
   <van-dialog class-name="operDialog" width="350px" v-model:show="show" :showConfirmButton="false"
-    :showCancelButton="false">
+    :showCancelButton="false" :closeOnClickOverlay="true">
     <slot name="title">
       <div class="van-dialog__header" style="padding-bottom: 1em;">{{ $t("device.commonOperations") }}</div>
       <div class="txt1" style="padding: 0.2em 1em">
@@ -307,12 +307,13 @@ export default {
           operCheckShow.value = true;
         }; */
     const openDoorFun = () => {
-      if (device.value.machineType === '1' || device.value.equimentType === 'MG280') {
-        operType.value = 4;
-        operCheckShow.value = true;
-      } else {
-        router.push({ path: "openDoor", query: { deviceId: device.value.id } });
-      }
+      // if (device.value.machineType === '1' || device.value.equimentType === 'MG280') {
+      //   operType.value = 4;
+      //   operCheckShow.value = true;
+      // } else {
+      //   router.push({ path: "openDoor", query: { deviceId: device.value.id } });
+      // }
+      router.push({ path: "openDoor", query: { deviceId: device.value.id, machineType: device.value.machineType } });
     };
     // 日志功能
     const viewLogs = () => {

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

@@ -463,6 +463,10 @@ export default {
         };
       })[0];
       console.log(params);
+      if (params.name.length > 25) {
+        showToast(t("device.nameLength"));
+        return;
+      }
       const { data } = await updateDevice(params);
       if (data.code === "00000") {
         isUpdate.value = true;

+ 172 - 122
src/views/device/index.vue

@@ -37,16 +37,16 @@
                   <div class="group1 flex-col justify-between align-center">
                     <span class="word4">{{ equipStatus.machineUseNum }}</span>
                     <span class="info1">{{
-                      $t("device.totalNumberOfRuns")
-                    }}</span>
+        $t("device.totalNumberOfRuns")
+      }}</span>
                   </div>
                 </div>
                 <div @click="eqeStatusClk('')" class="TextGroup4 flex-col">
                   <div class="main6 flex-col justify-between align-center">
                     <span class="word5">{{ equipStatus.machineTotalNum }}</span>
                     <span class="word6">{{
-                      $t("device.totalNumberOfEquipment")
-                    }}</span>
+        $t("device.totalNumberOfEquipment")
+      }}</span>
                   </div>
                 </div>
               </div>
@@ -70,70 +70,61 @@
                       <span class="txt1">{{ item.name == null ? item.clientId.slice(-6) : item.name }}</span>
                     </div>
                   </div>
-                  <div class="l-flex-RC">
-                    <div v-if="item.hasTodayAlarm" class="l-flex-between o-pl-5">
-                      <div class="box4 flex-col "></div>
-                      <span class="o-pl-2" style="color: #fe5d55">{{ $t("device.alarmClock") }}</span>
-                    </div>
-                    <div class="layer2 flex-col" :class="{
-                      deviceOn: item.eqeStatus === 1,
-                      layerLeft: item.hasTodayAlarm,
-                    }"></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>
                 </div>
                 <span class="txt1 o-mt-10">{{ $t("device.affiliatedMerchants") }}:{{
-                  item.adminUserName
-                }}</span>
-                <span class="txt1 o-mt-10 kBordBott">{{ $t("device.machineUniqueCode") }}:{{
-                  item.clientId
-                }}</span>
+        item.adminUserName
+      }}</span>
+                <span class="txt1 o-mt-10">{{ $t("device.machineUniqueCode") }}:{{
+        item.clientId
+      }}</span>
+                <img v-if="item.checkType" class="pic1" referrerpolicy="no-referrer" src="../../assets/home/line.png" />
                 <div class="contentBottomCon" v-if="item.checkType">
-                  <img class="pic1" referrerpolicy="no-referrer" src="../../assets/home/line.png" />
                   <!-- 睡眠状态 -->
-                  <div class="word4 flex-row justify-between o-ptb-4 kBordBott">
-                    <span class="info1 o-ptb-5 kBordBott">{{ $t("device.sleepState") }}:{{
-                      item.isSleep
-                      ? $t("device.sleeping")
-                      : $t("device.notSleeping")
-                    }}</span>
+                  <div class="contentWord kBordBott">
+                    <span class="">{{ $t("device.sleepState") }}:{{
+        item.isSleep
+          ? $t("device.sleeping")
+          : $t("device.notSleeping")
+      }}</span>
                   </div>
-                  <div v-if="item.isSleep" class="layer3 o-ptb-7">
-                    <span class="word1">
-                      <div v-if="!sleepDescBoxShow">
-                        <van-field colon center class="word2" v-model="item.sleepDesc"
-                          :placeholder="$t('device.sleepDescPlace')" :label="$t('device.sleepDesc')" label-width="auto">
-                          <template #button class="button_1">
-                            <van-button size="small" type="primary" @click="sleepDescChg(item.sleepDesc, item.id)">{{
-                              $t("device.confirm") }}
-                            </van-button>
-                            <van-button size="small" type="primary" @click="editSleepDesc()">{{ $t("device.cancel")
-                            }}</van-button>
-                          </template>
-                        </van-field>
-                        <!-- </span> -->
-                      </div>
-                      <div v-else>
-                        <span class="word3 o-pr-10">{{ $t("device.sleepDesc") }}:</span>
-                        <span class="word3">{{ item.sleepDesc == null ? $t("device.SuspendBusiness") :
-                          item.sleepDesc }}</span>
-                        <van-icon name="edit" size="18" class="editIcon" @click="editSleepDesc()" />
-                      </div>
+                  <div v-if="item.isSleep" class="contentWord kBordBott">
+                    <span class="">{{ $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>
+                        <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>
-                  <!-- <span class="txt5 o-ptb-10 kBordBott l-flex-RC"><span>一键重启炉头:</span>
-                    <van-button type="primary">重启</van-button>
-                  </span> -->
+                  <span v-if="item.machineType == null || item.machineType == '0'"
+                    class="contentWord kBordBott l-flex-RC">
+                    <span>{{ $t("device.clickRestart") }}:</span>
+                    <van-button @click="restartHead(item.id)" type="primary">{{ $t("device.restartHead") }}</van-button>
+                  </span>
                   <!-- 炉头状态 -->
-                  <div class="word4 o-ptb-8">
-                    <span class="word3 o-pr-5" v-if="item.machineType == '0' || item.machineType == null">{{
-                      $t("device.furnHeadStatus") }}: </span>
-                    <span class="word3 o-pr-5" v-else>{{ $t("device.deviceStatus") }}: </span>
-                    <span>{{ item.eqeStatus === 1 ? $t("device.opened") : $t("device.closed") }}
-                    </span>
-                    <!-- <div class="l-flex-RC">
-                      <van-button type="primary">开启</van-button>
-                      <van-button type="primary">关闭</van-button>
-                    </div> -->
+                  <div class="contentWord kBordBott" v-if="item.machineType == null || item.machineType == '0'">
+                    <span>{{ (item.machineType == '0' || item.machineType == null) ? $t("device.furnHeadStatus") :
+        $t("device.deviceStatus") }}:
+                      {{ 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>
@@ -153,38 +144,36 @@
                   </div> -->
 
                   <!-- 定位: -->
-                  <div>
-                    <span v-if="item.latitude" class="txt5 o-ptb-3 kBordBott l-flex-RC">
-                      <span class="info1">{{ $t("device.position") }}:</span>
-                      <a class="clickable-link o-ptb-7" @click="viewPosiClk(item)">{{ item.fullName }}</a>
-                    </span>
-                  </div>
+                  <span v-if="item.latitude" class="contentWord kBordBott l-flex-RC">
+                    <span>{{ $t("device.position") }}:</span>
+                    <a class="clickable-link" @click="viewPosiClk(item)">{{ item.fullName }}</a>
+                  </span>
                   <!-- 机器参数 -->
-                  <van-row class="layer5 o-pt-7 kBordBott" justify="space-between"
+                  <van-row class="layer5 kBordBott" justify="space-between"
                     v-if="(item.machineType == '0' || item.machineType == null) && item.equimentType != 'P30'">
-                    <van-col class="word5" style="margin-bottom: 12px;">{{ $t("device.furnaceHeadTemperature") }}:{{
-                      item.furnaceTm
-                    }}{{ $t("device.degree") }}</van-col>
-                    <van-col class="word5" style="margin-bottom: 12px;">{{ $t("device.temperatureInCabinet") }}:{{
-                      item.cabinetTm
-                    }}{{ $t("device.degree") }}</van-col>
-                    <van-col class="word5" style="margin-bottom: 12px;">{{ $t("device.humidityInCabinet") }}:{{
-                      item.cabinetHd
-                    }}{{ $t("device.humidity") }}</van-col>
+                    <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 o-pt-7 kBordBott" justify="space-between" v-if="item.machineType == '1'">
-                    <van-col class="word5" style="margin-bottom: 12px;">{{ $t("device.stirringTemperature") }}:{{
-                      item.stirTm
-                    }}{{ $t("device.degree") }}</van-col>
-                    <van-col class="word5" style="margin-bottom: 12px;">{{ $t("device.cornGeneratorTemperature") }}:{{
-                      item.cornGeneratorTm
-                    }}{{ $t("device.degree") }}</van-col>
-                    <van-col class="word5" style="margin-bottom: 12px;">{{ $t("device.cupQuantity") }}:{{ item.cupQuantity
-                    }}</van-col>
+                  <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 o-pt-7 kBordBott">
-                      <van-col style="margin-bottom: 12px;">
+                    <van-row justify="space-between" class="sugarTxt kBordBott">
+                      <van-col style="">
                         {{ $t("device.whiteSugar") }}:{{ Format_calcuDecial(item.whiteSugar) }}%
                       </van-col>
                       <van-col>
@@ -193,16 +182,16 @@
                       <van-col>
                         {{ $t("device.yellowSugar") }}:{{ Format_calcuDecial(item.yellowSugar) }}%
                       </van-col>
-                      <van-col style="margin-bottom: 8px;">
+                      <van-col style="">
                         {{ $t("device.blueSugar") }}:{{ Format_calcuDecial(item.blueSugar) }}%
                       </van-col>
                     </van-row>
-                    <div class="info1 o-ptb-5 kBordBott">
+                    <div class="sugarTxt kBordBott">
                       <span>{{ $t("device.stick") }}:{{
-                        Format_calcuDecial(item.stick)
-                      }}%</span>
+        Format_calcuDecial(item.stick)
+      }}%</span>
                     </div>
-                    <van-row gutter="50" class="sugarTxt o-ptb-7 kBordBott">
+                    <van-row gutter="20" class="sugarTxt kBordBott">
                       <van-col>
                         {{ $t("device.water") }}:{{ Format_calcuDecial(item.water) }}%
                       </van-col>
@@ -211,54 +200,57 @@
                       </van-col>
                     </van-row>
                     <!-- 一键补料 -->
-                    <span class="info1 o-ptb-5 kBordBott l-flex-RC"><span>{{ $t("device.oneKeyFeed") }}:</span>
-                      <!-- <van-button @click="replenishmentClk(item)" type="primary">{{ $t("device.replenishment") }}
-                      </van-button> -->
-                      <a class="replenishment o-ptb-7" @click="replenishmentClk(item)">{{ $t("device.replenishment")
-                      }}</a>
+                    <span class="contentWord kBordBott">
+                      <span class="l-flex-RC">{{ $t("device.oneKeyFeed") }}:
+                        <van-button class="replenishment" @click="replenishmentClk(item)" type="primary">{{
+        $t("device.replenishment") }}
+                        </van-button>
+                      </span>
+                      <!-- <a class="replenishment" @click="replenishmentClk(item)">{{ $t("device.replenishment")
+                      }}</a> -->
                     </span>
                   </template>
                   <!-- 最近刷新时间 -->
-                  <span class="info1 o-ptb-7 kBordBott">{{ $t("device.lastRefreshTime") }}:{{
-                    showDateTime(item.lastUpdateTime)
-                  }}</span>
+                  <span class="contentWord kBordBott">{{ $t("device.lastRefreshTime") }}:{{
+        showDateTime(item.lastUpdateTime)
+      }}</span>
                   <!-- 音量 -->
-                  <span v-if="item.machineType != '2'" class="info2 o-ptb-7 kBordBott">{{ $t("device.volume") }}:{{
-                    item.volume }}</span>
+                  <span v-if="item.machineType != '2'" class="contentWord kBordBott">{{ $t("device.volume") }}:{{
+        item.volume }}</span>
                   <!-- 报警内容 -->
-                  <div class="l-flex-RC o-ptb-7">
-                    <span class="info3 kBordBott">{{ $t("device.alarmContent") }}:</span>
-                    <div class="info4 l-flex-RC">
-                      <span class="info5 o-pr-10 kBordBott">{{
-                        item.alarmList && item.alarmList[0]
-                        ? item.alarmList[0].alarmContent
-                        : $t("device.alarmContentNoData")
-                      }}
-                      </span>
-                      <van-button v-if="item.alarmList && item.alarmList[0]" type="primary" size="small" color="#07c160"
-                        :text="$t('device.eliminateAlarm')" @click="clearAlarm(item.alarmList[0])"></van-button>
-                    </div>
+                  <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])"></van-button>
                   </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>
+                        }}</span>
                       <div class="box2 flex-col"></div>
                     </div>
                     <div class="l-flex-RC o-ml-30" @click="deviceOprShow(item)">
                       <span class="c-text-14">{{
                         $t("device.commonOperations")
-                      }}</span>
+                        }}</span>
                       <div class="box2 flex-col"></div>
                     </div>
                   </div>
+                  <div style="height: 10px;"></div>
                 </div>
                 <div class="bd6 l-flex-center o-ptb-7" @click="item.checkType = !item.checkType">
                   <div class="l-flex-RC">
                     <span class="info2 o-mr-2">{{
                       item.checkType ? $t("device.stow") : $t("device.seeMore")
-                    }}</span>
+                      }}</span>
                     <div class="group2 flex-col" :class="{ checkType: item.checkType }"></div>
                   </div>
                 </div>
@@ -282,7 +274,7 @@ import {
   Api_postMachineNum,
 } from "../../service/home";
 import { onMounted, reactive, toRefs, ref, onActivated } from "vue";
-import { showFailToast, showSuccessToast, showToast, showDialog } from "vant";
+import { showFailToast, showSuccessToast, showToast, showDialog, showConfirmDialog } from "vant";
 import sHeader from "../../components/SimpleHeader";
 import { getLoginUser, Format_calcuDecial, styleUrl } from "../../common/js/utils";
 import {
@@ -290,6 +282,7 @@ import {
   eliminate,
   Api_getReplenishment,
   changeSleepDesc,
+  setFurnace,
 } from "../../service/device/index";
 import deviceSearch from "./deviceSearch";
 import deviceOper from "./deviceOper";
@@ -365,6 +358,7 @@ export default {
       labelId: "", // 分组标签
     });
     // 初始化页面获取列表
+    const showAlert = ref(false);
     onMounted(() => {
       sleepDescBoxShow.value = true;
       init();
@@ -372,6 +366,9 @@ export default {
       // window.addEventListener('scroll', handleScroll);
       // 加载样式
       styleUrl('device');
+      setInterval(() => {
+        showAlert.value = !showAlert.value;
+      }, 500); // 1000毫秒即1秒
     });
     // 初始化
     const init = () => {
@@ -480,7 +477,10 @@ export default {
       const { data } = await eliminate(Object.assign({}, params));
       if (data.code) {
         showSuccessToast(t("device.successfullyEliminatedTheAlarm"));
-        e.alarmList = [];
+        setTimeout(() => {
+          e.alarmContent = "";
+        }, 1000);
+        console.log("e", e);
       } else {
         showFailToast(data.message);
       }
@@ -575,7 +575,7 @@ export default {
       }
     }
 
-    
+
     // 点击标签
     const active = ref("");
     const clickLabel = (item) => {
@@ -591,7 +591,7 @@ export default {
       { text: t("device.group"), value: '0' },
       { text: t("device.addGroup"), value: '1' },
     ];
-    const selectLabel = (action) =>  {
+    const selectLabel = (action) => {
       // showToast(action.value);
       if (action.value == '0') {
         router.push('/labelMan');
@@ -601,7 +601,55 @@ export default {
       }
     }
 
+    // 重启炉头
+    const restartHead = (id) => {
+      showConfirmDialog({
+        title: t('user.tips'),
+        message: t('device.restartFurnaceHeadTips'),
+      }).then(async () => {
+        const { data } = await setFurnace({
+          equipmentId: id,
+          eqeStatus: 1,
+        });
+        if (data.code) {
+          showSuccessToast(t("device.restartSucceeded"));
+          setTimeout(() => {
+            router.go(0);
+          }, 1000);
+        } else {
+          showFailToast(data.message);
+        }
+      }).catch(() => {
+        return;
+      })
+    };
+    // 开启/关闭炉头
+    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")),
+      }).then(async () => {
+        const { data } = await setFurnace({
+          equipmentId: id,
+          eqeStatus: status,
+        });
+        if (data.code) {
+          showSuccessToast((status == 1 ? t("device.open") : t("device.close")) + t("device.success"));
+          setTimeout(() => {
+            router.go(0);
+          }, 1000);
+        } else {
+          showFailToast(data.message);
+        }
+      }).catch(() => {
+        return;
+      })
+    };
+
     return {
+      showAlert,
       ...toRefs(searchParams),
       list,
       loading,
@@ -633,7 +681,9 @@ export default {
       active,
       actions,
       showPopover,
-      selectLabel
+      selectLabel,
+      restartHead,
+      openCloseHead,
     };
   },
 };

+ 9 - 6
src/views/device/openDoor.vue

@@ -15,11 +15,12 @@
 					</div>
 					<span class="info3 o-pl-50">{{ $t("device.status") }}: </span>
 					<span class="info3 o-pl-10">{{ deviceDetal.outDoor != 1 ? $t("device.close") : $t("device.open")
-					}}</span>
+						}}</span>
 				</template>
 			</van-field>
 
-			<van-field colon readonly :label="`${$t('device.inDoor')}`" label-width="40px">
+			<van-field v-if="machineType == '0' || machineType == null" colon readonly :label="`${$t('device.inDoor')}`"
+				label-width="40px">
 				<template #input>
 					<div class="l-flex-RC">
 						<van-switch :model-value="deviceDetal.inDoor" @update:model-value="inDoorChg" size="22"
@@ -27,13 +28,13 @@
 					</div>
 					<span class="info3 o-pl-50">{{ $t("device.status") }}: </span>
 					<span class="info3 o-pl-10">{{ deviceDetal.inDoor != 1 ? $t("device.close") : $t("device.open")
-					}}</span>
+						}}</span>
 				</template>
 			</van-field>
 		</div>
 	</div>
 </template>
-  
+
 <script>
 import { onMounted, ref } from 'vue';
 import sHeader from "@/components/SimpleHeader";
@@ -47,6 +48,7 @@ export default {
 	setup() {
 		const route = useRoute();
 		const deviceId = route.query.deviceId;
+		const machineType = route.query.machineType;
 		const deviceDetal = ref({});
 		const { t } = useI18n();
 
@@ -125,7 +127,8 @@ export default {
 		return {
 			deviceDetal,
 			outDoorChg,
-			inDoorChg
+			inDoorChg,
+			machineType
 		};
 	},
 	components: {
@@ -133,7 +136,7 @@ export default {
 	},
 }
 </script>
-  
+
 <style lang="less" scoped>
 @import "../../common/style/common";
 </style>

+ 1 - 1
src/views/device/paramsSet/paramsSetInfo.vue

@@ -226,7 +226,7 @@ export default {
       if (value === 0) {
         params.name = "allUpdate";
         params.val = interval.value;
-      } else if (value === 0) {
+      } else if (value === 1) {
         params.name = "winter";
         params.val = "winter";
       } else {

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

@@ -192,8 +192,8 @@ export default {
     // 点击优惠码
     const disCountCodeClick = (data) => { console.log('disCountCodeClick', data); }
     // 时间格式化
-    const showDate = (date) => { return date ? dateUtil.formateDate(new Date(date), "yyyy-MM-dd") : ''; }
-    const showDateTime = (date) => { return date ? dateUtil.formateDate(new Date(date), "yyyy-MM-dd hh:mm:ss") : ''; }
+    const showDate = (date) => { return date ? dateUtil.formateDate(new Date(date), "yyyy/MM/dd") : ''; }
+    const showDateTime = (date) => { return date ? dateUtil.formateDate(new Date(date), "yyyy/MM/dd hh:mm:ss") : ''; }
     // 优惠码导出
     const exportClick = async () => {
       searchParams.size = 1000;

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

@@ -47,7 +47,7 @@
                 <div class="main5 flex-row justify-center">
                   <!-- <span class="word8">&yen;</span> -->
                   <span class="word8">{{ currencySymbol }}</span>
-                  <span class="word9">{{ salesVolume.toFixed(0) }}</span>
+                  <span class="word9">{{ salesVolume.toFixed(2) }}</span>
                 </div>
                 <span class="info5">{{ $t("home.totalIncome") }}</span>
               </div>

+ 108 - 47
src/views/orderCenter/index.vue

@@ -16,11 +16,11 @@
                 </div>
               </div>
             </div>
-            <div class="flex-col" >
-                <div class="main5 flex-row justify-between" @click="searchClick()">
-                  <img class="label2" src="@/assets/device/searchIcon.png" />
-                </div>
+            <div class="flex-col">
+              <div class="main5 flex-row justify-between" @click="searchClick()">
+                <img class="label2" src="@/assets/device/searchIcon.png" />
               </div>
+            </div>
           </div>
         </div>
         <img class="img1" referrerpolicy="no-referrer" src="@/assets/line.png" />
@@ -34,7 +34,7 @@
                   <div class="main5 flex-row justify-center">
                     <!-- <span class="word8">&yen;</span> -->
                     <span class="word8">{{ currencySymbol }}</span>
-                    <span class="word9">{{ salesVolume.toFixed(0) }}</span>
+                    <span class="word9">{{ salesVolume.toFixed(2) }}</span>
                   </div>
                   <span class="info5">{{ $t("home.totalIncome") }}</span>
                 </div>
@@ -104,27 +104,28 @@
                         <span class="info5">{{ currencySymbol }}</span>
                         <span class="word12" v-if="item.status === 3">{{ item.price.toFixed(2) }}</span>
                         <span class="word12" v-else>{{ item.refundAmount == null ? item.price.toFixed(2) : (item.price -
-                          item.refundAmount).toFixed(2) }}</span>
+      item.refundAmount).toFixed(2) }}</span>
                       </div>
                     </template>
                     <template #price-top>
-                      <span class="time_01" :style="user.ifForeign == '0' ? 'margin-top: 20px;' : 'margin-top: 40px;'">{{
-                        $t('orderCenter.paymentTime') }}:{{ showOrderTime(item, 1) }}</span>
+                      <span class="time_01"
+                        :style="user.ifForeign == '0' ? 'margin-top: 20px;' : 'margin-top: 40px;'">{{
+      $t('orderCenter.paymentTime') }}:{{ showOrderTime(item, 1) }}</span>
                     </template>
                     <template #footer>
                       <span v-if="item.status === 3">x{{ item.refundQuantity }}</span>
                       <span v-else>x{{ item.refundQuantity == null ? item.productNumber : (item.productNumber -
-                        item.refundQuantity) }}</span>
+      item.refundQuantity) }}</span>
                     </template>
                   </van-card>
                   <div v-if="typeof item.status === 'undefined'" class="main11 flex-col orderSuccess"></div>
                   <div v-else class="main11 flex-col" :class="{
-                    orderSuccess: item.status === 1 && (user.ifForeign == '0' || user.ifForeign == null),
-                    coinOrderSuccess: item.status === 1 && user.ifForeign == '1',
-                    orderError: item.status === 0,
-                    refunding: item.status === 2,
-                    refunded: item.status === 3,
-                  }"></div>
+      orderSuccess: item.status === 1 && (user.ifForeign == '0' || user.ifForeign == null),
+      coinOrderSuccess: item.status === 1 && user.ifForeign == '1',
+      orderError: item.status === 0,
+      refunding: item.status === 2,
+      refunded: item.status === 3,
+    }"></div>
                 </div>
                 <!-- <div class="section6 flex-col"></div> -->
               </div>
@@ -146,7 +147,7 @@
                 <!-- <span class="txt4">这里是设备名称</span> -->
                 <span class="info1">{{ $t('orderCenter.business') }}</span>
                 <span class="txt5">+ {{ refundObject.refundAmount == null ? refundObject.price.toFixed(2) :
-                  (refundObject.price - refundObject.refundAmount).toFixed(2) }}</span>
+      (refundObject.price - refundObject.refundAmount).toFixed(2) }}</span>
               </div>
             </div>
             <div class="layer1 flex-col"></div>
@@ -158,6 +159,10 @@
               <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>
@@ -179,13 +184,27 @@
               <span class="word7">{{ showPayType(refundObject) }}</span>
             </div>
             <div class="layer6 flex-row justify-between">
-              <span class="word6">{{ $t('orderCenter.creationTime') }}</span>
-              <span class="word7">{{ showOrderTime(refundObject, 2) }}</span>
+              <span class="word6">{{ refundObject.status === 1? $t('orderCenter.paymentTime') : refundObject.status === 3? $t('orderCenter.refundTime') : $t('orderCenter.creationTime') }}</span>
+              <span class="word7">{{ showOrderTime(refundObject, 1) }}</span>
             </div>
             <div v-if="refundObject.status === 3" class="layer7 flex-row justify-between">
               <span class="word8">{{ $t('orderCenter.refunded') }}</span>
               <span class="info4">{{ refundObject.refundAmount }}</span>
             </div>
+            <div v-if="refundObject.status === 3 && orderType == '3'" class="layer7 flex-row justify-between">
+              <span class="word8">退款原因</span>
+              <span class="info4">{{ 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"
@@ -201,7 +220,7 @@
     <kDialog :isCloseForConfirm="false" :dialogTitle="$t('orderCenter.refundTip')"
       :confirmBtnTxt="$t('orderCenter.refundSubmit')" ref="kDialogRef" @confirmclk="confirmClk">
       <template #content>
-        <div class="cust_vantBorder l-flex-RC">
+        <div class="refundBox l-flex-RC" style="overflow-y: auto; overflow-x: hidden; max-height: 40vh;">
           <div v-for="(item, index) in orderDetails" :key="index" class="card01">
             <van-checkbox v-model="isChecked[index]" @change="checkGood(index)" icon-size="20px"></van-checkbox>
             <van-card :price="item.price.toFixed(2)" :title="item.productName" :thumb="showSugarPic(item.productNo)">
@@ -214,11 +233,12 @@
           </div>
         </div>
         <div class="o-mt-5" style="height: 1px; background: #d7d7e2"></div>
+        <van-field v-if="orderType === '3'" v-model="cofficentForm.refundReason" rows="2" autosize label="退款原因"
+          type="textarea" maxlength="30" :clearable="true" placeholder="请输入退款原因" show-word-limit />
         <div class="btnFooter">
           <van-checkbox class="checkAllBtn o-mt-5" v-model="checkedAll" @click="checkAll">全选</van-checkbox>
           <div class="o-mt-5">
             <span class="">{{ $t('orderCenter.totalRefund') }}:</span>
-            <!-- <span class="totalRefund o-pr-15">&yen; {{ totalRefund.toFixed(2) }}</span> -->
             <span class="totalRefund o-pr-15">{{ currencySymbol }} {{ totalRefund.toFixed(2) }}</span>
           </div>
         </div>
@@ -238,7 +258,7 @@ 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 } from "../../service/order/index";
+import { getOrderList, refundOrder, refundWechatOrder, updateIsInvoice } 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";
@@ -263,6 +283,25 @@ export default {
     const totalRefund = ref(0);
     // 退款商户数量
     const refundNum = ref([]);
+    // 订单类型
+    const orderType = ref('');
+    // 是否开发票
+    const isInvoice = ref(0);
+    // 更新是否开发票
+    const updateInvoice = (id) => {
+      const params = {
+        id,
+        isInvoice: isInvoice.value,
+      }
+      showConfirmDialog({
+        message: '是否确认更新',
+      }).then(() => {
+        const { data } = updateIsInvoice(params);
+        console.log(data);
+      }).catch(() => {
+        return;
+      });
+    }
     // 加载状态
     // const isLoading = ref(false);
     // 监控退款选择框状态
@@ -327,13 +366,18 @@ export default {
     // 点击全选按钮
     const checkAll = () => {
       isChecked.value.forEach((item, index) => {
-        if (isChecked.value[index]) {
-          isChecked.value[index] = !isChecked.value[index]
-          checkedAll.value = false;
+        if (checkedAll.value) {
+          isChecked.value[index] = true;
         } else {
-          isChecked.value[index] = !isChecked.value[index]
-          checkedAll.value = true;
+          isChecked.value[index] = false;
         }
+        // if (isChecked.value[index]) {
+        //   isChecked.value[index] = !isChecked.value[index]
+        //   checkedAll.value = false;
+        // } else {
+        //   isChecked.value[index] = !isChecked.value[index]
+        //   checkedAll.value = true;
+        // }
       })
     }
     // 点击确定按钮
@@ -351,26 +395,36 @@ export default {
       if (cofficentForm.note === "" || cofficentForm.price === 0 || cofficentForm.price === "") {
         showToast(t('orderCenter.refundPlace'));
         return;
-      } else {
-        showConfirmDialog({
-          // title: "提示",
-          message: t('orderCenter.refundCheck'),
-        }).then(() => {
-          // isLoading.value = true; // 开始加载
-          refundAjax();
-          // isLoading.value = false; // 加载完成
-
-          kDialogRef.value.closeDialog();
-        }).catch(() => {
-          return;
-        });
       }
+      if (orderType.value === '3' && (cofficentForm.refundReason === "" || cofficentForm.refundReason === null)) {
+        showToast('请填写退款原因');
+        return;
+      }
+      showConfirmDialog({
+        // title: "提示",
+        message: t('orderCenter.refundCheck'),
+      }).then(() => {
+        // isLoading.value = true; // 开始加载
+        refundAjax();
+        // isLoading.value = false; // 加载完成
+
+        kDialogRef.value.closeDialog();
+      }).catch(() => {
+        return;
+      });
     }
     // 退款操作
     const refundAjax = async () => {
       try {
-        const { data } = await refundOrder(cofficentForm);
-        if (data.code && data.code !== 'B0001') {
+        // 如果为微信退款
+        let data = null;
+        if (orderType.value === '3') {
+          data = await refundWechatOrder(cofficentForm);
+        } else {
+          data = await refundOrder(cofficentForm);
+        }
+        console.log(data);
+        if (data.data.code && data.data.code !== 'B0001') {
           showDialog({
             message: t('orderCenter.refundSucceeded'),
           }).then(() => {
@@ -380,7 +434,7 @@ export default {
             search({});
           });
         } else {
-          showFailToast(data.message);
+          showFailToast(data.data.message);
         }
       } catch (error) {
         showFailToast(t('orderCenter.requestFailed'));
@@ -391,7 +445,8 @@ export default {
       price: 0,
       id: "",
       productNumber: 0,
-      note: 0
+      note: 0,
+      refundReason: "",
     });
     // 引入语言
     const { t } = useI18n();
@@ -650,6 +705,8 @@ export default {
     const orderClick = (item) => {
       //查询商户余额,要用admin的type去区分 TODO
       refundObject.value = item;
+      orderType.value = item.payPlatform;
+      isInvoice.value = item.isInvoice;
       refundType.value = true;
     };
     const accountDetail = ref({});
@@ -664,15 +721,15 @@ export default {
       if (idx === 1) {
         switch (item.status) {
           case 1:
-            return dateUtil.timeZoneDate(new Date(dateUtil.formateDate(new Date(item.payDate), "yyyy-MM-dd hh:mm:ss")));
+            return dateUtil.timeZoneDate(new Date(dateUtil.formateDate(new Date(item.payDate), "yyyy/MM/dd hh:mm:ss")));
           case 3:
-            return dateUtil.timeZoneDate(new Date(dateUtil.formateDate(new Date(item.refundDate), "yyyy-MM-dd hh:mm:ss")));
+            return dateUtil.timeZoneDate(new Date(dateUtil.formateDate(new Date(item.refundDate), "yyyy/MM/dd hh:mm:ss")));
           default:
-            return dateUtil.timeZoneDate(new Date(dateUtil.formateDate(new Date(item.createDate), "yyyy-MM-dd hh:mm:ss")));
+            return dateUtil.timeZoneDate(new Date(dateUtil.formateDate(new Date(item.createDate), "yyyy/MM/dd hh:mm:ss")));
         }
       } else {
         return item && item.createDate
-          ? dateUtil.timeZoneDate(new Date(dateUtil.formateDate(new Date(item.createDate), "yyyy-MM-dd hh:mm:ss")))
+          ? dateUtil.timeZoneDate(new Date(dateUtil.formateDate(new Date(item.createDate), "yyyy/MM/dd hh:mm:ss")))
           : "";
       }
     };
@@ -733,6 +790,7 @@ export default {
       { text: t('orderCenter.weChatScanning'), values: "WEIXIN_NATIVE" },
       { text: t('orderCenter.antiScanningOfAlipay'), values: "ALIPAY_CARD" },
       { text: t('orderCenter.weChatBackScanning'), values: "WEIXIN_CARD" },
+      { text: t('orderCenter.weChatBackScanning'), values: "WEIXIN_PAYCODE" },
     ];
     // 弹窗支付上述
     const showPayType = (item) => {
@@ -831,6 +889,9 @@ export default {
       // isLoading,
       isRefund,
       currencySymbol,
+      orderType,
+      isInvoice,
+      updateInvoice,
     };
   },
 };

+ 2 - 7
src/views/orderCenter/orderSearch.vue

@@ -58,7 +58,7 @@ export default {
     const sheetShow = ref(false);
     const startDateShow = ref(false);
     const endDateShow = ref(false);
-    const minDate = new Date(2018, 1, 1);
+    const minDate = new Date(2022, 1, 1);
     const maxDate = new Date();
 
     const userName = ref(''); // 用户名
@@ -96,7 +96,7 @@ export default {
     // 提交搜索表单触发搜索
     const onSubmit = () => {
       console.log('startTime.value', startTime.value)
-      if (userName.value == '' && sn.value == '' && trxNo.value == '' && clientId.value == '') {
+      if (userName.value == '' && sn.value == '' && trxNo.value == '' && clientId.value == '' && startTime.value == '' && endTime.value == '') {
         // if (startTime.value != '' || endTime.value != '') {
         //   Toast("请输入正确时间");
         //   return;
@@ -104,11 +104,6 @@ export default {
           showToast("请输入搜索条件");
         return;
         // }
-      } else {
-        if (startTime.value == '' || endTime.value == '') {
-          showToast("请输入指定订单日期");
-          return;
-        }
       }
       const searchParam = {
         userName: userName.value,

+ 6 - 2
src/views/robotRanking.vue

@@ -430,7 +430,7 @@ export default {
       colastdayStart:
         moment()
           .day(moment().day() - 1)
-          .format("YYYY-MM-DD") + " 00:00:00",
+          .format("") + " 00:00:00",
       colastdayEnd:
         moment()
           .day(moment().day() - 1)
@@ -606,6 +606,10 @@ export default {
               axisPointer: {
                 type: "shadow",
               },
+              borderWidth: 1,
+              textStyle:{
+                fontSize : 12
+              }
             },
             // 固定屏幕显示多少个,其余的滑动
             dataZoom: [
@@ -646,7 +650,7 @@ export default {
             xAxis: {
               type: "category",
               axisLabel: {
-                rotate: 45,
+                rotate: 20,
               },
               data: [],
             },

+ 1 - 1
src/views/taskMessage/equipment/index.vue

@@ -248,7 +248,7 @@ export default {
     };
     const showDateTime = (date) => {
       return date
-        ? dateUtil.formateDate(new Date(date), "yyyy-MM-dd hh:mm:ss")
+        ? dateUtil.formateDate(new Date(date), "yyyy/MM/dd hh:mm:ss")
         : "";
     };
     const showItemType = (type) => {

+ 1 - 1
src/views/taskMessage/proportion/index.vue

@@ -275,7 +275,7 @@ export default {
     });
     const showDateTime = (date) => {
       return date
-        ? dateUtil.formateDate(new Date(date), "yyyy-MM-dd hh:mm:ss")
+        ? dateUtil.formateDate(new Date(date), "yyyy/MM/dd hh:mm:ss")
         : "";
     };
     const changeStatusFun = async (item, type) => {