From 6cc2d85787171281c269f4a6c3290b4a0762bcb6 Mon Sep 17 00:00:00 2001 From: YangYuGang <1378265336@qq.com> Date: 星期三, 05 三月 2025 16:21:43 +0800 Subject: [PATCH] 生产工具 --- src/views/tigerprojects/system/lowcode/entityts/QMS_INS_STD.ts | 67 +++++++++++++++++++++------------ 1 files changed, 43 insertions(+), 24 deletions(-) diff --git a/src/views/tigerprojects/system/lowcode/entityts/QMS_INS_STD.ts b/src/views/tigerprojects/system/lowcode/entityts/QMS_INS_STD.ts index 3a3ceb9..dbb1a31 100644 --- a/src/views/tigerprojects/system/lowcode/entityts/QMS_INS_STD.ts +++ b/src/views/tigerprojects/system/lowcode/entityts/QMS_INS_STD.ts @@ -4,7 +4,7 @@ * @version: * @Date: 2024-06-19 20:34:27 * @LastEditors: Ben Lin - * @LastEditTime: 2024-06-26 02:57:35 + * @LastEditTime: 2024-07-04 09:26:27 */ import { ActionItem, BasicColumn } from '/@/components/Table'; @@ -14,25 +14,6 @@ const { t } = useI18n(); function _default() { - /** - * @description: 鑷畾涔夌紪杈戞柟娉� - * @param {Fn} args - * @param {*} params - * @return {*} - */ - function insStdEdit(args: Fn[], params: {}) { - const param = { - CODE: params['record']['STD_CODE'], - ID: params['record']['ID'], - Name: 'QMS_INS_ITEM', //涓�鑸槸鏄庣粏琛ㄥ疄浣� - Title: `缂栬緫妫�楠岄」鐩細${params['record']['STD_CODE']}`, - pCode: 'TECH_STD', //璺宠浆鍒伴珮绾ц〃鍗曠殑鍏抽敭瀛楁鍚� - mCode: 'STD_CODE', //璺宠浆鍒伴珮绾ц〃鍗曠殑鍏抽敭瀛楁鍚嶆槧灏勫瓧娈� - IsID: false, - }; - args[5](`/QMS_INS_ITEM/High/${encodeURI(JSON.stringify(param))}`); - } - const ActionColumn: BasicColumn = { width: 100, title: '鎿嶄綔', @@ -41,12 +22,16 @@ fixed: 'right', }; + /** + * @description: 涓�浜涜嚜瀹氭柟娉� + * @return {*} + */ const methods = { /** * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓� * @return {*} */ - CreateAction: (fnName: string) => { + CreateAction: (type: string) => { return { action: 'go', //drawer(鎵撳紑宸︿晶鎶藉眽妗�) | go(璺宠浆鍒版柊鐨勯〉闈�) url: 'QMS_INS_ITEM/High', @@ -58,6 +43,9 @@ pCode: 'TECH_STD', //璺宠浆鍒伴珮绾ц〃鍗曠殑鍏抽敭瀛楁鍚� mCode: 'STD_CODE', //璺宠浆鍒伴珮绾ц〃鍗曠殑鍏抽敭瀛楁鍚嶆槧灏勫瓧娈� IsID: false, + drawers: [ + { name: 'QMS_INS_ITEM', code: 'STD_CODE', type: 'one', keyName: 'QMS_INS_ITEM' }, + ], //IfShow: true:楂樼骇琛ㄥ崟鏄惁鏄剧ず瀛愯〃鏍煎鍒犳敼锛宒rawers鏄彸杈瑰脊鍑哄鏀逛晶妗嗙殑鍚嶅瓧鍒楄〃 }, }; }, @@ -76,7 +64,7 @@ * @param {*} d * @param {*} u * @return {*} - */ + */ GetSelectSuccess: (d, u) => { return { ITEM_CODE: d.values['val'], @@ -86,8 +74,8 @@ * @description: 寮瑰嚭閫夋嫨妗嗘墦寮�鏂规硶 * @param {Fn} openItemModal * @return {*} - */ - OpenSelectItem: (openItemModal: Fn) => { + */ + OpenSelectItem: (openItemModal: Fn, ...args) => { openItemModal(true, { title: '鐗╂枡鍒楄〃', schemas: [ @@ -121,8 +109,39 @@ searchInfo: { TABLE_NAME: 'BAS_ITEM' }, }); }, + GetUseForm: () => { + return {}; + }, }; + /* 浠ヤ笅鏄唴閮ㄦ柟娉曪紝涓峞xport锛屼緵涓婇潰鐨勬柟娉曡皟鐢� */ + + /** + * @description: 鑷畾涔夌紪杈戞柟娉� + * @param {Fn} args + * @param {*} params + * @return {*} + */ + function insStdEdit(args: Fn[], params: {}) { + const param = { + CODE: params['record']['STD_CODE'], + ID: params['record']['ID'], + Name: 'QMS_INS_ITEM', //涓�鑸槸鏄庣粏琛ㄥ疄浣� + SessionName: 'QMS_INS_ITEM_update', //SessionStorage鐨刱ey + Title: `缂栬緫妫�楠岄」鐩細${params['record']['STD_CODE']}`, + pCode: 'TECH_STD', //璺宠浆鍒伴珮绾ц〃鍗曠殑鍏抽敭瀛楁鍚� + mCode: 'STD_CODE', //璺宠浆鍒伴珮绾ц〃鍗曠殑鍏抽敭瀛楁鍚嶆槧灏勫瓧娈� + IsID: false, + drawers: [{ name: 'QMS_INS_ITEM', code: 'STD_CODE', type: 'one', keyName: 'QMS_INS_ITEM' }], //drawers鏄彸杈瑰脊鍑哄鏀逛晶妗嗙殑鍚嶅瓧鍒楄〃 + }; + // 灏嗗璞¤浆鎹负JSON瀛楃涓插苟淇濆瓨鍒皊essionStorage + sessionStorage.removeItem(`${param.SessionName}_params`); + sessionStorage.setItem(`${param.SessionName}_params`, encodeURI(JSON.stringify(param))); + args[5]( + `/QMS_INS_ITEM/High/${encodeURI(JSON.stringify({ sName: param.SessionName, Name: param.Name }))}`, + ); + } + return [methods, ActionColumn]; } -- Gitblit v1.9.3