diff --git a/src/api/mes/orderDay/index.ts b/src/api/mes/orderDay/index.ts new file mode 100644 index 000000000..0b88e4782 --- /dev/null +++ b/src/api/mes/orderDay/index.ts @@ -0,0 +1,102 @@ +import request from '@/config/axios' + +export interface OrderDayVO { + status: string + remark: string + planNoMonth: string + planNoDay: string + productCode: string + workroomCode: string + lineCode: string + planCount: number + processrouteCode: string + tempProcessroute: string + standardBom: string + tempBom: string + workMode: string + planDate: Date + startTime: Date + endTime: Date + taskMode: string +} + +// 查询生产日计划列表 +export const getOrderDayPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/orderday/senior', data }) + } else { + return await request.get({ url: `/mes/orderday/page`, params }) + } +} + +// 查询生产日计划详情 +export const getOrderDay = async (id: number) => { + return await request.get({ url: `/mes/orderday/get?id=` + id }) +} + +// 新增生产日计划 +export const createOrderDay = async (data: OrderDayVO) => { + return await request.post({ url: `/mes/orderday/create`, data }) +} + +// 修改生产日计划 +export const updateOrderDay = async (data: OrderDayVO) => { + return await request.put({ url: `/mes/orderday/update`, data }) +} + +// 删除生产日计划 +export const deleteOrderDay = async (id: number) => { + return await request.delete({ url: `/mes/orderday/delete?id=` + id }) +} + +// 导出生产日计划 Excel +export const exportOrderDay = async (params) => { + return await request.download({ url: `/mes/orderday/export-excel`, params }) +} +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/mes/orderday/get-import-template' }) +} +// 根据产品编码获取Bom +export const getBoms = async (code: String) => { + return request.get({ url: '/mes/common/geBomByProductCode?code='+code }) +} +// 根据产品编码获取工艺路线 +export const getProcessroutes = async (code: String) => { + return request.get({ url: '/mes/common/getProcessRouteByProductCode?code='+code }) +} +// 根据车间编码获取产线列表 +export const getProductlines = async (code: String) => { + return request.get({ url: '/mes/common/getLinesByWorkRoomCode?code='+code }) +} +// 获取产线信息 +export const getProductlineInfo = async (code: String) => { + return request.get({ url: '/mes/common/getLinesByWorkRoomCode?code='+code }) +} +// 根据工艺路线的工序信息 +export const getProcessroutesDetail = async (code) => { + return await request.get({ url: `/mes/orderday/getProcessInfo?code=`+ code }) +} +// 根据获取计划BOM信息 +export const getPlanBom = async (params) => { + return await request.get({ url: `/mes/orderday/getBomInfo`,params }) +} +// 根据计划的车间、产线、计划时间 查询已经配置的人员 +export const getPlanWorks = async (params) => { + return await request.get({ url: `/mes/orderday/getWorkGroup`,params }) +} +// 根据车间、产线 查询已配置的设备 +export const getPlanDevices = async (params) => { + return await request.get({ url: `/mes/orderday/getDeviceInfo`,params }) +} + +///发布计划 +export const publishPlan = async (params) => { + return await request.post({ url: `/mes/orderday/publishPlan`,params }) +} +//终止计划 +export const stopPlan = async (params) => { + return await request.post({ url: `/mes/orderday/stopPlan`,params }) +} \ No newline at end of file diff --git a/src/api/qms/samplingProcess/index.ts b/src/api/qms/samplingProcess/index.ts new file mode 100644 index 000000000..68a42f63a --- /dev/null +++ b/src/api/qms/samplingProcess/index.ts @@ -0,0 +1,53 @@ +import request from '@/config/axios' + +export interface SamplingProcessVO { + id: number + code: string + describe: string + sampleType: string + evaluationMode: string + sampleSize: number + sampleProgCode: number + available: string +} + +// 查询采样过程列表 +export const getSamplingProcessPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/qms/sampling-process/senior', data }) + } else { + return await request.get({ url: `/qms/sampling-process/page`, params }) + } +} + +// 查询采样过程详情 +export const getSamplingProcess = async (id: number) => { + return await request.get({ url: `/qms/sampling-process/get?id=` + id }) +} + +// 新增采样过程 +export const createSamplingProcess = async (data: SamplingProcessVO) => { + return await request.post({ url: `/qms/sampling-process/create`, data }) +} + +// 修改采样过程 +export const updateSamplingProcess = async (data: SamplingProcessVO) => { + return await request.put({ url: `/qms/sampling-process/update`, data }) +} + +// 删除采样过程 +export const deleteSamplingProcess = async (id: number) => { + return await request.delete({ url: `/qms/sampling-process/delete?id=` + id }) +} + +// 导出采样过程 Excel +export const exportSamplingProcess = async (params) => { + return await request.download({ url: `/qms/sampling-process/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/qms/sampling-process/get-import-template' }) +} \ No newline at end of file diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 790198bfc..4b0b7512f 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -25,7 +25,7 @@ /> - +
@@ -97,22 +97,25 @@ - + - - - - - + + + + + + + +
@@ -142,6 +145,7 @@ + diff --git a/src/views/mes/orderDay/components/orderDetail.vue b/src/views/mes/orderDay/components/orderDetail.vue new file mode 100644 index 000000000..ce6d955bd --- /dev/null +++ b/src/views/mes/orderDay/components/orderDetail.vue @@ -0,0 +1,237 @@ + + + + + diff --git a/src/views/mes/orderDay/components/schedule.vue b/src/views/mes/orderDay/components/schedule.vue new file mode 100644 index 000000000..0d05bb829 --- /dev/null +++ b/src/views/mes/orderDay/components/schedule.vue @@ -0,0 +1,332 @@ + + + + + diff --git a/src/views/mes/orderDay/index.vue b/src/views/mes/orderDay/index.vue new file mode 100644 index 000000000..f7193af01 --- /dev/null +++ b/src/views/mes/orderDay/index.vue @@ -0,0 +1,331 @@ + + + diff --git a/src/views/mes/orderDay/orderDay.data.ts b/src/views/mes/orderDay/orderDay.data.ts new file mode 100644 index 000000000..1f9cd3889 --- /dev/null +++ b/src/views/mes/orderDay/orderDay.data.ts @@ -0,0 +1,327 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' +import * as WorkshopApi from '@/api/wms/workshop' +import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' +import { on } from '@/utils/domUtils' + +// 表单校验 +export const OrderDayRules = reactive({ + planNoDay: [ + { required: true, message: '请输入一个日计划编号', trigger: 'blur' } + ], + planNoMonth: [ + { required: true, message: '请输入一个月计划编号', trigger: 'blur' } + ], + productCode: [ + { required: true, message: '请选择一个产品', trigger: 'blur' } + ], + workroomCode: [ + { required: true, message: '请选择一个车间', trigger: 'blur' } + ], + lineCode: [ + { required: true, message: '请选择一个产线', trigger: 'blur' } + ], + workMode: [ + { required: true, message: '请选择工单生成方式', trigger: 'blur' } + ], + startTime: [ + { required: true, message: '请输入计划生产开始时间', trigger: 'blur' } + ], + endTime: [ + { required: true, message: '请输入计划生产完成时间', trigger: 'blur' } + ], + planDate: [ + { required: true, message: '请输入计划日期', trigger: 'blur' } + ], + taskMode: [ + { required: true, message: '请选择一个生产方式', trigger: 'blur' } + ], +}) + +export const OrderDay = useCrudSchemas(reactive([ + { + label: '主键', + field: 'id', + sort: 'custom', + isForm: false, + width: '60px', + }, + { + label: '日计划单号', + field: 'planNoDay', + sort: 'custom', + isSearch: true, + required: true, + }, + { + label: '月计划单号', + field: 'planNoMonth', + sort: 'custom', + isSearch: true, + required: false, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + isForm: false, + isTable: true, + isDetail:true, + isSearch: false, + width: '80px', + dictType: DICT_TYPE.MES_PLANDO_STATUS, + dictClass: 'string', + form: { + component: 'Select', + }, + }, + { + label: '产品编号', + field: 'productCode', + sort: 'custom', + isSearch: true, + required: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '产品编码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '产品信息', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 + isHideFilterButton:true, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'type', + action: 'in', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + value: 'FG,SEMI',//,SEMI] + isMainValue: false + }, + + ] + } + } + }, + { + label: '车间编码', + field: 'workroomCode', + sort: 'custom', + isSearch: true, + required: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '车间', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '车间信息', // 查询弹窗标题 + searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + + }, + { + label: '产线编码', + field: 'lineCode', + sort: 'custom', + isSearch: true, + required: true, + form:{ + component:'Select', + componentProps:{ + options:[{lablel:'1',value:'1'}] + } + } + }, + { + label: '计划数量', + field: 'planCount', + sort: 'custom', + required: true, + form: { + component: 'InputNumber', + value: 1 + }, + }, + { + label: '工艺路线编码', + field: 'processrouteCode', + sort: 'custom', + form: { + component:'Select', + componentProps: { + options: [] + } + } + }, + { + label: '临时工艺', + field: 'tempProcessroute', + sort: 'custom', + width: '80px', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: 'BOM编码', + field: 'standardBom', + sort: 'custom', + form: { + component:'Select', + componentProps: { + options: [{lablel:'bom',value:'bom'}] + } + } + }, + { + label: '替代BOM', + field: 'tempBom', + sort: 'custom', + width: '80px', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + } + } + }, + { + label: '工单模式', + field: 'workMode', + width: '80px', + sort: 'custom', + dictType: DICT_TYPE.MES_WORKBILL_MODEL, + dictClass: 'string', + form: { + component: 'Select', + value: 'BATCH', + }, + }, + { + label: '计划日期', + field: 'planDate', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + type: 'date', + valueFormat: 'YYYY-MM-DD', + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'date', + valueFormat: 'x' + } + }, + }, + { + label: '开始时间', + field: 'startTime', + sort: 'custom', + formatter: dateFormatter, + required: true, + form: { + component: 'TimePicker', + componentProps: { + type: 'time', + dateFormat: 'HH:mm', + //valueFormat: 'x', + } + }, + }, + { + label: '结束时间', + field: 'endTime', + sort: 'custom', + formatter: dateFormatter, + isReadonly:true, + form: { + component: 'TimePicker', + componentProps: { + type: 'time', + dateFormat: 'HH:mm', + } + }, + }, + { + label: '生产模式', + field: 'taskMode', + width : '80px', + sort: 'custom', + dictType: DICT_TYPE.MES_TASK_MODE, + dictClass: 'string', + form: { + component: 'Select', + value:'ASSIGN' + }, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'datetime', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + isTable:false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 200, + fixed: 'right' + } + } +])) diff --git a/src/views/mes/processroute/components/configDialog.vue b/src/views/mes/processroute/components/configDialog.vue index 3f041b99b..71006812c 100644 --- a/src/views/mes/processroute/components/configDialog.vue +++ b/src/views/mes/processroute/components/configDialog.vue @@ -43,7 +43,28 @@ -
+
+ +
+ + + + + + + + + + @@ -53,9 +74,9 @@ 产品信息 -

产品名称:{{ productData.name }}

-

产品编码:{{ productData.code }}

-

产品描述:{{ productData.desc1 }}

+

产品名称:{{ productData.name }}

+

产品编码:{{ productData.code }}

+

产品描述:{{ productData.desc1 }}

diff --git a/src/views/qms/samplingProcess/samplingProcess.data.ts b/src/views/qms/samplingProcess/samplingProcess.data.ts new file mode 100644 index 000000000..a805e2a01 --- /dev/null +++ b/src/views/qms/samplingProcess/samplingProcess.data.ts @@ -0,0 +1,84 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const SamplingProcessRules = reactive({ + code: [required], + sampleType: [required], + evaluationMode: [required], + available: [required], +}) + +export const SamplingProcess = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isTable: false, + isForm: false, + }, + { + label: '编码', + field: 'code', + sort: 'custom', + isSearch: true, + }, + { + label: '描述', + field: 'describe', + sort: 'custom', + isSearch: true, + }, + { + label: '取样类型', + field: 'sampleType', + sort: 'custom', + dictType: DICT_TYPE.SAMPLING_TYPE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: true, + form: { + component: 'SelectV2' + }, + }, + { + label: '评估模式', + field: 'evaluationMode', + sort: 'custom', + dictType: DICT_TYPE.EVALUATION_MODE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'SelectV2' + }, + }, + { + label: '样品量', + field: 'sampleSize', + sort: 'custom', + }, + { + label: '采样方案编码', + field: 'sampleProgCode', + sort: 'custom', + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))