| | |
| | | export interface EntityCustFunctionType { |
| | | CreateAction: (fnName: string) => {}; |
| | | ActionItem: (params: Recordable<any>, data, ...args) => ActionItem[]; |
| | | EditeOperation: (data: Ref<any[]>, d, u) => void; |
| | | EditOperation: (data: Ref<any[]>, d, u) => void; |
| | | OpenSelectItem: (openItemModal: Fn, ...args) => void; |
| | | GetSelectSuccess: (d, u, ...args) => {}; |
| | | GetHomeUrl: () => string; |
| | | GetBaseColumns: () => []; |
| | | GetSearchForm: () => []; |
| | |
| | | GetBaseForm: () => []; |
| | | GetBaseCards: () => []; |
| | | OthersValues: (val: string, id: string) => {} |
| | | GetTitle: () => {}; |
| | | GetCrudColSlots: () => []; |
| | | nodeChange: ({}) => void, |
| | | CreateIcon: (params: Recordable<any>) => string; |
| | | } |
| | |
| | | * @version: |
| | | * @Date: 2024-06-20 12:13:27 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-25 00:07:08 |
| | | * @LastEditTime: 2024-06-26 16:00:06 |
| | | --> |
| | | <template> |
| | | <Card title="æ·»å å·¥èº"> |
| | |
| | | import { useTabs } from '/@/hooks/web/useTabs'; |
| | | import { useMessage } from '/@/hooks/web/useMessage'; |
| | | |
| | | const objParams = inject('objParams') as Ref<any>; |
| | | const custImport = ref<any[]>(await import(`../entityts/${objParams.value['Name']}.ts`)); |
| | | const [{ EditeOperation, GetBaseColumns, GetSearchForm, GetCrudForm, OthersValues }] = |
| | | custImport.value['default'](); |
| | | const { refreshPage } = useTabs(); |
| | | const { createErrorModal } = useMessage(); |
| | | // const props = defineProps({ |
| | | // prodCode: { type: String }, |
| | | // }); |
| | | const { t } = useI18n(); |
| | | const [register, { openModal }] = useModal(); |
| | | interface NavItem { |
| | |
| | | url: string; |
| | | action: string; |
| | | } |
| | | const Prod_Code = inject('prodCode') as Ref<string>; |
| | | |
| | | // watch( |
| | | // () => Prod_Code, |
| | |
| | | url: '/addCustomer', |
| | | action: 'addCustomer', |
| | | }, |
| | | // { |
| | | // title: 'éå®åºåºå', |
| | | // icon: 'Out|svg', |
| | | // color: '#e18525', |
| | | // url: '/saleoutorder', |
| | | // }, |
| | | // { |
| | | // title: 'å®å·¥å
¥åºå', |
| | | // icon: 'In|svg', |
| | | // color: '#3fb27f', |
| | | // url: '/finishedwarehouse', |
| | | // }, |
| | | // { |
| | | // title: 'ç产éæå', |
| | | // icon: 'materialret|svg', |
| | | // color: '#4daf1bc9', |
| | | // url: '/materialret', |
| | | // }, |
| | | // { |
| | | // title: 'çç¹å', |
| | | // icon: 'inventory|svg', |
| | | // color: '#00d8ff', |
| | | // url: '/inventory', |
| | | // }, |
| | | // { |
| | | // title: 'è°æ¨å', |
| | | // icon: 'transfer|svg', |
| | | // color: '#00d8ff', |
| | | // url: '/transfer', |
| | | // }, |
| | | // { |
| | | // title: '宿¶åºå', |
| | | // icon: 'WmsItem|svg', |
| | | // color: '#00d8ff', |
| | | // url: '/WmsItem', |
| | | // }, |
| | | ]; |
| | | function changeItem(action) { |
| | | openModal(true, { |
| | |
| | | * @return {*} |
| | | */ |
| | | async function handleSuccess(d, u) { |
| | | if (isNullOrEmpty(Prod_Code.value)) { |
| | | if (isNullOrEmpty(objParams.value['CODE'])) { |
| | | createErrorModal({ |
| | | title: t('sys.api.errorTip'), |
| | | content: '产å为空ï¼ä¸è½æ·»å å·¥èºè·¯çº¿ï¼è¯·ç¹å»å·¦ä¾§éæ©äº§å', |
| | |
| | | var i; |
| | | for (i = 0; i < codes.length; i++) { |
| | | if (d.which == 'addRoute') { |
| | | await RouteToProd({ rotId: codes[i], prodCode: Prod_Code.value }); |
| | | await RouteToProd({ rotId: codes[i], prodCode: objParams.value['CODE'] }); |
| | | } else { |
| | | await RouteToCust({ rotId: codes[i], prodCode: Prod_Code.value, custCode: '' }); |
| | | await RouteToCust({ rotId: codes[i], prodCode: objParams.value['CODE'], custCode: '' }); |
| | | } |
| | | } |
| | | |
| | |
| | | * @version: |
| | | * @Date: 2024-06-24 23:44:31 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-25 21:34:33 |
| | | * @LastEditTime: 2024-06-26 18:45:42 |
| | | --> |
| | | <template> |
| | | <Card title="è¡ä¸ºé
ç½®"> |
| | |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import { Ref, inject, nextTick, onMounted, ref, unref, watch } from 'vue'; |
| | | import { BasicForm, FormSchema, useForm } from '/@/components/Form/index'; |
| | | import { BasicForm, useForm } from '/@/components/Form/index'; |
| | | import { Card } from 'ant-design-vue'; |
| | | import { useModal } from '/@/components/Modal'; |
| | | import GeneralModal from '/@/views/components/GeneralModal.vue'; |
| | | import { useUserStore } from '/@/store/modules/user'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { GetEnum, getEntity } from '/@/api/tigerapi/system'; |
| | | import { useLocale } from '/@/locales/useLocale'; |
| | | import { isNullOrEmpty } from '/@/utils/is'; |
| | | import { isNullOrUnDef } from '/@/utils/is'; |
| | | import { EntityCustFunctionType } from '/@/api/tigerapi/model/basModel'; |
| | | |
| | | const { t } = useI18n(); |
| | | const { getLocale } = useLocale(); |
| | | const emit = defineEmits(['success', 'register']); |
| | | const [registerItemAdd, { openModal: openItemModal }] = useModal(); |
| | | const Prod_Code = inject('prodCode') as Ref<string>; |
| | | const ACT_ID = inject('actionCode') as Ref<string>; |
| | | const Cust_Code = inject('custCode') as Ref<string>; |
| | | const crudColSlots = ref<any>([ |
| | | 'scanadd', |
| | | 'assyadd', |
| | | 'testadd', |
| | | 'auditadd', |
| | | 'printadd', |
| | | 'pkgadd', |
| | | const objParams = inject('objParams') as Ref<any>; |
| | | const custImport = ref<any[]>([]); |
| | | const EntityCustFunction = ref([ |
| | | { |
| | | ActionItem(params, data, ...args) {}, |
| | | EditOperation(data, d, u) {}, |
| | | GetBaseColumns() {}, |
| | | GetSearchForm() {}, |
| | | GetCrudForm() {}, |
| | | GetCrudColSlots(val, id) {}, |
| | | OpenSelectItem(openItemModal: Fn, ...args) {}, |
| | | GetSelectSuccess(d, u, ...args) {}, |
| | | nodeChange(params: { |
| | | resetFields: any; |
| | | setFieldsValue: any; |
| | | objParams: Ref<any>; |
| | | selectedNodes: Ref<any[]>; |
| | | }) {}, |
| | | } as EntityCustFunctionType, |
| | | ]); |
| | | /* 卿importå®ä½å.tsçèªå®ä¹æ¹æ³ */ |
| | | try { |
| | | custImport.value = await import(`../entityts/${objParams.value['Name']}.ts`); |
| | | } catch (e) {} |
| | | const [{ GetCrudForm, GetCrudColSlots, nodeChange, OpenSelectItem, GetSelectSuccess }] = |
| | | isNullOrUnDef(custImport.value['default']) |
| | | ? EntityCustFunction.value |
| | | : custImport.value['default'](); |
| | | const crudColSlots = ref<any>(GetCrudColSlots()); |
| | | |
| | | const isNormal = (type: number) => type === 0; |
| | | const isScan = (type: number) => type === 1; |
| | | const isAssy = (type: number) => type === 2; |
| | | const isTest = (type: number) => type === 3; |
| | | const isAudit = (type: number) => type === 4; |
| | | const isPrint = (type: number) => type === 5; |
| | | const isPackage = (type: number) => type === 6; |
| | | const formSchema: FormSchema[] = [ |
| | | { |
| | | field: 'PROD_CODE', |
| | | label: '产åç¼ç ', |
| | | component: 'Input', |
| | | dynamicDisabled: ({ values }) => { |
| | | return true; |
| | | }, |
| | | colProps: { span: 12 }, |
| | | }, |
| | | { |
| | | field: 'ID', |
| | | label: 'ID', |
| | | component: 'Input', |
| | | show: false, |
| | | }, |
| | | { |
| | | field: 'CUST_CODE', |
| | | label: '客æ·ç¼ç ', |
| | | component: 'Input', |
| | | dynamicDisabled: ({ values }) => { |
| | | return true; |
| | | }, |
| | | colProps: { span: 12 }, |
| | | }, |
| | | { |
| | | field: 'ACT_TYPE', |
| | | label: 'è¡ä¸ºç±»å', |
| | | component: 'ApiSelect', |
| | | colProps: { span: 12 }, |
| | | defaultValue: 0, |
| | | componentProps: { |
| | | api: GetEnum, |
| | | params: { name: 'MES_PROD_ACTION+ACT_TYPEs' }, |
| | | resultField: 'Data', |
| | | labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name', |
| | | valueField: 'Value', |
| | | // onChange: (e, v) => { |
| | | // alert(e) |
| | | // console.log('ApiSelect====>:', e, v); |
| | | // }, |
| | | }, |
| | | }, |
| | | { |
| | | field: 'IS_ACTIVE', |
| | | label: 'æ¯å¦å¯ç¨', |
| | | required: true, |
| | | component: 'Select', |
| | | colProps: { span: 12 }, |
| | | componentProps: { |
| | | options: [ |
| | | { |
| | | label: 'æ¯', |
| | | value: 'Y', |
| | | key: 'Y', |
| | | }, |
| | | { |
| | | label: 'å¦', |
| | | value: 'N', |
| | | key: 'N', |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | { |
| | | field: 'RULE_CODE', |
| | | label: 'æ«ç éªè¯', |
| | | component: 'Input', |
| | | colProps: { span: 10 }, |
| | | ifShow: ({ values }) => isScan(values.ACT_TYPE), |
| | | }, |
| | | { |
| | | field: '0', |
| | | label: '1', |
| | | defaultValue: '', |
| | | component: 'Input', |
| | | colProps: { span: 2, pull: 1 }, |
| | | ifShow: ({ values }) => isScan(values.ACT_TYPE), |
| | | colSlot: 'scanadd', |
| | | }, |
| | | { |
| | | field: 'ITEM_CODE', |
| | | label: 'ç»è£
䏿', |
| | | colProps: { span: 10 }, |
| | | component: 'Input', |
| | | ifShow: ({ values }) => isAssy(values.ACT_TYPE), |
| | | }, |
| | | { |
| | | field: '00', |
| | | label: '1', |
| | | defaultValue: '', |
| | | component: 'Input', |
| | | colProps: { span: 2, pull: 1 }, |
| | | ifShow: ({ values }) => isAssy(values.ACT_TYPE), |
| | | colSlot: 'assyadd', |
| | | }, |
| | | { |
| | | field: 'TEST_CODE', |
| | | label: 'äº§åæµè¯', |
| | | colProps: { span: 10 }, |
| | | component: 'Input', |
| | | ifShow: ({ values }) => isTest(values.ACT_TYPE), |
| | | }, |
| | | { |
| | | field: 'test0', |
| | | label: '1', |
| | | defaultValue: '', |
| | | component: 'Input', |
| | | colProps: { span: 2, pull: 1 }, |
| | | ifShow: ({ values }) => isTest(values.ACT_TYPE), |
| | | colSlot: 'testadd', |
| | | }, |
| | | { |
| | | field: 'SAPL_CODE', |
| | | label: 'äº§åæ½æ£', |
| | | colProps: { span: 10 }, |
| | | component: 'Input', |
| | | ifShow: ({ values }) => isAudit(values.ACT_TYPE), |
| | | }, |
| | | { |
| | | field: 'audit0', |
| | | label: '1', |
| | | defaultValue: '', |
| | | component: 'Input', |
| | | colProps: { span: 2, pull: 1 }, |
| | | ifShow: ({ values }) => isAudit(values.ACT_TYPE), |
| | | colSlot: 'auditadd', |
| | | }, |
| | | { |
| | | field: 'LABEL_CODE', |
| | | label: 'æ ç¾æå°', |
| | | colProps: { span: 10 }, |
| | | component: 'Input', |
| | | ifShow: ({ values }) => isPrint(values.ACT_TYPE), |
| | | }, |
| | | { |
| | | field: 'print0', |
| | | label: '1', |
| | | defaultValue: '', |
| | | component: 'Input', |
| | | colProps: { span: 2, pull: 1 }, |
| | | ifShow: ({ values }) => isPrint(values.ACT_TYPE), |
| | | colSlot: 'printadd', |
| | | }, |
| | | { |
| | | field: 'pkgRULE_CODE', |
| | | label: 'å
è£
è§å', |
| | | colProps: { span: 10 }, |
| | | component: 'Input', |
| | | ifShow: ({ values }) => isPackage(values.ACT_TYPE), |
| | | }, |
| | | { |
| | | field: 'pkg0', |
| | | label: '1', |
| | | defaultValue: '', |
| | | component: 'Input', |
| | | colProps: { span: 2, pull: 1 }, |
| | | ifShow: ({ values }) => isPackage(values.ACT_TYPE), |
| | | colSlot: 'pkgadd', |
| | | }, |
| | | { |
| | | field: 'REMARK', |
| | | label: '夿³¨', |
| | | component: 'Input', |
| | | colProps: { span: 12 }, |
| | | }, |
| | | ]; |
| | | const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({ |
| | | labelWidth: 120, |
| | | schemas: formSchema, |
| | | schemas: GetCrudForm(), |
| | | actionColOptions: { |
| | | offset: 8, |
| | | span: 24, |
| | |
| | | submitButtonOptions: { |
| | | text: 'æäº¤', |
| | | }, |
| | | submitFunc: customSubmitFunc, |
| | | }); |
| | | |
| | | /* 注å
¥éä¸èç¹æ°æ® */ |
| | | const selectedNodes = inject('selectedNodes') as Ref<any>; |
| | | watch( |
| | | () => ACT_ID.value, |
| | | (newVal, oldVal) => { |
| | | () => selectedNodes.value, |
| | | (newVal, oldVal) => { |
| | | nextTick(() => { |
| | | getActType(); |
| | | /* èç¹åæ¢äºä»¶ */ |
| | | nodeChange({ resetFields, setFieldsValue, objParams, selectedNodes }); |
| | | }); |
| | | }, |
| | | { deep: true, immediate: true }, |
| | | ); |
| | | }, |
| | | { deep: true, immediate: true }, |
| | | ); |
| | | |
| | | onMounted(() => { |
| | | getActType(); |
| | | /* èç¹åæ¢äºä»¶ */ |
| | | nodeChange({ resetFields, setFieldsValue, objParams, selectedNodes }); |
| | | }); |
| | | |
| | | function getActType() { |
| | | resetFields(); |
| | | let sqlcmd = ' 1=1 '; |
| | | if (!isNullOrEmpty(Prod_Code.value)) { |
| | | sqlcmd += `And PROD_CODE = '${Prod_Code.value}'`; |
| | | } |
| | | if (!isNullOrEmpty(Cust_Code.value)) { |
| | | sqlcmd += `And CUST_CODE = '${Cust_Code.value}'`; |
| | | } |
| | | if (!isNullOrEmpty(ACT_ID.value)) { |
| | | sqlcmd += `And ACT_ID = '${ACT_ID.value}'`; |
| | | } |
| | | getEntity({ |
| | | sqlcmd: sqlcmd, |
| | | entityName: 'MES_PROD_ACTION', |
| | | }).then((res) => { |
| | | setFieldsValue({ |
| | | PROD_CODE: Prod_Code.value, |
| | | ACT_TYPE: res.Data.Items[0].ACT_TYPE |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | async function handleSubmit() { |
| | | async function customSubmitFunc() { |
| | | // try { |
| | | // const values = await validate(); |
| | | // setDrawerProps({ confirmLoading: true }); |
| | |
| | | // } |
| | | } |
| | | |
| | | const itemCodeModalCfg = { |
| | | title: 'ç©æå表', |
| | | schemas: [ |
| | | { |
| | | field: 'ITEM_CODE', |
| | | component: 'Input', |
| | | label: 'ç©æç¼ç ', |
| | | colProps: { |
| | | span: 12, |
| | | }, |
| | | }, |
| | | ], |
| | | ItemColumns: [ |
| | | { |
| | | title: t('ç©æç¼ç '), |
| | | dataIndex: 'ITEM_CODE', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t('ç©æåç§°'), |
| | | dataIndex: 'ITEM_NAME', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 180, |
| | | }, |
| | | ], |
| | | tableName: 'BAS_ITEM', |
| | | rowKey: 'ITEM_CODE', |
| | | searchInfo: { TABLE_NAME: 'BAS_ITEM' }, |
| | | }; |
| | | |
| | | const ruleModalCfg = { |
| | | title: 'è§åå表', |
| | | schemas: [ |
| | | { |
| | | field: 'RULE_CODE', |
| | | component: 'Input', |
| | | label: 'è§åç¼ç ', |
| | | colProps: { |
| | | span: 12, |
| | | }, |
| | | }, |
| | | ], |
| | | ItemColumns: [ |
| | | { |
| | | title: t('è§åç¼ç '), |
| | | dataIndex: 'RULE_CODE', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t('è§ååç§°'), |
| | | dataIndex: 'RULE_NAME', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 180, |
| | | }, |
| | | ], |
| | | tableName: 'BAS_CODE_RULE', |
| | | rowKey: 'RULE_CODE', |
| | | searchInfo: { TABLE_NAME: 'BAS_CODE_RULE' }, |
| | | }; |
| | | |
| | | const printModalCfg = { |
| | | 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' }, |
| | | }; |
| | | |
| | | const pkgModalCfg = { |
| | | title: 'å
è£
è§åå表', |
| | | schemas: [ |
| | | { |
| | | field: 'RULE_CODE', |
| | | component: 'Input', |
| | | label: 'å
è£
è§åç¼ç ', |
| | | colProps: { |
| | | span: 12, |
| | | }, |
| | | }, |
| | | ], |
| | | ItemColumns: [ |
| | | { |
| | | title: t('å
è£
è§åç¼ç '), |
| | | dataIndex: 'RULE_CODE', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t('å
è£
è§ååç§°'), |
| | | dataIndex: 'RULE_NAME', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 180, |
| | | }, |
| | | ], |
| | | tableName: 'BAS_PKG_RULE', |
| | | rowKey: 'RULE_CODE', |
| | | searchInfo: { TABLE_NAME: 'BAS_PKG_RULE' }, |
| | | }; |
| | | |
| | | /** |
| | | * @description: ç¹å»æå¼å¼¹åºéæ©åè¡¨æ¡ |
| | | * @param {*} item |
| | | * @return {*} |
| | | */ |
| | | function handleSelectItem(item) { |
| | | let config = {}; |
| | | switch (item) { |
| | | case 'scanadd': |
| | | config = ruleModalCfg; |
| | | break; |
| | | case 'assyadd': |
| | | config = itemCodeModalCfg; |
| | | break; |
| | | case 'testadd': |
| | | config = itemCodeModalCfg; |
| | | break; |
| | | case 'printadd': |
| | | config = printModalCfg; |
| | | break; |
| | | case 'pkgadd': |
| | | config = pkgModalCfg; |
| | | break; |
| | | } |
| | | openItemModal(true, config); |
| | | OpenSelectItem(openItemModal, item); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return {*} |
| | | */ |
| | | function handleItemSuccess(d, u, item) { |
| | | let value = {}; |
| | | switch (item) { |
| | | case 'scanadd': |
| | | value = { |
| | | RULE_CODE: d.values['val'], |
| | | }; |
| | | break; |
| | | case 'assyadd': |
| | | value = { |
| | | ITEM_CODE: d.values['val'], |
| | | }; |
| | | break; |
| | | case 'printadd': |
| | | value = { |
| | | LABEL_CODE: d.values['val'], |
| | | }; |
| | | break; |
| | | case 'pkgadd': |
| | | value = { |
| | | pkgRULE_CODE: d.values['val'], |
| | | }; |
| | | break; |
| | | } |
| | | setFieldsValue(value); |
| | | setFieldsValue(GetSelectSuccess(d, u, item)); |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Description: ç»å页é¢å·¦ä¾§æ å½¢ |
| | | * @Author: Ben Lin |
| | | * @version: |
| | | * @Date: 2024-06-26 15:31:43 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-26 18:48:09 |
| | | --> |
| | | <template> |
| | | <GeneralTree |
| | | @select="handleSelect" |
| | | @UnSelect="UnSelect" |
| | | :title="title" |
| | | :treeData="treeData" |
| | | :create-icon="createIcon" |
| | | :fieldNames="fieldNames" |
| | | /><!-- |
| | | add |
| | | @handle-add="handleAdd" --> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import { Ref, inject, onMounted, ref } from 'vue'; |
| | | import { isNullOrUnDef } from '/@/utils/is'; |
| | | import GeneralTree from '/@/views/components/GeneralTree.vue'; |
| | | import { TreeItem } from '/@/components/TigerTree'; |
| | | import { EntityCustFunctionType } from '/@/api/tigerapi/model/basModel'; |
| | | |
| | | const objParams = inject('objParams') as Ref<any>; |
| | | const nodeType = inject('nodeType') as Ref<any>; |
| | | const selectedNodes = inject('selectedNodes') as Ref<any>; |
| | | const custImport = ref<any[]>([]); |
| | | const EntityCustFunction = ref([ |
| | | { |
| | | CreateIcon(params: Recordable<any>) {}, |
| | | } as EntityCustFunctionType, |
| | | ]); |
| | | /* 卿importå®ä½å.tsçèªå®ä¹æ¹æ³ */ |
| | | try { |
| | | custImport.value = await import(`../entityts/${objParams.value['Name']}.ts`); |
| | | } catch (e) {} |
| | | const [{ CreateIcon }] = isNullOrUnDef(custImport.value['default']) |
| | | ? EntityCustFunction.value |
| | | : custImport.value['default'](); |
| | | const treeData = ref<TreeItem[]>([]); |
| | | const title = ref(''); |
| | | const fieldNames = ref({}); |
| | | |
| | | onMounted(async () => { |
| | | await fetch(objParams.value['Name']); |
| | | }); |
| | | |
| | | /** |
| | | * @description: æ å½¢èç¹å¾æ |
| | | * @param {*} params |
| | | * @param {*} type |
| | | * @return {*} |
| | | */ |
| | | function createIcon(params: Recordable<any>) { |
| | | return CreateIcon(params); |
| | | } |
| | | |
| | | /** |
| | | * @description: è·åæ å½¢æ°æ® |
| | | * @param {*} type |
| | | * @return {*} |
| | | */ |
| | | async function fetch(type: string) { |
| | | if (!isNullOrUnDef(custImport.value)) { |
| | | const [{ fetchTreeData }] = custImport.value['default'](); |
| | | //æ ¹æ®typeè·åæ å½¢æ°æ® |
| | | const data = await fetchTreeData(type, objParams.value['CODE']); |
| | | title.value = data.title; |
| | | treeData.value = data.treeData; |
| | | fieldNames.value = data.fieldNames; |
| | | } |
| | | } |
| | | |
| | | function handleSelect(Id = '', info) { |
| | | // searchInfo.Id = Id; |
| | | nodeType.value = info.selectedNodes[0].type; |
| | | selectedNodes.value = info.selectedNodes; |
| | | // prodCode.value =rotType.value=='Product'? info.selectedNodes[0].code: prodCode.value; |
| | | // actionCode.value = rotType.value == 'Action' ? info.selectedNodes[0].code : actionCode.value; |
| | | // custCode.value = rotType.value == 'Customer' ? info.selectedNodes[0].code : custCode.value; |
| | | // reload(); |
| | | } |
| | | |
| | | /** |
| | | * @description: åæ¶éæ©æ¶äºä»¶è¿åæ¹æ³ |
| | | * @param {*} node |
| | | * @return {*} |
| | | */ |
| | | function UnSelect(node) { |
| | | nodeType.value = ''; |
| | | // reload(); |
| | | } |
| | | </script> |
| | |
| | | :content="pageContent" |
| | | @back="goBack" |
| | | > |
| | | <GeneralTree |
| | | class="w-1/4 xl:w-1/5" |
| | | v-if="isMounted" |
| | | @select="handleSelect" |
| | | @UnSelect="UnSelect" |
| | | :title="title" |
| | | :treeData="treeData" |
| | | :create-icon="createIcon" |
| | | :fieldNames="fieldNames" |
| | | /><!-- |
| | | add |
| | | @handle-add="handleAdd" --> |
| | | <div class="w-3/4 xl:w-4/5 p-5"> |
| | | <CarGridNav v-if="entityName == 'ProdRouteBinding' && rotType == 'Product'" /> |
| | | <Config v-if="entityName == 'ProdRouteBinding' && rotType == 'Action'" /> |
| | | </div> |
| | | <Suspense class="w-1/4 xl:w-1/5"> |
| | | <LeftTree /> |
| | | </Suspense> |
| | | <Suspense> |
| | | <div class="w-3/4 xl:w-4/5 p-5"> |
| | | <CarGridNav v-if="entityName == 'ProdRouteBinding' && nodeType == 'Product'" /> |
| | | <Config v-if="entityName == 'ProdRouteBinding' && nodeType == 'Action'" /> |
| | | </div> |
| | | </Suspense> |
| | | <!-- <BasicTable class="w-3/4 xl:w-4/5" @register="registerTable"> |
| | | <template #toolbar> |
| | | <a-button type="primary" @click="handleCreate" preIcon="add_02|svg"> æ°å¢ </a-button> |
| | |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import { PageWrapper } from '@/components/Page'; |
| | | import GeneralTree from '/@/views/components/GeneralTree.vue'; |
| | | import { useModal } from '@/components/Modal'; |
| | | import GeneralModal from '/@/views/components/GeneralModal.vue'; |
| | | import CarGridNav from './CarGridNav.vue'; |
| | | import Config from './Config.vue'; |
| | | import LeftTree from './LeftTree.vue'; |
| | | import CustModal from '/@/views/components/CustModal.vue'; |
| | | import { OpenCustModal } from '../data'; |
| | | import { Ref, onMounted, provide, reactive, ref } from 'vue'; |
| | | import { useRoute } from 'vue-router'; |
| | | import { useDrawer } from '/@/components/Drawer'; |
| | | import { BasicForm, useForm } from '/@/components/Form/index'; |
| | | import { TreeItem } from '/@/components/TigerTree'; |
| | | import { useTabs } from '/@/hooks/web/useTabs'; |
| | | import { isNullOrUnDef } from '/@/utils/is'; |
| | | import { useGo } from '/@/hooks/web/usePage'; |
| | |
| | | const baseCards = ref([] as any[]); |
| | | const otherCards = ref([] as any[]); |
| | | const searchInfo = reactive<Recordable>({}); |
| | | const treeData = ref<TreeItem[]>([]); |
| | | const title = ref(''); |
| | | const fieldNames = ref({}); |
| | | const dense = isNullOrUnDef(objParams.value.dense) ? ref(false) : ref(objParams.value.dense); |
| | | const pageTitle = ref(objParams.value.pageTitle); |
| | | const pageContent = ref(objParams.value.pageContent); |
| | | const prodCode = ref(objParams.value.CODE); |
| | | const actionCode = ref(''); |
| | | const custCode = ref(''); |
| | | const rotType = ref(''); |
| | | const nodeType = ref(''); |
| | | const selectedNodes = ref([]); |
| | | const isMounted = ref(false); |
| | | const custImport = ref<any>(null); |
| | | const [registerCust, { openModal: openCustomModal, closeModal }] = useModal(); |
| | | const [registerItemAdd, { openModal: openItemModal }] = useModal(); |
| | | const [registerDrawer, { openDrawer }] = useDrawer(); |
| | | provide<Ref<string>>('prodCode', prodCode); |
| | | provide<Ref<string>>('actionCode', actionCode); |
| | | provide<Ref<string>>('custCode', custCode); |
| | | provide<Ref<string>>('nodeType', nodeType); |
| | | provide<Ref<any>>('objParams', objParams); |
| | | provide<Ref<any>>('selectedNodes', selectedNodes); |
| | | setTitle(objParams.value.Title); //设置æ ç¾é¡µæ é¢ |
| | | |
| | | /** |
| | | * @description: è·åæ å½¢æ°æ® |
| | | * @param {*} type |
| | | * @return {*} |
| | | */ |
| | | async function fetch(type: string) { |
| | | if (!isNullOrUnDef(custImport.value)) { |
| | | const [{ fetchTreeData }] = custImport.value['default'](); |
| | | //æ ¹æ®typeè·åæ å½¢æ°æ® |
| | | const data = await fetchTreeData(type, objParams.value.CODE); |
| | | title.value = data.title; |
| | | treeData.value = data.treeData; |
| | | fieldNames.value = data.fieldNames; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description: 页é¢å·¦ä¾§ç¹å»è¿å龿¥æ¶çæä½ |
| | |
| | | // console.log('handleAdd'); |
| | | // } |
| | | |
| | | /** |
| | | * @description: æ å½¢èç¹å¾æ |
| | | * @param {*} params |
| | | * @param {*} type |
| | | * @return {*} |
| | | */ |
| | | function createIcon(params: Recordable<any>) { |
| | | if (isNullOrUnDef(custImport.value)) { |
| | | return ''; |
| | | } else { |
| | | const [{ CreateIcon }] = custImport.value['default'](); |
| | | return CreateIcon(params); |
| | | } |
| | | } |
| | | |
| | | onMounted(async () => { |
| | | isMounted.value = false; |
| | | /* 卿importå®ä½å.tsçèªå®ä¹æ¹æ³ */ |
| | | try { |
| | | custImport.value = await import(`../entityts/${entityName.value}.ts`); |
| | | await fetch(entityName.value); |
| | | isMounted.value = true; |
| | | } catch (e) {} |
| | | }); |
| | | |
| | | function handleSelect(deptId = '', info) { |
| | | searchInfo.deptId = deptId; |
| | | rotType.value = info.selectedNodes[0].type; |
| | | // prodCode.value =rotType.value=='Product'? info.selectedNodes[0].code: prodCode.value; |
| | | actionCode.value = rotType.value == 'Action' ? info.selectedNodes[0].code : actionCode.value; |
| | | custCode.value = rotType.value == 'Customer' ? info.selectedNodes[0].code : custCode.value; |
| | | // reload(); |
| | | } |
| | | |
| | | /** |
| | | * @description: åæ¶éæ©æ¶äºä»¶è¿åæ¹æ³ |
| | | * @param {*} node |
| | | * @return {*} |
| | | */ |
| | | function UnSelect(node) { |
| | | prodCode.value = ''; |
| | | rotType.value = ''; |
| | | // reload(); |
| | | } |
| | | |
| | | /** |
| | | * @description: å¼¹åºæ¡ç¡®å®è¿å |
| | |
| | | * @version: |
| | | * @Date: 2024-06-19 20:34:27 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-25 11:28:25 |
| | | * @LastEditTime: 2024-06-26 18:33:05 |
| | | */ |
| | | |
| | | import { ActionItem, BasicColumn } from '/@/components/Table'; |
| | |
| | | * @param {Fn} openItemModal |
| | | * @return {*} |
| | | */ |
| | | OpenSelectItem: (openItemModal: Fn) => { |
| | | OpenSelectItem: (openItemModal: Fn, ...args) => { |
| | | openItemModal(true, { |
| | | title: 'ç©æå表', |
| | | schemas: [ |
| | |
| | | * @version: |
| | | * @Date: 2024-06-19 20:34:27 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-22 23:40:02 |
| | | * @LastEditTime: 2024-06-26 18:33:09 |
| | | */ |
| | | |
| | | import { ActionItem, BasicColumn } from '/@/components/Table'; |
| | |
| | | VAR_VALUE: d.values['val'], |
| | | }; |
| | | }, |
| | | OpenSelectItem:(openItemModal: Fn) => { |
| | | OpenSelectItem:(openItemModal: Fn, ...args) => { |
| | | openItemModal(true, { |
| | | title: 'è¿ç¨åéå表', |
| | | schemas: [ |
| | |
| | | RSNG_CODE: d.values['val'], |
| | | }; |
| | | }, |
| | | OpenSelectItem:(openItemModal: Fn) => { |
| | | OpenSelectItem:(openItemModal: Fn, ...args) => { |
| | | openItemModal(true, { |
| | | title: 'ä¸è¯åå ç»å表', |
| | | schemas: [ |
| | |
| | | * @version: |
| | | * @Date: 2024-06-19 20:34:27 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-25 18:30:51 |
| | | * @LastEditTime: 2024-06-26 18:41:16 |
| | | */ |
| | | |
| | | import { Ref, unref } from 'vue'; |
| | | import { GetRoutePTree } from '/@/api/tigerapi/mes/router'; |
| | | import { convertToTree } from '/@/api/tigerapi/system'; |
| | | import { GetEnum, convertToTree, getEntity } from '/@/api/tigerapi/system'; |
| | | import { useLocale } from '/@/locales/useLocale'; |
| | | import { isNullOrEmpty } from '/@/utils/is'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | |
| | | const { t } = useI18n(); |
| | | const { getLocale } = useLocale(); |
| | | function _default() { |
| | | const isNormal = (type: number) => type === 0; |
| | | const isScan = (type: number) => type === 1; |
| | | const isAssy = (type: number) => type === 2; |
| | | const isTest = (type: number) => type === 3; |
| | | const isAudit = (type: number) => type === 4; |
| | | const isPrint = (type: number) => type === 5; |
| | | const isPackage = (type: number) => type === 6; |
| | | const methods = { |
| | | /** |
| | | * @description: è·åæ 形徿 |
| | |
| | | /** |
| | | * @description: é«çº§è¡¨åå详æ
页é¢è¿å主页é¢çurl |
| | | * @return {*} |
| | | */ |
| | | */ |
| | | GetHomeUrl: () => { |
| | | return `/V_BAS_PROD/LC/${encodeURI(JSON.stringify({ ID: 'V_BAS_PROD', colSlots: [], crudColSlots: [] }))}`; |
| | | }, |
| | |
| | | data.fieldNames = { key: 'id', title: 'name' }; |
| | | return data; |
| | | }, |
| | | GetCrudForm: () => { |
| | | return [ |
| | | { |
| | | field: 'PROD_CODE', |
| | | label: '产åç¼ç ', |
| | | component: 'Input', |
| | | dynamicDisabled: ({ values }) => { |
| | | return true; |
| | | }, |
| | | colProps: { span: 12 }, |
| | | }, |
| | | { |
| | | field: 'ID', |
| | | label: 'ID', |
| | | component: 'Input', |
| | | show: false, |
| | | }, |
| | | { |
| | | field: 'CUST_CODE', |
| | | label: '客æ·ç¼ç ', |
| | | component: 'Input', |
| | | dynamicDisabled: ({ values }) => { |
| | | return true; |
| | | }, |
| | | colProps: { span: 12 }, |
| | | }, |
| | | { |
| | | field: 'ACT_TYPE', |
| | | label: 'è¡ä¸ºç±»å', |
| | | component: 'ApiSelect', |
| | | colProps: { span: 12 }, |
| | | defaultValue: 0, |
| | | componentProps: { |
| | | api: GetEnum, |
| | | params: { name: 'MES_PROD_ACTION+ACT_TYPEs' }, |
| | | resultField: 'Data', |
| | | labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name', |
| | | valueField: 'Value', |
| | | // onChange: (e, v) => { |
| | | // alert(e) |
| | | // console.log('ApiSelect====>:', e, v); |
| | | // }, |
| | | }, |
| | | }, |
| | | { |
| | | field: 'IS_ACTIVE', |
| | | label: 'æ¯å¦å¯ç¨', |
| | | required: true, |
| | | component: 'Select', |
| | | colProps: { span: 12 }, |
| | | componentProps: { |
| | | options: [ |
| | | { |
| | | label: 'æ¯', |
| | | value: 'Y', |
| | | key: 'Y', |
| | | }, |
| | | { |
| | | label: 'å¦', |
| | | value: 'N', |
| | | key: 'N', |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | { |
| | | field: 'RULE_CODE', |
| | | label: 'æ«ç éªè¯', |
| | | component: 'Input', |
| | | colProps: { span: 10 }, |
| | | ifShow: ({ values }) => isScan(values.ACT_TYPE), |
| | | }, |
| | | { |
| | | field: '0', |
| | | label: '1', |
| | | defaultValue: '', |
| | | component: 'Input', |
| | | colProps: { span: 2, pull: 1 }, |
| | | ifShow: ({ values }) => isScan(values.ACT_TYPE), |
| | | colSlot: 'scanadd', |
| | | }, |
| | | { |
| | | field: 'ITEM_CODE', |
| | | label: 'ç»è£
䏿', |
| | | colProps: { span: 10 }, |
| | | component: 'Input', |
| | | ifShow: ({ values }) => isAssy(values.ACT_TYPE), |
| | | }, |
| | | { |
| | | field: '00', |
| | | label: '1', |
| | | defaultValue: '', |
| | | component: 'Input', |
| | | colProps: { span: 2, pull: 1 }, |
| | | ifShow: ({ values }) => isAssy(values.ACT_TYPE), |
| | | colSlot: 'assyadd', |
| | | }, |
| | | { |
| | | field: 'TEST_CODE', |
| | | label: 'äº§åæµè¯', |
| | | colProps: { span: 10 }, |
| | | component: 'Input', |
| | | ifShow: ({ values }) => isTest(values.ACT_TYPE), |
| | | }, |
| | | { |
| | | field: 'test0', |
| | | label: '1', |
| | | defaultValue: '', |
| | | component: 'Input', |
| | | colProps: { span: 2, pull: 1 }, |
| | | ifShow: ({ values }) => isTest(values.ACT_TYPE), |
| | | colSlot: 'testadd', |
| | | }, |
| | | { |
| | | field: 'SAPL_CODE', |
| | | label: 'äº§åæ½æ£', |
| | | colProps: { span: 10 }, |
| | | component: 'Input', |
| | | ifShow: ({ values }) => isAudit(values.ACT_TYPE), |
| | | }, |
| | | { |
| | | field: 'audit0', |
| | | label: '1', |
| | | defaultValue: '', |
| | | component: 'Input', |
| | | colProps: { span: 2, pull: 1 }, |
| | | ifShow: ({ values }) => isAudit(values.ACT_TYPE), |
| | | colSlot: 'auditadd', |
| | | }, |
| | | { |
| | | field: 'LABEL_CODE', |
| | | label: 'æ ç¾æå°', |
| | | colProps: { span: 10 }, |
| | | component: 'Input', |
| | | ifShow: ({ values }) => isPrint(values.ACT_TYPE), |
| | | }, |
| | | { |
| | | field: 'print0', |
| | | label: '1', |
| | | defaultValue: '', |
| | | component: 'Input', |
| | | colProps: { span: 2, pull: 1 }, |
| | | ifShow: ({ values }) => isPrint(values.ACT_TYPE), |
| | | colSlot: 'printadd', |
| | | }, |
| | | { |
| | | field: 'pkgRULE_CODE', |
| | | label: 'å
è£
è§å', |
| | | colProps: { span: 10 }, |
| | | component: 'Input', |
| | | ifShow: ({ values }) => isPackage(values.ACT_TYPE), |
| | | }, |
| | | { |
| | | field: 'pkg0', |
| | | label: '1', |
| | | defaultValue: '', |
| | | component: 'Input', |
| | | colProps: { span: 2, pull: 1 }, |
| | | ifShow: ({ values }) => isPackage(values.ACT_TYPE), |
| | | colSlot: 'pkgadd', |
| | | }, |
| | | { |
| | | field: 'REMARK', |
| | | label: '夿³¨', |
| | | component: 'Input', |
| | | colProps: { span: 12 }, |
| | | }, |
| | | ]; |
| | | }, |
| | | /** |
| | | * @description: è·å表åä¸çåæ®µææ§½å表 |
| | | * @return {*} |
| | | */ |
| | | GetCrudColSlots: () => { |
| | | return ['scanadd', 'assyadd', 'testadd', 'auditadd', 'printadd', 'pkgadd']; |
| | | }, |
| | | nodeChange: (params: { |
| | | resetFields: any; |
| | | setFieldsValue: any; |
| | | objParams: Ref<any>; |
| | | selectedNodes: Ref<any[]>; |
| | | }) => { |
| | | params['resetFields'](); |
| | | let sqlcmd = ' 1=1 '; |
| | | if (!isNullOrEmpty(params['objParams'].value['CODE'])) { |
| | | sqlcmd += `And PROD_CODE = '${params['objParams'].value['CODE']}'`; |
| | | } |
| | | // if (!isNullOrEmpty(Cust_Code.value)) { |
| | | // sqlcmd += `And CUST_CODE = '${Cust_Code.value}'`; |
| | | // } |
| | | if (!isNullOrEmpty(params['selectedNodes'].value[0].code)) { |
| | | sqlcmd += `And ACT_ID = '${params['selectedNodes'].value[0].code}'`; |
| | | } |
| | | getEntity({ |
| | | sqlcmd: sqlcmd, |
| | | entityName: 'MES_PROD_ACTION', |
| | | }).then((res) => { |
| | | params['setFieldsValue']({ |
| | | PROD_CODE: params['objParams'].value['CODE'], |
| | | ACT_TYPE: res.Data.Items[0].ACT_TYPE, |
| | | }); |
| | | }); |
| | | }, |
| | | /** |
| | | * @description: å¼¹åºéæ©æ¡æå¼æ¹æ³ |
| | | * @param {Fn} openItemModal |
| | | * @return {*} |
| | | */ |
| | | OpenSelectItem: (openItemModal: Fn, ...args) => { |
| | | let config = {}; |
| | | switch (args[0]) { |
| | | case 'scanadd': |
| | | config = ruleModalCfg; |
| | | break; |
| | | case 'assyadd': |
| | | config = itemCodeModalCfg; |
| | | break; |
| | | case 'testadd': |
| | | config = itemCodeModalCfg; |
| | | break; |
| | | case 'printadd': |
| | | config = printModalCfg; |
| | | break; |
| | | case 'pkgadd': |
| | | config = pkgModalCfg; |
| | | break; |
| | | } |
| | | openItemModal(true, config); |
| | | }, |
| | | /** |
| | | * @description: å¼¹åºéæ©æ¡éæ©æåè¿å |
| | | * @param {*} d |
| | | * @param {*} u |
| | | * @return {*} |
| | | */ |
| | | GetSelectSuccess: (d, u, ...args) => { |
| | | let value = {}; |
| | | switch (args[0]) { |
| | | case 'scanadd': |
| | | value = { |
| | | RULE_CODE: d.values['val'], |
| | | }; |
| | | break; |
| | | case 'assyadd': |
| | | value = { |
| | | ITEM_CODE: d.values['val'], |
| | | }; |
| | | break; |
| | | case 'printadd': |
| | | value = { |
| | | LABEL_CODE: d.values['val'], |
| | | }; |
| | | break; |
| | | case 'pkgadd': |
| | | value = { |
| | | pkgRULE_CODE: d.values['val'], |
| | | }; |
| | | break; |
| | | } |
| | | return value; |
| | | }, |
| | | }; |
| | | |
| | | const itemCodeModalCfg = { |
| | | title: 'ç©æå表', |
| | | schemas: [ |
| | | { |
| | | field: 'ITEM_CODE', |
| | | component: 'Input', |
| | | label: 'ç©æç¼ç ', |
| | | colProps: { |
| | | span: 12, |
| | | }, |
| | | }, |
| | | ], |
| | | ItemColumns: [ |
| | | { |
| | | title: t('ç©æç¼ç '), |
| | | dataIndex: 'ITEM_CODE', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t('ç©æåç§°'), |
| | | dataIndex: 'ITEM_NAME', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 180, |
| | | }, |
| | | ], |
| | | tableName: 'BAS_ITEM', |
| | | rowKey: 'ITEM_CODE', |
| | | searchInfo: { TABLE_NAME: 'BAS_ITEM' }, |
| | | }; |
| | | |
| | | const ruleModalCfg = { |
| | | title: 'è§åå表', |
| | | schemas: [ |
| | | { |
| | | field: 'RULE_CODE', |
| | | component: 'Input', |
| | | label: 'è§åç¼ç ', |
| | | colProps: { |
| | | span: 12, |
| | | }, |
| | | }, |
| | | ], |
| | | ItemColumns: [ |
| | | { |
| | | title: t('è§åç¼ç '), |
| | | dataIndex: 'RULE_CODE', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t('è§ååç§°'), |
| | | dataIndex: 'RULE_NAME', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 180, |
| | | }, |
| | | ], |
| | | tableName: 'BAS_CODE_RULE', |
| | | rowKey: 'RULE_CODE', |
| | | searchInfo: { TABLE_NAME: 'BAS_CODE_RULE' }, |
| | | }; |
| | | |
| | | const printModalCfg = { |
| | | 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' }, |
| | | }; |
| | | |
| | | const pkgModalCfg = { |
| | | title: 'å
è£
è§åå表', |
| | | schemas: [ |
| | | { |
| | | field: 'RULE_CODE', |
| | | component: 'Input', |
| | | label: 'å
è£
è§åç¼ç ', |
| | | colProps: { |
| | | span: 12, |
| | | }, |
| | | }, |
| | | ], |
| | | ItemColumns: [ |
| | | { |
| | | title: t('å
è£
è§åç¼ç '), |
| | | dataIndex: 'RULE_CODE', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t('å
è£
è§ååç§°'), |
| | | dataIndex: 'RULE_NAME', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 180, |
| | | }, |
| | | ], |
| | | tableName: 'BAS_PKG_RULE', |
| | | rowKey: 'RULE_CODE', |
| | | searchInfo: { TABLE_NAME: 'BAS_PKG_RULE' }, |
| | | }; |
| | | |
| | | return [methods]; |
| | |
| | | * @version: |
| | | * @Date: 2024-06-19 20:34:27 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-26 02:57:35 |
| | | * @LastEditTime: 2024-06-26 18:33:23 |
| | | */ |
| | | |
| | | import { ActionItem, BasicColumn } from '/@/components/Table'; |
| | |
| | | * @param {Fn} openItemModal |
| | | * @return {*} |
| | | */ |
| | | OpenSelectItem: (openItemModal: Fn) => { |
| | | OpenSelectItem: (openItemModal: Fn, ...args) => { |
| | | openItemModal(true, { |
| | | title: 'ç©æå表', |
| | | schemas: [ |
| | |
| | | const EntityCustFunction = ref([ |
| | | { |
| | | ActionItem(params, data, ...args) {}, |
| | | EditeOperation(data, d, u) {}, |
| | | EditOperation(data, d, u) {}, |
| | | GetBaseColumns() {}, |
| | | GetSearchForm() {}, |
| | | GetCrudForm() {}, |
| | |
| | | const [ |
| | | { |
| | | ActionItem: nActionItem, |
| | | EditeOperation, |
| | | EditOperation, |
| | | GetBaseColumns, |
| | | GetSearchForm, |
| | | GetCrudForm, |