From e683cf39ca0b154e714d56426cdfb99c464604d6 Mon Sep 17 00:00:00 2001
From: shilixia <2309368887@qq.com>
Date: Fri, 15 Oct 2021 10:14:19 +0800
Subject: [PATCH] shengchanzijihua
---
hb_client/src/api/pm.js | 28 ++++-
hb_client/src/router/index.js | 8 ++
hb_client/src/views/pm/plan.vue | 49 ++++++--
hb_client/src/views/pm/work.vue | 181 ++++++++++++++++++++++++++++++
hb_client/src/views/sam/order.vue | 2 +-
5 files changed, 257 insertions(+), 11 deletions(-)
create mode 100644 hb_client/src/views/pm/work.vue
diff --git a/hb_client/src/api/pm.js b/hb_client/src/api/pm.js
index 7386fec..6fb9dc8 100644
--- a/hb_client/src/api/pm.js
+++ b/hb_client/src/api/pm.js
@@ -3,14 +3,14 @@ import request from '@/utils/request'
//生产排程
export function getProductionplanList(query) {
return request({
- url: 'pm/productionplan/',
+ url: 'pm/production_plan/',
method: 'get',
params: query
})
}
export function createProductionplan(data) {
return request({
- url: 'pm/productionplan/',
+ url: 'pm/production_plan/',
method: 'post',
data
})
@@ -31,3 +31,27 @@ export function createequip(data) {
data
})
}
+//生成子计划
+export function createsubplan(id, data) {
+ return request({
+ url: `/pm/production_plan/${id}/gen_subplan/`,
+ method: 'post',
+ data
+ })
+}
+//子计划列表
+export function getsubproductionplanList(query) {
+ return request({
+ url: '/pm/subproduction_plan/',
+ method: 'get',
+ params: query
+ })
+}
+//子计划编辑开始结束时间
+export function updatesubproductionplan(id, data) {
+ return request({
+ url: `/pm/subproduction_plan/${id}/`,
+ method: 'put',
+ data
+ })
+}
diff --git a/hb_client/src/router/index.js b/hb_client/src/router/index.js
index 4b8ad23..19400d5 100644
--- a/hb_client/src/router/index.js
+++ b/hb_client/src/router/index.js
@@ -144,6 +144,14 @@ export const asyncRoutes = [
name: 'plan',
component: () => import('@/views/pm/plan'),
meta: { title: '生产计划管理', icon: 'example', perms: ['index_manage'] }
+ }
+ ,
+ {
+ path: 'work/:id',
+ name: 'work',
+ component: () => import('@/views/pm/work'),
+ meta: { title: '生产子计划', perms: ['vendor_manage'] },
+ hidden: true
},
{
path: 'resources',
diff --git a/hb_client/src/views/pm/plan.vue b/hb_client/src/views/pm/plan.vue
index 2f2fa4d..a8f2c6e 100644
--- a/hb_client/src/views/pm/plan.vue
+++ b/hb_client/src/views/pm/plan.vue
@@ -51,7 +51,12 @@
{{ scope.row.order_.delivery_date }}
-
+
+
+ 否
+ 是
+
+
{{ scope.row.create_time }}
@@ -61,13 +66,14 @@
width="100px"
>
-
车间排产
-
+ v-if="scope.row.is_planed"
+ @click="handleselectplan(scope)"
+ >查看子计划
+ 生产子计划
@@ -118,6 +124,8 @@
{{ scope.row.delivery_date }}
+
+
{{ scope.row.create_time }}
@@ -190,7 +198,7 @@
\ No newline at end of file
diff --git a/hb_client/src/views/sam/order.vue b/hb_client/src/views/sam/order.vue
index 79e731b..175621e 100644
--- a/hb_client/src/views/sam/order.vue
+++ b/hb_client/src/views/sam/order.vue
@@ -74,7 +74,7 @@
编辑