diff --git a/src/api/mes/orderDay/index.ts b/src/api/mes/orderDay/index.ts
index 852c8f0e3..00f348d3e 100644
--- a/src/api/mes/orderDay/index.ts
+++ b/src/api/mes/orderDay/index.ts
@@ -98,8 +98,8 @@ export const getPlanDevices = async (params) => {
}
///发布计划
-export const publishPlan = async (params) => {
- return await request.post({ url: `/mes/orderday/publishPlan`,params })
+export const publishPlan = async (data: OrderDayVO) => {
+ return await request.post({ url: `/mes/orderday/publishPlan`,data })
}
//终止计划
export const stopPlan = async (params) => {
diff --git a/src/api/mes/orderDayConfig/index.ts b/src/api/mes/orderDayConfig/index.ts
index 1b7cdae4c..b5134d9c5 100644
--- a/src/api/mes/orderDayConfig/index.ts
+++ b/src/api/mes/orderDayConfig/index.ts
@@ -34,4 +34,4 @@ export const getConfigProcessWorker = async (params) => {
// 查询已经的工序工位设备
export const getConfigProcessEquipment = async (params) => {
return await request.get({ url: `/mes/orderDayequipment/getByOrder`, params })
-}
\ No newline at end of file
+}
diff --git a/src/api/mes/workScheduling/index.ts b/src/api/mes/workScheduling/index.ts
new file mode 100644
index 000000000..08591d25b
--- /dev/null
+++ b/src/api/mes/workScheduling/index.ts
@@ -0,0 +1,46 @@
+import request from '@/config/axios'
+
+export interface WorkSchedulingVO {
+ flagDo: string
+}
+
+// 查询生产任务排产列表
+export const getWorkSchedulingPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/mes/work-scheduling/senior', data })
+ } else {
+ return await request.get({ url: `/mes/work-scheduling/page`, params })
+ }
+}
+
+// 查询生产任务排产详情
+export const getWorkScheduling = async (id: number) => {
+ return await request.get({ url: `/mes/work-scheduling/get?id=` + id })
+}
+
+// 新增生产任务排产
+export const createWorkScheduling = async (data: WorkSchedulingVO) => {
+ return await request.post({ url: `/mes/work-scheduling/create`, data })
+}
+
+// 修改生产任务排产
+export const updateWorkScheduling = async (data: WorkSchedulingVO) => {
+ return await request.put({ url: `/mes/work-scheduling/update`, data })
+}
+
+// 删除生产任务排产
+export const deleteWorkScheduling = async (id: number) => {
+ return await request.delete({ url: `/mes/work-scheduling/delete?id=` + id })
+}
+
+// 导出生产任务排产 Excel
+export const exportWorkScheduling = async (params) => {
+ return await request.download({ url: `/mes/work-scheduling/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/mes/work-scheduling/get-import-template' })
+}
\ No newline at end of file
diff --git a/src/views/mes/orderDay/components/schedule.vue b/src/views/mes/orderDay/components/schedule.vue
index 7fdd2bd63..27e8dadf9 100644
--- a/src/views/mes/orderDay/components/schedule.vue
+++ b/src/views/mes/orderDay/components/schedule.vue
@@ -99,7 +99,7 @@
- 发布计划
+ 发布计划
@@ -115,7 +115,8 @@ import {
createGraph,
getNewNode
} from '@/views/mes/processroute/components/graphbase.data'
-import * as orderDayconfigApi from '@/api/mes/orderDayconfig'
+import * as orderDayconfigApi from '@/api/mes/orderDayConfig'
+import * as OrderDayApi from '@/api/mes/orderDay'
import {ProcessSearch} from '../../publicUtil/processSearch.data'
import * as ProcessApi from '@/api/wms/process'
import { SearchTable } from '@/components/SearchTable'
@@ -286,7 +287,30 @@ const opensearchTable = (
true
)
}
-
+const publishPlan= async ()=>{
+ let data ={
+ id: detailData.value.id,
+ status: detailData.value.status,
+ remark: detailData.value.remark,
+ planNoMonth: detailData.value.planNoMonth,
+ planNoDay: detailData.value.planNoDay,
+ productCode: detailData.value.productCode,
+ workroomCode: detailData.value.workroomCode,
+ lineCode: detailData.value.lineCode,
+ planCount: detailData.value.planCount,
+ processrouteCode: detailData.value.processrouteCode,
+ tempProcessroute: detailData.value.tempProcessroute,
+ standardBom: detailData.value.standardBom,
+ tempBom: detailData.value.tempBom,
+ workMode: detailData.value.workMode,
+ planDate: detailData.value.planDate,
+ startTime: detailData.value.planDate,
+ endTime: detailData.value.endTime,
+ taskMode: detailData.value.taskMode
+}
+ console.log("-------",data)
+ await OrderDayApi.publishPlan(data)
+}
// 弹层确定返回所选数据
// val : 弹层列表row 数据
const searchTableSuccess = (formField, searchField, val, type, row) => {
diff --git a/src/views/mes/workScheduling/index.vue b/src/views/mes/workScheduling/index.vue
new file mode 100644
index 000000000..9df35398a
--- /dev/null
+++ b/src/views/mes/workScheduling/index.vue
@@ -0,0 +1,244 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mes/workScheduling/workScheduling.data.ts b/src/views/mes/workScheduling/workScheduling.data.ts
new file mode 100644
index 000000000..16bda9f81
--- /dev/null
+++ b/src/views/mes/workScheduling/workScheduling.data.ts
@@ -0,0 +1,143 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+
+// 表单校验
+export const WorkSchedulingRules = reactive({
+})
+
+export const WorkScheduling = useCrudSchemas(reactive([
+ {
+ label: '主键',
+ field: 'id',
+ sort: 'custom',
+ isForm: false,
+ },
+ {
+ label: '状态',
+ field: 'status',
+ sort: 'custom',
+ isSearch: true,
+ isForm: false,
+ },
+ {
+ 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: '计划编号',
+ field: 'planMaserCode',
+ sort: 'custom',
+ isSearch: true,
+ isForm: false,
+ },
+ {
+ label: '任务编号',
+ field: 'schedulingCode',
+ sort: 'custom',
+ isSearch: true,
+ isForm: false,
+ },
+ {
+ label: '产品编号',
+ field: 'productCode',
+ sort: 'custom',
+ isSearch: true,
+ isForm: false,
+ },
+ {
+ label: '车间',
+ field: 'workroomCode',
+ sort: 'custom',
+ isSearch: true,
+ isForm: false,
+ },
+ {
+ label: '产线',
+ field: 'lineCode',
+ sort: 'custom',
+ isSearch: true,
+ isForm: false,
+ },
+ {
+ label: '工艺路线',
+ field: 'prouteCode',
+ sort: 'custom',
+ isSearch: true,
+ isForm: false,
+ },
+ {
+ label: '计划数量',
+ field: 'planCount',
+ sort: 'custom',
+ isForm: false,
+ },
+ {
+ label: '完工数量',
+ field: 'finishCount',
+ sort: 'custom',
+ isForm: false,
+ },
+ {
+ label: '合格数量',
+ field: 'qualifiedCount',
+ sort: 'custom',
+ isForm: false,
+ },
+ {
+ label: '不合格数量',
+ field: 'unqualifiedCount',
+ sort: 'custom',
+ isForm: false,
+ },
+ {
+ label: '执行状态',
+ field: 'flagDo',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '当前工序',
+ field: 'workingNode',
+ sort: 'custom',
+ isForm: false,
+ },
+ {
+ label: '当前任务号',
+ field: 'workingTaskSort',
+ sort: 'custom',
+ isForm: false,
+ },
+ {
+ label: '工单模式',
+ field: 'formType',
+ sort: 'custom',
+ isForm: false,
+ },
+ {
+ label: '生产序号',
+ field: 'workSort',
+ sort: 'custom',
+ isForm: false,
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isForm: false,
+ table: {
+ width: 150,
+ fixed: 'right'
+ }
+ }
+]))