Przeglądaj źródła

fix: 上货记录状态值前后端不一致

- 前端表单状态筛选值0/1/2修正为1/2/3,与后端StockRecordStatus枚举一致
- statusMap显示映射同样修正

Co-Authored-By: Claude <noreply@anthropic.com>
skyline 13 godzin temu
rodzic
commit
30bd1fbdd6

+ 3 - 3
haha-admin-web/src/views/inventory/records/index.vue

@@ -52,9 +52,9 @@ const {
           clearable
           class="w-[180px]!"
         >
-          <el-option label="进行中" :value="0" />
-          <el-option label="已完成" :value="1" />
-          <el-option label="已取消" :value="2" />
+          <el-option label="进行中" :value="1" />
+          <el-option label="已完成" :value="2" />
+          <el-option label="已取消" :value="3" />
         </el-select>
       </el-form-item>
       <el-form-item>

+ 3 - 3
haha-admin-web/src/views/inventory/records/utils/hook.tsx

@@ -21,9 +21,9 @@ export function useStockRecords() {
   });
 
   const statusMap = {
-    0: { text: "进行中", type: "primary" },
-    1: { text: "已完成", type: "success" },
-    2: { text: "已取消", type: "info" }
+    1: { text: "进行中", type: "primary" },
+    2: { text: "已完成", type: "success" },
+    3: { text: "已取消", type: "info" }
   };
 
   const stockTypeMap = {