From 226ad601bb8326814c3e94efd6f476014f6a9e66 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期四, 27 六月 2024 23:06:47 +0800 Subject: [PATCH] 产品工艺路线工序配置更新 --- src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_DTL.ts | 246 +++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 238 insertions(+), 8 deletions(-) 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 2183840..0110c1d 100644 --- a/src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_DTL.ts +++ b/src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_DTL.ts @@ -4,18 +4,18 @@ * @version: * @Date: 2024-06-19 20:34:27 * @LastEditors: Ben Lin - * @LastEditTime: 2024-06-22 22:29:28 + * @LastEditTime: 2024-06-26 03:14:01 */ import { Ref } from 'vue'; -import { DeleteEntity } from '/@/api/tigerapi/system'; +import { DeleteEntity, getEntity } from '/@/api/tigerapi/system'; import { ActionItem, BasicColumn } from '/@/components/Table'; -import { isNullOrEmpty } from '/@/utils/is'; +import { isNullOrEmpty, isNullOrUnDef } from '/@/utils/is'; import { buildUUID } from '/@/utils/uuid'; import { useUserStore } from '/@/store/modules/user'; import { formatToDateTime } from '/@/utils/dateUtil'; -function _default() { +function _default(): any[] { /** * @description: 鑷畾涔夊垹闄ゆ柟娉� * @param {Fn} args @@ -55,17 +55,20 @@ * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓� * @return {*} */ - CreateAction: () => { + CreateAction: (fnName: string) => { return { action: 'drawer', //drawer(鎵撳紑宸︿晶鎶藉眽妗�) | go(璺宠浆鍒版柊鐨勯〉闈�) }; }, /** - * @description: 浜у搧缁戝畾宸ヨ壓璺嚎鎿嶄綔瀛楁鑷畾涔夋寜閽� + * @description: 鎿嶄綔瀛楁鑷畾涔夋寜閽� * @return {*} */ ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => { - data[1].popConfirm.confirm = custDel.bind(null, args[1], params); + /* 閲嶅啓鍒犻櫎鏂规硶 */ + if (!isNullOrUnDef(data[1])) { + data[1].popConfirm.confirm = custDel.bind(null, args, params); + } return data; }, /** @@ -75,7 +78,7 @@ * @param {*} u * @return {*} */ - EditeOperation: (data: Ref<any[]>, d, u) => { + EditOperation: (data: Ref<any[]>, d, u) => { if (u.isUpdate) { //鏇存柊 var _data = data.value.map((item) => { @@ -107,6 +110,233 @@ data.value = _data2; } }, + /** + * @description: 楂樼骇琛ㄥ崟鍜岃鎯呴〉闈㈣繑鍥炰富椤甸潰鐨剈rl + * @return {*} + */ + GetHomeUrl: () => { + return `/BAS_PKG_RULE/LC/${encodeURI(JSON.stringify({ ID: 'BAS_PKG_RULE', colSlots: [], crudColSlots: [] }))}`; + }, + /** + * @description: 楂樼骇琛ㄥ崟鏄庣粏琛ㄦ牸瀛楁 + * @return {*} + */ + GetBaseColumns: () => { + return [ + { + title: '鍖呰/杞藉叿缂栫爜', + dataIndex: 'PKG_CODE', + // ifShow: false, + width: 180, + }, + { + title: '鍖呰灞傜骇', + dataIndex: 'PKG_LEVEL', + }, + { + title: '鍖呰鏁伴噺', + dataIndex: 'PKG_QTY', + }, + { + title: '鍖呰瑙勫垯ID', + dataIndex: 'PKG_RULE_ID', + ifShow: false, + }, + { + title: '澶囨敞', + dataIndex: 'REMARK', + }, + { + title: '鏇存柊鏃堕棿', + dataIndex: 'UPDATE_TIME', + }, + { + title: '鏇存柊浜�', + dataIndex: 'UPDATE_USER', + }, + ]; + }, + /** + * @description: 楂樼骇琛ㄥ崟鏌ヨ鏉′欢瀛楁 + * @return {*} + */ + GetSearchForm: () => { + return [ + { + field: 'PKG_CODE', + label: '鍖呰瑙勫垯缂栫爜', + component: 'Input', + colProps: { + span: 8, + }, + }, + ]; + }, + /** + * @description: 楂樼骇琛ㄥ崟澧炲垹鏀硅〃鍗曞瓧娈� + * @return {*} + */ + GetCrudForm: () => { + return [ + { + field: 'PKG_CODE', + label: '鍖呰/杞藉叿缂栫爜', + component: 'ApiSelect', + required: true, + colProps: { + span: 24, + }, + componentProps: { + api: getEntity, + params: { entityName: 'BAS_PKG_TYPE', sqlcmd: ' 1=1 ' }, + resultField: 'Data.Items', + labelField: 'PKG_NAME', + valueField: 'PKG_CODE', + }, + }, + { + label: '鍖呰灞傜骇', + field: 'PKG_LEVEL', + component: 'Input', + required: true, + colProps: { + span: 24, + }, + }, + { + label: '鍖呰瑙勫垯ID', + field: 'PKG_RULE_ID', + component: 'Input', + colProps: { + span: 24, + }, + dynamicDisabled: ({ values }) => { + return true; + }, + }, + { + label: '鍖呰鏁伴噺', + field: 'PKG_QTY', + component: 'Input', + colProps: { + span: 24, + }, + }, + { + label: '澶囨敞', + field: 'REMARK', + component: 'Input', + colProps: { + span: 24, + }, + }, + { + label: 'ID', + field: 'ID', + component: 'Input', + colProps: { + span: 24, + }, + show: false, + }, + ]; + }, + OthersValues: (val: string, id: string) => { + return { PKG_RULE_ID: id }; + }, + /** + * @description: 楂樼骇琛ㄥ崟涓诲熀鏈俊鎭瓧娈� + * @return {*} + */ + GetBaseForm: () => { + return [ + { + field: 'RULE_CODE', + label: '鍖呰瑙勫垯缂栫爜', + component: 'Input', + required: true, + colProps: { + span: 8, + }, + }, + { + label: '鍖呰瑙勫垯鍚嶇О', + field: 'RULE_NAME', + required: true, + component: 'Input', + colProps: { + span: 8, + }, + }, + { + label: '鏄惁鍚敤', + field: 'IS_ACTIVE', + required: true, + component: 'Select', + colProps: { + span: 8, + }, + componentProps: { + options: [ + { + label: '鍚敤', + value: 'Y', + key: 'Y', + }, + { + label: '绂佺敤', + value: 'N', + key: 'N', + }, + ], + }, + }, + { + label: '澶囨敞', + field: 'REMARK', + component: 'Input', + colProps: { + span: 8, + }, + }, + { + label: 'ID', + field: 'ID', + component: 'Input', + colProps: { + span: 8, + }, + show: false, + }, + ]; + }, + /** + * @description: 楂樼骇琛ㄥ崟涓讳俊鎭崱鐗囩敓鎴愶紝鍙互澶氫釜 + * @return {*} + */ + GetBaseCards: () => { + return [ + { + name: 'BaseForm', + slots: [], //瀹氫箟鎻掓Ы + preIcons: {}, //瀹氫箟鎻掓Ы涓寜閽浘鏍� + title: '鍖呰淇℃伅', + entityName: 'BAS_PKG_RULE', //瀹炰綋鍚嶇О + }, + ]; + }, + /** + * @description: 鑾峰彇鏍囬淇℃伅 + * @param {string} type + * @return {*} + */ + GetTitle: () => { + return { + pageTitle: '鍖呰瑙勫垯绠$悊', + pageContent: '杩欓噷鍙互娣诲姞鍜屼慨鏀瑰寘瑁呰鍒欏拰鍖呰淇℃伅銆�', + baseTableTitle: '鍖呰淇℃伅绠$悊', + }; + }, }; return [methods, ActionColumn]; -- Gitblit v1.9.3