From 6e6fec028ffc9a27b3c8d30eb484cd361a119d76 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期一, 25 十一月 2024 23:53:12 +0800 Subject: [PATCH] 入库单更新 --- src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts | 78 +++++++++++++++++++++++++++++++++------ 1 files changed, 66 insertions(+), 12 deletions(-) diff --git a/src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts b/src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts index 1b01adb..542c71c 100644 --- a/src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts +++ b/src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts @@ -4,14 +4,16 @@ * @version: * @Date: 2024-06-19 20:34:27 * @LastEditors: Ben Lin - * @LastEditTime: 2024-07-31 22:23:50 + * @LastEditTime: 2024-08-20 15:03:44 */ import { DeleteLabelTemplate } from '/@/api/tigerapi/mes/label'; import { CustModalParams } from '/@/api/tigerapi/model/systemModel'; import { ActionItem, BasicColumn } from '/@/components/Table'; import { useWebSocketStore } from '/@/store/modules/websocket'; +import { useI18n } from '/@/hooks/web/useI18n'; +const { t } = useI18n(); function _default() { const ActionColumn: BasicColumn = { width: 120, @@ -98,11 +100,62 @@ */ CustFunc: (param: CustModalParams) => { const webSocketStore = useWebSocketStore(); - if (webSocketStore.GetSocketState == 1) { + if (webSocketStore.GetSocketState == 1 && param.values['TEMP_TYPE'] == 0) { webSocketStore.sendMessage( `wsSubStrings ${param.values['ID']}_#_${param.values['TEMP_PATH']}`, ); } + }, + /** + * @description: 閫夋嫨杩囩▼鍙橀噺寮瑰嚭閫夋嫨妗嗘垚鍔熻繑鍥炶祴鍊兼柟娉� + * @param {*} d + * @param {*} u + * @return {*} + */ + GetSelectSuccess: (d, u) => { + return { + LABEL_CODE: d.values['val'], + }; + }, + /** + * @description: 鎵撳紑瀹㈡埛寮瑰嚭閫夋嫨妗� + * @param {Fn} openItemModal + * @param {array} args + * @return {*} + */ + OpenSelectItem: (openItemModal: Fn, ...args) => { + openItemModal(true, { + title: '鎵撳嵃妯℃澘鍒楄〃', + schemas: [ + { + field: 'LABEL_CODE', + component: 'Input', + label: '妯℃澘缂栫爜', + colProps: { + span: 12, + }, + }, + ], + ItemColumns: [ + { + title: t('妯℃澘缂栫爜'), + dataIndex: 'LABEL_CODE', + resizable: true, + sorter: true, + width: 200, + }, + { + title: t('妯℃澘鍚嶇О'), + dataIndex: 'LABEL_NAME', + resizable: true, + sorter: true, + width: 180, + }, + ], + tableName: 'BAS_LABEL_TEMP', + rowKey: 'LABEL_CODE', + searchInfo: { TABLE_NAME: 'BAS_LABEL_TEMP' }, + }); }, }; @@ -122,6 +175,7 @@ Title: `缂栬緫妯℃澘${params['record']['LABEL_CODE']}鐨勫彉閲廯, pCode: 'LABEL_CODE', IsID: true, + ifSave: false, colSlots: params['colSlots'].value, //['BAS_LABEL_VAR1add', 'BAS_LABEL_VAR2add'], colSlotsInHigh: ['BAS_LABEL_VAR1add', 'BAS_LABEL_VAR2add'], drawers: [ @@ -131,18 +185,18 @@ type: 'one', keyName: 'BAS_LABEL_VAR', order: 'VAR_NAME', - showTbButton: false, - FnName: '', - }, - { - name: 'BAS_LABEL_VAR_WO', - code: 'LABEL_ID', - type: 'one', - keyName: 'BAS_LABEL_VAR_WO', - order: '', showTbButton: true, FnName: 'AddRow', }, + // { + // name: 'BAS_LABEL_VAR_WO', + // code: 'LABEL_ID', + // type: 'one', + // keyName: 'BAS_LABEL_VAR_WO', + // order: '', + // showTbButton: true, + // FnName: 'AddRow', + // }, ], //drawers鏄彸杈瑰脊鍑哄鏀逛晶妗嗙殑鍚嶅瓧鍒楄〃 }; // const webSocketStore = useWebSocketStore(); @@ -164,7 +218,7 @@ * @param {Fn} args * @param {*} params * @return {*} - */ + */ function Del(args: Fn[], params: {}) { const reload = args[1]; DeleteLabelTemplate(params['record']['ID']).then((action) => { -- Gitblit v1.9.3