update 当前产线生产规格

This commit is contained in:
lb
2023-12-28 10:14:14 +08:00
parent b57b65ffd4
commit c2802627d6
7 changed files with 249 additions and 155 deletions

View File

@@ -2,6 +2,7 @@ import { createSlice } from "@reduxjs/toolkit";
export const initialState = {
table: [],
productData: [],
chart: {
year: [],
week: [],
@@ -15,8 +16,9 @@ const cuttingSlice = createSlice({
initialState,
reducers: {
setCuttingTable: (state, action) => {
console.log("setting cuttting table...");
state.table = action.payload;
if ("data" in action.payload) state.table = action.payload.data;
if ("productData" in action.payload)
state.productData = action.payload.productData;
},
setCuttingChart: (state, action) => {
switch (action.payload.dateType) {