diff --git a/src/api/eam/basicEamWorkshop/index.ts b/src/api/eam/basicEamWorkshop/index.ts new file mode 100644 index 000000000..31acbb17c --- /dev/null +++ b/src/api/eam/basicEamWorkshop/index.ts @@ -0,0 +1,65 @@ +import request from '@/config/axios' +import {EquipmentMainPartVO} from "@/api/eam/equipmentMainPart"; + +export interface BasicEamWorkshopVO { + id: number + code: string + name: string + description: string + type: string + available: string + activeTime: Date + expireTime: Date + remark: string + deletionTime: Date + deleterId: string + extraProperties: string + concurrencyStamp: number + siteId: string +} + +// 查询EAM车间列表 +export const getBasicEamWorkshopPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/basic-eam-workshop/senior', data }) + } else { + return await request.get({ url: `/eam/basic-eam-workshop/page`, params }) + } +} + +// 查询EAM车间详情 +export const getBasicEamWorkshop = async (id: number) => { + return await request.get({ url: `/eam/basic-eam-workshop/get?id=` + id }) +} + +// 新增EAM车间 +export const createBasicEamWorkshop = async (data: BasicEamWorkshopVO) => { + return await request.post({ url: `/eam/basic-eam-workshop/create`, data }) +} + +// 修改EAM车间 +export const updateBasicEamWorkshop = async (data: BasicEamWorkshopVO) => { + return await request.put({ url: `/eam/basic-eam-workshop/update`, data }) +} + +// 删除EAM车间 +export const deleteBasicEamWorkshop = async (id: number) => { + return await request.delete({ url: `/eam/basic-eam-workshop/delete?id=` + id }) +} + +// 导出EAM车间 Excel +export const exportBasicEamWorkshop = async (params) => { + return await request.download({ url: `/eam/basic-eam-workshop/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/basic-eam-workshop/get-import-template' }) +} + +// 启用 / 禁用 +export const updateEnableCode = async (data: BasicEamWorkshopVO) => { + return await request.post({ url: `/eam/basic-eam-workshop/ables` , data }) +} diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index 4cedb45c2..ec715bc6f 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -1054,7 +1054,7 @@ export default { 供应商发票申请主:'Supplier invoice request master data', 请添明细数据:'Please provide detailed data', 非SCP订单无法打印:'Non SCP orders cannot be printed', - '明细数据条数已超过最大数量限制【999条】':'The number of detailed data items has exceeded the maximum limit [999 items]', + '明细数据条数已超过最大数量限制【20000条】':'The number of detailed data items has exceeded the maximum limit [20000 items]', 供应商发货申请主导入模版:'Supplier delivery request is led into the template', 供应商发票申请主导入模板:'Supplier invoice request lead into template', 供应商发票申请明细:'Supplier invoice request details', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index fbb2fd3a7..f7586d6ea 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -1054,7 +1054,7 @@ export default { 供应商发票申请主:'供应商发票申请主', 请添明细数据:'请添明细数据', 非SCP订单无法打印:'非SCP订单无法打印', - '明细数据条数已超过最大数量限制【999条】':'明细数据条数已超过最大数量限制【999条】', + '明细数据条数已超过最大数量限制【20000条】':'明细数据条数已超过最大数量限制【20000条】', 供应商发货申请主导入模版:'供应商发货申请主导入模版', 供应商发票申请主导入模板:'供应商发票申请主导入模板', 供应商发票申请明细:'供应商发票申请明细', diff --git a/src/views/eam/basicEamWorkshop/basicEamWorkshop.data.ts b/src/views/eam/basicEamWorkshop/basicEamWorkshop.data.ts new file mode 100644 index 000000000..49809cffb --- /dev/null +++ b/src/views/eam/basicEamWorkshop/basicEamWorkshop.data.ts @@ -0,0 +1,199 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const BasicEamWorkshopRules = reactive({ + code: [required], + available: [required], + concurrencyStamp: [required], +}) + +export const BasicEamWorkshop = useCrudSchemas(reactive([ + { + 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: 'description', + sort: 'custom', + isSearch: false, + }, + { + label: '车间类型', + field: 'type', + sort: 'custom', + isSearch: true, + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + }, + { + label: '生效时间', + field: 'activeTime', + 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: '失效时间', + field: 'expireTime', + 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: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: 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')] + } + }, + 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: 'extraProperties', + 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: 'siteId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/basicEamWorkshop/index.vue b/src/views/eam/basicEamWorkshop/index.vue new file mode 100644 index 000000000..c3739217a --- /dev/null +++ b/src/views/eam/basicEamWorkshop/index.vue @@ -0,0 +1,295 @@ + + + diff --git a/src/views/wms/productionManage/productionplan/productionMain/index.vue b/src/views/wms/productionManage/productionplan/productionMain/index.vue index 25e53a661..ccf175c27 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMain/index.vue @@ -461,7 +461,11 @@ const tableSelectionDelete = (selection) => { } // 主子数据 提交 -const submitForm = async (formType, data) => { +const submitForm = async (formType, submitData) => { + let data = {...submitData} + if(data.masterId){ + data.id = data.masterId + } if(tableData.value.find(item => (item.planQty <= 0))) { message.warning('数量必须大于0') formRef.value.formLoading = false diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue index f8dab6fc1..91b97e1da 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue @@ -448,7 +448,11 @@ const tableSelectionDelete = (selection) => { } // 主子数据 提交 -const submitForm = async (formType, data) => { +const submitForm = async (formType, submitData) => { + let data = {...submitData} + if(data.masterId){ + data.id = data.masterId + } if(tableData.value.find(item => (item.planQty <= 0))) { message.warning('数量必须大于0') formRef.value.formLoading = false diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue index 338d62945..468b425b1 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue @@ -447,7 +447,11 @@ const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) } // 主子数据 提交 -const submitForm = async (formType, data) => { +const submitForm = async (formType, submitData) => { + let data = {...submitData} + if(data.masterId){ + data.id = data.masterId + } if(tableData.value.find(item => (item.planQty <= 0))) { message.warning('数量必须大于0') formRef.value.formLoading = false diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue index 186b60738..6d039de03 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue @@ -448,7 +448,11 @@ const tableSelectionDelete = (selection) => { } // 主子数据 提交 -const submitForm = async (formType, data) => { +const submitForm = async (formType, submitData) => { + let data = {...submitData} + if(data.masterId){ + data.id = data.masterId + } if(tableData.value.find(item => (item.planQty <= 0))) { message.warning('数量必须大于0') formRef.value.formLoading = false diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index 47e2b3da1..21d03a373 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -985,10 +985,10 @@ const handleImport = () => { message.warning(t('ts.请添明细数据')) return; } - // if(data.subList.length > 999){ - // message.warning(t('ts.明细数据条数已超过最大数量限制【999条】')) - // return; - // } + if(data.subList.length > 20000){ + message.warning(t('ts.明细数据条数已超过最大数量限制【20000条】')) + return; + } await SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain(data) message.success(t('common.createSuccess')) } else {