From 08f1b081e006f0f3b83bcbdf47f4ef494e18450b Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期三, 11 九月 2024 00:50:18 +0800
Subject: [PATCH] 包装规则更新,保存修改,重量范围

---
 src/views/tigerprojects/system/lowcode/high/dtl.vue              |    8 
 src/api/tigerapi/mes/router.ts                                   |    1 
 src/api/tigerapi/mes/pkgrule.ts                                  |   24 ++
 src/api/tigerapi/mes/mesApi.ts                                   |    3 
 src/views/tigerprojects/bas/checkrule/checkrule.data.ts          |    2 
 src/views/tigerprojects/system/lowcode/entityts/MES_SHIFT_SYS.ts |   24 ++
 src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_RULE.ts  |   19 +
 src/api/tigerapi/model/mesModel.ts                               |  185 +++++++++++++-------
 src/assets/icons/Collection.svg                                  |    1 
 src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_DTL.ts   |  252 ++++++++++++++++++++++++++--
 10 files changed, 429 insertions(+), 90 deletions(-)

diff --git a/src/api/tigerapi/mes/mesApi.ts b/src/api/tigerapi/mes/mesApi.ts
index 7f736f3..a65b536 100644
--- a/src/api/tigerapi/mes/mesApi.ts
+++ b/src/api/tigerapi/mes/mesApi.ts
@@ -4,7 +4,7 @@
  * @version: 
  * @Date: 2024-04-27 15:54:50
  * @LastEditors: Ben Lin
- * @LastEditTime: 2024-08-04 18:03:42
+ * @LastEditTime: 2024-09-11 00:20:02
  */
 export enum mesApi {
   GetRoute = '/MES/GetRoute',
@@ -17,6 +17,7 @@
   SaveRoute = '/MES/SaveRoute',
   DeleteRoute = '/MES/DeleteRoute',
   SaveMesWo = '/MES/SaveMesWo',
+  SaveBasPkgRule = '/MES/SaveBasPkgRule',
   DeleteMesWo = '/MES/DeleteMesWo',
   SaveMesWs = '/MES/SaveMesWs',
   DeleteMesWs = '/MES/DeleteMesWs',
diff --git a/src/api/tigerapi/mes/pkgrule.ts b/src/api/tigerapi/mes/pkgrule.ts
new file mode 100644
index 0000000..acc20d9
--- /dev/null
+++ b/src/api/tigerapi/mes/pkgrule.ts
@@ -0,0 +1,24 @@
+
+/*
+ * @Description: 鍖呰瑙勫垯
+ * @Author: Ben Lin
+ * @version: 
+ * @Date: 2024-09-11 00:14:59
+ * @LastEditors: Ben Lin
+ * @LastEditTime: 2024-09-11 00:35:31
+ */
+import { BizBasPkgRuleInput } from "../model/mesModel";
+import { genAction } from "../system";
+import { mesApi } from "./mesApi";
+import { defHttp } from "/@/utils/http/axios";
+
+export const SaveBasPkgRule = async (params: BizBasPkgRuleInput) => {
+  const data = await defHttp.post(
+    { url: mesApi.SaveBasPkgRule, params: genAction('', params) },
+    {
+      errorMessageMode: 'none',
+      isTransformResponse: false,
+    },
+  );
+  return data;
+};
\ No newline at end of file
diff --git a/src/api/tigerapi/mes/router.ts b/src/api/tigerapi/mes/router.ts
index a0b388f..630cdb0 100644
--- a/src/api/tigerapi/mes/router.ts
+++ b/src/api/tigerapi/mes/router.ts
@@ -5,6 +5,7 @@
 import { mesApi } from './mesApi';
 import { useUserStore } from '/@/store/modules/user';
 import { DelProdRotInput, DelWoRotInput, RoutePageListGetResultModel, RoutelistPageParams } from '../model/mesModel';
+import { buildUUID } from '/@/utils/uuid';
 
 /**
  * @description: 鑾峰彇宸ヨ壓璺嚎鍒楄〃
diff --git a/src/api/tigerapi/model/mesModel.ts b/src/api/tigerapi/model/mesModel.ts
index fd02b12..5efa642 100644
--- a/src/api/tigerapi/model/mesModel.ts
+++ b/src/api/tigerapi/model/mesModel.ts
@@ -270,25 +270,25 @@
 }
 
 export interface BAS_DEFECT {
-	ID: string;
-	CREATE_TIME: Date;
-	CREATE_USER: string;
-	UPDATE_TIME: Date;
-	UPDATE_USER: string;
-	GHOST_ROW: boolean;
-	AUTH_ORG: string;
-	AUTH_PROD: string;
-	AUTH_WH: string;
-	DFT_CODE: string;
-	DFT_NAME: string;
-	DFTG_CODE: string;
-	DFT_LEVEL: number;
-	REMARK: string;
+  ID: string;
+  CREATE_TIME: Date;
+  CREATE_USER: string;
+  UPDATE_TIME: Date;
+  UPDATE_USER: string;
+  GHOST_ROW: boolean;
+  AUTH_ORG: string;
+  AUTH_PROD: string;
+  AUTH_WH: string;
+  DFT_CODE: string;
+  DFT_NAME: string;
+  DFTG_CODE: string;
+  DFT_LEVEL: number;
+  REMARK: string;
 }
 
 export interface SaveWoBatchInput {
-	Wo: BIZ_MES_WO;
-	WoBatch: BIZ_MES_WO_BATCH;
+  Wo: BIZ_MES_WO;
+  WoBatch: BIZ_MES_WO_BATCH;
 }
 
 export type OperPageListGetResultModel = BasicFetchResult<OperListItem>;
@@ -320,59 +320,59 @@
 }
 
 export interface BAS_LABEL_VAR_WO {
-	ID: string;
-	CREATE_TIME: Date;
-	CREATE_USER: string;
-	UPDATE_TIME: Date;
-	UPDATE_USER: string;
-	GHOST_ROW: boolean;
-	AUTH_ORG: string;
-	AUTH_PROD: string;
-	AUTH_WH: string;
-	LABEL_ID: string;
-	VAR_NAME: string;
-	VAR_VALUE: string;
-	REMARK: string;
-	LABEL_VIEW_PATH: string;
-	WORK_ORDER: string;
-	CUST_CODE: string;
-	PROD_CODE: string;
+  ID: string;
+  CREATE_TIME: Date;
+  CREATE_USER: string;
+  UPDATE_TIME: Date;
+  UPDATE_USER: string;
+  GHOST_ROW: boolean;
+  AUTH_ORG: string;
+  AUTH_PROD: string;
+  AUTH_WH: string;
+  LABEL_ID: string;
+  VAR_NAME: string;
+  VAR_VALUE: string;
+  REMARK: string;
+  LABEL_VIEW_PATH: string;
+  WORK_ORDER: string;
+  CUST_CODE: string;
+  PROD_CODE: string;
 }
 
 export interface BAS_LABEL_TEMP {
-	ID: string;
-	CREATE_TIME: Date;
-	CREATE_USER: string;
-	UPDATE_TIME: Date;
-	UPDATE_USER: string;
-	GHOST_ROW: boolean;
-	AUTH_ORG: string;
-	AUTH_PROD: string;
-	AUTH_WH: string;
-	LABEL_CODE: string;
-	LABEL_NAME: string;
-	TEMP_TYPE: number;
-	TEMP_PATH: string;
-	CUST_CODE: string;
-	PROD_CODE: string;
-	REMARK: string;
+  ID: string;
+  CREATE_TIME: Date;
+  CREATE_USER: string;
+  UPDATE_TIME: Date;
+  UPDATE_USER: string;
+  GHOST_ROW: boolean;
+  AUTH_ORG: string;
+  AUTH_PROD: string;
+  AUTH_WH: string;
+  LABEL_CODE: string;
+  LABEL_NAME: string;
+  TEMP_TYPE: number;
+  TEMP_PATH: string;
+  CUST_CODE: string;
+  PROD_CODE: string;
+  REMARK: string;
 }
 
 export interface BAS_LABEL_VAR {
-	ID: string;
-	CREATE_TIME: Date;
-	CREATE_USER: string;
-	UPDATE_TIME: Date;
-	UPDATE_USER: string;
-	GHOST_ROW: boolean;
-	AUTH_ORG: string;
-	AUTH_PROD: string;
-	AUTH_WH: string;
-	LABEL_ID: string;
-	VAR_NAME: string;
-	VAR_TYPE: number;
-	VAR_VALUE: string;
-	REMARK: string;
+  ID: string;
+  CREATE_TIME: Date;
+  CREATE_USER: string;
+  UPDATE_TIME: Date;
+  UPDATE_USER: string;
+  GHOST_ROW: boolean;
+  AUTH_ORG: string;
+  AUTH_PROD: string;
+  AUTH_WH: string;
+  LABEL_ID: string;
+  VAR_NAME: string;
+  VAR_TYPE: number;
+  VAR_VALUE: string;
+  REMARK: string;
 }
 
 export interface BasLabelTempInput {
@@ -380,3 +380,62 @@
   LabelVars: BAS_LABEL_VAR[];
   LabelVarWos: BAS_LABEL_VAR_WO[];
 }
+
+export interface BAS_PKG_RULE {
+  ID: string;
+  CREATE_TIME: Date;
+  CREATE_USER: string;
+  UPDATE_TIME: Date;
+  UPDATE_USER: string;
+  GHOST_ROW: boolean;
+  AUTH_ORG: string;
+  AUTH_PROD: string;
+  AUTH_WH: string;
+  RULE_CODE: string;
+  RULE_NAME: string;
+  IS_ACTIVE: string;
+  REMARK: string;
+}
+
+export interface BAS_PKG_DTL {
+	ID: string;
+	CREATE_TIME: Date;
+	CREATE_USER: string;
+	UPDATE_TIME: Date;
+	UPDATE_USER: string;
+	GHOST_ROW: boolean;
+	AUTH_ORG: string;
+	AUTH_PROD: string;
+	AUTH_WH: string;
+	PKG_RULE_ID: string;
+	PKG_CODE: string;
+	PKG_LEVEL: number;
+	PKG_QTY: number;
+	LABEL_CODE: string;
+	REMARK: string;
+}
+
+export interface BAS_PKG_PROD {
+  ID: string;
+  CREATE_TIME: Date;
+  CREATE_USER: string;
+  UPDATE_TIME: Date;
+  UPDATE_USER: string;
+  GHOST_ROW: boolean;
+  AUTH_ORG: string;
+  AUTH_PROD: string;
+  AUTH_WH: string;
+  PKG_RULE_ID: string;
+  ITEM_CODE: string;
+  MIN_WEIGHT: number;
+  MIN_UNIT: string;
+  MAX_WEIGHT: number;
+  MAX_UNIT: string;
+  REMARK: string;
+}
+
+export interface BizBasPkgRuleInput {
+  PkgRule: BAS_PKG_RULE;
+  PkgDtl: BAS_PKG_DTL[];
+  PkgProd: BAS_PKG_PROD[];
+}
diff --git a/src/assets/icons/Collection.svg b/src/assets/icons/Collection.svg
new file mode 100644
index 0000000..eb31550
--- /dev/null
+++ b/src/assets/icons/Collection.svg
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1724571813913" class="icon" viewBox="0 0 1139 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="79424" xmlns:xlink="http://www.w3.org/1999/xlink" width="222.4609375" height="200"><path d="M1137.834714 172.991567a54.677861 54.677861 0 0 0-10.495264-47.048392A57.923232 57.923232 0 0 0 1079.645779 113.872672h-112.601094V46.535965C967.044685 20.876656 938.671411 0 903.845353 0h-669.950885C198.992494 0 170.809008 20.876656 170.809008 46.535965V113.872672H56.936336v0.512427c-31.941284 2.315411-56.936336 22.148235-56.936336 46.30822V977.407099c0 24.141006 24.919136 43.97383 56.936336 46.308219v0.227746h1025.423408a108.501677 108.501677 0 0 0 44.998684-22.774535 41.145992 41.145992 0 0 0 10.514244-34.313631zM227.157001 56.936336h683.406839v739.508108H227.157001z" fill="#079610" p-id="79425"></path><path d="M824.589973 625.730331H316.471133c-26.171736 0-32.036178 12.73476-32.036178 28.468168s5.807506 28.468168 32.036178 28.468168h508.11884c26.171736 0 28.733871-12.73476 28.733871-28.468168s-2.562135-28.468168-28.733871-28.468168z" fill="#079610" p-id="79426"></path><path d="M356.535335 403.868409l189.616977 165.115374a40.045223 40.045223 0 0 0 44.543194 0l189.673913-164.982523a29.606895 29.606895 0 0 0 13.588805-34.161801 43.005912 43.005912 0 0 0-34.161801-25.146882 58.986044 58.986044 0 0 0-46.422093 10.001816l-87.302381 72.119359V205.597109c0-19.339375-30.897452-34.920953-57.050209-34.920953s-57.18306 15.638514-57.18306 34.920953v221.083792l-88.175405-72.119359a60.162728 60.162728 0 0 0-65.875341 0.854045 28.75285 28.75285 0 0 0-1.252599 48.452822z" fill="#079610" p-id="79427"></path></svg>
\ No newline at end of file
diff --git a/src/views/tigerprojects/bas/checkrule/checkrule.data.ts b/src/views/tigerprojects/bas/checkrule/checkrule.data.ts
index 071f55e..e07c451 100644
--- a/src/views/tigerprojects/bas/checkrule/checkrule.data.ts
+++ b/src/views/tigerprojects/bas/checkrule/checkrule.data.ts
@@ -552,7 +552,7 @@
       };
     },
     rules: [
-      {
+      {                                                                                                                                
         required: true,
         // @ts-ignore
         validator: async (rule, value) => {
diff --git a/src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_DTL.ts b/src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_DTL.ts
index eb6da34..01d9385 100644
--- a/src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_DTL.ts
+++ b/src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_DTL.ts
@@ -4,7 +4,7 @@
  * @version:
  * @Date: 2024-06-19 20:34:27
  * @LastEditors: Ben Lin
- * @LastEditTime: 2024-07-06 23:15:08
+ * @LastEditTime: 2024-09-11 00:47:09
  */
 
 import { Ref, ref } from 'vue';
@@ -13,6 +13,9 @@
 import { isNullOrEmpty, isNullOrUnDef } from '/@/utils/is';
 import { useDrawer } from '/@/components/Drawer';
 import { EditOperation, Search, custDel } from '../data';
+import { dateUtil } from '/@/utils/dateUtil';
+import { SaveBasPkgRule } from '/@/api/tigerapi/mes/pkgrule';
+import { BAS_PKG_RULE } from '/@/api/tigerapi/model/mesModel';
 
 function _default(): any[] {
   const ActionColumn: BasicColumn = {
@@ -57,22 +60,36 @@
      * @param {*} u
      * @return {*}
      */
-    EditOperation: (data: Ref<any[]>, d, u, item) => {
+    EditOperation: (data: Ref<any[]>, d, u, name) => {
       //鏇存柊
-      var _data = data.value[item].map((item) => {
-        if (item['ID'] == d.ID)
-          return {
-            ...item,
-            PKG_CODE: d.PKG_CODE,
-            PKG_NAME: d.PKG_NAME,
-            PKG_LEVEL: d.PKG_LEVEL,
-            PKG_QTY: d.PKG_QTY,
-            LABEL_CODE: d.LABEL_CODE,
-            REMARK: d.REMARK,
-          };
+      var _data = data.value[name].map((item) => {
+        if (item['ID'] == d.ID) {
+          if (name == 'BAS_PKG_DTL') {
+            return {
+              ...item,
+              PKG_CODE: d.PKG_CODE,
+              PKG_NAME: d.PKG_NAME,
+              PKG_LEVEL: d.PKG_LEVEL,
+              PKG_QTY: d.PKG_QTY,
+              LABEL_CODE: d.LABEL_CODE,
+              REMARK: d.REMARK,
+            };
+          }
+          if (name == 'BAS_PKG_PROD') {
+            return {
+              ...item,
+              ITEM_CODE: d.ITEM_CODE,
+              MIN_WEIGHT: d.MIN_WEIGHT,
+              MIN_UNIT: d.MIN_UNIT,
+              MAX_WEIGHT: d.MAX_WEIGHT,
+              MAX_UNIT: d.MAX_UNIT,
+              REMARK: d.REMARK,
+            };
+          }
+        }
         return item;
       });
-      EditOperation(data, d, u, item, _data);
+      EditOperation(data, d, u, name, _data);
     },
     /**
      * @description: 楂樼骇琛ㄥ崟鍜岃鎯呴〉闈㈣繑鍥炰富椤甸潰鐨剈rl
@@ -197,6 +214,9 @@
         {
           BAS_PKG_DTL: useDrawer(),
         },
+        {
+          BAS_PKG_PROD: useDrawer(),
+        },
       ];
     },
     /**
@@ -229,6 +249,28 @@
             fixed: 'right',
           }, //鑷畾涔夋搷浣滃垪
         }),
+        BAS_PKG_PROD: useTable({
+          title: '鍒楄〃淇℃伅',
+          dataSource: data.value['BAS_PKG_PROD'],
+          columns: baseColumns['BAS_PKG_PROD'],
+          formConfig: {
+            labelWidth: 140,
+            schemas: searchForms['BAS_PKG_PROD'],
+            submitFunc: () => Search('BAS_PKG_PROD', data, args[0]), //鑷畾涔夋煡璇㈡彁浜ゆ寜閽殑鏂规硶锛岃Е鍙戞煡璇㈡彁浜や簨浠�
+          },
+          useSearchForm: true,
+          showTableSetting: false,
+          bordered: true,
+          canResize: true,
+          showIndexColumn: false,
+          actionColumn: {
+            width: 130,
+            title: '鎿嶄綔',
+            dataIndex: 'action',
+            slots: { customRender: 'action' },
+            fixed: 'right',
+          }, //鑷畾涔夋搷浣滃垪
+        }),
       };
     },
     /**
@@ -245,6 +287,8 @@
             data = d.data.value[d.type];
           }
           break;
+        case 'BAS_PKG_PROD':
+          break;
       }
       return data;
     },
@@ -259,11 +303,27 @@
         pageContent: '杩欓噷鍙互娣诲姞鍜屼慨鏀瑰寘瑁呰鍒欏拰鍖呰淇℃伅銆�',
         tableTitle: {
           BAS_PKG_DTL: '鍖呰淇℃伅绠$悊',
+          BAS_PKG_PROD: '绉伴噸鑼冨洿绠$悊',
         },
       };
     },
     GetUseForm: () => {
       return {};
+    },
+    /**
+     * @description: 鎻愪氦鎵�鏈�
+     * @return {*}
+     */
+    SubmitAll: (data: Ref<any[]>, keyFieldValues: Ref<{}>, ...args) => {
+      SaveBasPkgRule({
+        PkgDtl: data.value['BAS_PKG_DTL'],
+        PkgProd: data.value['BAS_PKG_PROD'],
+        PkgRule: {} as unknown as BAS_PKG_RULE
+      }).then((action) => {
+        if (action.IsSuccessed) {
+          args[0]();
+        }
+      });
     },
   };
 
@@ -317,6 +377,16 @@
         },
       },
     ] as FormSchema[],
+    BAS_PKG_PROD: [
+      {
+        field: 'ITEM_CODE',
+        label: '鐗╂枡缂栫爜',
+        component: 'Input',
+        colProps: {
+          span: 8,
+        },
+      },
+    ] as FormSchema[],
   };
 
   const baseColumns = {
@@ -348,6 +418,49 @@
       {
         title: '鍖呰鏁伴噺',
         dataIndex: 'PKG_QTY',
+      },
+      {
+        title: '鏍囩妯℃澘',
+        dataIndex: 'LABEL_CODE',
+      },
+      {
+        title: '鍖呰瑙勫垯ID',
+        dataIndex: 'PKG_RULE_ID',
+        ifShow: false,
+      },
+      {
+        title: '澶囨敞',
+        dataIndex: 'REMARK',
+      },
+      {
+        title: '鏇存柊鏃堕棿',
+        dataIndex: 'UPDATE_TIME',
+      },
+      {
+        title: '鏇存柊浜�',
+        dataIndex: 'UPDATE_USER',
+      },
+    ] as BasicColumn[],
+    BAS_PKG_PROD: [
+      {
+        title: '鐗╂枡缂栫爜',
+        dataIndex: 'ITEM_CODE',
+      },
+      {
+        title: '绉伴噸涓嬮檺',
+        dataIndex: 'MIN_WEIGHT',
+      },
+      {
+        title: '绉伴噸涓嬮檺鍗曚綅',
+        dataIndex: 'MIN_UNIT',
+      },
+      {
+        title: '绉伴噸涓婇檺',
+        dataIndex: 'MAX_WEIGHT',
+      },
+      {
+        title: '绉伴噸涓婇檺鍗曚綅',
+        dataIndex: 'MAX_UNIT',
       },
       {
         title: '鍖呰瑙勫垯ID',
@@ -391,10 +504,12 @@
           span: 24,
         },
         componentProps: ({ formModel }) => {
-          formModel.PKG_LEVEL =
-            _data['BAS_PKG_DTL'].reduce((max, item) => {
-              return max < Number(item.PKG_LEVEL) ? Number(item.PKG_LEVEL) : max;
-            }, 0) + 1;
+          if (isNullOrEmpty(formModel.PKG_LEVEL) || Number(formModel.PKG_LEVEL) == 0) {
+            formModel.PKG_LEVEL =
+              _data['BAS_PKG_DTL'].reduce((max, item) => {
+                return max < Number(item.PKG_LEVEL) ? Number(item.PKG_LEVEL) : max;
+              }, 0) + 1;
+          }
           return {
             onChange: (e) => {},
           };
@@ -444,6 +559,24 @@
         },
       },
       {
+        field: 'LABEL_CODE',
+        label: '妯℃澘缂栫爜',
+        component: 'Input',
+        show: true,
+        // required: true,
+        colProps: {
+          span: 22,
+        },
+      },
+      {
+        field: 'BAS_LABEL_TEMP1PSelect_0', //鎸変綆浠g爜閰嶇疆鐨勮鍒欙紝瀹炰綋鍚�+搴忓彿+PSelect_0锛屽簭鍙风敤鏉ュ尯鍒嗗涓殑鏃跺�欙紝PSelect_0杩欐槸涓浐瀹氬悗缂�
+        label: '1',
+        defaultValue: 'BAS_LABEL_TEMP',
+        component: 'Input',
+        colProps: { span: 2 },
+        colSlot: 'BAS_LABEL_TEMP1add', //鎸変綆浠g爜閰嶇疆鐨勮鍒欙紝瀹炰綋鍚�+搴忓彿+add锛屽簭鍙风敤鏉ュ尯鍒嗗涓殑鏃跺�欙紝add杩欐槸涓浐瀹氬悗缂�
+      },
+      {
         label: '鍖呰鍚嶇О',
         field: 'PKG_NAME',
         component: 'Input',
@@ -470,6 +603,89 @@
         show: false,
       },
     ] as FormSchema[],
+    BAS_PKG_PROD: [
+      {
+        label: '鍖呰瑙勫垯ID',
+        field: 'PKG_RULE_ID',
+        component: 'Input',
+        colProps: {
+          span: 24,
+        },
+        dynamicDisabled: ({ values }) => {
+          return true;
+        },
+      },
+      {
+        label: '鐗╂枡缂栫爜',
+        field: 'ITEM_CODE',
+        component: 'Input',
+        required: true,
+        colProps: {
+          span: 22,
+        },
+      },
+      {
+        field: 'BAS_ITEM1PSelect_0', //鎸変綆浠g爜閰嶇疆鐨勮鍒欙紝瀹炰綋鍚�+搴忓彿+PSelect_0锛屽簭鍙风敤鏉ュ尯鍒嗗涓殑鏃跺�欙紝PSelect_0杩欐槸涓浐瀹氬悗缂�
+        label: '1',
+        defaultValue: 'BAS_ITEM',
+        component: 'Input',
+        colProps: { span: 2 },
+        colSlot: 'BAS_ITEM1add', //鎸変綆浠g爜閰嶇疆鐨勮鍒欙紝瀹炰綋鍚�+搴忓彿+add锛屽簭鍙风敤鏉ュ尯鍒嗗涓殑鏃跺�欙紝add杩欐槸涓浐瀹氬悗缂�
+      },
+      {
+        label: '绉伴噸涓嬮檺',
+        field: 'MIN_WEIGHT',
+        component: 'Input',
+        required: true,
+        colProps: {
+          span: 24,
+        },
+      },
+      {
+        label: '绉伴噸涓嬮檺鍗曚綅',
+        field: 'MIN_UNIT',
+        required: true,
+        component: 'Input',
+        colProps: {
+          span: 24,
+        },
+      },
+      {
+        label: '绉伴噸涓婇檺',
+        field: 'MAX_WEIGHT',
+        required: true,
+        component: 'Input',
+        colProps: {
+          span: 24,
+        },
+      },
+      {
+        label: '绉伴噸涓婇檺鍗曚綅',
+        field: 'MAX_UNIT',
+        required: true,
+        component: 'Input',
+        colProps: {
+          span: 24,
+        },
+      },
+      {
+        label: '澶囨敞',
+        field: 'REMARK',
+        component: 'Input',
+        colProps: {
+          span: 24,
+        },
+      },
+      {
+        label: 'ID',
+        field: 'ID',
+        component: 'Input',
+        colProps: {
+          span: 24,
+        },
+        show: false,
+      },
+    ] as FormSchema[],
   };
 
   return [methods, ActionColumn];
diff --git a/src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_RULE.ts b/src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_RULE.ts
index 5bfd5e4..d1242b1 100644
--- a/src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_RULE.ts
+++ b/src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_RULE.ts
@@ -4,7 +4,7 @@
  * @version:
  * @Date: 2024-06-19 20:34:27
  * @LastEditors: Ben Lin
- * @LastEditTime: 2024-07-06 23:26:47
+ * @LastEditTime: 2024-09-10 23:49:55
  */
 
 import { ActionItem, BasicColumn } from '/@/components/Table';
@@ -43,11 +43,18 @@
           drawers: [
             {
               name: 'BAS_PKG_DTL', //瀹為檯鐨勫疄浣撳悕
-              dataType: 'V_BAS_PKG_DTL', //濡傛灉杩欓噷缁欎簡鍊硷紝鍒欎細鏇挎崲name鐨勫疄浣撳悕鍘绘煡涔夋暟鎹簱
+              dataType: 'V_BAS_PKG_DTL', //濡傛灉杩欓噷缁欎簡鍊硷紝鍒欎細鏇挎崲name鐨勫疄浣撳悕鍘绘煡璇㈡暟鎹簱
               code: 'PKG_RULE_ID',
               type: 'one',
               keyName: 'BAS_PKG_DTL',
               order: 'PKG_LEVEL',
+            },
+            {
+              name: 'BAS_PKG_PROD', //瀹為檯鐨勫疄浣撳悕
+              code: 'PKG_RULE_ID',
+              type: 'one',
+              keyName: 'BAS_PKG_PROD',
+              order: 'ITEM_CODE',
             },
           ], //drawers鏄彸杈瑰脊鍑哄鏀逛晶妗嗙殑鍚嶅瓧鍒楄〃
         },
@@ -85,6 +92,7 @@
       Title: `缂栬緫鍖呰瑙勫垯锛�${params['record']['RULE_CODE']}`,
       IsExist: 'RULE_CODE',
       IsID: true,
+      crudColSlots: {BAS_PKG_DTL:['BAS_LABEL_TEMP1add'], BAS_PKG_PROD:['BAS_ITEM1add']} /* 澧炲垹鏀硅〃鍗曞瓧娈电殑鎻掓Ы鍒楄〃锛屼竴鑸敤浜庡脊鍑洪�夋嫨妗嗘寜閽� */,
       drawers: [
         {
           name: 'BAS_PKG_DTL',
@@ -94,6 +102,13 @@
           keyName: 'BAS_PKG_DTL',
           order: 'PKG_LEVEL',
         },
+        {
+          name: 'BAS_PKG_PROD', //瀹為檯鐨勫疄浣撳悕
+          code: 'PKG_RULE_ID',
+          type: 'one',
+          keyName: 'BAS_PKG_DTL',
+          order: 'ITEM_CODE',
+        },
       ], //drawers鏄彸杈瑰脊鍑哄鏀逛晶妗嗙殑鍚嶅瓧鍒楄〃
     };
     // 灏嗗璞¤浆鎹负JSON瀛楃涓插苟淇濆瓨鍒皊essionStorage
diff --git a/src/views/tigerprojects/system/lowcode/entityts/MES_SHIFT_SYS.ts b/src/views/tigerprojects/system/lowcode/entityts/MES_SHIFT_SYS.ts
index 46e054c..5c316b4 100644
--- a/src/views/tigerprojects/system/lowcode/entityts/MES_SHIFT_SYS.ts
+++ b/src/views/tigerprojects/system/lowcode/entityts/MES_SHIFT_SYS.ts
@@ -43,7 +43,13 @@
           IsID: false, //鏄惁甯﹁繃鍘讳晶杈规鐨勬槸ID锛宖alse灏辨槸CODE锛宼rue鏄疘D
           ifSave: false,
           drawers: [
-            { name: 'MES_SHIFT', code: 'SFTS_CODE', type: 'one', keyName: 'MES_SHIFT', order: 'SFT_CODE' },
+            {
+              name: 'MES_SHIFT',
+              code: 'SFTS_CODE',
+              type: 'one',
+              keyName: 'MES_SHIFT',
+              order: 'SFT_CODE',
+            },
             {
               name: 'MES_SHIFT_PRD',
               code: 'SFT_CODE',
@@ -139,8 +145,20 @@
       IsID: false, //鏄惁甯﹁繃鍘讳晶杈规鐨勬槸ID锛宖alse灏辨槸CODE锛宼rue鏄疘D
       ifSave: false,
       drawers: [
-        { name: 'MES_SHIFT', code: 'SFTS_CODE', type: 'one', keyName: 'MES_SHIFT', order: 'SFT_CODE' }, //type: one-琛ㄧず闇�瑕乧ode: 'SFTS_CODE'鍙鍞竴鍊�
-        { name: 'MES_SHIFT_PRD', code: 'SFT_CODE', type: 'all', keyName: 'MES_SHIFT', order: 'SFT_CODE,SEQ' }, //type: all-琛ㄧず闇�瑕乧ode: 'SFT_CODE'鎵�鏈夌殑鍊硷紝keyName锛氳〃绀洪渶瑕佹墍鏈夊�肩殑code鐨勫疄浣撳悕
+        {
+          name: 'MES_SHIFT',
+          code: 'SFTS_CODE',
+          type: 'one',
+          keyName: 'MES_SHIFT',
+          order: 'SFT_CODE',
+        }, //type: one-琛ㄧず闇�瑕乧ode: 'SFTS_CODE'鍙鍞竴鍊�
+        {
+          name: 'MES_SHIFT_PRD',
+          code: 'SFT_CODE',
+          type: 'all',
+          keyName: 'MES_SHIFT',
+          order: 'SFT_CODE,SEQ',
+        }, //type: all-琛ㄧず闇�瑕乧ode: 'SFT_CODE'鎵�鏈夌殑鍊硷紝keyName锛氳〃绀洪渶瑕佹墍鏈夊�肩殑code鐨勫疄浣撳悕
       ], //drawers鏄彸杈瑰脊鍑哄鏀逛晶妗嗙殑鍚嶅瓧鍒楄〃
     };
     // 灏嗗璞¤浆鎹负JSON瀛楃涓插苟淇濆瓨鍒皊essionStorage
diff --git a/src/views/tigerprojects/system/lowcode/high/dtl.vue b/src/views/tigerprojects/system/lowcode/high/dtl.vue
index 7c5966d..282eac1 100644
--- a/src/views/tigerprojects/system/lowcode/high/dtl.vue
+++ b/src/views/tigerprojects/system/lowcode/high/dtl.vue
@@ -181,7 +181,9 @@
       dtlSlots,
       useModalData,
       useFormData,
-      crudColSlots: props.crudColSlots,
+      crudColSlots: isNullOrUnDef(objParams.value['crudColSlots'])
+        ? {}
+        : objParams.value['crudColSlots'][item['name']],
       data,
       name: item.name, //drawers鍒楄〃閲岄潰鐨刵ame锛岃〃绀烘槸鍝竴涓疄浣擄紝涔熷氨鏄珮绾ц〃鍗曚腑琛ㄦ牸鐨勫悕瀛�
       keyName: item.keyName,
@@ -275,7 +277,9 @@
         ifSave: objParams.value['ifSave'],
         entityName: item['name'], //props.entityName,
         // formJson: GetCrudForm(item, data), //鑾峰彇澧炲垹鏀硅〃鍗曞瓧娈�
-        crudColSlots: props.crudColSlots,
+        crudColSlots: isNullOrUnDef(objParams.value['crudColSlots'])
+          ? {}
+          : objParams.value['crudColSlots'][item['name']],
         keyFieldValues: keyFieldValues.value,
         data,
         name: item['name'], //drawers鍒楄〃閲岄潰鐨刵ame锛岃〃绀烘槸鍝竴涓疄浣擄紝涔熷氨鏄珮绾ц〃鍗曚腑琛ㄦ牸鐨勫悕瀛�

--
Gitblit v1.9.3