From 8cae1dcd8d2bde01880ac4b70bdda4e61df3c7ef Mon Sep 17 00:00:00 2001 From: YangYuGang <1378265336@qq.com> Date: 星期六, 08 三月 2025 12:46:26 +0800 Subject: [PATCH] 送货单(U9) --- src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN_SN.ts | 0 src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN.ts | 599 +++++++++++++++++++++++++++++++++++++ src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN_DTL.ts | 321 ++++++++++++++++++++ 3 files changed, 920 insertions(+), 0 deletions(-) diff --git a/src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN.ts b/src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN.ts new file mode 100644 index 0000000..22dd283 --- /dev/null +++ b/src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN.ts @@ -0,0 +1,599 @@ +/* + * @Description: U9閫佽揣鍗� + * @Author: Ben Lin + * @version: + * @Date: 2024-06-19 20:34:27 + * @LastEditors: Ben Lin + * @LastEditTime: 2024-10-23 20:48:14 + */ + +import { Ref, h, ref, render, unref } from 'vue'; +import { GetEnum, SaveEntity, convertToTree, getEntity } from '/@/api/tigerapi/system'; +import { useLocale } from '/@/locales/useLocale'; +import { useI18n } from '/@/hooks/web/useI18n'; +import { useMessage } from '/@/hooks/web/useMessage'; +import { useModal } from '/@/components/Modal'; +import { ActionItem, BasicColumn, FormSchema } from '/@/components/Table'; +import { useUserStore } from '/@/store/modules/user'; +import { buildUUID } from '/@/utils/uuid'; +import { SaveWoBatchInput } from '/@/api/tigerapi/model/mesModel'; +import { CustModalParams, FunctionType } from '/@/api/tigerapi/model/systemModel'; +import { SaveMesBatchWo } from '/@/api/tigerapi/mes/wo'; +import { useForm } from '/@/components/Form/index'; +import { cloneDeep } from 'lodash-es'; +import { useProdRouteStore } from '/@/store/modules/prodRoute'; +import { Tag, Tooltip } from 'ant-design-vue'; + +const { t } = useI18n(); +const { createErrorModal } = useMessage(); +const { getLocale } = useLocale(); +function _default() { + const ActionColumn: BasicColumn = { + width: 180, + title: '鎿嶄綔', + dataIndex: 'action', + slots: { customRender: 'action' }, + fixed: 'right', + }; + /** + * @description: 宸ュ崟绠$悊鐨勪竴浜涜嚜瀹氫箟鏂规硶 + * @return {*} + */ + const methods = { + /** + * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓� + * @return {*} + */ + CreateAction: (type: string, fnName: string) => { + return { + action: 'drawer', //drawer(鎵撳紑宸︿晶鎶藉眽妗�) | go(璺宠浆鍒版柊鐨勯〉闈�) + }; + }, + /** + * @description: 鎿嶄綔瀛楁鑷畾涔夋寜閽� + * @return {*} + */ + ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => { + data.map((x) => { + if (x.name == 'goDetail') { + x.onClick = goDetail.bind(null, args[5], params); + x.tooltip = '宸ュ崟鎵规'; + } + }); + return data; + }, + GetUseForm: () => { + return { + forminfo: useForm({ + labelWidth: 120, + schemas: woformSchema, + actionColOptions: { + span: 24, + }, + showActionButtonGroup: false, + }), + woinfo: useForm({ + labelWidth: 120, + schemas: woCfgformSchema, + actionColOptions: { + span: 24, + }, + showActionButtonGroup: false, + }), + prodinfo: useForm({ + labelWidth: 120, + schemas: prodCfgformSchema, + actionColOptions: { + span: 24, + }, + showActionButtonGroup: false, + }), + tmpinfo: useForm({ + labelWidth: 120, + schemas: prodCfgformSchema, + actionColOptions: { + span: 24, + }, + showActionButtonGroup: false, + }), + }; + }, + /** + * @description: 鑷畾涔夋柟娉� + * @param {string} type + * @param {array} args + * @return {*} + */ + CustFunc: (param: CustModalParams) => { + switch (param.cType) { + case 'BIZ_MES_WO': + case 'BIZ_MES_WO_Config': + return getWoFns[param.FnName](param) as Promise<any>; + // break; + default: + return new Promise((resolve, reject) => { + try { + (e) => {}; + resolve(true); + } catch { + reject(false); + } finally { + // args[0][0]({ confirmLoading: false }); + } + }); + // break; + } + }, + /** + * @description: 鑾峰彇澶氳〃鍗曟彃妲藉垪琛� + * @return {*} + */ + GetDtlSlots: (type: string) => { + let result = [] as any[]; + switch (type) { + case 'BIZ_MES_WO_Config': + result = [ + { name: 'woinfo', slots: [], preIcons: {}, title: '宸ュ崟淇℃伅' }, + { + name: 'prodinfo', + slots: ['addRot', 'setRot'], + preIcons: { addRot: 'search|svg', setRot: 'config|svg' }, + title: '浜у搧淇℃伅', + }, + { name: 'rotinfo', slots: ['add'], preIcons: { add: 'search|svg' }, title: '宸ヨ壓淇℃伅' }, + ]; + break; + case 'BIZ_MES_WO': + result = [ + { + name: 'forminfo', + slots: ['add', 'set'], + preIcons: { add: 'search|svg', set: 'config|svg' }, //濡傛灉鏄涓〃鍗曪紝澧炲姞澶氫釜鎻掓Ы銆俿lots鏄脊鍑烘鎸夐挳鐨勬彃妲斤紝preIcons鏄彃妲藉搴旂殑鎸夐挳鍥炬爣 + title: '涓嬪彂閰嶇疆', + }, + ]; + break; + } + return result; + }, + /** + * @description: 鑾峰彇妯℃�佹搴旂敤鍒楄〃 + * @return {*} + */ + GetUseModals: () => { + return { + useModalData: { + add: useModal(), + set: useModal(), + addRot: useModal(), + setRot: useModal(), + }, + }; + }, + /** + * @description: 鑾峰彇鑷畾涔夋暟鎹� + * @return {*} + */ + GetCustData: () => { + return { + isCustEl: { + forminfo: false, + woinfo: false, + prodinfo: false, + rotinfo: true, + }, + }; + }, + /** + * @description: 寮瑰嚭閫夋嫨妗嗛�夋嫨鎴愬姛杩斿洖鏂规硶 + * @param {*} d + * @param {*} u + * @return {*} + */ + GetSelectSuccess: (d, u) => { + return { + ROUTE_CODE: d.values['val'], + // ID: d.values['id'], + ROT_ID: d.values['id'], + }; + }, + /** + * @description: 鎵撳紑寮瑰嚭閫夋嫨妗� + * @param {Fn} openItemModal + * @param {array} args + * @return {*} + */ + OpenSelectItem: (openItemModal: Fn, ...args) => { + const slotName = args[0]; + const openRvModal = args[1]; + const selectVals = args[2]; + switch (slotName) { + case 'addRot': + case 'add': + openItemModal(true, { + title: '宸ヨ壓璺嚎鍒楄〃', + schemas: [ + { + field: 'ROT_CODE', + component: 'Input', + label: '宸ヨ壓璺嚎缂栫爜', + colProps: { + span: 12, + }, + }, + ], + ItemColumns: [ + { + title: t('宸ヨ壓璺嚎缂栫爜'), + dataIndex: 'ROT_CODE', + resizable: true, + sorter: true, + width: 200, + }, + { + title: t('宸ヨ壓璺嚎鍚嶇О'), + dataIndex: 'ROT_NAME', + resizable: true, + sorter: true, + width: 180, + }, + ], + tableName: 'MES_ROUTE', + rowKey: 'ROT_CODE', + returnFieldName: ['ROUTE_CODE', 'ROT_ID'], //杩斿洖鍊艰璧嬪�肩殑瀛楁鍚嶇О + searchInfo: { TABLE_NAME: 'MES_ROUTE' }, + }); + break; + case 'set': + openRvModal(true, { rotId: selectVals.value['ROUTE_CODE'], slotName: slotName }); + break; + case 'setRot': + break; + } + }, + /** + * @description: 鑾峰彇鏍囬淇℃伅 + * @param {string} type + * @return {*} + */ + GetTitle: () => { + return { + importTitle: '宸ュ崟璁″垝瀵煎叆' /* 鎵撳紑妯℃�佺獥鍙f樉绀虹殑鏍囬 */, + }; + }, + }; + + /* 浠ヤ笅鏄唴閮ㄦ柟娉曪紝涓峞xport锛屼緵涓婇潰鐨勬柟娉曡皟鐢� */ + + /** + * @description: 鑷畾涔夋柟娉� + * @return {*} + */ + const getWoFns: Record<string, FunctionType> = { + /** + * @description: 宸ュ崟閰嶇疆淇濆瓨鏂规硶 + * @param {*} e + * @param {array} args + * @return {*} + */ + SaveCofig: (param: CustModalParams) => { + return new Promise((resolve, reject) => { + try { + const form = param.values['prodinfo']; + const wo = param.values['mValues']; + const _wo = cloneDeep(wo); + _wo.ROUTE_STATUS = 1; + _wo.ROUTE_CODE = form.ROUTE_CODE; + SaveEntity(_wo, true, 'BIZ_MES_WO').then((action) => { + if (action.IsSuccessed) { + SP_MES_PROD2WO({ rotId: form.ROT_ID, wo: wo.ORDER_NO }).then((res) => { + if (!res.IsSuccessed) { + SaveEntity(wo, true, 'BIZ_MES_WO'); + } + resolve(res); + }); + } else { + reject(action); + } + }); + } catch { + reject(false); + } + }); + }, + /** + * @description: 宸ュ崟涓嬪彂淇濆瓨鏂规硶 + * @param {CustModalParams} param + * @return {*} + */ + SaveWoBatch: (param: CustModalParams) => { + return new Promise((resolve, reject) => { + try { + const form = param.values['forminfo']; + const wo = param.values['mValues']; + wo.STATUS = wo.STATUS == 3 ? wo.STATUS : 2; + let input: SaveWoBatchInput = { + Wo: wo, + WoBatch: { + ID: buildUUID(), + CREATE_TIME: new Date(), + CREATE_USER: useUserStore().getUserInfo.userId as string, + UPDATE_TIME: new Date(), + UPDATE_USER: useUserStore().getUserInfo.userId as string, + GHOST_ROW: false, + AUTH_ORG: useUserStore().getUserInfo.orgCode, + AUTH_PROD: useUserStore().getUserInfo.prodCode as string, + AUTH_WH: '', + ORDER_NO: wo.ORDER_NO, + STATUS: wo.STATUS, + ITEM_CODE: wo.ITEM_CODE, + CUST_CODE: wo.CUST_CODE, + FACTORY: wo.FACTORY, + WS_CODE: wo.WS_CODE, + ACT_LINE: form.ACT_LINE, + STD_WORKER_QTY: wo.STD_WORKER_QTY, + ACT_WORKER_QTY: wo.ACT_WORKER_QTY, + RELEASE_TIME: new Date(), + RELEASE_USER: useUserStore().getUserInfo.userId as string, + PLAN_QTY: form.RELEASE_QTY, + INPUT_QTY: wo.INPUT_QTY, + OUTPUT_QTY: wo.OUTPUT_QTY, + SCRAP_QTY: wo.SCRAP_QTY, + STOCK_IN_QTY: wo.STOCK_IN_QTY, + UPH: wo.UPH, + UPPH: wo.UPPH, + REMARK: wo.REMARK, + ACT_START_TIME: wo.ACT_START_TIME, + ACT_END_TIME: wo.ACT_END_TIME, + BATCH_NO: '', + }, + IfToCust: form.IfToCust, + }; + SaveMesBatchWo(input).then((action) => { + resolve(action); + }); + } catch { + reject(false); + } + }); + }, + initRoute: () => {}, + }; + + /** + * @description: 璺宠浆鍒拌鎯呴〉闈㈡柟娉� + * @param {Fn} go + * @return {*} + */ + function goDetail(go: Fn, params: Recordable) { + const id = { + ID: params['record'].ID, + CODE: params['record']['ORDER_NO'], + Name: 'BIZ_U9_ASN_DTL', + firstTabName: '閫佽揣鍗�(U9)', + secondTabName: '閫佽揣鍗昐N', //'鏍囩杩囩▼鍙橀噺', + firstTitle: '鏄庣粏', + secondTitle: '', //'杩囩▼鍙橀噺', + pageTitle: '閫佽揣鍗�(U9)璇︽儏', //璇︽儏椤甸潰鏍囬 + contentStr: '杩欓噷鏄�佽揣鍗�(U9)鏄庣粏绠$悊椤甸潰锛屽彲浠ユ樉绀洪�佽揣鍗�(U9)鐨勬墍鏈夋壒娆¤鎯�', + detailName: `閫佽揣鍗昜${params['record'].ORDER_NO}]鎵规璇︽儏`, + keyFieldValues: { ORDER_NO: params['record']['ORDER_NO'] }, + colSlots: params['colSlots'].value, + SessionName: 'BIZ_U9_ASN_DTL_update', + ifSave: false, + }; + // 灏嗗璞¤浆鎹负JSON瀛楃涓插苟淇濆瓨鍒皊essionStorage + sessionStorage.removeItem(`${id.SessionName}_params`); + sessionStorage.setItem(`${id.SessionName}_params`, encodeURI(JSON.stringify(id))); + go(`/BIZ_U9_ASN_DTL/${encodeURI(JSON.stringify({ sName: id.SessionName, Name: id.Name }))}`); + } + + + + + const woformSchema: FormSchema[] = [ + { + field: 'PLAN_QTY', + label: '宸ュ崟鏁伴噺', + component: 'Input', + required: true, + colProps: { + span: 24, + }, + dynamicDisabled: ({ values }) => { + return true; + }, + }, + { + field: 'RELEASE_QTY', + label: '宸ュ崟涓嬪彂鏁伴噺', + component: 'Input', + required: true, + colProps: { + span: 24, + }, + }, + { + label: '瀹為檯浜х嚎', + field: 'ACT_LINE', + component: 'ApiSelect', + required: true, + colProps: { + span: 24, + }, + componentProps: { + api: getEntity, + params: { entityName: 'MES_LINE', sqlcmd: ' 1=1 ', order: '' }, + resultField: 'Data.Items', + labelField: 'LINE_NAME', + valueField: 'LINE_CODE', + }, + }, + { + field: 'IfToCust', + component: 'Switch', + label: '鏄惁淇濆瓨宸ヨ壓璺嚎鍒板鎴�', + defaultValue: true, + colProps: { + span: 8, + }, + labelWidth: 200, + }, + // { + // label: '宸ヨ壓璺嚎', + // field: 'ROUTE_CODE', + // component: 'Input', + // required: true, + // colProps: { + // span: 22, + // }, + // }, + // { + // field: 'add', + // component: 'Input', + // label: '1', + // colSlot: 'add', + // defaultValue: 'MES_ROUTE', + // colProps: { + // span: 1, + // }, + // }, + // { + // field: 'set', + // component: 'Input', + // label: '1', + // colSlot: 'set', + // defaultValue: 'MES_ROUTE', + // colProps: { + // span: 1, + // }, + // }, + ]; + + const woCfgformSchema: FormSchema[] = [ + { + field: 'ORDER_NO', + component: 'Input', + label: '宸ュ崟鍙�', + colProps: { + span: 8, + }, + componentProps: { + placeholder: '璇疯緭鍏ュ伐鍗曞彿', + onChange: (e: any) => { + console.log(e); + }, + }, + dynamicDisabled: true, + }, + { + field: 'ORDER_TYPE', + component: 'ApiSelect', + label: '宸ュ崟绫诲瀷', + colProps: { + span: 8, + }, + defaultValue: 0, + componentProps: { + api: GetEnum, + params: { name: 'BIZ_MES_WO+ORDER_TYPEs' }, + resultField: 'Data', + labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name', + valueField: 'Value', + placeholder: '璇烽�夋嫨宸ュ崟绫诲瀷', + }, + dynamicDisabled: true, + }, + { + field: 'PLAN_QTY', + component: 'Input', + label: '璁″垝鏁伴噺', + colProps: { + span: 8, + }, + dynamicDisabled: true, + }, + ]; + + const prodCfgformSchema: FormSchema[] = [ + { + field: 'ITEM_CODE', + component: 'Input', + label: '鐗╂枡缂栫爜', + required: true, + colProps: { + span: 12, + }, + componentProps: { + placeholder: '璇疯緭鍏ョ墿鏂欑紪鐮�', + onChange: (e: any) => { + console.log(e); + }, + }, + dynamicDisabled: true, + }, + { + field: 'ITEM_TYPE', + component: 'Input', + label: '鐗╂枡绫诲瀷', + colProps: { + span: 12, + }, + }, + { + label: '宸ヨ壓璺嚎', + field: 'ROUTE_CODE', + component: 'Input', + required: true, + colProps: { + span: 12, + }, + }, + { + field: 'addRot', + component: 'Input', + label: '1', + colSlot: 'addRot', + defaultValue: 'MES_ROUTE', + colProps: { + span: 1, + }, + }, + { + field: 'setRot', + component: 'Input', + label: '1', + colSlot: 'setRot', + defaultValue: 'MES_ROUTE', + colProps: { + span: 1, + }, + }, + { + label: '宸ヨ壓璺嚎', + field: 'ROT_ID', + component: 'Input', + show: false, + colProps: { + span: 12, + }, + }, + // { + // field: 'fieldsc', + // component: 'Upload', + // label: '鎵撳嵃妯℃澘', + // colProps: { + // span: 10, + // }, + // rules: [{ required: true, message: '璇烽�夋嫨涓婁紶鏂囦欢' }], + // componentProps: { + // api: uploadApi, + // multiple: false, + // }, + // }, + ]; + + return [methods, ActionColumn]; +} + +export default _default; diff --git a/src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN_DTL.ts b/src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN_DTL.ts new file mode 100644 index 0000000..4ba3a7f --- /dev/null +++ b/src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN_DTL.ts @@ -0,0 +1,321 @@ +/* + * @Description: 閫佽揣鍗�(U9)鏄庣粏 + * @Author: Ben Lin + * @version: + * @Date: 2024-06-19 20:34:27 + * @LastEditors: Ben Lin + * @LastEditTime: 2024-09-29 21:28:37 + */ + +import { Tag, Tooltip } from 'ant-design-vue'; +import { ActionItem, BasicColumn, FormSchema } from '/@/components/Table'; +import { useI18n } from '/@/hooks/web/useI18n'; +import { h } from 'vue'; +import { getEntity, SaveEntity } from '/@/api/tigerapi/system'; +import { useLocale } from '/@/locales/useLocale'; +import { useModal } from '/@/components/Modal'; +import { CustModalParams, FunctionType } from '/@/api/tigerapi/model/systemModel'; +import { useForm } from '/@/components/Form'; +import { useMessage } from '/@/hooks/web/useMessage'; +import { UpdateWoBatchStatus } from '/@/api/tigerapi/mes/wo'; +import { useUserStore } from '/@/store/modules/user'; +import { formatToDateTime } from '/@/utils/dateUtil'; + +const { getLocale } = useLocale(); +const { createMessage, createErrorModal } = useMessage(); +const { t } = useI18n(); + +function _default() { + const ActionColumn: BasicColumn = { + width: 180, + title: '鎿嶄綔', + dataIndex: 'action', + slots: { customRender: 'action' }, + fixed: 'right', + }; + + /** + * @description: 涓�浜涜嚜瀹氫箟鏂规硶 + * @return {*} + */ + const methods = { + /** + * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓猴紝蹇呴渶瑕佹湁鐨勬柟娉� + * @return {*} + */ + CreateAction: (type: string) => { + return { + action: 'drawer', //drawer(鎵撳紑宸︿晶鎶藉眽妗�) | go(璺宠浆鍒版柊鐨勯〉闈�) + }; + }, + /** + * @description: 浜у搧缁戝畾宸ヨ壓璺嚎鎿嶄綔瀛楁鑷畾涔夋寜閽紝蹇呴渶瑕佹湁鐨勬柟娉� + * @return {*} + */ + ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => { + data.map((x) => { + // if (x.name == 'handlePause') { + // x.onClick = handlePause.bind(null, args, params); + // x.color = 'error'; + // x.tooltip = '鏆傚仠'; + // } + // if (x.name == 'handleStart') { + // x.onClick = handleStart.bind(null, args, params); + // x.tooltip = '鍙栨秷鏆傚仠'; + // } + // if (x.name == 'handleRelease') { + // x.onClick = handleRelease.bind(null, args, params); + // x.tooltip = '涓嬪彂'; + // } + // if (x.name == 'handleUnRelease') { + // x.onClick = handleUnRelease.bind(null, args, params); + // x.tooltip = '鍙栨秷涓嬪彂'; + // } + }); + return data; + }, + /** + * @description: 楂樼骇琛ㄥ崟鍜岃鎯呴〉闈㈣繑鍥炰富椤甸潰鐨剈rl + * @return {*} + */ + GetHomeUrl: (params: {}) => { + return `/BIZ_U9_ASN/LC/${encodeURI(JSON.stringify({ ID: 'BIZ_U9_ASN',"EntityName":"BIZ_U9_ASN", colSlots: params['colSlots'], crudColSlots: [] }))}`; + }, + GetBaseColumns: () => { + return [ + { + dataIndex: 'ORDER_NO', + title: '鍗曟嵁鍙�', + // ifShow: false, + sorter: true, + resizable: true, + }, + // { + // dataIndex: 'BATCH_NO', + // title: '宸ュ崟鎵规鍙�', + // ifShow: true, + // sorter: true, + // resizable: true, + // customRender: () => {}, + // }, + { + dataIndex: 'STATUS', + title: '鐘舵��', + ifShow: true, + sorter: true, + resizable: true, + customRender: ({ record }) => { + let color = ''; + let text = ''; + switch ( + record.STATUS //鐘舵��(0Init鍒濆鍖東1Imported宸插鍏2Release宸蹭笅鍙憒3Working鐢熶骇涓瓅4Paused宸叉殏鍋渱5Closed宸插叧闂�) + ) { + case 0: + text ='鍒濆鍖�'; + color = '#8a8a8a'; + break; + case 1: + text = '宸插鍏�';color = 'blue'; + break; + case 2: + text = '宸查�佽揪';color = 'green'; + break; + case 3: + text = '娓呯偣涓�';color = 'orange'; + break; + case 4: + text = '涓婃灦涓�';color = 'red'; + break; + case 5: + text = '寰呭鏍�';color = '#e1822c'; + break; + case 6: + text = '宸插畬鎴�';color = '#009966'; + break; + case 7: + text = '宸蹭綔搴�';color = '#CCCCCC'; + break; + } + return h(Tooltip, { title: text }, () => h(Tag, { color: color }, () => text)); + }, + }, + { + dataIndex: 'SUPP_CODE', + title: '渚涘簲鍟嗙紪鐮�', + ifShow: true, + sorter: true, + resizable: true, + }, + { + dataIndex: 'SUPP_NAME', + title: '渚涘簲鍟嗗悕绉�', + ifShow: true, + sorter: true, + resizable: true, + }, + { + dataIndex: 'ORDER_DATE', + title: '鍗曟嵁鏃ユ湡', + ifShow: true, + sorter: true, + resizable: true, + }, + { + dataIndex: 'DELIVERY_DATE', + title: '閫佽揣鏃ユ湡', + ifShow: true, + sorter: true, + resizable: true, + }, + { + dataIndex: 'PLANARRIVED_DATE', + title: '棰勮閫佽揪鏃ユ湡', + ifShow: true, + sorter: true, + resizable: true, + }, + { + dataIndex: 'RECEIVER', + title: '鏀惰揣浜�', + ifShow: true, + sorter: true, + resizable: true, + }, + { + dataIndex: 'RECEIVE_DATE', + title: '鏀惰揣鏃ユ湡', + ifShow: true, + sorter: true, + resizable: true, + }, + { + dataIndex: 'REMARK', + title: '澶囨敞', + ifShow: true, + sorter: true, + resizable: true, + }, + ]; + }, + GetSearchForm: () => { + return [ + { + field: 'ORDER_NO', + label: t('鍗曟嵁鍙�'), + colProps: { span: 8 }, + component: 'Input', + }, + ]; + }, + GetCrudForm: () => { + return []; + }, + KeyFieldValues: (val: string, id: string) => { + return { ORDER_NO: val }; + }, + GetUseForm: () => { + return { + forminfo: useForm({ + labelWidth: 120, + schemas: [], //woformSchema, + actionColOptions: { + span: 24, + }, + showActionButtonGroup: false, + }), + }; + }, + /** + * @description: 鑷畾涔夋柟娉� + * @param {string} type + * @param {array} args + * @return {*} + */ + CustFunc: (param: CustModalParams) => { + // switch (param.cType) { + // case 'BIZ_U9_ASN_DTL': + // return getWoFns[param.FnName](param) as Promise<any>; + // break; + // default: + // return new Promise((resolve, reject) => { + // try { + // (e) => {}; + // resolve(true); + // } catch { + // reject(false); + // } finally { + // // args[0][0]({ confirmLoading: false }); + // } + // }); + // // break; + // } + }, + /** + * @description: 鑾峰彇澶氳〃鍗曟彃妲藉垪琛� + * @return {*} + */ + GetDtlSlots: (type: string) => { + let result = [] as any[]; + switch (type) { + case 'BIZ_MES_WO_BATCH': + result = [ + { + name: 'forminfo', + slots: ['add', 'set'], + preIcons: { add: 'search|svg', set: 'config|svg' }, //濡傛灉鏄涓〃鍗曪紝澧炲姞澶氫釜鎻掓Ы銆俿lots鏄脊鍑烘鎸夐挳鐨勬彃妲斤紝preIcons鏄彃妲藉搴旂殑鎸夐挳鍥炬爣 + title: '涓嬪彂閰嶇疆', + }, + ]; + break; + } + return result; + }, + /** + * @description: 鑾峰彇妯℃�佹搴旂敤鍒楄〃 + * @return {*} + */ + GetUseModals: () => { + return { + useModalData: { + add: useModal(), + set: useModal(), + addRot: useModal(), + setRot: useModal(), + }, + }; + }, + /** + * @description: 寮瑰嚭閫夋嫨妗嗛�夋嫨鎴愬姛杩斿洖鏂规硶 + * @param {*} d + * @param {*} u + * @return {*} + */ + GetSelectSuccess: (d, u) => { + return { + ROUTE_CODE: d.values['val'], + // ID: d.values['id'], + ROT_ID: d.values['id'], + }; + }, + /** + * @description: 鎵撳紑寮瑰嚭閫夋嫨妗� + * @param {Fn} openItemModal + * @param {array} args + * @return {*} + */ + OpenSelectItem: (openItemModal: Fn, ...args) => { + const slotName = args[0]; + switch (slotName) { + case 'addRot': + break; + } + }, + }; + + /* 浠ヤ笅鏄唴閮ㄦ柟娉曪紝涓峞xport锛屼緵涓婇潰鐨勬柟娉曡皟鐢� */ + + + return [methods, ActionColumn]; +} + +export default _default; diff --git a/src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN_SN.ts b/src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN_SN.ts new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/views/tigerprojects/system/lowcode/entityts/BIZ_U9_ASN_SN.ts -- Gitblit v1.9.3