From 19b684192a4fdb2dee9e8f9c63691f5f7562ba71 Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Wed, 13 Oct 2021 09:27:15 +0800 Subject: [PATCH] chanpinguanli --- hb_client/src/api/mtm.js | 42 ++- hb_client/src/api/pm.js | 18 ++ hb_client/src/api/sam.js | 7 + hb_client/src/router/index.js | 35 +++ hb_client/src/views/inm/materialbatch.vue | 178 ++++++++++++ hb_client/src/views/inm/warehouse.vue | 4 +- hb_client/src/views/mtm/materialdo.vue | 11 +- hb_client/src/views/mtm/productprocess.vue | 246 +++++++++++++--- hb_client/src/views/mtm/step.vue | 4 +- hb_client/src/views/pm/plan.vue | 288 +++++++++++++++++++ hb_client/src/views/pm/resources.vue | 308 +++++++++++++++++++++ 11 files changed, 1086 insertions(+), 55 deletions(-) create mode 100644 hb_client/src/api/pm.js create mode 100644 hb_client/src/views/inm/materialbatch.vue create mode 100644 hb_client/src/views/pm/plan.vue create mode 100644 hb_client/src/views/pm/resources.vue diff --git a/hb_client/src/api/mtm.js b/hb_client/src/api/mtm.js index 317cbcb..940a086 100644 --- a/hb_client/src/api/mtm.js +++ b/hb_client/src/api/mtm.js @@ -1,5 +1,6 @@ import request from '@/utils/request' //物料 + export function getMaterialList(query) { return request({ url: '/mtm/material/', @@ -34,6 +35,36 @@ export function deleteMaterial(id, data) { data }) } +//产品分解 +export function getsubproducationList(query) { + return request({ + url: '/mtm/subproducation/', + method: 'get', + params: query + }) +} +export function createsubproducation(data) { + return request({ + url: '/mtm/subproducation/', + method: 'post', + data + }) +} + +export function updatesubproducation(id, data) { + return request({ + url: `/mtm/subproducation/${id}/`, + method: 'put', + data + }) +} +export function deletesubproducation(id, data) { + return request({ + url: `/mtm/subproducation/${id}/`, + method: 'delete', + data + }) +} //工序 export function getProcessList(query) { return request({ @@ -64,7 +95,16 @@ export function deleteProcess(id, data) { }) } //子工序 -export function getStepList(id) { +export function getStepList(query) { + return request({ + url: `/mtm/step/`, + method: 'get', + params: query + }) +} + + +export function getStepLists(id) { return request({ url: `/mtm/process/${id}/steps/`, method: 'get' diff --git a/hb_client/src/api/pm.js b/hb_client/src/api/pm.js new file mode 100644 index 0000000..4f3365d --- /dev/null +++ b/hb_client/src/api/pm.js @@ -0,0 +1,18 @@ +import request from '@/utils/request' + +//生产排程 +export function getProductionplanList(query) { + return request({ + url: 'pm/productionplan/', + method: 'get', + params: query + }) +} +export function createProductionplan(data) { + return request({ + url: 'pm/productionplan/', + method: 'post', + data + }) +} + diff --git a/hb_client/src/api/sam.js b/hb_client/src/api/sam.js index 451942a..cc378cd 100644 --- a/hb_client/src/api/sam.js +++ b/hb_client/src/api/sam.js @@ -87,3 +87,10 @@ export function deleteOrder(id, data) { data }) } + +export function getordertoplan() { + return request({ + url: '/sam/order/toplan/', + method: 'get', + }) +} \ No newline at end of file diff --git a/hb_client/src/router/index.js b/hb_client/src/router/index.js index 48d89d0..0b386cb 100644 --- a/hb_client/src/router/index.js +++ b/hb_client/src/router/index.js @@ -130,6 +130,34 @@ export const asyncRoutes = [ meta: { title: '产品管理', icon: 'example', perms: ['vendor_manage'] } }, ] + } + , + { + path: '/pm', + component: Layout, + redirect: '/pm/plan', + name: 'pm', + meta: { title: '生产管理', icon: 'example', perms: ['equipment_set'] }, + children: [ + { + path: 'plan', + name: 'plan', + component: () => import('@/views/pm/plan'), + meta: { title: '生产计划管理', icon: 'example', perms: ['index_manage'] } + }, + { + path: 'resources', + name: 'resources', + component: () => import('@/views/pm/resources'), + meta: { title: '生产资源配置', icon: 'example', perms: ['index_manage'] } + }, + { + path: 'testitem', + name: 'testitem', + component: () => import('@/views/pm/plan'), + meta: { title: '生产作业管理', icon: 'example', perms: ['index_manage'] } + } + ] }, { path: '/em', @@ -233,6 +261,13 @@ export const asyncRoutes = [ name: 'warehouse', component: () => import('@/views/inm/warehouse'), meta: { title: '仓库', icon: 'example', perms: ['index_manage'] } + }, + { + path: 'materialbatch/:id', + name: 'MaterialBatch', + component: () => import('@/views/inm/materialbatch'), + meta: { title: '仓库物料', perms: ['vendor_manage'] }, + hidden: true } , { diff --git a/hb_client/src/views/inm/materialbatch.vue b/hb_client/src/views/inm/materialbatch.vue new file mode 100644 index 0000000..939f3dc --- /dev/null +++ b/hb_client/src/views/inm/materialbatch.vue @@ -0,0 +1,178 @@ + + diff --git a/hb_client/src/views/inm/warehouse.vue b/hb_client/src/views/inm/warehouse.vue index d632f37..928ed5b 100644 --- a/hb_client/src/views/inm/warehouse.vue +++ b/hb_client/src/views/inm/warehouse.vue @@ -177,9 +177,9 @@ export default { this.listLoading = false; }); }, - + //跳转到该仓库的物料表 handleMaterial(scope){ - alert(1) + this.$router.push({name: "MaterialBatch", params: { id: scope.row.id }, }) }, handleFilter() { this.listQuery.page = 1; diff --git a/hb_client/src/views/mtm/materialdo.vue b/hb_client/src/views/mtm/materialdo.vue index a64aab7..85efa25 100644 --- a/hb_client/src/views/mtm/materialdo.vue +++ b/hb_client/src/views/mtm/materialdo.vue @@ -61,16 +61,7 @@ - - - - - - + diff --git a/hb_client/src/views/mtm/productprocess.vue b/hb_client/src/views/mtm/productprocess.vue index 29afc03..29734fe 100644 --- a/hb_client/src/views/mtm/productprocess.vue +++ b/hb_client/src/views/mtm/productprocess.vue @@ -15,8 +15,7 @@ fit stripe highlight-current-row - height="100" - v-el-height-adaptive-table="{bottomOffset: 50}" + @current-change="handleCurrentChange"> @@ -30,9 +29,6 @@ - - - @@ -56,7 +52,9 @@ - + + +
+
+ 生产分解 +
+ 新增 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 取消 + 确认 +
+
+ + @@ -272,8 +351,10 @@ - - + + + + - + + +
@@ -327,10 +410,7 @@
- - 新增 - + 新增 @@ -426,7 +506,8 @@ \ No newline at end of file diff --git a/hb_client/src/views/pm/resources.vue b/hb_client/src/views/pm/resources.vue new file mode 100644 index 0000000..21af9ad --- /dev/null +++ b/hb_client/src/views/pm/resources.vue @@ -0,0 +1,308 @@ + + \ No newline at end of file