diff --git a/package.json b/package.json index 5646cfe76..d99ee0b98 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "vue": "^3.3.4", "vue-dompurify-html": "^4.1.4", "vue-i18n": "^9.4.1", + "vue-next-focus": "^0.0.12", "vue-router": "^4.2.5", "vue-types": "^5.1.1", "vuedraggable": "^4.1.0", diff --git a/src/api/eam/equipmentRepairJobMain/index.ts b/src/api/eam/equipmentRepairJobMain/index.ts index 3e7cad2b0..0a77ee4eb 100644 --- a/src/api/eam/equipmentRepairJobMain/index.ts +++ b/src/api/eam/equipmentRepairJobMain/index.ts @@ -115,7 +115,7 @@ export const backEquipmentRepairOrder = async (data: EquipmentRepairJobMainVO) = return await request.post({ url: `/eam/equipment-repair-job-main/fallback`, data }) } -//报修验证不通过,生成新工单 +//报修验证 export const createEquipmentRepairNewOrder = async (data: EquipmentRepairJobMainVO) => { return await request.post({ url: `/eam/equipment-repair-job-main/createNew`, data }) } diff --git a/src/api/eam/recordDeviceChanged/index.ts b/src/api/eam/recordDeviceChanged/index.ts new file mode 100644 index 000000000..a7fe656b6 --- /dev/null +++ b/src/api/eam/recordDeviceChanged/index.ts @@ -0,0 +1,59 @@ +import request from '@/config/axios' + +export interface RecordDeviceChangedVO { + id: number + code: string + name: string + statusBefore: string + statusAfter: string + operator: number + operateTime: Date + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询设备变更记录列表 +export const getRecordDeviceChangedPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/record-device-changed/senior', data }) + } else { + return await request.get({ url: `/eam/record-device-changed/page`, params }) + } +} + +// 查询设备变更记录详情 +export const getRecordDeviceChanged = async (id: number) => { + return await request.get({ url: `/eam/record-device-changed/get?id=` + id }) +} + +// 新增设备变更记录 +export const createRecordDeviceChanged = async (data: RecordDeviceChangedVO) => { + return await request.post({ url: `/eam/record-device-changed/create`, data }) +} + +// 修改设备变更记录 +export const updateRecordDeviceChanged = async (data: RecordDeviceChangedVO) => { + return await request.put({ url: `/eam/record-device-changed/update`, data }) +} + +// 删除设备变更记录 +export const deleteRecordDeviceChanged = async (id: number) => { + return await request.delete({ url: `/eam/record-device-changed/delete?id=` + id }) +} + +// 导出设备变更记录 Excel +export const exportRecordDeviceChanged = async (params) => { + return await request.download({ url: `/eam/record-device-changed/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/record-device-changed/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/packageoverJobMain/index.ts b/src/api/wms/packageoverJobMain/index.ts index dcd1df373..6ce1b6c77 100644 --- a/src/api/wms/packageoverJobMain/index.ts +++ b/src/api/wms/packageoverJobMain/index.ts @@ -69,6 +69,10 @@ export const updatePackageoverJobMain = async (data: PackageoverJobMainVO) => { export const deletePackageoverJobMain = async (id: number) => { return await request.delete({ url: `/wms/packageover-job-main/delete?id=` + id }) } +// 关闭翻包任务主 +export const closePackageoverJobMain = async (id: number) => { + return await request.put({ url: `/wms/packageover-job-main/close?id=` + id }) +} // 导出翻包任务主 Excel export const exportPackageoverJobMain = async (params) => { diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 6d07390f8..9e7f6cfd9 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -619,12 +619,14 @@ const submitForm = async () => { formLoading.value = true if (formType.value == 'create') { const validateForm = await tableFormRef.value.validateForm() - if (props.tableFormDataLength) { + if (!validateForm && props.tableFormDataLength) { if (props.tableData.length == 0) { message.warning('请填写明细信息!') formLoading.value = false return } + formLoading.value = false + return } // 主子表——提交请求 try { diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue index 44fca3917..e7972b878 100644 --- a/src/components/TableForm/src/TableForm.vue +++ b/src/components/TableForm/src/TableForm.vue @@ -62,8 +62,8 @@ :prop="headerItem.field" :align="headerItem?.tableForm?.align || 'center'" :sortable="headerItem?.tableForm?.sortable || false" - :width="headerItem?.tableForm?.width || '200px'" - :min-width="headerItem?.tableForm?.minWidth || 'auto'" + :width="headerItem?.tableForm?.width" + :min-width="headerItem?.tableForm?.minWidth || '200px'" > { console.log(TableBaseForm_Ref.value) let _lists = TableBaseForm_Ref.value?.map((v) => v.validate()) + if(!_lists ||_lists.length == 0){ + return false + } return Promise.all(_lists) .then(() => { return true diff --git a/src/main.ts b/src/main.ts index 50255e0c3..48fb29001 100644 --- a/src/main.ts +++ b/src/main.ts @@ -45,6 +45,9 @@ import VueDOMPurifyHTML from 'vue-dompurify-html' // 解决v-html 的安全隐 import DataVVue3 from '@kjgl77/datav-vue3' import { useLocaleStore } from '@/store/modules/locale' +import { vue_next_focus } from "vue-next-focus"; + + // 创建实例 const setupAll = async () => { const app = createApp(App) @@ -67,6 +70,7 @@ const setupAll = async () => { app.use(VueDOMPurifyHTML) app.use(DataVVue3) + app.use( vue_next_focus ) app.mount('#app') app.config.warnHandler = () => null; diff --git a/src/utils/validator.ts b/src/utils/validator.ts index 8a9d70261..b040b2ddf 100644 --- a/src/utils/validator.ts +++ b/src/utils/validator.ts @@ -788,6 +788,19 @@ export function validatePercent(rule, value, callback){ } } +export function validateSampleCode(rule, value, callback){ + if (value) { + const orgReg =/[A-Z]/ + if (orgReg.test(value)) { + callback() + } else { + callback(new Error('样本字码错误')) + } + } else { + callback() + } +} + export default { validateCode, validateEmail, diff --git a/src/views/eam/equipmentAccounts/ablesForm.vue b/src/views/eam/equipmentAccounts/ablesForm.vue new file mode 100644 index 000000000..4585930a9 --- /dev/null +++ b/src/views/eam/equipmentAccounts/ablesForm.vue @@ -0,0 +1,121 @@ + + + + diff --git a/src/views/eam/equipmentAccounts/index.vue b/src/views/eam/equipmentAccounts/index.vue index fe388bea2..9a7a924e6 100644 --- a/src/views/eam/equipmentAccounts/index.vue +++ b/src/views/eam/equipmentAccounts/index.vue @@ -50,7 +50,7 @@ :isBusiness="false" /> - + ([ - { - label: 'id', - field: 'id', - sort: 'custom', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - }, - { - label: '编码', - field: 'code', - sort: 'custom', - isSearch: true, - }, - { - label: '名称', - field: 'name', - sort: 'custom', - isSearch: true, - }, - { - label: '类型', - field: 'type', - sort: 'custom', - dictType: DICT_TYPE.DEVICE_TYPE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isSearch: true, - form: { - component: 'Select' - } - }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } +export const EquipmentMainPart = useCrudSchemas( + reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false + }, + { + label: '编码', + field: 'code', + sort: 'custom', + isSearch: true }, - isForm: false, - }, - { - label: '部门id', - field: 'departmentCode', - sort: 'custom', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - isSearch: false, - }, - { - label: '地点ID', - field: 'siteId', - sort: 'custom', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - }, - { - label: '是否启用', - field: 'available', - sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isTable: true, - isDetail: false, - isSearch: false, - isTableForm: false, - isForm: false, - }, - { - label: '删除时间', - field: 'deletionTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true + }, + { + label: '类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.DEVICE_TYPE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: true, + form: { + component: 'Select' } }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false + }, + { + label: '部门id', + field: 'departmentCode', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false + }, + { + label: '是否启用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false + }, + { + label: '删除时间', + field: 'deletionTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isTable: false, + isForm: false, + isDetail: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } } }, - }, - { - label: '删除人id', - field: 'deleterId', - sort: 'custom', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - }, - { - label: '并发乐观锁', - field: 'concurrencyStamp', - sort: 'custom', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - form: { - component: 'InputNumber', - value: 0 + { + label: '删除人id', + field: 'deleterId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false }, - }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } } - } -])) + ]) +) diff --git a/src/views/eam/itemAccounts/index.vue b/src/views/eam/itemAccounts/index.vue index 2369ba9cb..3e8f617a3 100644 --- a/src/views/eam/itemAccounts/index.vue +++ b/src/views/eam/itemAccounts/index.vue @@ -31,9 +31,9 @@ v-model:currentPage="tableObject.currentPage" v-model:sort="tableObject.sort" > -