From 08114b7451615854cb01556a7c477e32e17f520e Mon Sep 17 00:00:00 2001
From: zhuguifei <312353457@qq.com>
Date: 星期五, 03 四月 2026 09:47:04 +0800
Subject: [PATCH] refactor: 调整储丝单柜卷包产量计算逻辑

---
 ruoyi-plus-soybean/src/views/md/instrument/index.vue |  276 +++++++++++++++++++++++++++---------------------------
 1 files changed, 138 insertions(+), 138 deletions(-)

diff --git a/ruoyi-plus-soybean/src/views/md/instrument/index.vue b/ruoyi-plus-soybean/src/views/md/instrument/index.vue
index 9910a7d..b81dcce 100644
--- a/ruoyi-plus-soybean/src/views/md/instrument/index.vue
+++ b/ruoyi-plus-soybean/src/views/md/instrument/index.vue
@@ -33,149 +33,149 @@
 
 const { columns, columnChecks, data, getData, getDataByPage, loading, mobilePagination, scrollX } =
   useNaivePaginatedTable({
-  api: () => fetchGetInstrumentList(searchParams.value),
-  transform: response => defaultTransform(response),
-  onPaginationParamsChange: params => {
-    searchParams.value.pageNum = params.page;
-    searchParams.value.pageSize = params.pageSize;
-  },
-  columns: () => [
-    {
-      type: 'selection',
-      align: 'center',
-      width: 48
+    api: () => fetchGetInstrumentList(searchParams.value),
+    transform: response => defaultTransform(response),
+    onPaginationParamsChange: params => {
+      searchParams.value.pageNum = params.page;
+      searchParams.value.pageSize = params.pageSize;
     },
-    {
-      key: 'index',
-      title: $t('common.index'),
-      align: 'center',
-      width: 64,
-      render: (_, index) => index + 1
-    },
-    {
-      key: 'instrumentCode',
-      title: '浠櫒浠g爜',
-      align: 'center',
-      width: 120
-    },
-    {
-      key: 'instrumentName',
-      title: '浠櫒鍚嶇О',
-      align: 'center',
-      width: 200
-    },
-    {
-      key: 'ifStd',
-      title: '鎺ュ彛鏍囧噯',
-      align: 'center',
-      width: 120
-    },
-    {
-      key: 'isc',
-      title: '鎺ュ彛鏍囧噯浠g爜',
-      align: 'center',
-      width: 100
-    },
-    {
-      key: 'workShop',
-      title: '鎵�灞炶溅闂�',
-      align: 'center',
-      width: 120
-    },
-    {
-      key: 'enable',
-      title: '鍚敤',
-      align: 'center',
-      width: 120,
-      render(row) {
-        return <DictTag value={row.enable} dictCode="sys_yes_no" />;
-      }
-    },
-    {
-      key: 'del',
-      title: '鍒犻櫎',
-      align: 'center',
-      width: 120
-    },
-    {
-      key: 'instrumentDes',
-      title: '澶囨敞',
-      align: 'center',
-      width: 300,
-      render: row => (
-        <NTooltip trigger="hover">
-          {{
-            trigger: () => (
-              <div
-                style={{
-                  whiteSpace: 'nowrap',
-                  overflow: 'hidden',
-                  textOverflow: 'ellipsis'
-                }}
-              >
-                {row.instrumentDes}
-              </div>
-            ),
-            default: () => row.instrumentDes
-          }}
-        </NTooltip>
-      )
-    },
-    {
-      key: 'operate',
-      title: $t('common.operate'),
-      align: 'center',
-      width: 130,
-      render: row => {
-        const divider = () => {
-          if (!hasAuth('md:instrument:edit') || !hasAuth('md:instrument:remove')) {
-            return null;
-          }
-          return <NDivider vertical />;
-        };
+    columns: () => [
+      {
+        type: 'selection',
+        align: 'center',
+        width: 48
+      },
+      {
+        key: 'index',
+        title: $t('common.index'),
+        align: 'center',
+        width: 64,
+        render: (_, index) => index + 1
+      },
+      {
+        key: 'instrumentCode',
+        title: '浠櫒浠g爜',
+        align: 'center',
+        width: 120
+      },
+      {
+        key: 'instrumentName',
+        title: '浠櫒鍚嶇О',
+        align: 'center',
+        width: 200
+      },
+      {
+        key: 'ifStd',
+        title: '鎺ュ彛鏍囧噯',
+        align: 'center',
+        width: 120
+      },
+      {
+        key: 'isc',
+        title: '鎺ュ彛鏍囧噯浠g爜',
+        align: 'center',
+        width: 100
+      },
+      {
+        key: 'workShop',
+        title: '鎵�灞炶溅闂�',
+        align: 'center',
+        width: 120
+      },
+      {
+        key: 'enable',
+        title: '鍚敤',
+        align: 'center',
+        width: 120,
+        render(row) {
+          return <DictTag value={row.enable} dictCode="sys_yes_no" />;
+        }
+      },
+      {
+        key: 'del',
+        title: '鍒犻櫎',
+        align: 'center',
+        width: 120
+      },
+      {
+        key: 'instrumentDes',
+        title: '澶囨敞',
+        align: 'center',
+        width: 300,
+        render: row => (
+          <NTooltip trigger="hover">
+            {{
+              trigger: () => (
+                <div
+                  style={{
+                    whiteSpace: 'nowrap',
+                    overflow: 'hidden',
+                    textOverflow: 'ellipsis'
+                  }}
+                >
+                  {row.instrumentDes}
+                </div>
+              ),
+              default: () => row.instrumentDes
+            }}
+          </NTooltip>
+        )
+      },
+      {
+        key: 'operate',
+        title: $t('common.operate'),
+        align: 'center',
+        width: 130,
+        render: row => {
+          const divider = () => {
+            if (!hasAuth('md:instrument:edit') || !hasAuth('md:instrument:remove')) {
+              return null;
+            }
+            return <NDivider vertical />;
+          };
 
-        const editBtn = () => {
-          if (!hasAuth('md:instrument:edit')) {
-            return null;
-          }
+          const editBtn = () => {
+            if (!hasAuth('md:instrument:edit')) {
+              return null;
+            }
+            return (
+              <ButtonIcon
+                text
+                type="primary"
+                icon="material-symbols:drive-file-rename-outline-outline"
+                tooltipContent={$t('common.edit')}
+                onClick={() => edit(row.id)}
+              />
+            );
+          };
+
+          const deleteBtn = () => {
+            if (!hasAuth('md:instrument:remove')) {
+              return null;
+            }
+            return (
+              <ButtonIcon
+                text
+                type="error"
+                icon="material-symbols:delete-outline"
+                tooltipContent={$t('common.delete')}
+                popconfirmContent={$t('common.confirmDelete')}
+                onPositiveClick={() => handleDelete(row.id)}
+              />
+            );
+          };
+
           return (
-            <ButtonIcon
-              text
-              type="primary"
-              icon="material-symbols:drive-file-rename-outline-outline"
-              tooltipContent={$t('common.edit')}
-              onClick={() => edit(row.id)}
-            />
+            <div class="flex-center gap-8px">
+              {editBtn()}
+              {divider()}
+              {deleteBtn()}
+            </div>
           );
-        };
-
-        const deleteBtn = () => {
-          if (!hasAuth('md:instrument:remove')) {
-            return null;
-          }
-          return (
-            <ButtonIcon
-              text
-              type="error"
-              icon="material-symbols:delete-outline"
-              tooltipContent={$t('common.delete')}
-              popconfirmContent={$t('common.confirmDelete')}
-              onPositiveClick={() => handleDelete(row.id)}
-            />
-          );
-        };
-
-        return (
-          <div class="flex-center gap-8px">
-            {editBtn()}
-            {divider()}
-            {deleteBtn()}
-          </div>
-        );
+        }
       }
-    }
-  ]
-});
+    ]
+  });
 
 const { drawerVisible, operateType, editingData, handleAdd, handleEdit, checkedRowKeys, onBatchDeleted, onDeleted } =
   useTableOperate(data, 'id', getData);

--
Gitblit v1.9.3