From b12c9e77a6b6a7b410ac421c5a3d68da88823460 Mon Sep 17 00:00:00 2001
From: zhuguifei <312353457@qq.com>
Date: 星期五, 06 三月 2026 15:20:51 +0800
Subject: [PATCH] feat: 烟丝单柜产耗统计

---
 ruoyi-plus-soybean/src/views/analy/output-analy/modules/roller-data-operate-drawer.vue |  128 +++++++++++++++++++++++++++++-------------
 1 files changed, 87 insertions(+), 41 deletions(-)

diff --git a/ruoyi-plus-soybean/src/views/analy/output-analy/modules/roller-data-operate-drawer.vue b/ruoyi-plus-soybean/src/views/analy/output-analy/modules/roller-data-operate-drawer.vue
index 2b0ad65..fac69f2 100755
--- a/ruoyi-plus-soybean/src/views/analy/output-analy/modules/roller-data-operate-drawer.vue
+++ b/ruoyi-plus-soybean/src/views/analy/output-analy/modules/roller-data-operate-drawer.vue
@@ -1,9 +1,9 @@
 <script setup lang="ts">
 import { computed, ref, watch } from 'vue';
-import { jsonClone } from '~/packages/utils';
 import { fetchCreateRollerData, fetchUpdateRollerData } from '@/service/api/analy/roller-data';
 import { useFormRules, useNaiveForm } from '@/hooks/common/form';
 import { $t } from '@/locales';
+import { jsonClone } from '~/packages/utils';
 
 defineOptions({
   name: 'RollerDataOperateDrawer'
@@ -45,37 +45,33 @@
 
 function createDefaultModel(): Model {
   return {
-      time: null,
-      key: '',
-      online: null,
-      qty: null,
-      badQty: null,
-      lvbangVal: null,
-      juanyanzhiVal: null,
-      shuisongzhiVal: null,
-      runTime: null,
-      stopTime: null,
-      stopTimes: null,
-      speed: null,
-      runStatus: null,
-      cy: null,
-      cyCs: null,
-      cyOnline: '',
-      recQty1: null,
-      recQty2: null,
-      tsQty: null
+    time: null,
+    key: '',
+    online: null,
+    qty: null,
+    badQty: null,
+    lvbangVal: null,
+    juanyanzhiVal: null,
+    shuisongzhiVal: null,
+    runTime: null,
+    stopTime: null,
+    stopTimes: null,
+    speed: null,
+    runStatus: null,
+    cy: null,
+    cyCs: null,
+    cyOnline: '',
+    recQty1: null,
+    recQty2: null,
+    tsQty: null
   };
 }
 
-type RuleKey = Extract<
-  keyof Model,
-  | 'time'
-  | 'key'
->;
+type RuleKey = Extract<keyof Model, 'time' | 'key'>;
 
 const rules: Record<RuleKey, App.Global.FormRule> = {
   time: createRequiredRule('鏃堕棿涓嶈兘涓虹┖'),
-  key: createRequiredRule('key涓嶈兘涓虹┖'),
+  key: createRequiredRule('key涓嶈兘涓虹┖')
 };
 
 function handleUpdateModelWhenEdit() {
@@ -93,16 +89,76 @@
 async function handleSubmit() {
   await validate();
 
-  const { time, key, online, qty, badQty, lvbangVal, juanyanzhiVal, shuisongzhiVal, runTime, stopTime, stopTimes, speed, runStatus, cy, cyCs, cyOnline, recQty1, recQty2, tsQty } = model.value;
+  const {
+    time,
+    key,
+    online,
+    qty,
+    badQty,
+    lvbangVal,
+    juanyanzhiVal,
+    shuisongzhiVal,
+    runTime,
+    stopTime,
+    stopTimes,
+    speed,
+    runStatus,
+    cy,
+    cyCs,
+    cyOnline,
+    recQty1,
+    recQty2,
+    tsQty
+  } = model.value;
 
   // request
   if (props.operateType === 'add') {
-    const { error } = await fetchCreateRollerData({ time, key, online, qty, badQty, lvbangVal, juanyanzhiVal, shuisongzhiVal, runTime, stopTime, stopTimes, speed, runStatus, cy, cyCs, cyOnline, recQty1, recQty2, tsQty });
+    const { error } = await fetchCreateRollerData({
+      time,
+      key,
+      online,
+      qty,
+      badQty,
+      lvbangVal,
+      juanyanzhiVal,
+      shuisongzhiVal,
+      runTime,
+      stopTime,
+      stopTimes,
+      speed,
+      runStatus,
+      cy,
+      cyCs,
+      cyOnline,
+      recQty1,
+      recQty2,
+      tsQty
+    });
     if (error) return;
   }
 
   if (props.operateType === 'edit') {
-    const { error } = await fetchUpdateRollerData({ time, key, online, qty, badQty, lvbangVal, juanyanzhiVal, shuisongzhiVal, runTime, stopTime, stopTimes, speed, runStatus, cy, cyCs, cyOnline, recQty1, recQty2, tsQty });
+    const { error } = await fetchUpdateRollerData({
+      time,
+      key,
+      online,
+      qty,
+      badQty,
+      lvbangVal,
+      juanyanzhiVal,
+      shuisongzhiVal,
+      runTime,
+      stopTime,
+      stopTimes,
+      speed,
+      runStatus,
+      cy,
+      cyCs,
+      cyOnline,
+      recQty1,
+      recQty2,
+      tsQty
+    });
     if (error) return;
   }
 
@@ -132,12 +188,7 @@
           />
         </NFormItem>
         <NFormItem label="key" path="key">
-          <NInput
-            v-model:value="model.key"
-            :rows="3"
-            type="textarea"
-            placeholder="璇疯緭鍏ey"
-          />
+          <NInput v-model:value="model.key" :rows="3" type="textarea" placeholder="璇疯緭鍏ey" />
         </NFormItem>
         <NFormItem label="缃戠粶鐘舵��" path="online">
           <NInputNumber v-model:value="model.online" placeholder="璇疯緭鍏ョ綉缁滅姸鎬�" class="w-full" />
@@ -186,12 +237,7 @@
           <NInputNumber v-model:value="model.cyCs" placeholder="璇疯緭鍏ュ偍鐑熻澶囪溅閫�" class="w-full" />
         </NFormItem>
         <NFormItem label="鍌ㄧ儫璁惧缃戠粶" path="cyOnline">
-          <NInput
-            v-model:value="model.cyOnline"
-            :rows="3"
-            type="textarea"
-            placeholder="璇疯緭鍏ュ偍鐑熻澶囩綉缁�"
-          />
+          <NInput v-model:value="model.cyOnline" :rows="3" type="textarea" placeholder="璇疯緭鍏ュ偍鐑熻澶囩綉缁�" />
         </NFormItem>
         <NFormItem label="鎺ユ敹鏈轰骇閲�" path="recQty1">
           <NInputNumber v-model:value="model.recQty1" placeholder="璇疯緭鍏ユ帴鏀舵満浜ч噺" class="w-full" />

--
Gitblit v1.9.3