qinyan 1 year ago
parent
commit
f13f93ca5e

+ 1 - 1
src/modules/collocation/module/actions/collocation.ts

@@ -23,7 +23,7 @@ export const collocationAction = CollocationModule.action({
   async renameMatchCategory() {
     const name = await queenApi.showInput({
       title: "请输入分类名称",
-      defaultValue: this.store.currentGroupList[0].category,
+      defaultValue: this.store.editType,
     });
     if (!name) return;
     this.store.currentGroupList.forEach((element: ProductMatching) => {

+ 1 - 1
src/modules/collocation/module/actions/design.ts

@@ -101,7 +101,7 @@ export const designAction = CollocationModule.action({
     styleItem.prodMatchs = [
       {
         index: -1,
-        category: "product",
+        category: "换单品",
         group: "",
         productIds: [],
       },

+ 2 - 6
src/modules/collocation/module/stores/design.ts

@@ -10,18 +10,14 @@ export const designStore = CollocationModule.store({
   }),
   getters: {
     menuOptions(state) {
-      const options = [
-        { label: "换料", value: "mat" },
-        { label: "换单品", value: "换单品" },
-      ];
+      const options = [{ label: "换料", value: "mat" }];
 
       const sourceData: any = {
         mat: state.designDetail.matMatchs,
-        product: [],
       };
 
       state.designDetail.prodMatchs?.forEach((element: ProductMatching) => {
-        const key = element.category || "product";
+        const key = element.category || "换单品";
         if (!sourceData[key]) {
           sourceData[key] = [];
           options.push({ label: key, value: key });