From 5742dbf62147e6a8b12fdda2492c3533746821a6 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Wed, 15 May 2024 15:31:23 +0800 Subject: [PATCH] =?UTF-8?q?qad=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/qadproductionplan/index.ts | 58 +++++ .../qadproductionplan/index.vue | 244 ++++++++++++++++++ .../qadProductionPlanMain.data.ts | 119 +++++++++ 3 files changed, 421 insertions(+) create mode 100644 src/api/wms/qadproductionplan/index.ts create mode 100644 src/views/wms/productionManage/productionplan/qadproductionplan/index.vue create mode 100644 src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts diff --git a/src/api/wms/qadproductionplan/index.ts b/src/api/wms/qadproductionplan/index.ts new file mode 100644 index 000000000..c25893833 --- /dev/null +++ b/src/api/wms/qadproductionplan/index.ts @@ -0,0 +1,58 @@ +import request from '@/config/axios' + +export interface QadProductionPlanMainVO { + displayOrder: number + workshop: string + productionLine: string + shift: string + team: string + planDate: Date + details: string + number: string + planType: string + businessType: string + remark: string + woNumber: string + woLine: string +} + +// 查询QAD生产计划主列表 +export const getQadProductionPlanMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/qad-production-plan-main/senior', data }) + } else { + return await request.get({ url: `/wms/qad-production-plan-main/page`, params }) + } +} + +// 查询QAD生产计划主详情 +export const getQadProductionPlanMain = async (id: number) => { + return await request.get({ url: `/wms/qad-production-plan-main/get?id=` + id }) +} + +// 新增QAD生产计划主 +export const createQadProductionPlanMain = async (data: QadProductionPlanMainVO) => { + return await request.post({ url: `/wms/qad-production-plan-main/create`, data }) +} + +// 修改QAD生产计划主 +export const updateQadProductionPlanMain = async (data: QadProductionPlanMainVO) => { + return await request.put({ url: `/wms/qad-production-plan-main/update`, data }) +} + +// 删除QAD生产计划主 +export const deleteQadProductionPlanMain = async (id: number) => { + return await request.delete({ url: `/wms/qad-production-plan-main/delete?id=` + id }) +} + +// 导出QAD生产计划主 Excel +export const exportQadProductionPlanMain = async (params) => { + return await request.download({ url: `/wms/qad-production-plan-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/qad-production-plan-main/get-import-template' }) +} diff --git a/src/views/wms/productionManage/productionplan/qadproductionplan/index.vue b/src/views/wms/productionManage/productionplan/qadproductionplan/index.vue new file mode 100644 index 000000000..1b0427298 --- /dev/null +++ b/src/views/wms/productionManage/productionplan/qadproductionplan/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts b/src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts new file mode 100644 index 000000000..01a9d1b4a --- /dev/null +++ b/src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts @@ -0,0 +1,119 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const QadProductionPlanMainRules = reactive({ + workshop: [required], + woNumber: [required], + woLine: [required], +}) + +export const QadProductionPlanMain = useCrudSchemas(reactive([ + { + label: '顺序', + field: 'displayOrder', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + }, + { + label: '车间', + field: 'workshop', + sort: 'custom', + isSearch: true, + }, + { + label: '生产线', + field: 'productionLine', + sort: 'custom', + isSearch: true, + }, + { + label: '班次', + field: 'shift', + sort: 'custom', + isSearch: true, + }, + { + label: '班组', + field: 'team', + sort: 'custom', + }, + { + label: '计划日期', + field: 'planDate', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '明细列表', + field: 'details', + sort: 'custom', + }, + { + label: '计划类型', + field: 'planType', + sort: 'custom', + form: { + component: 'SelectV2' + }, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + form: { + component: 'SelectV2' + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + isForm: false, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + isForm: false, + }, + { + label: '订单号', + field: 'woNumber', + sort: 'custom', + }, + { + label: '订单行', + field: 'woLine', + sort: 'custom', + }, + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // } + // } +]))