Explorar o código

添加爆米花相关信息

soobin %!s(int64=2) %!d(string=hai) anos
pai
achega
33665f265a

+ 53 - 38
src/assets/language/en.json

@@ -281,6 +281,7 @@
     "addAlarmClock": "Add alarm clock",
     "modify": "modify",
     "furnHeadStatus": "Furnace head status",
+    "deviceStatus": "Device status",
     "opened": "Opened",
     "closed": "Closed",
     "weekday2": "weekday",
@@ -295,16 +296,20 @@
     "deletionSucceeded": "Deletion succeeded",
     "commonOperations": "Remote operating equipment",
     "equipmentNo": "Equipment No",
+    "restart": "Restart device",
     "restartFurnaceHead": "Restart furnace head",
     "sleep": "sleep",
     "openCloseFurnaceHead": "Open/close furnace head",
     "openFurnHead": "Open furnace head",
+    "openDevice": "Open device",
     "closeFurnHead": "Close furnace head",
+    "closeDevice": "Close device",
     "remoteDoorOpening": "Remote door opening",
     "remoteSugarMaking": "Remote sugar making",
+    "remoteProduction": "Remote production",
     "outDoor": "Outer door",
     "inDoor": "Inner door",
-	"status": "Status",
+    "status": "Status",
     "openRemind": "Remind",
     "openRemindOut": "Are you sure you want to switch the outer door?",
     "openRemindIn": "Are you sure you want to switch the Inner door?",
@@ -313,7 +318,7 @@
     "parameterSetting": "Parameter setting",
     "operationConfirmation": "Operation confirmation",
     "pleaseConfirmAgainWhetherToOperate": "Please confirm again whether to operate",
-	"IllThinkAboutItAgain": "Cancel",
+    "IllThinkAboutItAgain": "Cancel",
     "restartSucceeded": "Restart succeeded",
     "deleteDeviceSucceed": "Delete device successfully",
     "sleepSuccessfully": "Sleep successfully",
@@ -369,8 +374,11 @@
     "submitAndPushDeviceUpdates": "Submit and push device updates",
     "clickToSelectPattern": "Click to select pattern",
     "pleaseSelectAPattern": "Please select a pattern",
+    "clickToSelectTaste": "Click to choose flavor",
+    "pleaseSelectTaste": "Please choose the flavor",
+    "todaysMakeList": "Make Today List",
     "todaysSugarList": "Make a sugar list today",
-    "submitToMakeSugar": "Submit to make sugar",
+    "submitToMakeSugar": "Submit",
     "viewResults": "View Results",
     "dataOverview": "Data Overview",
     "search": "search",
@@ -383,11 +391,14 @@
     "lastRefreshTime": "Recent refresh time",
     "machineUniqueCode": "Machine unique code",
     "furnaceHeadTemperature": "furnace head temperature",
+    "stirringTemperature": "Stirring temperature",
+    "cornGeneratorTemperature": "Corn generator temperature",
+    "cupQuantity": "Cup quantity",
     "temperatureInCabinet": "Temperature in cabinet",
     "humidityInCabinet": "Humidity in cabinet",
-	"showGoods": "Block or display goods",
-	"editCheck": "Are you sure about the change?",
-	"unknownError": "Unknown error!",
+    "showGoods": "Block or display goods",
+    "editCheck": "Are you sure about the change?",
+    "unknownError": "Unknown error!",
     "degree": "degree",
     "volume": "volume",
     "alarmContent": "Alarm content",
@@ -403,8 +414,8 @@
     "pleaseSelectAMachine": "Please select a machine",
     "quantityPurchased": "Quantity purchased",
     "pleaseEnterThePurchaseQuantity": "Please enter the purchase quantity",
-	"download": "Download",
-	"downloading": "Downloading...",
+    "download": "Download",
+    "downloading": "Downloading...",
     "month": "month",
     "weChat": "WeChat",
     "alipay": "Alipay",
@@ -443,7 +454,7 @@
       "customLogoSucceed": "Custom logo success"
     },
     "deleteDevice": "Delete Device",
-	"viewLogs": "View logs",
+    "viewLogs": "View logs",
     "noPosition": "No positioning",
     "equipLocation": "Equipment location",
     "position": "Position",
@@ -469,7 +480,7 @@
     "sureUpdate": "Are you sure you want to update",
     "coupon": "coupon",
     "adRule": "Advertising rules",
-	"changePassword": "Changing device password",
+    "changePassword": "Changing device password",
     "editAdRule": {
       "title": "Edit Rule",
       "ruleName": "Rule Name",
@@ -481,17 +492,17 @@
       "title": "Goods display setting",
       "equipmentName": "Equipment name"
     },
-	"devicePasswordPage":{
-		"title":"Changing device password",
-		"equipmentName":"Equipment name",
-		"deivcePwd": "Equipment password",
-		"adminPassword": "Administrator password",
-		"guestPassword": "Secondary administrator password",
-		"checkDeivcePwd": "Confirm password",
-		"passwordPlaceholder": "Please enter a password of more than 6 characters",
-		"passwordCheckRequired": "Please enter your password again",
-		"passwordMatch": "Two passwords do not match"
-	},
+    "devicePasswordPage": {
+      "title": "Changing device password",
+      "equipmentName": "Equipment name",
+      "deivcePwd": "Equipment password",
+      "adminPassword": "Administrator password",
+      "guestPassword": "Secondary administrator password",
+      "checkDeivcePwd": "Confirm password",
+      "passwordPlaceholder": "Please enter a password of more than 6 characters",
+      "passwordCheckRequired": "Please enter your password again",
+      "passwordMatch": "Two passwords do not match"
+    },
     "flowerType": "Flower type",
     "flowerTypePlace": "Please select the flower type"
   },
@@ -574,7 +585,7 @@
     "totalIncome": "Total income",
     "productNum": "Sales volume",
     "numberOfOrders": "Order quantity",
-	"salesAmount": "Sales amount",
+    "salesAmount": "Sales amount",
     "commonTools": "commonTools",
     "deviceManagement": "Device management",
     "discountCode": "discountCode",
@@ -794,13 +805,13 @@
     "clickSearch": "Click Search",
     "selectFullTime": "Select full time",
     "refundAmount": "Refund amount",
-	"refundTip": "Make sure the amount corresponds to the quantity, otherwise it will affect the statistics!",
-	"refundQuantity":"Refund quantity",
+    "refundTip": "Make sure the amount corresponds to the quantity, otherwise it will affect the statistics!",
+    "refundQuantity": "Refund quantity",
     "refundAmountPlace": "Please enter the refund amount",
     "most": "most ",
-	"at":"",
+    "at": "",
     "accountBalance": "Account balance",
-	"refundSubmit": "Submit applications"
+    "refundSubmit": "Submit applications"
   },
   "orderExport": {
     "orderAnalysis": "Order Analysis",
@@ -854,7 +865,7 @@
     "labelMan": "Label management",
     "apkMan": "Apk management",
     "merchantMan": "Merchant management",
-	"accountOperation": "Account operation",
+    "accountOperation": "Account operation",
     "modifyRole": "Modify Role",
     "whole": "whole",
     "roleAddedSuccessfully": "Role added successfully",
@@ -1099,8 +1110,8 @@
     "emailCodeRequired": "Please enter the email verification code",
     "registerButton": "Register",
     "replaysInSeconds": "Replays in seconds",
-	"emailRegistration": "Email registration",
-	"phoneRegistration": "Phone registration"
+    "emailRegistration": "Email registration",
+    "phoneRegistration": "Phone registration"
   },
   "robotRanking": {
     "machineSalesRanking": "Machine sales ranking",
@@ -1122,6 +1133,11 @@
     "changeTypePlace": "Please select statistics method",
     "patternStatistics": "Pattern statistics",
     "salesStatistics": "Sales statistics",
+    "companyTypeLabel": "Company type",
+    "companyTypePlaceholder":"Please select a companytype",
+    "whole":"All",
+    "sz": "Sunzee",
+    "sc": "Sevencloud",
     "seleWeekDateRangeNotSeveDays": "The date range of the selected week cannot exceed 7 days!!!",
     "rankMethod": "Ranking method"
   },
@@ -1151,7 +1167,7 @@
     "logOutContent": "Are you sure you want to log out",
     "corrEmailPlace": "Please enter the correct email address",
     "corrPhonePlace": "Please enter the correct mobile number",
-    "bindWechat":"Bind WeChat"
+    "bindWechat": "Bind WeChat"
   },
   "bindWechat": {
     "cancel": "Cancel",
@@ -1228,13 +1244,12 @@
     "M506": "Outer Loop Button"
   },
   "accountOperation": {
-  	"title": "Acount operation",
-  	"accountAuthority": "Account authority",
-  	"distributionSettings": "Distribution Settings",
-  	"withdrawalAccountNo": "Standby withdrawal account No",
-  	"standbyWithdrawalAccountNo": "Standby withdrawal account No",
-  	"merchantManagement": "Merchant management",
-  	"labelMan": "Label management"
-  	
+    "title": "Acount operation",
+    "accountAuthority": "Account authority",
+    "distributionSettings": "Distribution Settings",
+    "withdrawalAccountNo": "Standby withdrawal account No",
+    "standbyWithdrawalAccountNo": "Standby withdrawal account No",
+    "merchantManagement": "Merchant management",
+    "labelMan": "Label management"
   }
 }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 386 - 373
src/assets/language/zh.json


BIN=BIN
src/assets/order/spunSugar/goods/B01.png


BIN=BIN
src/assets/order/spunSugar/goods/B02.png


BIN=BIN
src/assets/order/spunSugar/goods/B03.png


BIN=BIN
src/assets/order/spunSugar/goods/B04.png


BIN=BIN
src/assets/order/spunSugar/goods/B05.png


BIN=BIN
src/assets/order/spunSugar/goods/B06.png


+ 5 - 3
src/service/device/index.js

@@ -33,11 +33,13 @@ export function sleepEquipment(params) {
 }
 
 // 远程开门
-/* export function openDoor(params) {
+export function openDoor(params) {
   return axios.post(`/SZWL-SERVER/tEquipment/openDoor?${stringToUrl(params)}`, params);
-} */
+}
+
+// 新版远程开门,包含内门外门
 export function Api_openDoor(params) {
-    return axios.get(`/SZWL-SERVER/tEquipment/openDoor`, {params})
+    return axios.get(`/SZWL-SERVER/tEquipment/openDoors`, {params})
 }
 
 // 系统脱机

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

@@ -1,4 +1,4 @@
-.page {
+.dosugarPage {
     background-color: rgba(255, 255, 255, 1);
     position: relative;
     width: 100%;

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

@@ -1,4 +1,4 @@
-.page {
+.uniPayPage {
     background-color: rgba(255, 255, 255, 1);
     position: relative;
     width: 375px;

+ 2 - 2
src/utils/config.js

@@ -2,8 +2,8 @@ let baseURL;
 // 开发环境
 if (process.env.NODE_ENV === 'development') {
     // 测试的
-    // baseURL = 'http://szwltest.sunzee.com.cn:49002/'
-    baseURL = 'https://szwl.sunzee.com.cn/'
+    baseURL = 'http://szwltest.sunzee.com.cn:49002/'
+    // baseURL = 'https://szwl.sunzee.com.cn/'
     // 正式的
     // baseURL = 'https://sz.sunzee.com.cn/'
     

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

@@ -198,6 +198,14 @@ export default {
         name: "280en",
         id: "280en",
       },
+      {
+        name: "POP320ch",
+        id: "POP320ch",
+      },
+      {
+        name: "POP320en",
+        id: "POP320en",
+      }
     ]);
     const busiPopFieldName = reactive({
       text: "name",

+ 59 - 111
src/views/device/deviceOper.vue

@@ -1,12 +1,7 @@
 <template>
   <!-- 设备常见操作弹窗 -->
-  <van-dialog
-      class-name="operDialog"
-      width="auto"
-      v-model:show="show"
-      :showConfirmButton="false"
-      :showCancelButton="false"
-  >
+  <van-dialog class-name="operDialog" width="auto" v-model:show="show" :showConfirmButton="false"
+    :showCancelButton="false">
     <slot name="title">
       <div class="van-dialog__header">{{ $t("device.commonOperations") }}</div>
       <div class="txt1" style="padding: 0.2em 1em">
@@ -21,39 +16,30 @@
     <div class="operBox">
       <div class="operItem" @click="restartFurnace()">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/restart.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/restart.png" />
         </div>
-        <div class="operText">{{ $t("device.restartFurnaceHead") }}</div>
+        <div v-if="device.machineType === '1'" class="operText">{{ $t("device.restart") }}</div>
+        <div v-else class="operText">{{ $t("device.restartFurnaceHead") }}</div>
       </div>
       <div class="operItem" @click="sleepEquipmentFun()">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/sleep.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/sleep.png" />
         </div>
         <div class="operText">{{ sleepTitle }}</div>
       </div>
       <div class="operItem" @click="openOffFurnace(1)">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/onOff.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/onOff.png" />
         </div>
-        <div class="operText">{{ $t("device.openFurnHead") }}</div>
+        <div v-if="device.machineType === '1'" class="operText">{{ $t("device.openDevice") }}</div>
+        <div v-else class="operText">{{ $t("device.openFurnHead") }}</div>
       </div>
       <div class="operItem" @click="openOffFurnace(0)">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/onOff.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/onOff.png" />
         </div>
-        <div class="operText">{{ $t("device.closeFurnHead") }}</div>
+        <div v-if="device.machineType === '1'" class="operText">{{ $t("device.closeDevice") }}</div>
+        <div v-else class="operText">{{ $t("device.closeFurnHead") }}</div>
       </div>
       <!--     <div class="operItem" @click="openDoorFun()">
               <div class="operIcon">
@@ -66,10 +52,7 @@
             </div> -->
       <div class="operItem" @click="openDoorFun()">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/openDoor.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/openDoor.png" />
         </div>
         <div class="operText">{{ $t("device.remoteDoorOpening") }}</div>
       </div>
@@ -77,132 +60,93 @@
         <div class="operIcon">
           <img class="operImg" src="../../assets/device/operIcon/doSugar.png" />
         </div>
-        <div class="operText">{{ $t("device.remoteSugarMaking") }}</div>
+        <div v-if="device.machineType === '1'" class="operText">{{ $t("device.remoteProduction") }}</div>
+        <div v-else class="operText">{{ $t("device.remoteSugarMaking") }}</div>
       </div>
       <div class="operItem" @click="alarmClock()">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/alarmClock.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/alarmClock.png" />
         </div>
         <div class="operText">{{ $t("device.timeSwitch") }}</div>
       </div>
       <div class="operItem" @click="modulation()">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/modulation.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/modulation.png" />
         </div>
         <div class="operText">{{ $t("device.modulation") }}</div>
       </div>
       <div class="operItem" @click="recharge()">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/recharge.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/recharge.png" />
         </div>
         <div class="operText">{{ $t("device.equipmentRecharge") }}</div>
       </div>
       <div class="operItem" @click="paramSetPush()">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/paramsSet.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/paramsSet.png" />
         </div>
         <div class="operText">{{ $t("device.parameterSetting") }}</div>
       </div>
       <div class="operItem" @click="saveProportionPush()">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/saveProportion.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/saveProportion.png" />
         </div>
         <div class="operText">{{ $t("device.addDistributor") }}</div>
       </div>
       <div v-if="isRole('M17')" class="operItem" @click="tuojiEquipmentFun()">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/tuoji.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/tuoji.png" />
         </div>
         <div class="operText">{{ $t("device.sysOffline") }}</div>
       </div>
       <div class="operItem" @click="modifyPriceClk()">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/editPrice.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/editPrice.png" />
         </div>
         <div class="operText">{{ $t("device.modifyPrice") }}</div>
       </div>
       <div class="operItem" @click="showGoodsClk()">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/showGoods.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/showGoods.png" />
         </div>
         <div class="operText">{{ $t("device.showGoods") }}</div>
       </div>
-      <div class="operItem" @click="changePasswordClk()">
+      <div v-if="device.machineType === '1'" class="operItem" @click="changePasswordClk()">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/password.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/password.png" />
         </div>
         <div class="operText">{{ $t("device.changePassword") }}</div>
       </div>
       <!-- 删除设备 -->
       <div v-if="user.type < 2" class="operItem" @click="deleteDevice()">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/deletedevice.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/deletedevice.png" />
         </div>
         <div class="operText">{{ $t("device.deleteDevice") }}</div>
       </div>
       <!-- 日志功能 -->
       <div v-if="user.type < 2" class="operItem" @click="viewLogs()">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/viewLogs.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/viewLogs.png" />
         </div>
         <div class="operText">{{ $t("device.viewLogs") }}</div>
       </div>
       <!-- 定制logo -->
       <div v-if="user.type < 2" class="operItem" @click="customLogo()">
         <div class="operIcon">
-          <img
-              class="operImg"
-              src="../../assets/device/operIcon/customLogo.png"
-          />
+          <img class="operImg" src="../../assets/device/operIcon/customLogo.png" />
         </div>
         <div class="operText">{{ $t("device.customLogo.customLogo") }}</div>
       </div>
     </div>
   </van-dialog>
-  <van-dialog
-      v-model:show="operCheckShow"
-      :title="$t('device.operationConfirmation')"
-      :showConfirmButton="false"
-      :showCancelButton="false"
-  >
+  <van-dialog v-model:show="operCheckShow" :title="$t('device.operationConfirmation')" :showConfirmButton="false"
+    :showCancelButton="false">
     <div class="operCheckBox">
       <div class="block5 flex-col"></div>
       <span class="word10">{{
-          $t("device.pleaseConfirmAgainWhetherToOperate")
-        }}</span>
+        $t("device.pleaseConfirmAgainWhetherToOperate")
+      }}</span>
       <div class="block6 flex-row justify-between">
         <div class="mod7 flex-col" @click="operCheckClear()">
           <span class="info5">{{ $t("device.IllThinkAboutItAgain") }}</span>
@@ -221,7 +165,7 @@ import { onMounted, ref } from "vue";
 import {
   setFurnace,
   sleepEquipment,
-  // openDoor,
+  openDoor,
   deviceTuoji,
   delOneDevice,
 } from "../../service/device";
@@ -267,9 +211,9 @@ export default {
       show.value = true;
       // isSleep=true,机器属于休眠状态,按钮是关闭休眠
       if (device.value.isSleep) {
-        sleepTitle.value=t("device.turnOffHibe");
-      }else{
-        sleepTitle.value=t("device.enableSleep");
+        sleepTitle.value = t("device.turnOffHibe");
+      } else {
+        sleepTitle.value = t("device.enableSleep");
       }
     };
     // 重启炉头
@@ -296,15 +240,20 @@ export default {
           operCheckShow.value = true;
         }; */
     const openDoorFun = () => {
-      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 } });
+      }
     };
     // 日志功能
     const viewLogs = () => {
-      router.push({ path: "viewLogs", query: {deviceId: device.value.id }});
+      router.push({ path: "viewLogs", query: { deviceId: device.value.id } });
     };
     // 定制logo
     const customLogo = () => {
-      router.push({ path: "customLogo", query: {deviceId: device.value.id }});
+      router.push({ path: "customLogo", query: { deviceId: device.value.id } });
     }
     // 音量调节
     const modulation = () => {
@@ -312,7 +261,7 @@ export default {
     };
     // 远程做糖
     const doSugar = () => {
-      router.push({ path: "doSugar", query: { deviceId: device.value.id } });
+      router.push({ path: "doSugar", query: { deviceId: device.value.id , machineType: device.value.machineType } });
     };
     // 定时开关
     const alarmClock = () => {
@@ -396,11 +345,10 @@ export default {
         });
         if (data.code) {
           Toast.success(
-              `${
-                  device.value.eqeStatus === 0
-                      ? t("device.close")
-                      : t("device.open")
-              }${t("device.success")}`
+            `${device.value.eqeStatus === 0
+              ? t("device.close")
+              : t("device.open")
+            }${t("device.success")}`
           );
           device.value.eqeStatus = device.value.eqeStatus === 0 ? 1 : 0;
           operCheckShow.value = false;
@@ -409,15 +357,15 @@ export default {
         }
       }
       // 远程开门
-      /*     if (operType.value === 4) {
-              const { data } = await openDoor({ equipmentId: device.value.id });
-              if (data.code) {
-                Toast.success(t("device.remoteDoorOpeningSucceeded"));
-                operCheckShow.value = false;
-              } else {
-                Toast.fail(data.message);
-              }
-            } */
+      if (operType.value === 4) {
+        const { data } = await openDoor({ equipmentId: device.value.id });
+        if (data.code) {
+          Toast.success(t("device.remoteDoorOpeningSucceeded"));
+          operCheckShow.value = false;
+        } else {
+          Toast.fail(data.message);
+        }
+      }
       // 系统脱机
       if (operType.value === 5) {
         const { data } = await deviceTuoji({ id: device.value.id });
@@ -444,7 +392,7 @@ export default {
       // 关闭弹窗
       show.value = false;
       // 触发操作完成回调
-      emit("operfinish",true);
+      emit("operfinish", true);
     };
     const isRole = (key) => {
       return user.menuCodeList.filter((type) => key === type).length > 0;

+ 75 - 95
src/views/device/deviceSearch.vue

@@ -4,24 +4,20 @@
     <van-action-sheet v-model:show="sheetShow" :closeable='false' :title="$t('device.enterAnyInformationToSearch')">
       <div class="content">
         <van-form @submit="onSubmit">
-          <van-field
-              v-model="clientId"
-              name="clientId"
-              :label="$t('device.equipmentNoLabel')"
-              :placeholder="$t('device.equipmentNoPlaceholder')"
-          />
-          <van-field
-              v-model="equipmentName"
-              name="equipmentName"
-              :label="$t('device.equipmentNameLabel')"
-              :placeholder="$t('device.equipmentNamePlaceholder')"
-          />
-          <van-field
-              v-model="adminUserName"
-              name="adminUserName"
-              :label="$t('device.merchantNameLabel')"
-              :placeholder="$t('device.merchantNamePlaceholder')"
-          />
+          <van-field v-model="clientId" name="clientId" :label="$t('device.equipmentNoLabel')"
+            :placeholder="$t('device.equipmentNoPlaceholder')" />
+          <van-field v-model="equipmentName" name="equipmentName" :label="$t('device.equipmentNameLabel')"
+            :placeholder="$t('device.equipmentNamePlaceholder')" />
+          <van-field v-model="adminName" name="adminName" :label="$t('device.merchantNameLabel')"
+            :placeholder="$t('device.merchantNamePlaceholder')" />
+          <div v-if="isShowCompany()">
+            <van-field label-width="86" v-model="companyTypeText" is-link readonly :label="$t('device.companyTypeLabel')"
+              :placeholder="$t('device.companyTypePlaceholder')" @click="companyTypeShow = true" class="field" />
+            <van-popup v-model:show="companyTypeShow" round position="bottom">
+              <van-cascader v-model="companyType" :title="$t('device.companyTypePlaceholder')"
+                :options="companyTypeOptions" @close="companyTypeShow = false" @finish="companyTypeFinish" />
+            </van-popup>
+          </div>
           <!-- <van-field
             v-model="areaName"
             name="areaName"
@@ -31,90 +27,40 @@
           <!-- 设备类型、设备机型 -->
           <van-row>
             <van-col span="12">
-              <van-field
-                  label-width="66"
-                  v-model="machineTypeText"
-                  is-link
-                  readonly
-                  :label="$t('device.equipmentTypeLabel')"
-                  :placeholder="$t('device.equipmentTypePlaceholder')"
-                  @click="machineTypeShow = true"
-                  class="field"
-              />
+              <van-field label-width="66" v-model="machineTypeText" is-link readonly
+                :label="$t('device.equipmentTypeLabel')" :placeholder="$t('device.equipmentTypePlaceholder')"
+                @click="machineTypeShow = true" class="field" />
               <van-popup v-model:show="machineTypeShow" round position="bottom">
-                <van-cascader
-                    v-model="machineType"
-                    :title="$t('device.equipmentTypePlaceholder')"
-                    :options="machineTypeOptions"
-                    @close="machineTypeShow = false"
-                    @finish="machineTypeFinish"
-                />
+                <van-cascader v-model="machineType" :title="$t('device.equipmentTypePlaceholder')"
+                  :options="machineTypeOptions" @close="machineTypeShow = false" @finish="machineTypeFinish" />
               </van-popup>
             </van-col>
             <van-col span="12">
-              <van-field
-                  label-width="66"
-                  v-model="equimentTypeText"
-                  is-link
-                  readonly
-                  :label="$t('device.equipmentModelLabel')"
-                  :placeholder="$t('device.equipmentModelPlaceholder')"
-                  @click="equimentTypeShow = true"
-                  class="field"
-              />
+              <van-field label-width="66" v-model="equimentTypeText" is-link readonly
+                :label="$t('device.equipmentModelLabel')" :placeholder="$t('device.equipmentModelPlaceholder')"
+                @click="equimentTypeShow = true" class="field" />
               <van-popup v-model:show="equimentTypeShow" round position="bottom">
-                <van-cascader
-                    v-model="equimentType"
-                    :title="$t('device.equipmentModelPlaceholder')"
-                    :options="equimentTypeOptions"
-                    @close="equimentTypeShow = false"
-                    @finish="equimentTypeFinish"
-                />
+                <van-cascader v-model="equimentType" :title="$t('device.equipmentModelPlaceholder')"
+                  :options="equimentTypeOptions" @close="equimentTypeShow = false" @finish="equimentTypeFinish" />
               </van-popup>
             </van-col>
           </van-row>
           <!-- 开机状态、设备状态 -->
           <van-row>
             <van-col span="12">
-              <van-field
-                  label-width="66"
-                  v-model="eqeStatusText"
-                  is-link
-                  readonly
-                  :label="$t('device.powerOnStatus')"
-                  :placeholder="$t('device.pleaseSelectThePowerOnStatus')"
-                  @click="eqeStatusShow = true"
-                  class="field"
-              />
+              <van-field label-width="66" v-model="eqeStatusText" is-link readonly :label="$t('device.powerOnStatus')"
+                :placeholder="$t('device.pleaseSelectThePowerOnStatus')" @click="eqeStatusShow = true" class="field" />
               <van-popup v-model:show="eqeStatusShow" round position="bottom">
-                <van-cascader
-                    v-model="eqeStatus"
-                    :title="$t('device.pleaseSelectThePowerOnStatus')"
-                    :options="eqeStatusOptions"
-                    @close="eqeStatusShow = false"
-                    @finish="eqeStatusFinish"
-                />
+                <van-cascader v-model="eqeStatus" :title="$t('device.pleaseSelectThePowerOnStatus')"
+                  :options="eqeStatusOptions" @close="eqeStatusShow = false" @finish="eqeStatusFinish" />
               </van-popup>
             </van-col>
             <van-col span="12">
-              <van-field
-                  label-width="66"
-                  v-model="isUsingText"
-                  is-link
-                  readonly
-                  :label="$t('device.equipmentStatus')"
-                  :placeholder="$t('device.pleaseSelectTheDeviceStatus')"
-                  @click="isUsingShow = true"
-                  class="field"
-              />
+              <van-field label-width="66" v-model="isUsingText" is-link readonly :label="$t('device.equipmentStatus')"
+                :placeholder="$t('device.pleaseSelectTheDeviceStatus')" @click="isUsingShow = true" class="field" />
               <van-popup v-model:show="isUsingShow" round position="bottom">
-                <van-cascader
-                    v-model="isUsing"
-                    :title="$t('device.pleaseSelectTheDeviceStatus')"
-                    :options="isUsingOptions"
-                    @close="isUsingShow = false"
-                    @finish="isUsingFinish"
-                />
+                <van-cascader v-model="isUsing" :title="$t('device.pleaseSelectTheDeviceStatus')"
+                  :options="isUsingOptions" @close="isUsingShow = false" @finish="isUsingFinish" />
               </van-popup>
             </van-col>
           </van-row>
@@ -164,9 +110,9 @@
           <!-- 操作 -->
           <van-row justify="space-around" style="padding: 2em;">
             <van-button class="clearBtn" span="5" round plain type="primary" style="height: 2em; padding: 0 2em;"
-                        @click="registerClick">{{ $t('device.emptyingConditions') }}</van-button>
+              @click="registerClick">{{ $t('device.emptyingConditions') }}</van-button>
             <van-button class="selectBtn" span="5" round type="primary" style="height: 2em; padding: 0 2em;"
-                        native-type="submit">{{ $t('device.clickSearch') }}</van-button>
+              native-type="submit">{{ $t('device.clickSearch') }}</van-button>
           </van-row>
         </van-form>
       </div>
@@ -177,7 +123,7 @@
 <script>
 import { ref } from 'vue';
 import { useI18n } from 'vue-i18n';
-import {styleUrl} from "../../common/js/utils";
+import { getLoginUser, styleUrl } from "../../common/js/utils";
 
 export default {
   setup(prop, context) {
@@ -185,11 +131,15 @@ export default {
     const sheetShow = ref(false);
     const clientId = ref(''); // 设备唯一码_设备编号
     const equipmentName = ref(''); // 设备名称_机器名
-    const adminUserName = ref(''); // 商家名
+    const adminName = ref(''); // 商家名
     const areaName = ref(''); // 设备所在地_地址名
     const machineType = ref(''); // 设备类型
     const machineTypeText = ref(''); // 设备类型 - 页面显示
     const machineTypeShow = ref(false); // 设备类型级联状态
+    const companyType = ref(''); // 公司平台
+    const companyTypeText = ref(''); // 公司平台 - 页面显示
+    const companyTypeShow = ref(false); // 公司平台级联状态
+    const user = getLoginUser(); // 获取登录用户
     const machineTypeOptions = ref([
       {
         text: t('device.spunSugar'),
@@ -200,10 +150,24 @@ export default {
         value: '1',
       }
     ]); // 设备类型级联选项
+    const companyTypeOptions = ref([
+      {
+        text: t('device.sz'),
+        value: '0',
+      },
+      {
+        text: t('device.sc'),
+        value: '1',
+      }
+    ]);
     const machineTypeFinish = ({ selectedOptions }) => {
       machineTypeShow.value = false;
       machineTypeText.value = selectedOptions.map((option) => option.text).join('/');
     }; // 设备类型级联选择
+    const companyTypeFinish = ({ selectedOptions }) => {
+      companyTypeShow.value = false;
+      companyTypeText.value = selectedOptions.map((option) => option.text).join('/');
+    }; // 公司平台级联选择
 
     const equimentType = ref(''); // 设备机型
     const equimentTypeText = ref(''); // 设备机型 - 页面显示
@@ -220,6 +184,10 @@ export default {
       {
         text: 'MG280',
         value: 'MG280',
+      },
+      {
+        text: 'POP320',
+        value: 'POP320',
       }
     ]); // 设备机型级联选项
     const equimentTypeFinish = ({ selectedOptions }) => {
@@ -307,9 +275,10 @@ export default {
       const searchParam = {
         clientId: clientId.value,
         equipmentName: equipmentName.value,
-        adminUserName: adminUserName.value,
+        adminName: adminName.value,
         areaName: areaName.value,
         machineType: machineType.value,
+        companyType: companyType.value,
         equimentType: equimentType.value,
         eqeStatus: eqeStatus.value,
         isUsing: isUsing.value,
@@ -323,10 +292,12 @@ export default {
     const registerClick = () => {
       clientId.value = '';
       equipmentName.value = '';
-      adminUserName.value = '';
+      adminName.value = '';
       areaName.value = '';
       machineType.value = '';
       machineTypeText.value = '';
+      companyType.value = '';
+      companyTypeText.value = '';
       equimentType.value = '';
       equimentTypeText.value = '';
       eqeStatus.value = '';
@@ -342,12 +313,15 @@ export default {
     // 加载样式
     styleUrl('deviceSearch');
 
+    // 是否管理员
+    const isShowCompany = () => { return (user && user.type === 0); }
+
     return {
       sheetShow,
 
       clientId,
       equipmentName,
-      adminUserName,
+      adminName,
       areaName,
 
       machineType,
@@ -362,6 +336,13 @@ export default {
       equimentTypeOptions,
       equimentTypeFinish,
 
+      isShowCompany,
+      companyType,
+      companyTypeText,
+      companyTypeShow,
+      companyTypeOptions,
+      companyTypeFinish,
+
       eqeStatus,
       eqeStatusText,
       eqeStatusShow,
@@ -395,5 +376,4 @@ export default {
 };
 </script>
 
-<style lang="less" scoped>
-</style>
+<style lang="less" scoped></style>

+ 61 - 55
src/views/device/deviceSet.vue

@@ -1,45 +1,45 @@
 <template>
   <!-- 设备信息修改 -->
-  <div class="deviceSetPage page flex-col">
+  <div class="deviceSetPage flex-col">
     <s-header :name="$t('device.deviceInformation')" :noback="false"></s-header>
     <van-form @submit="updateDeviceFun">
       <div class="bd1 flex-col">
         <div class="bd3 flex-col">
           <div class="mod1 flex-col">
             <span class="word2">{{ $t("device.essentialInformation") }}</span>
-            <img class="pic1" referrerpolicy="no-referrer" title=""
-                 src="../../assets/device/line.png" />
+            <img class="pic1" referrerpolicy="no-referrer"
+              src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a" />
           </div>
           <div class="mod2 flex-col"></div>
         </div>
         <van-field colon readonly v-model="deviceDetal.clientId" :label="`${$t('device.equipmentCode')}`"
-                   placeholder="" />
+          placeholder="" />
         <div class="cust_vantBorder">
           <van-field colon required clearable v-model="deviceDetal.name" name="name"
-                     :label="`${$t('device.equipmentNameLabel')}`" :placeholder="$t('device.equipmentNamePlaceholder')" :rules="[
+            :label="`${$t('device.equipmentNameLabel')}`" :placeholder="$t('device.equipmentNamePlaceholder')" :rules="[
               {
                 required: true,
                 message: $t('device.equipmentNamePlaceholder'),
               },
             ]" />
           <van-field colon clearable v-model="deviceDetal.selfName" :label="`${$t('device.equipmentRemarksLabel')}`"
-                     :placeholder="$t('device.equipmentRemarksPlaceholder')" />
+            :placeholder="$t('device.equipmentRemarksPlaceholder')" />
         </div>
         <van-field colon readonly v-model="deviceDetal.adminUserName" :label="`${$t('device.affiliatedMerchant')}`"
-                   placeholder="" />
+          placeholder="" />
         <!-- 地区 -->
         <div v-if="areaShow" class="bd7 l-flex-between">
           <div class="l-flex-RC">
             <div class="cust_vantBorder">
               <div class="filedInpPad">
                 <van-field colon @click-input="fieldValueInpClk" readonly clearable v-model="fieldValue"
-                           :label="`${$t('device.affiliatedArea')}`" :placeholder="$t('user.regionPlace')">
+                  :label="`${$t('device.affiliatedArea')}`" :placeholder="$t('user.regionPlace')">
                   <template #right-icon>
                     <div class="l-flex-RC">
                       <van-icon v-if="fieldValue" @click="
                         fieldValue = '';
                       deviceDetal.areaId = '';
-                                                " class="o-mr-6" name="clear" />
+                      " class="o-mr-6" name="clear" />
                       <van-icon @click="fieldValueInpClk" name="arrow-down" />
                     </div>
                   </template>
@@ -59,11 +59,11 @@
           </van-field>
         </div>
         <van-field colon readonly v-model="deviceDetal.equimentType" :label="`${$t('device.machineType')}`"
-                   placeholder="" />
+          placeholder="" />
         <!-- mg280才有到期时间 -->
         <template v-if="deviceDetal?.equimentType?.indexOf('mg280') !== -1">
           <van-field colon readonly v-model="deviceDetal.lastUseDate" :label="`${$t('device.expirationTime')}`"
-                     placeholder="" />
+            placeholder="" />
         </template>
         <div class="bd9 l-f">
           <van-field colon readonly :label="`${$t('device.equipmentLabel')}`" placeholder="">
@@ -107,7 +107,7 @@
             </template>
           </van-field>
         </div>
-        <van-field colon readonly :label="`${$t('device.coupon')}`" placeholder="">
+        <!-- <van-field colon readonly :label="`${$t('device.coupon')}`" placeholder="">
           <template #input>
             <div class="l-flex-RC">
               <span>{{ couponStatusNameComp }}</span>
@@ -115,18 +115,18 @@
                           inactive-value="0" />
             </div>
           </template>
-        </van-field>
+        </van-field> -->
         <div class="cust_vantBorder">
           <van-field colon required clearable v-model="deviceDetal.operationalName" name="operationalName"
-                     :label="`${$t('device.nameOfOperatorLabel')}`" :placeholder="$t('device.nameOfOperatorPlaceholder')" :rules="[
+            :label="`${$t('device.nameOfOperatorLabel')}`" :placeholder="$t('device.nameOfOperatorPlaceholder')" :rules="[
               {
                 required: true,
                 message: $t('device.nameOfOperatorPlaceholder'),
               },
             ]" />
           <van-field colon required clearable v-model="deviceDetal.operationalPhone" name="operationalPhone"
-                     :label="`${$t('device.operatorTelephoneLabel')}`" :placeholder="$t('device.operatorTelephonePlaceholder')"
-                     :rules="[
+            :label="`${$t('device.operatorTelephoneLabel')}`" :placeholder="$t('device.operatorTelephonePlaceholder')"
+            :rules="[
               {
                 required: true,
                 message: $t('device.operatorTelephonePlaceholder'),
@@ -134,36 +134,36 @@
             ]" />
 
           <van-field clearable v-model="deviceDetal.timeRuleId" :label="`${$t('device.advertisingRulesLabel')}:`"
-                     :placeholder="$t('device.advertisingRulesPlaceholder')" />
+            :placeholder="$t('device.advertisingRulesPlaceholder')" />
         </div>
         <div class="cust_vantBorder">
           <van-field clearable label-width="32%" v-model="deviceDetal.messageReceiver1"
-                     :label="`${$t('device.messageReceiver1')}:`"
-                     :placeholder="$t('device.equipmentmessageReceiverPlaceholder')" />
+            :label="`${$t('device.messageReceiver1')}:`"
+            :placeholder="$t('device.equipmentmessageReceiverPlaceholder')" />
         </div>
         <div class="cust_vantBorder">
           <van-field clearable label-width="32%" v-model="deviceDetal.messageReceiver2"
-                     :label="`${$t('device.messageReceiver2')}:`"
-                     :placeholder="$t('device.equipmentmessageReceiverPlaceholder')" />
+            :label="`${$t('device.messageReceiver2')}:`"
+            :placeholder="$t('device.equipmentmessageReceiverPlaceholder')" />
         </div>
         <div class="cust_vantBorder">
           <van-field clearable label-width="32%" v-model="deviceDetal.messageReceiver3"
-                     :label="`${$t('device.messageReceiver3')}:`"
-                     :placeholder="$t('device.equipmentmessageReceiverPlaceholder')" />
+            :label="`${$t('device.messageReceiver3')}:`"
+            :placeholder="$t('device.equipmentmessageReceiverPlaceholder')" />
         </div>
         <van-field colon readonly label-width="18%" :label="`${$t('device.paymentMethod')}`" placeholder="">
           <template #input>
             <div class="van-cell__value van-field__value radioBox">
               <van-radio-group v-model="deviceDetal.payType" direction="horizontal">
                 <van-radio name="0" icon-size="18px">{{
-                    $t("device.onlinePayment")
-                  }}</van-radio>
+                  $t("device.onlinePayment")
+                }}</van-radio>
                 <van-radio name="1" icon-size="18px">{{
-                    $t("device.offlinePayment")
-                  }}</van-radio>
+                  $t("device.offlinePayment")
+                }}</van-radio>
                 <van-radio name="2" icon-size="18px">{{
-                    $t("device.onlineAndOfflinePayment")
-                  }}</van-radio>
+                  $t("device.onlineAndOfflinePayment")
+                }}</van-radio>
               </van-radio-group>
             </div>
           </template>
@@ -175,18 +175,18 @@
               <div class="van-cell__value van-field__value radioBox">
                 <van-radio-group v-model="deviceDetal.channel" direction="horizontal">
                   <van-radio name="1" icon-size="18px">{{
-                      $t("device.tweets")
-                    }}</van-radio>
+                    $t("device.tweets")
+                  }}</van-radio>
                   <van-radio name="2" icon-size="18px">{{
-                      $t("device.mq")
-                    }}</van-radio>
+                    $t("device.mq")
+                  }}</van-radio>
                 </van-radio-group>
               </div>
             </template>
           </van-field>
         </template>
         <!-- 花型种类 -->
-        <template v-if="isAdmind">
+        <template v-if="isAdmind && machineType === '0'">
           <van-field colon readonly :label="`${$t('device.flowerType')}`" placeholder="">
             <template #input>
               <div class="van-cell__value van-field__value radioBox">
@@ -195,7 +195,6 @@
                   <van-radio name="22" icon-size="18px">22</van-radio>
                   <van-radio name="26" icon-size="18px">26</van-radio>
                   <van-radio name="30" icon-size="18px">30</van-radio>
-                  <van-radio name="42" icon-size="18px">42</van-radio>
                 </van-radio-group>
               </div>
             </template>
@@ -206,27 +205,27 @@
         <!-- url -->
         <div v-if="isAdmind" class="cust_vantBorder">
           <van-field colon clearable class="input1" v-model="deviceDetal.url" :label="$t('device.url')"
-                     :placeholder="$t('device.urlPlace')">
+            :placeholder="$t('device.urlPlace')">
             <template #button>
               <van-button @click="updateUrlClk" type="primary">&nbsp;&nbsp;{{ $t("device.update")
-                }}&nbsp;&nbsp;</van-button>
+              }}&nbsp;&nbsp;</van-button>
             </template>
           </van-field>
         </div>
         <div class="l-flex-center o-mtb-30">
           <van-button round type="primary" class="info7" native-type="submit">{{
-              $t("device.submitAndPushDeviceUpdates") }}</van-button>
+            $t("device.submitAndPushDeviceUpdates") }}</van-button>
         </div>
 
       </div>
     </van-form>
     <!-- 地区弹窗 -->
     <kCascader @getareaname="getAreaName" :selectId="deviceDetal.areaId" @areapopfinish="areaPopFinish"
-               ref="kCascaderRef"></kCascader>
+      ref="kCascaderRef"></kCascader>
     <!-- 更新弹窗 -->
     <kDialog :dialogTitle="$t('user.logOutTips')" :cancelBtnTxt="$t('user.cancelLog')"
-             :confirmBtnTxt="$t('user.confirmLog')" ref="kDialogRef" :dialogContent="$t('device.sureUpdate')"
-             @confirmclk="confirmClk">
+      :confirmBtnTxt="$t('user.confirmLog')" ref="kDialogRef" :dialogContent="$t('device.sureUpdate')"
+      @confirmclk="confirmClk">
     </kDialog>
   </div>
 </template>
@@ -234,15 +233,15 @@
 // 导入接口
 import { Api_getAdRuleDetail } from "@/service/advertManage";
 // 引入弹窗
-import kDialog from "../../components/commom/kDialog/index.vue";
+import kDialog from "@/components/commom/kDialog/index.vue";
 // 导入公用方法
-import { setLocal, getLoginUser, styleUrl } from "@/common/js/utils";
+import { setLocal, getLoginUser } from "@/common/js/utils";
 // 导入vuex
 import { useStore } from "vuex";
 // 导入接口
 import { Api_getGetEquipmentToLabel } from "@/service/labelMan";
 // 导入地区弹窗
-import kCascader from "../../components/commom/kCascader/index.vue";
+import kCascader from "@/components/commom/kCascader/index.vue";
 import { computed, onMounted, reactive, ref } from "vue";
 import sHeader from "@/components/SimpleHeader";
 import { useRoute, useRouter } from "vue-router";
@@ -255,6 +254,7 @@ import {
 import { Toast } from "vant";
 import { useI18n } from "vue-i18n";
 import dateUtil from "@/utils/dateUtil";
+import { styleUrl } from "../../common/js/utils";
 
 export default {
   name: "deviceSet",
@@ -282,8 +282,6 @@ export default {
     const { t } = useI18n();
     const route = useRoute();
     const router = useRouter();
-    // 加载样式
-    styleUrl('deviceSet');
     const deviceDetal = ref({
       name: "",
       selfName: "",
@@ -309,8 +307,12 @@ export default {
     };
     // 是否管理员
     const isAdmind = ref(false);
+    // 设备类型
+    const machineType = ref('0');
     // 初始化页面获取列表
     onMounted(async () => {
+      // 加载样式
+      styleUrl('deviceSet');
       // 从标签设置回来
       // let tagList = sessionStorage.getItem("tagList") || "[]";
       // tagsList.arr = JSON.parse(tagList);
@@ -325,15 +327,15 @@ export default {
     // 获取标签
     const getLabelDetail = () => {
       Api_getGetEquipmentToLabel({ equipmentId: route.query.deviceId }).then(
-          (res) => {
-            console.log("res", res);
-            if (res.data.code === "00000") {
-              tagsList.arr = res.data.data;
-              // 储存数据到vuex
-              store.commit("MUTA_LABELLIST", tagsList.arr);
-              setLocal("deviceSet-tagsList", JSON.stringify(tagsList.arr));
-            }
+        (res) => {
+          console.log("res", res);
+          if (res.data.code === "00000") {
+            tagsList.arr = res.data.data;
+            // 储存数据到vuex
+            store.commit("MUTA_LABELLIST", tagsList.arr);
+            setLocal("deviceSet-tagsList", JSON.stringify(tagsList.arr));
           }
+        }
       );
     };
 
@@ -361,6 +363,9 @@ export default {
             getDetail(data.data.timeRuleId);
           }
         }
+        if (data.data.machineType === '1') {
+          machineType.value = '1';
+        }
       } else {
         Toast.fail(data.message);
       }
@@ -497,10 +502,11 @@ export default {
       couponStatusNameComp,
       toEditAdRule,
       adRuleList,
+      machineType,
     };
   },
 };
 </script>
 <style lang="less" scoped>
-@import "@/common/style/common";
+@import "../../common/style/common";
 </style>

+ 50 - 22
src/views/device/doSugar.vue

@@ -1,32 +1,59 @@
 <template>
   <!-- 远程做糖 -->
-  <div class="page flex-col">
+  <div class="dosugarPage flex-col">
     <s-header :name="$t('device.remoteSugarMaking')" :noback="false"></s-header>
     <div class="box1 flex-col">
       <div class="block2 flex-row justify-between">
         <div class="block3 flex-col"></div>
         <span class="info2">{{ $t('device.equipmentName') }}:{{ deviceDetal ? deviceDetal.name : '' }}</span>
       </div>
-      <van-field v-model="fieldValue" is-link readonly :label="$t('device.clickToSelectPattern')"
-                 :placeholder="$t('device.pleaseSelectAPattern')" @click="show = true" />
-      <van-popup v-model:show="show" round position="bottom">
-        <van-cascader v-model="cascaderValue" :title="$t('device.pleaseSelectAPattern')" :options="options"
-                      @close="show = false" @finish="onFinish" >
-          <template #option="{ option }">
-            <div class="cascader-item">
-              <van-image :src="option.imgUrl" width="50px" height="50px"></van-image>
-              <div class="cascader-label">{{ option.value }}</div>
-            </div>
-          </template>
-        </van-cascader>
-      </van-popup>
-      <div class="textRow o-pr-20">
-        <span @click="pushToDaySugarList">{{ $t('device.todaysSugarList') }}>></span>
+      <div v-if="machineType === '1'">
+        <van-field v-model="fieldValue" is-link readonly
+          :label="$t('device.clickToSelectTaste')"
+          :placeholder="$t('device.pleaseSelectTaste')"
+          @click="show = true" />
+        <van-popup v-model:show="show" round position="bottom">
+          <van-cascader v-model="cascaderValue" :title="$t('device.pleaseSelectAPattern')" :options="options"
+            @close="show = false" @finish="onFinish">
+            <template #option="{ option }">
+              <div class="cascader-item">
+                <van-image :src="option.imgUrl" width="50px" height="50px"></van-image>
+                <div class="cascader-label">{{ option.value }}</div>
+              </div>
+            </template>
+          </van-cascader>
+        </van-popup>
+        <div class="textRow o-pr-20">
+          <span @click="pushToDaySugarList">{{ $t('device.todaysMakeList')}}>></span>
+        </div>
+        <div v-if="!doSugartData" class="block5 flex-col" @click="submitDoSugar"><span class="txt3">{{
+          $t('device.submitToMakeSugar') }}</span></div>
+        <van-button v-if="doSugartData" round type="primary" class="volumeChangeButton" :disabled="doSugartType"
+          @click="checkData()">{{ $t('device.viewResults') }}</van-button>
+      </div>
+      <div v-else>
+        <van-field v-model="fieldValue" is-link readonly :label="$t('device.clickToSelectPattern')"
+          :placeholder="$t('device.pleaseSelectAPattern')" @click="show = true" />
+        <van-popup v-model:show="show" round position="bottom">
+          <van-cascader v-model="cascaderValue" :title="$t('device.pleaseSelectAPattern')" :options="options"
+            @close="show = false" @finish="onFinish">
+            <template #option="{ option }">
+              <div class="cascader-item">
+                <van-image :src="option.imgUrl" width="50px" height="50px"></van-image>
+                <div class="cascader-label">{{ option.value }}</div>
+              </div>
+            </template>
+          </van-cascader>
+        </van-popup>
+        <div class="textRow o-pr-20">
+          <span @click="pushToDaySugarList">{{ $t('device.todaysSugarList') }}>></span>
+        </div>
+        <div v-if="!doSugartData" class="block5 flex-col" @click="submitDoSugar"><span class="txt3">{{
+          $t('device.submitToMakeSugar') }}</span></div>
+        <van-button v-if="doSugartData" round type="primary" class="volumeChangeButton" :disabled="doSugartType"
+          @click="checkData()">{{ $t('device.viewResults') }}</van-button>
+
       </div>
-      <div v-if="!doSugartData" class="block5 flex-col" @click="submitDoSugar"><span
-          class="txt3">{{ $t('device.submitToMakeSugar') }}</span></div>
-      <van-button v-if="doSugartData" round type="primary" class="volumeChangeButton" :disabled="doSugartType"
-                  @click="checkData()">{{ $t('device.viewResults') }}</van-button>
     </div>
   </div>
 </template>
@@ -45,6 +72,7 @@ export default {
     const route = useRoute();
     const router = useRouter();
     const deviceId = route.query.deviceId;
+    const machineType = route.query.machineType;
     const deviceDetal = ref(null);
     const show = ref(false);
     const fieldValue = ref('');
@@ -62,7 +90,6 @@ export default {
     onMounted(async () => {
       styleUrl('doSugar')
       getDeviceDetalFun();
-      // console.log(deviceId);
     });
 
     const showSugarPhoto = (no) => {
@@ -113,7 +140,7 @@ export default {
     };
 
     const pushToDaySugarList = async () => {
-      router.push({ path: 'toDaySugarList', query: { deviceId: deviceId}})
+      router.push({ path: 'toDaySugarList', query: { deviceId: deviceId } })
     }
 
     return {
@@ -129,6 +156,7 @@ export default {
       checkData,
       pushToDaySugarList,
       showSugarPhoto,
+      machineType
     };
   },
   components: { sHeader },

+ 71 - 60
src/views/device/index.vue

@@ -4,15 +4,15 @@
     <s-header :name="sys ? sys.title : $t('public.sysName')" :noback="false"></s-header>
     <div class="listBox">
       <van-list v-model:loading="loading" v-model:error="error" :error-text="$t('public.requestFailed')"
-                :finished="finished" :finished-text="$t('public.noMore')" offset="300" :immediate-check="false" @load="onLoad">
+        :finished="finished" :finished-text="$t('public.noMore')" offset="300" :immediate-check="false" @load="onLoad">
         <div class="deviceBox1 flex-col">
           <div class="searchRow flex-row justify-between">
             <div class="flex-col">
               <div class="flex-row justify-between bd3">
                 <div class="flex-col outer4"></div>
                 <span class="flex-col txt2">{{
-                    $t("device.dataOverview")
-                  }}</span>
+                  $t("device.dataOverview")
+                }}</span>
               </div>
             </div>
             <div class="flex-col">
@@ -32,16 +32,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>
@@ -60,7 +60,7 @@
                   <div class="l-flex-RC">
                     <!-- 报警标志 -->
                     <div v-if="item.hasTodayAlarm" class="box4 flex-col">
-                      <!-- <img class="pic1" src="../../assets/home/M4.png" /> -->
+                      <!-- <img class="pic1" src="../../assets/device/alarm.png" /> -->
                     </div>
                     <div class="layer2 flex-col" :class="{
                       deviceOn: item.eqeStatus === 1,
@@ -69,31 +69,31 @@
                   </div>
                 </div>
                 <span class="txt1 o-mt-10">{{ $t("device.affiliatedMerchants") }}:{{
-                    item.adminUserName
-                  }}</span>
+                  item.adminUserName
+                }}</span>
                 <span class="txt1 o-mt-10 kBordBott">{{ $t("device.machineUniqueCode") }}:{{
-                    item.clientId
-                  }}</span>
+                  item.clientId
+                }}</span>
                 <div class="contentBottomCon" v-if="item.checkType">
                   <img class="pic1" referrerpolicy="no-referrer" src="../../assets/home/line.png" />
                   <div class="layer2 flex-row justify-between o-ptb-5 kBordBott">
                     <span class="info1 o-ptb-5 kBordBott">{{ $t("device.sleepState") }}:{{
-                        item.isSleep
-                            ? $t("device.sleeping")
-                            : $t("device.notSleeping")
-                      }}</span>
+                      item.isSleep
+                      ? $t("device.sleeping")
+                      : $t("device.notSleeping")
+                    }}</span>
                   </div>
                   <div v-if="item.isSleep" class="layer3 o-ptb-8">
                     <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">
+                          :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") }}
+                              $t("device.confirm") }}
                             </van-button>
                             <van-button size="small" type="primary" @click="editSleepDesc()">{{ $t("device.cancel")
-                              }}</van-button>
+                            }}</van-button>
                           </template>
                         </van-field>
                         <!-- </span> -->
@@ -101,7 +101,7 @@
                       <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>
+                          item.sleepDesc }}</span>
                         <van-icon name="edit" size="18" class="editIcon" @click="editSleepDesc()" />
                       </div>
                     </span>
@@ -110,7 +110,8 @@
                     <van-button type="primary">重启</van-button>
                   </span> -->
                   <div class="word4 o-ptb-10">
-                    <span class="word3 o-pr-5">{{ $t("device.furnHeadStatus") }}: </span>
+                    <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">
@@ -125,23 +126,33 @@
                   <div>
                     <span v-if="item.latitude" class="txt5 o-ptb-5 kBordBott l-flex-RC">
                       <span class="info1">{{
-                          $t("device.position") }}:</span>
+                        $t("device.position") }}:</span>
                       <van-button @click="viewPosiClk(item)" type="primary">{{
-                          $t("device.view")
-                        }}</van-button>
+                        $t("device.view")
+                      }}</van-button>
                     </span>
                   </div>
-                  <van-row class="layer5 o-ptb-10 kBordBott" justify="space-between">
+                  <van-row class="layer5 o-ptb-10 kBordBott" justify="space-between" v-if="item.machineType == '0' || item.machineType == null">
                     <van-col class="word5">{{ $t("device.furnaceHeadTemperature") }}:{{
-                        item.furnaceTm
-                      }}{{ $t("device.degree") }}</van-col>
+                      item.furnaceTm
+                    }}{{ $t("device.degree") }}</van-col>
                     <van-col class="word5">{{ $t("device.temperatureInCabinet") }}:{{
-                        item.cabinetTm
-                      }}{{ $t("device.degree") }}</van-col>
+                      item.cabinetTm
+                    }}{{ $t("device.degree") }}</van-col>
                     <van-col class="word5">{{ $t("device.humidityInCabinet") }}:{{ item.cabinetHd
-                      }}{{ $t("device.degree") }}</van-col>
+                    }}{{ $t("device.degree") }}</van-col>
+                  </van-row>
+                  <van-row class="layer5 o-ptb-10 kBordBott" justify="space-between" v-else>
+                    <van-col class="word5">{{ $t("device.stirringTemperature") }}:{{
+                      item.stirTm
+                    }}{{ $t("device.degree") }}</van-col>
+                    <van-col class="word5">{{ $t("device.cornGeneratorTemperature") }}:{{
+                      item.cornGeneratorTm
+                    }}{{ $t("device.degree") }}</van-col>
+                    <van-col class="word5">{{ $t("device.cupQuantity") }}:{{ item.cupQuantity
+                    }}</van-col>
                   </van-row>
-                  <template v-if="item.isMaterialUse === '1'">
+                  <template v-if="item.isMaterialUse === '1' && (item.machineType == '0' || item.machineType == null)" >
                     <van-row justify="space-between" class="sugarTxt o-ptb-10 kBordBott">
                       <van-col>
                         {{ $t("device.whiteSugar") }}:{{ $M_FormatCalcuDecial(item.whiteSugar) }}%
@@ -158,8 +169,8 @@
                     </van-row>
                     <div class="sugarTxt o-ptb-10 kBordBott">
                       <span>{{ $t("device.stick") }}:{{
-                          $M_FormatCalcuDecial(item.stick)
-                        }}%</span>
+                        $M_FormatCalcuDecial(item.stick)
+                      }}%</span>
                     </div>
                     <van-row gutter="50" class="sugarTxt o-ptb-10 kBordBott">
                       <van-col>
@@ -175,27 +186,27 @@
                     </span>
                   </template>
                   <span class="info1 o-ptb-8 kBordBott">{{ $t("device.lastRefreshTime") }}:{{
-                      showDateTime(item.lastUpdateTime)
-                    }}</span>
+                    showDateTime(item.lastUpdateTime)
+                  }}</span>
                   <span class="info2 o-ptb-5 kBordBott">{{ $t("device.volume") }}:{{ item.volume }}</span>
                   <span class="info3 o-ptb-10 kBordBott">{{ $t("device.alarmContent") }}:{{
-                      item.alarmList && item.alarmList[0]
-                          ? item.alarmList[0].alarmContent
-                          : item.alarmContent
-                    }}
+                    item.alarmList && item.alarmList[0]
+                    ? item.alarmList[0].alarmContent
+                    : item.alarmContent
+                  }}
                     <span v-if="item.alarmList && item.alarmList[0]" style="color: #4d6add"
-                          @click="clearAlarm(item.alarmList[0])">{{ $t("device.eliminateAlarm") }}</span></span>
+                      @click="clearAlarm(item.alarmList[0])">{{ $t("device.eliminateAlarm") }}</span></span>
                   <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)">
                       <span class="c-text-14">{{
-                          $t("device.commonOperations")
-                        }}</span>
+                        $t("device.commonOperations")
+                      }}</span>
                       <div class="box2 flex-col"></div>
                     </div>
                   </div>
@@ -203,8 +214,8 @@
                 <div class="bd6 l-flex-center o-ptb-10" @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>
+                      item.checkType ? $t("device.stow") : $t("device.seeMore")
+                    }}</span>
                     <div class="group2 flex-col" :class="{ checkType: item.checkType }"></div>
                   </div>
                 </div>
@@ -240,8 +251,8 @@ import {
   Api_getReplenishment,
   changeSleepDesc,
 } from "../../service/device/index";
-import deviceSearch from "./deviceSearch.vue";
-import deviceOper from "./deviceOper.vue";
+import deviceSearch from "./deviceSearch";
+import deviceOper from "./deviceOper";
 import { useRouter } from "vue-router";
 import dateUtil from "../../utils/dateUtil";
 import { useI18n } from "vue-i18n";
@@ -304,15 +315,15 @@ export default {
         }
         // 列表值叠加
         list.value = list.value.concat(
-            data.data.records.map((item) => {
-              if(item.sleepDesc == null) {
-                item.sleepDesc = t("device.SuspendBusiness");
-              }
-              return {
-                ...item,
-                checkType: false,
-              };
-            })
+          data.data.records.map((item) => {
+            if (item.sleepDesc == null) {
+              item.sleepDesc = t("device.SuspendBusiness");
+            }
+            return {
+              ...item,
+              checkType: false,
+            };
+          })
         );
         if (list.value.length === data.data.total) {
           finished.value = true;
@@ -375,8 +386,8 @@ 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")
+        : "";
     };
 
     // 点击查看定位
@@ -424,7 +435,7 @@ export default {
       });
     };
     // 点击运行总数和总设备数
-    const eqeStatusClk = (val)=>{
+    const eqeStatusClk = (val) => {
       searchParams.eqeStatus = val;
       // 初始化
       searchParams.current = 1;

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

@@ -59,7 +59,7 @@ import { useRoute } from 'vue-router';
 import { getDeviceDetal, Api_openDoor } from '@/service/device'
 import { Toast, Dialog } from 'vant';
 import { useI18n } from "vue-i18n";
-import {styleUrl} from "../../common/js/utils";
+import { styleUrl } from "../../common/js/utils";
 
 export default {
   setup() {

+ 22 - 40
src/views/login.vue

@@ -1,9 +1,7 @@
 <template>
   <!-- 登录 -->
   <div class="login">
-    <s-header
-        :name="sys ? sys.title : $t('public.sysName')"
-    ></s-header>
+    <s-header :name="sys ? sys.title : $t('public.sysName')" :noback="true"></s-header>
     <div class="loginLogoBox l-re">
       <div class="loginLogo"></div>
       <div class="l-ab pointer languageCon" @click="languageClk">
@@ -17,49 +15,33 @@
     </div>
     <div class="loginFormBox">
       <van-form @submit="onSubmit">
-        <van-field
-            v-model="userName"
-            name="userName"
-            label=""
-            :placeholder="$t('login.userNameInput')"
-            :rules="[{ required: true, message: $t('login.userNameInput') }]"
-        />
-        <van-field
-            v-model="userPwd"
-            type="password"
-            name="userPwd"
-            label=""
-            :placeholder="$t('login.passWordInput')"
-            :rules="[{ required: true, message: $t('login.passWordInput') }]"
-        />
+        <van-field v-model="userName" name="userName" label="" :placeholder="$t('login.userNameInput')"
+          :rules="[{ required: true, message: $t('login.userNameInput') }]" />
+        <van-field v-model="userPwd" type="password" name="userPwd" label="" :placeholder="$t('login.passWordInput')"
+          :rules="[{ required: true, message: $t('login.passWordInput') }]" />
         <div class="checkedPasswordBox">
           <van-checkbox icon-size="18px" class="checkedPassWord" v-model="checked">
             {{ $t("login.checkedPassWord") }}
           </van-checkbox>
           <span class="forgetPassWord" @click="forgetPassword">{{
-              $t("login.forgetPassWord")
-            }}</span>
+            $t("login.forgetPassWord")
+          }}</span>
         </div>
         <br>
         <br>
         <!-- 微信登录 -->
         <div v-if="isInWeChat" class="loginWithWechatClass">
           <van-button class="wechat-btn" type="primary" size="large" @click="wxLoginHandler">
-            <van-icon name="wechat" color="#1bd66c" size="40" class="wechat-icon"/>
+            <van-icon name="wechat" color="#1bd66c" size="40" class="wechat-icon" />
           </van-button>
         </div>
 
         <div class="buttonBox">
-          <van-button
-              round
-              type="primary"
-              class="register"
-              @click="registerClick"
-          >{{ $t("login.regusterButton") }}
+          <van-button round type="primary" class="register" @click="registerClick">{{ $t("login.regusterButton") }}
           </van-button>
           <van-button round type="primary" native-type="submit">{{
-              $t("login.loginButton")
-            }}
+            $t("login.loginButton")
+          }}
           </van-button>
         </div>
       </van-form>
@@ -69,15 +51,15 @@
 
 <script>
 import md5 from "js-md5";
-import {onMounted, ref, computed, reactive} from "vue";
-import {Toast, Dialog, Button} from "vant";
-import {login, getSys, getOpenid} from "../service/login";
-import {setLocal, getLocal, navigatorLanguage, styleUrl} from "../common/js/utils";
+import { onMounted, ref, computed, reactive } from "vue";
+import { Toast, Dialog, Button } from "vant";
+import { login, getSys, getOpenid } from "../service/login";
+import { setLocal, getLocal, navigatorLanguage, styleUrl } from "../common/js/utils";
 import sHeader from "../components/SimpleHeader";
-import {useRoute, useRouter} from "vue-router";
-import {useI18n} from "vue-i18n";
+import { useRoute, useRouter } from "vue-router";
+import { useI18n } from "vue-i18n";
 // vant 组件的中英文切换
-import {Locale} from "vant";
+import { Locale } from "vant";
 // 引入英文语言包
 import enUS from "vant/es/locale/lang/en-US";
 // 引入简体中文语言包
@@ -86,7 +68,7 @@ import zhCN from "vant/es/locale/lang/zh-CN";
 export default {
   setup() {
     let languageName = ref(getLocal("curLang"));
-    const {locale, t} = useI18n();
+    const { locale, t } = useI18n();
     // 语言点击
     const languageClk = () => {
       if (languageName.value === "zh") {
@@ -132,7 +114,7 @@ export default {
       }
     });
     const getSysFun = async () => {
-      const {data} = await getSys({
+      const { data } = await getSys({
         relationAdminId: route.query.relation_admin_id,
       });
       if (data.code === "00000") {
@@ -143,7 +125,7 @@ export default {
     };
     // 登录
     const onSubmit = async (values) => {
-      const {data} = await login({
+      const { data } = await login({
         username: values.userName,
         password: md5(values.userPwd),
       });
@@ -177,7 +159,7 @@ export default {
       state.isLoading = true;
       try {
         // 用户静默授权,获取 用户信息
-        const {data} = await getOpenid();
+        const { data } = await getOpenid();
         console.log("微信登录:", data)
         if (data.code === "00000") {
           window.location.href = data.data;

+ 1 - 1
src/views/register.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 注册 -->
-  <div class="page flex-col registerPage">
+  <div class="flex-col registerPage">
     <s-header :name="$t('register.header')" :noback="false"></s-header>
     <div class="registerFormBox">
       <van-form @submit="registerSubmit">

+ 133 - 171
src/views/robotRanking.vue

@@ -1,9 +1,6 @@
 <template>
   <div class="robotRanking flex-col">
-    <s-header
-        :name="$t('robotRanking.machineSalesRanking')"
-        :noback="true"
-    ></s-header>
+    <s-header :name="$t('robotRanking.machineSalesRanking')" :noback="true"></s-header>
     <div class="box1 flex-col">
       <div class="box3 flex-col">
         <div class="main1 flex-col">
@@ -15,8 +12,8 @@
                     <div class="layer3 flex-col"></div>
                     <div class="TextGroup1 flex-col">
                       <span class="word3">{{
-                          $t("robotRanking.machineSalesRanking")
-                        }}</span>
+                        $t("robotRanking.machineSalesRanking")
+                      }}</span>
                     </div>
                   </div>
                 </div>
@@ -25,93 +22,48 @@
                   <span class="txt3">{{ $t("robotRanking.rankMethod") }}</span>
                 </div>
               </div>
-              <img
-                  class="img1"
-                  referrerpolicy="no-referrer"
-                  src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a"
-              />
+              <img class="img1" referrerpolicy="no-referrer"
+                src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a" />
             </div>
           </div>
           <div class="l-f l-flex-e o-plr-15">
-            <span class="robotLabelName l-in c-text-13" style="color: #404d74"
-            >{{ $t("robotRanking.dailySalesRanking") }}:</span
-            >
-            <kTabs
-                @tabclk="(e) => tabclk(e, 'day')"
-                :tabList="tabDayList"
-            ></kTabs>
+            <span class="robotLabelName l-in c-text-13" style="color: #404d74">{{ $t("robotRanking.dailySalesRanking")
+            }}:</span>
+            <kTabs @tabclk="(e) => tabclk(e, 'day')" :tabList="tabDayList"></kTabs>
           </div>
-          <div
-              v-if="!totalNoData('day')"
-              ref="dayChartBox"
-              class="mod3 flex-col"
-          ></div>
+          <div v-if="!totalNoData('day')" ref="dayChartBox" class="mod3 flex-col"></div>
           <kNoData v-else></kNoData>
           <div class="groove"></div>
           <div class="l-f l-flex-e o-plr-15">
-            <span
-                class="robotLabelName l-in o-mr-6 c-text-13"
-                style="color: #404d74"
-            >{{ $t("robotRanking.salesRankingThisWeek") }}:</span
-            >
-            <kTabs
-                @tabclk="(e) => tabclk(e, 'week')"
-                :tabList="tabWeekList"
-            ></kTabs>
+            <span class="robotLabelName l-in o-mr-6 c-text-13" style="color: #404d74">{{
+              $t("robotRanking.salesRankingThisWeek") }}:</span>
+            <kTabs @tabclk="(e) => tabclk(e, 'week')" :tabList="tabWeekList"></kTabs>
           </div>
-          <div
-              v-if="!totalNoData('week')"
-              ref="weekChartBox"
-              class="mod5 flex-col"
-          ></div>
+          <div v-if="!totalNoData('week')" ref="weekChartBox" class="mod5 flex-col"></div>
           <kNoData v-else></kNoData>
           <div class="groove"></div>
           <div class="l-f l-flex-e o-plr-15">
-            <span
-                class="robotLabelName l-in o-mr-6 c-text-13"
-                style="color: #404d74"
-            >{{ $t("robotRanking.salesRankingThisMonth") }}:</span
-            >
-            <kTabs
-                @tabclk="(e) => tabclk(e, 'month')"
-                :tabList="tabMonthList"
-            ></kTabs>
+            <span class="robotLabelName l-in o-mr-6 c-text-13" style="color: #404d74">{{
+              $t("robotRanking.salesRankingThisMonth") }}:</span>
+            <kTabs @tabclk="(e) => tabclk(e, 'month')" :tabList="tabMonthList"></kTabs>
           </div>
-          <div
-              v-if="!totalNoData('month')"
-              ref="monthChartBox"
-              class="mod9 flex-col"
-          ></div>
+          <div v-if="!totalNoData('month')" ref="monthChartBox" class="mod9 flex-col"></div>
           <kNoData v-else></kNoData>
           <div class="groove"></div>
           <div class="l-f l-flex-e o-plr-15">
-            <span
-                class="robotLabelName l-in o-mr-6 c-text-13"
-                style="color: #404d74"
-            >{{ $t("robotRanking.salesRankingThisYear") }}:</span
-            >
-            <kTabs
-                @tabclk="(e) => tabclk(e, 'year')"
-                :tabList="tabYearList"
-            ></kTabs>
+            <span class="robotLabelName l-in o-mr-6 c-text-13" style="color: #404d74">{{
+              $t("robotRanking.salesRankingThisYear") }}:</span>
+            <kTabs @tabclk="(e) => tabclk(e, 'year')" :tabList="tabYearList"></kTabs>
           </div>
-          <div
-              v-if="!totalNoData('year')"
-              ref="yearChartBox"
-              class="mod11 flex-col"
-          ></div>
+          <div v-if="!totalNoData('year')" ref="yearChartBox" class="mod11 flex-col"></div>
           <kNoData v-else></kNoData>
           <div class="groove"></div>
         </div>
       </div>
     </div>
     <!-- 筛选弹窗 -->
-    <kDialog
-        :dialogTitle="$t('subLedgerManage.search.title')"
-        :confirmBtnTxt="$t('subLedgerManage.search.screen')"
-        ref="kDialogRef"
-        @confirmclk="confirmClk"
-    >
+    <kDialog :dialogTitle="$t('subLedgerManage.search.title')" :confirmBtnTxt="$t('subLedgerManage.search.screen')"
+      ref="kDialogRef" @confirmclk="confirmClk">
       <template #content>
         <div class="cust_vantBorder">
           <!-- <van-field @click-input="busiInpClk" readonly clearable  v-model="searchForm.businessName"
@@ -124,96 +76,67 @@
               </div>
             </template>
           </van-field> -->
-          <van-field
-              @click-input="changeTypeInpClk"
-              readonly
-              clearable
-              v-model="searchForm.changeTypeName"
-              :placeholder="$t('robotRanking.changeTypePlace')"
-              :label="$t('robotRanking.changeType')"
-          >
+          <van-field @click-input="changeTypeInpClk" readonly clearable v-model="searchForm.changeTypeName"
+            :placeholder="$t('robotRanking.changeTypePlace')" :label="$t('robotRanking.changeType')">
             <template #right-icon>
               <div class="l-flex-RC">
-                <van-icon
-                    v-if="searchForm.changeTypeName"
-                    @click="
-                    searchForm.changeTypeName = '';
-                    searchForm.changeType = '';
-                  "
-                    class="o-mr-6"
-                    name="clear"
-                />
+                <van-icon v-if="searchForm.changeTypeName" @click="
+                  searchForm.changeTypeName = '';
+                searchForm.changeType = '';
+                " class="o-mr-6" name="clear" />
                 <van-icon @click="changeTypeInpClk" name="arrow-down" />
               </div>
             </template>
           </van-field>
+          <van-field v-if="isAdmin()" @click-input="companyTypeInpClk" readonly clearable
+            v-model="searchForm.companyTypeName" :placeholder="$t('robotRanking.companyTypePlaceholder')"
+            :label="$t('robotRanking.companyTypeLabel')">
+            <template #right-icon>
+              <div class="l-flex-RC">
+                <van-icon v-if="searchForm.companyTypeName" @click="
+                  searchForm.companyTypeName = '';
+                searchForm.companyType = '';
+                " class="o-mr-6" name="clear" />
+                <van-icon @click="companyTypeInpClk" name="arrow-down" />
+              </div>
+            </template>
+          </van-field>
         </div>
       </template>
     </kDialog>
     <!-- 商家选择框 -->
     <van-popup v-model:show="busiPopShow" position="bottom">
-      <van-picker
-          :title="$t('subLedgerManage.search.busiPlaceholder')"
-          :columns="busiPopList"
-          :columns-field-names="busiPopFieldName"
-          @confirm="busiPopConfirm"
-          @cancel="busiPopShow = false"
-      />
+      <van-picker :title="$t('subLedgerManage.search.busiPlaceholder')" :columns="busiPopList"
+        :columns-field-names="busiPopFieldName" @confirm="busiPopConfirm" @cancel="busiPopShow = false" />
     </van-popup>
     <!-- 统计方式弹窗 -->
     <van-popup v-model:show="changeTypeShow" position="bottom">
-      <van-picker
-          :default-index="chgTypeDefaIdx"
-          :title="$t('robotRanking.changeTypePlace')"
-          :columns="changeTypePopList"
-          :columns-field-names="yearPopFieldName"
-          @confirm="changeTypePopConfirm"
-          @cancel="changeTypeShow = false"
-      />
+      <van-picker :default-index="chgTypeDefaIdx" :title="$t('robotRanking.changeTypePlace')" :columns="changeTypePopList"
+        :columns-field-names="yearPopFieldName" @confirm="changeTypePopConfirm" @cancel="changeTypeShow = false" />
+    </van-popup>
+    <!-- 公司平台弹窗 -->
+    <van-popup v-model:show="companyTypeShow" position="bottom">
+      <van-picker :default-index="chgTypeDefaIdx" :title="$t('robotRanking.companyTypePlaceholder')"
+        :columns="companyTypePopList" :columns-field-names="yearPopFieldName" @confirm="companyTypePopConfirm"
+        @cancel="companyTypeShow = false" />
     </van-popup>
     <!-- 日的日期选择弹窗 -->
-    <van-calendar
-        @confirm="calendarDayConfirm"
-        v-model:show="dayShow"
-        color="#4d6add"
-        :min-date="minDate"
-        :show-confirm="false"
-    />
+    <van-calendar @confirm="calendarDayConfirm" v-model:show="dayShow" color="#4d6add" :min-date="minDate"
+      :show-confirm="false" />
     <!-- 周的日期选择弹窗 -->
-    <van-calendar
-        @confirm="
-        (e) => {
-          calendarWeekOrMonConfirm(e, 1);
-        }
-      "
-        v-model:show="weekShow"
-        :allow-same-day="true"
-        color="#4d6add"
-        :min-date="minDate"
-        type="range"
-    />
+    <van-calendar @confirm="(e) => {
+      calendarWeekOrMonConfirm(e, 1);
+    }
+      " v-model:show="weekShow" :allow-same-day="true" color="#4d6add" :min-date="minDate" type="range" />
     <!-- 月的日期选择弹窗 -->
-    <van-calendar
-        @confirm="
-        (e) => {
-          calendarWeekOrMonConfirm(e, 2);
-        }
-      "
-        v-model:show="monthShow"
-        :allow-same-day="true"
-        color="#4d6add"
-        :min-date="minDate"
-        type="range"
-    />
+    <van-calendar @confirm="(e) => {
+      calendarWeekOrMonConfirm(e, 2);
+    }
+      " v-model:show="monthShow" :allow-same-day="true" color="#4d6add" :min-date="minDate" type="range" />
     <!-- 年的日期选择弹窗 -->
     <van-popup v-model:show="yearShow" position="bottom">
-      <van-picker
-          :title="$t('robotRanking.yearPopTitle')"
-          :columns="yearPopList"
-          :columns-field-names="yearPopFieldName"
-          @confirm="yearPopConfirm"
-          @cancel="yearShow = false"
-      />
+      <van-picker :title="$t('robotRanking.yearPopTitle')" :columns="yearPopList" :columns-field-names="yearPopFieldName"
+        @confirm="yearPopConfirm" @cancel="yearShow = false" />
     </van-popup>
     <nav-bar></nav-bar>
   </div>
@@ -269,7 +192,14 @@ export default {
     const changeTypeInpClk = () => {
       changeTypeShow.value = true;
     };
+    // 是否管理员
+    const isAdmin = () => { return (user && user.type === 0); }
+    // 公司平台弹窗
+    const companyTypeInpClk = () => {
+      companyTypeShow.value = true;
+    };
     const changeTypeShow = ref(false);
+    const companyTypeShow = ref(false);
     // 默认选中
     const chgTypeDefaIdx = ref(1);
     const changeTypePopList = [
@@ -282,20 +212,40 @@ export default {
         id: 0,
       },
     ];
+
+    const companyTypePopList = [
+      {
+        name: t("robotRanking.whole"),
+        id: "",
+      },
+      {
+        name: t("robotRanking.sz"),
+        id: "0",
+      },
+      {
+        name: t("robotRanking.sc"),
+        id: "1",
+      },
+    ];
     const changeTypePopConfirm = (e) => {
       searchForm.changeType = e.id;
       searchForm.changeTypeName = e.name;
       changeTypeShow.value = false;
     };
+    const companyTypePopConfirm = (e) => {
+      searchForm.companyType = e.id;
+      searchForm.companyTypeName = e.name;
+      companyTypeShow.value = false;
+    };
     // 年的日期选择弹窗
     // 点击确定
     const yearPopConfirm = (e) => {
       console.log("e11", e);
       const year = e.id;
       const startDate =
-          moment().year(year).startOf("year").format("YYYY-MM-DD") + " 00:00:00";
+        moment().year(year).startOf("year").format("YYYY-MM-DD") + " 00:00:00";
       const endDate =
-          moment().year(year).endOf("year").format("YYYY-MM-DD") + " 23:59:59";
+        moment().year(year).endOf("year").format("YYYY-MM-DD") + " 23:59:59";
       getEquipRankList("year", startDate, endDate);
       yearShow.value = false;
     };
@@ -432,24 +382,24 @@ export default {
       todayEnd: moment().format("YYYY-MM-DD") + " 23:59:59",
       // 昨日
       colastdayStart:
-          moment()
-              .day(moment().day() - 1)
-              .format("YYYY-MM-DD") + " 00:00:00",
+        moment()
+          .day(moment().day() - 1)
+          .format("YYYY-MM-DD") + " 00:00:00",
       colastdayEnd:
-          moment()
-              .day(moment().day() - 1)
-              .format("YYYY-MM-DD") + " 23:59:59",
+        moment()
+          .day(moment().day() - 1)
+          .format("YYYY-MM-DD") + " 23:59:59",
       // 这周
       weekStart: moment().weekday(1).format("YYYY-MM-DD") + " 00:00:00",
       weekEnd: moment().weekday(7).format("YYYY-MM-DD") + " 23:59:59",
       // 上周
-      lastWeekStart:moment().week(moment().week() - 1).startOf('week').add(1,'days').format("YYYY-MM-DD") + " 00:00:00",
+      lastWeekStart: moment().week(moment().week() - 1).startOf('week').add(1, 'days').format("YYYY-MM-DD") + " 00:00:00",
       // moment()
       //   .week(moment().week() - 1)
       //   .startOf("week")
       //   .format("YYYY-MM-DD") + " 00:00:00",
 
-      lastWeekEnd:moment().week(moment().week() - 1).endOf('week').add(1,'days').format("YYYY-MM-DD") + " 23:59:59",
+      lastWeekEnd: moment().week(moment().week() - 1).endOf('week').add(1, 'days').format("YYYY-MM-DD") + " 23:59:59",
       // moment()
       //   .week(moment().week() - 1)
       //   .endOf("week")
@@ -460,29 +410,29 @@ export default {
       monthEnd: moment().endOf("month").format("YYYY-MM-DD") + " 23:59:59",
       // 上个月
       lastmonthStart:
-          moment()
-              .month(moment().month() - 1)
-              .startOf("month")
-              .format("YYYY-MM-DD") + " 00:00:00",
+        moment()
+          .month(moment().month() - 1)
+          .startOf("month")
+          .format("YYYY-MM-DD") + " 00:00:00",
       lastmonthEnd:
-          moment()
-              .month(moment().month() - 1)
-              .endOf("month")
-              .format("YYYY-MM-DD") + " 23:59:59",
+        moment()
+          .month(moment().month() - 1)
+          .endOf("month")
+          .format("YYYY-MM-DD") + " 23:59:59",
       // 今年
       yearStart: moment().startOf("year").format("YYYY-MM-DD") + " 00:00:00",
       yearEnd: moment().endOf("year").format("YYYY-MM-DD") + " 23:59:59",
       // 上年
       lastYearStart:
-          moment()
-              .year(moment().year() - 1)
-              .startOf("year")
-              .format("YYYY-MM-DD") + " 00:00:00",
+        moment()
+          .year(moment().year() - 1)
+          .startOf("year")
+          .format("YYYY-MM-DD") + " 00:00:00",
       lastYearEnd:
-          moment()
-              .year(moment().year() - 1)
-              .endOf("year")
-              .format("YYYY-MM-DD") + " 23:59:59",
+        moment()
+          .year(moment().year() - 1)
+          .endOf("year")
+          .format("YYYY-MM-DD") + " 23:59:59",
     });
     // 点击tab
     const tabclk = (e, type) => {
@@ -561,6 +511,7 @@ export default {
       }
     };
     const changeType = ref(0);
+    const companyType = ref(""); // 公司平台
     let chartObj = {
       day: null,
       week: null,
@@ -573,9 +524,11 @@ export default {
         adminId: user.id,
         ifForeign: user.ifForeign,
         changeType: changeType.value, //必填,默认为一0:销售额统计,1:花型统计
+        companyType: companyType.value,
         chartType,
         startDate,
         endDate,
+
       };
       getRankingList(param).then(async (res) => {
         const { data } = res;
@@ -694,9 +647,9 @@ export default {
               },
             ];
             dayChartOption.dataZoom[0]["startValue"] =
-                data.data.categories[data.data.categories.length - 5];
+              data.data.categories[data.data.categories.length - 5];
             dayChartOption.dataZoom[0]["endValue"] =
-                data.data.categories[data.data.categories.length - 1];
+              data.data.categories[data.data.categories.length - 1];
             // 解决resize不起作用,配合onMounted里的方法使用
             switch (chartType) {
               case "day":
@@ -745,6 +698,7 @@ export default {
       // 默认筛选选中
       searchForm.changeTypeName = t("robotRanking.salesStatistics");
       searchForm.changeType = 0;
+      searchForm.companyTypeName = t("robotRanking.whole");
       init();
       window.addEventListener("resize", () => {
         chartObj.day && chartObj.day.resize();
@@ -768,6 +722,8 @@ export default {
       businessName: "",
       changeTypeName: "",
       changeType: "",
+      companyTypeName: "",
+      companyType: ""
     });
     const kDialogRef = ref(null);
     const busiPopShow = ref(false);
@@ -796,6 +752,7 @@ export default {
       } else {
         changeType.value = searchForm.changeType;
       }
+      companyType.value = searchForm.companyType;
       init();
     };
     // 筛选弹窗
@@ -849,13 +806,18 @@ export default {
       changeTypePopList,
       changeTypePopConfirm,
       changeTypeInpClk,
+      companyTypeInpClk,
+      companyTypePopConfirm,
+      companyTypePopList,
+      companyTypeShow,
       totalNoData,
       chgTypeDefaIdx,
+
+      isAdmin,
     };
   },
   components: { sHeader, navBar, kTabs, kDialog, kNoData },
 };
 </script>
 
-<style lang="less" scoped>
-</style>
+<style lang="less" scoped></style>

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

@@ -1,6 +1,6 @@
 <template>
   <!-- 自充值 -->
-  <div class="page flex-col">
+  <div class="uniPayPage flex-col">
     <s-header :name="$t('uniPay.selfRecharging')" :noback="false"></s-header>
     <div class="box1 flex-col">
       <van-field v-model="deviceValue" is-link readonly :label="$t('uniPay.selfRecharging')"