| | |
| | | SERIAL_MIN: number; |
| | | SERIAL_MAX: number; |
| | | SERIAL_RESET: number; |
| | | SERIAL_INTERVAL: number; |
| | | SERIAL_IGNORE: string; |
| | | FIXED_NOTLIKE: string; |
| | | CHECK_TABLE: string; |
| | | CHECK_FIELD: string; |
| | | CHECK_LENGTH: number; |
| | |
| | | |
| | | // Multi-label |
| | | multiTabsSetting: { |
| | | cache: false, |
| | | cache: true, |
| | | // Turn on |
| | | show: true, |
| | | // Is it possible to drag and drop sorting tabs |
| | |
| | | * @version: |
| | | * @Date: 2024-07-24 20:42:38 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-07-25 09:43:58 |
| | | * @LastEditTime: 2024-08-26 16:16:01 |
| | | */ |
| | | import { defineStore } from 'pinia'; |
| | | import { useGlobSetting } from '/@/hooks/setting'; |
| | |
| | | 'wsApply ' + |
| | | JSON.stringify({ |
| | | Data: 'ping', |
| | | Message: '心跳发送' |
| | | Message: 'BS端心跳发送' |
| | | }), |
| | | ); |
| | | this.socketHeart = this.socketHeart + 1; |
| | |
| | | * @version: |
| | | * @Date: 2024-06-17 14:51:26 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-07-15 20:37:07 |
| | | * @LastEditTime: 2024-08-28 21:38:19 |
| | | */ |
| | | export { |
| | | isArguments, |
| | |
| | | isMatchWith, |
| | | isNative, |
| | | isNil, |
| | | isNumber, |
| | | isNull, |
| | | isObjectLike, |
| | | isPlainObject, |
| | |
| | | return regex.test(str); |
| | | } |
| | | |
| | | export function isNumber(str: string): boolean{ |
| | | const regex = /^[0-9]*$/; |
| | | return regex.test(str); |
| | | } |
| | | |
| | | |
| | | export function isTimeViaRegExp8601(value: any): boolean { |
| | | return /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(value.toString()); |
| | |
| | | * @version: |
| | | * @Date: 2024-06-05 15:46:07 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-07-22 00:51:10 |
| | | * @LastEditTime: 2024-08-22 12:00:25 |
| | | --> |
| | | <template> |
| | | <BasicModal |
| | |
| | | /** |
| | | * @description: 取消按钮触发取消事件 |
| | | * @return {*} |
| | | */ |
| | | */ |
| | | function handleCancel() { |
| | | emit('cancel'); |
| | | } |
| | |
| | | <!-- |
| | | * @Description: file content |
| | | * @Author: Ben Lin |
| | | * @version: |
| | | * @Date: 2024-06-18 15:09:48 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-08-28 20:57:43 |
| | | --> |
| | | <template> |
| | | <BasicDrawer |
| | | v-bind="$attrs" |
| | |
| | | const isUpdate = ref(true); |
| | | |
| | | const [MaterialForm, { resetFields, setFieldsValue, validate }] = useForm({ |
| | | labelWidth: 120, |
| | | labelWidth: 140, |
| | | schemas: formSchema, |
| | | actionColOptions: { |
| | | span: 24, |
| | |
| | | import { BasicColumn } from '/@/components/Table'; |
| | | import { FormSchema } from '/@/components/Table'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { isEmpty, isNullOrEmpty, isNullOrUnDef, isObject, isString } from '/@/utils/is'; |
| | | import { isEmpty, isNullOrEmpty, isNullOrUnDef, isNumber, isObject, isString } from '/@/utils/is'; |
| | | import { h } from 'vue'; |
| | | import { Tag } from 'ant-design-vue'; |
| | | import { useMessage } from '/@/hooks/web/useMessage'; |
| | |
| | | text = record.DATA_VALUE; |
| | | break; |
| | | case Data_Types.SerialCode: |
| | | text = `${PrefixInteger(record.SERIAL_MIN,record.CHECK_LENGTH)}-${PrefixInteger(record.SERIAL_MAX,record.CHECK_LENGTH)}`; |
| | | text = `${PrefixInteger(record.SERIAL_MIN, record.CHECK_LENGTH)}-${PrefixInteger(record.SERIAL_MAX, record.CHECK_LENGTH)}`; |
| | | break; |
| | | } |
| | | return h(Tag, { color: color }, () => text); |
| | |
| | | formModel.CHECK_LENGTH = ''; |
| | | } |
| | | if (e == Data_Types.DbCheck || e == Data_Types.NoCheck) { |
| | | formModel.DATA_REGEX = formModel.CHECK_LENGTH>0? `(.{${formModel.CHECK_LENGTH}}){${formModel.REPEAT_TIMES}}`: `(.*){${formModel.REPEAT_TIMES}}`; |
| | | formModel.DATA_REGEX = |
| | | formModel.CHECK_LENGTH > 0 |
| | | ? `(.{${formModel.CHECK_LENGTH}}){${formModel.REPEAT_TIMES}}` |
| | | : `(.*){${formModel.REPEAT_TIMES}}`; |
| | | } |
| | | if (e == Data_Types.SerialCode) { |
| | | formModel.DATA_REGEX = `([0-9]{${formModel.CHECK_LENGTH}}){${formModel.REPEAT_TIMES}}`; |
| | |
| | | // return Math.max(maxLength, str.length); |
| | | }, 0); |
| | | formModel.CHECK_LENGTH = _length; |
| | | if (formModel.FIXED_NOTLIKE == 'Y') { |
| | | formModel.DATA_RANGE = `${val}`; |
| | | formModel.DATA_REGEX = `([^${e.target.value.replace(new RegExp(',', 'g'), '|')}]{${formModel.CHECK_LENGTH}}){${formModel.REPEAT_TIMES}}`; |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | |
| | | } |
| | | } |
| | | //formModel.CHECK_LENGTH>0? `(.{${formModel.CHECK_LENGTH}}){${formModel.REPEAT_TIMES}}`: `(.*){${formModel.REPEAT_TIMES}}`; |
| | | if ( |
| | | formModel.DATA_TYPE == Data_Types.DbCheck |
| | | ) { |
| | | formModel.DATA_REGEX = val>0? `(.{${val}}){${formModel.REPEAT_TIMES}}`: `(.*){${formModel.REPEAT_TIMES}}`; |
| | | if (formModel.DATA_TYPE == Data_Types.DbCheck) { |
| | | formModel.DATA_REGEX = |
| | | val > 0 |
| | | ? `(.{${val}}){${formModel.REPEAT_TIMES}}` |
| | | : `(.*){${formModel.REPEAT_TIMES}}`; |
| | | } |
| | | if ( |
| | | formModel.DATA_TYPE == Data_Types.NoCheck |
| | | ) { |
| | | if (formModel.DATA_TYPE == Data_Types.NoCheck) { |
| | | formModel.DATA_REGEX = `(.{${val}}){${formModel.REPEAT_TIMES}}`; |
| | | } |
| | | if (formModel.DATA_TYPE == Data_Types.SerialCode) { |
| | |
| | | ifShow: ({ values }) => isSerial(values.DATA_TYPE), |
| | | }, |
| | | { |
| | | field: 'FIXED_NOTLIKE', |
| | | label: '是否不包含固定值', |
| | | required: true, |
| | | component: 'Select', |
| | | colProps: { span: 12 }, |
| | | componentProps: ({ schema, tableAction, formActionType, formModel }) => { |
| | | return { |
| | | options: [ |
| | | { |
| | | label: '是', |
| | | value: 'Y', |
| | | }, |
| | | { |
| | | label: '否', |
| | | value: 'N', |
| | | }, |
| | | ], |
| | | onChange: (e) => { |
| | | if (isFixed(formModel.DATA_TYPE)) { |
| | | var val = typeof e == 'object' && e != null ? e.target.value : e; |
| | | formModel.DATA_RANGE =val == 'N'? formModel.DATA_VALUE: `${formModel.DATA_VALUE}`; |
| | | formModel.DATA_REGEX = |
| | | val == 'N' |
| | | ? `(${formModel.DATA_VALUE.replace(new RegExp(',', 'g'), '|')}){${formModel.REPEAT_TIMES}}` |
| | | : `([^${formModel.DATA_VALUE.replace(new RegExp(',', 'g'), '|')}]{${formModel.CHECK_LENGTH}}){${formModel.REPEAT_TIMES}}`; |
| | | } |
| | | }, |
| | | }; |
| | | }, |
| | | ifShow: ({ values }) => isFixed(values.DATA_TYPE), |
| | | }, |
| | | { |
| | | field: 'SERIAL_INTERVAL', |
| | | label: '流水号取号间隔', |
| | | component: 'Input', |
| | | dynamicRules: ({ values }) => { |
| | | return [ |
| | | { |
| | | required: true, |
| | | validator: (_, value) => { |
| | | if (!value) { |
| | | return Promise.reject('流水号取号间隔不能为空!'); |
| | | } |
| | | if (!isNumber(value)) { |
| | | return Promise.reject('请输入数字!'); |
| | | } |
| | | if (Number(value) < 0) { |
| | | return Promise.reject('必需输入大于0的数字!'); |
| | | } |
| | | return Promise.resolve(); |
| | | }, |
| | | }, |
| | | ]; |
| | | }, |
| | | show: true, |
| | | colProps: { span: 12 }, |
| | | dynamicDisabled: ({ values }) => { |
| | | return false; |
| | | }, |
| | | ifShow: ({ values }) => isSerial(values.DATA_TYPE), |
| | | }, |
| | | { |
| | | field: 'SERIAL_IGNORE', |
| | | label: '流水号跳号', |
| | | component: 'Input', |
| | | // required: true, |
| | | show: true, |
| | | colProps: { span: 24 }, |
| | | ifShow: ({ values }) => isSerial(values.DATA_TYPE), |
| | | }, |
| | | { |
| | | field: 'DATA_RANGE', |
| | | label: '校验范围', |
| | | component: 'Input', |
| | |
| | | { |
| | | icon: 'clarity:note-edit-line', |
| | | onClick: handleEdit.bind(null, record), |
| | | name:'', |
| | | }, |
| | | { |
| | | icon: 'ant-design:delete-outlined', |
| | |
| | | placement: 'left', |
| | | confirm: handleDelete.bind(null, record), |
| | | }, |
| | | name:'', |
| | | }, |
| | | ]" |
| | | /> |
| | |
| | | import { buildUUID } from '/@/utils/uuid'; |
| | | |
| | | export default defineComponent({ |
| | | name: 'CheckRuleManagement', |
| | | name: 'checkrule', |
| | | components: { BasicTable, CheckruleDrawer, TableAction, PageWrapper, [Card.name]: Card }, |
| | | setup() { |
| | | const go = useGo(); |
| | |
| | | DESCRIPTION: d.DESCRIPTION, |
| | | CHECK_TABLE: d.CHECK_TABLE, |
| | | CHECK_FIELD: d.CHECK_FIELD, |
| | | FIXED_NOTLIKE: d.FIXED_NOTLIKE, |
| | | SERIAL_INTERVAL: d.SERIAL_INTERVAL, |
| | | SERIAL_IGNORE: d.SERIAL_IGNORE, |
| | | }; |
| | | return item; |
| | | }); |
| | |
| | | GetUseForm, |
| | | GetUseModals, |
| | | }, |
| | | ActionColumn |
| | | ] = isNullOrUnDef(custImport.value['default']) |
| | | ? EntityCustFunction.value |
| | | : custImport.value['default'](); |
| | |
| | | bordered: true, |
| | | canResize: true, |
| | | showIndexColumn: false, |
| | | actionColumn: { |
| | | width: 130, |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | slots: { customRender: 'action' }, |
| | | fixed: undefined, |
| | | }, //自定义操作列 |
| | | actionColumn: ActionColumn |
| | | ? ActionColumn |
| | | : { |
| | | width: 120, |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | slots: { customRender: 'action' }, |
| | | fixed: 'right', |
| | | }, //自定义操作列 |
| | | }); |
| | | |
| | | onMounted(() => {}); |
| | |
| | | * @version: |
| | | * @Date: 2024-06-19 20:34:27 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-08-22 11:14:02 |
| | | * @LastEditTime: 2024-08-28 08:53:22 |
| | | */ |
| | | |
| | | import { Tag, Tooltip } from 'ant-design-vue'; |
| | |
| | | import { CustModalParams, FunctionType } from '/@/api/tigerapi/model/systemModel'; |
| | | import { useForm } from '/@/components/Form'; |
| | | import { useMessage } from '/@/hooks/web/useMessage'; |
| | | import { UpdateWoStatus } from '/@/api/tigerapi/mes/wo'; |
| | | import { useUserStore } from '/@/store/modules/user'; |
| | | |
| | | const { getLocale } = useLocale(); |
| | | const { createMessage, createErrorModal } = useMessage(); |
| | |
| | | |
| | | function _default() { |
| | | const ActionColumn: BasicColumn = { |
| | | width: 80, |
| | | width: 160, |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | slots: { customRender: 'action' }, |
| | | fixed: undefined, |
| | | fixed: 'right', |
| | | }; |
| | | |
| | | /** |
| | |
| | | }); |
| | | return; |
| | | } |
| | | params['record'].STATUS = 4; |
| | | SaveEntity(params['record'], true, 'BIZ_MES_WO_BATCH').then((action) => { |
| | | if (action.IsSuccessed) { |
| | | createMessage.success(t('已暂停')); |
| | | reload(); |
| | | } else { |
| | | createMessage.success(t('暂停操作失败')); |
| | | } |
| | | // params['record'].STATUS = 4; |
| | | // SaveEntity(params['record'], true, 'BIZ_MES_WO_BATCH').then((action) => { |
| | | // if (action.IsSuccessed) { |
| | | // createMessage.success(t('已暂停')); |
| | | // reload(); |
| | | // } else { |
| | | // createMessage.success(t('暂停操作失败')); |
| | | // } |
| | | // }); |
| | | UpdateWoStatus({ |
| | | UserId: useUserStore().getUserInfo.userId as string, |
| | | WorkOrder: params['record'].ORDER_NO, |
| | | Status: -1, |
| | | RouteStatus: 0, |
| | | }); |
| | | } |
| | | |
| | |
| | | */ |
| | | function handleRelease(args, params: Recordable) { |
| | | const openCustModal = args[7]; |
| | | if (params['record'].STATUS != 0) { |
| | | createErrorModal({ |
| | | title: t('警告'), |
| | | content: t('工单不是初始状态,不能下发!'), |
| | | getContainer: () => document.body, |
| | | }); |
| | | return; |
| | | } |
| | | openCustModal(true, { |
| | | isUpdate: true, //是否更新操作 |
| | | ctype: 'BIZ_MES_WO_BATCH', //是哪个页面 |
| | |
| | | * @version: |
| | | * @Date: 2024-06-18 15:09:48 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-25 18:55:09 |
| | | * @LastEditTime: 2024-08-25 16:11:05 |
| | | --> |
| | | <template> |
| | | <BasicDrawer |
| | |
| | | setDrawerProps({ confirmLoading: true }); |
| | | // TODO custom api |
| | | //保存菜单 |
| | | values['func_class'] = menuName.value; |
| | | SaveMenu(values, unref(isUpdate)).then((action) => { |
| | | if (action.IsSuccessed) { |
| | | closeDrawer(); |
| | |
| | | { |
| | | icon: 'clarity:note-edit-line', |
| | | onClick: handleEdit.bind(null, record, 'BS 菜单'), |
| | | name: '', |
| | | }, |
| | | { |
| | | icon: 'ant-design:delete-outlined', |
| | |
| | | placement: 'left', |
| | | confirm: handleDelete.bind(null, record), |
| | | }, |
| | | name: '', |
| | | }, |
| | | ]" |
| | | /> |
| | |
| | | { |
| | | icon: 'clarity:note-edit-line', |
| | | onClick: handleEdit.bind(null, record, 'PDA'), |
| | | name: '', |
| | | }, |
| | | { |
| | | icon: 'ant-design:delete-outlined', |
| | |
| | | placement: 'left', |
| | | confirm: handleDelete.bind(null, record), |
| | | }, |
| | | name: '', |
| | | }, |
| | | ]" |
| | | /> |
| | |
| | | rowKey: 'id', |
| | | }); |
| | | |
| | | const [registerTableSecond, { reload:reloadSecond, expandAll:expandAllSecond, expandRows:expandRowsSecond }] = useTable({ |
| | | const [ |
| | | registerTableSecond, |
| | | { reload: reloadSecond, expandAll: expandAllSecond, expandRows: expandRowsSecond }, |
| | | ] = useTable({ |
| | | // const [registerTable, { reload, expandRows }] = useTable({ |
| | | title: '菜单列表', |
| | | api: getMenuList, |
| | |
| | | const apiAction = DeleteMenu(record); |
| | | apiAction.then((onfulfilled) => { |
| | | if (onfulfilled.IsSuccessed) { |
| | | reload(); |
| | | reloadSecond(); |
| | | reload(); |
| | | } |
| | | }); |
| | | } |
| | |
| | | ifShow: ({ values }) => !isDir(values.func_type), |
| | | }, |
| | | { |
| | | field: 'func_group', |
| | | label: '功能组', |
| | | component: 'Input', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | field: 'status', |
| | | label: '状态', |
| | | component: 'RadioButtonGroup', |
| | |
| | | }, |
| | | ifShow: ({ values }) => isMenu(values.func_type), |
| | | }, |
| | | |
| | | { |
| | | field: 'show', |
| | | label: '是否显示', |