From edd4f64d710ea3b675ad81d502bc58adce433958 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 26 Jun 2024 08:20:59 +0800 Subject: [PATCH 1/4] =?UTF-8?q?20000=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/en-US.ts | 2 +- src/locales/zh-CN.ts | 2 +- .../supplierinvoice/supplierinvoiceRequestMain/index.vue | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) 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/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 { From 69ffc260effae0d0ad09bd8edcddf8f534870308 Mon Sep 17 00:00:00 2001 From: gaojs <757918719@qq.com> Date: Wed, 26 Jun 2024 11:20:27 +0800 Subject: [PATCH 2/4] =?UTF-8?q?EAM=20=E2=80=94=E2=80=94>=20=20=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E6=95=B0=E6=8D=AE=E8=BD=A6=E9=97=B4=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/basicEamWorkshop/index.ts | 59 +++++ .../basicEamWorkshop/basicEamWorkshop.data.ts | 199 ++++++++++++++ src/views/eam/basicEamWorkshop/index.vue | 244 ++++++++++++++++++ 3 files changed, 502 insertions(+) create mode 100644 src/api/eam/basicEamWorkshop/index.ts create mode 100644 src/views/eam/basicEamWorkshop/basicEamWorkshop.data.ts create mode 100644 src/views/eam/basicEamWorkshop/index.vue diff --git a/src/api/eam/basicEamWorkshop/index.ts b/src/api/eam/basicEamWorkshop/index.ts new file mode 100644 index 000000000..330e0a251 --- /dev/null +++ b/src/api/eam/basicEamWorkshop/index.ts @@ -0,0 +1,59 @@ +import request from '@/config/axios' + +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' }) +} \ No newline at end of file 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..95ce7e199 --- /dev/null +++ b/src/views/eam/basicEamWorkshop/index.vue @@ -0,0 +1,244 @@ + + + From 9ade868f1c20ac3851a434be098e71f30b0cff5c Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 26 Jun 2024 11:27:22 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=A2=84=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E8=AE=A1=E5=88=92=E6=97=A0=E6=B3=95=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=EF=BC=8C=E6=8A=A5=E9=94=99=E2=80=9C=E7=94=9F=E4=BA=A7=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E4=B8=BB=E4=B8=8D=E5=AD=98=E5=9C=A8=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionplan/productionMain/index.vue | 6 +++++- .../productionplan/productionMainAssemble/index.vue | 6 +++++- .../productionMainAssembleSparePart/index.vue | 6 +++++- .../productionplan/productionMainPredictSparePart/index.vue | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) 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 From a4ff2bc4898b1e8a9fad158dc3cc801a6f2969fb Mon Sep 17 00:00:00 2001 From: gaojs <757918719@qq.com> Date: Wed, 26 Jun 2024 13:27:39 +0800 Subject: [PATCH 4/4] =?UTF-8?q?EAM=20=E2=80=94=E2=80=94>=20=20=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E6=95=B0=E6=8D=AE=E8=BD=A6=E9=97=B4=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/basicEamWorkshop/index.ts | 8 +++- src/views/eam/basicEamWorkshop/index.vue | 61 ++++++++++++++++++++++-- 2 files changed, 63 insertions(+), 6 deletions(-) diff --git a/src/api/eam/basicEamWorkshop/index.ts b/src/api/eam/basicEamWorkshop/index.ts index 330e0a251..31acbb17c 100644 --- a/src/api/eam/basicEamWorkshop/index.ts +++ b/src/api/eam/basicEamWorkshop/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import {EquipmentMainPartVO} from "@/api/eam/equipmentMainPart"; export interface BasicEamWorkshopVO { id: number @@ -56,4 +57,9 @@ export const exportBasicEamWorkshop = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/eam/basic-eam-workshop/get-import-template' }) -} \ No newline at end of file +} + +// 启用 / 禁用 +export const updateEnableCode = async (data: BasicEamWorkshopVO) => { + return await request.post({ url: `/eam/basic-eam-workshop/ables` , data }) +} diff --git a/src/views/eam/basicEamWorkshop/index.vue b/src/views/eam/basicEamWorkshop/index.vue index 95ce7e199..c3739217a 100644 --- a/src/views/eam/basicEamWorkshop/index.vue +++ b/src/views/eam/basicEamWorkshop/index.vue @@ -33,7 +33,7 @@ @@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' +import * as BasicFaultCauseApi from "@/api/eam/basicFaultCause"; defineOptions({ name: 'BasicEamWorkshop' }) @@ -131,11 +132,25 @@ const buttonBaseClick = (val, item) => { } } +const isShowMainButton = (row,val) => { + if (val.indexOf(row.available) > -1) { + return false + } else { + return true + } +} + // 列表-操作按钮 -const butttondata = [ - defaultButtons.mainListEditBtn({hasPermi:'eam:basicEamWorkshop:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'eam:basicEamWorkshop:delete'}), // 删除 -] +const butttondata = (row) => { + return [ + defaultButtons.mainListEditBtn({hasPermi:'eam:basicEamWorkshop:update'}), // 编辑 + //defaultButtons.mainListDeleteBtn({hasPermi:'eam:basicEamWorkshop:delete'}), // 删除 + defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:basicEamWorkshop:update'}), + defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:basicEamWorkshop:update'}), + ] +} + + // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { @@ -143,6 +158,10 @@ const buttonTableClick = async (val, row) => { openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id) + } else if (val == 'enable') { + handleEnable(row.id) + } else if (val == 'disable') { + handleDisable(row.id) } } @@ -195,6 +214,38 @@ const handleDelete = async (id: number) => { } catch {} } + +/** 启用 */ +const handleEnable = async (id: number) => { + try { + const params = ref({ + id: '', + available:'', + }) + params.value.id = id + params.value.available = 'TRUE' + await BasicEamWorkshopApi.updateEnableCode(params.value) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } catch {} +} +/** 禁用 */ +const handleDisable = async (id: number) => { + try { + const params = ref({ + id: '', + available:'', + }) + params.value.id = id + params.value.available = 'FALSE' + await BasicEamWorkshopApi.updateEnableCode(params.value) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } catch {} +} + /** 导出按钮操作 */ const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => {