From c24a68bedc0a62e3a99705aeeac6265270b15020 Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Fri, 10 Dec 2021 13:23:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_client/src/api/inm.js | 10 ++ hb_client/src/api/mtm.js | 3 +- hb_client/src/api/sam.js | 9 +- hb_client/src/api/wpm.js | 26 +++++ hb_client/src/views/inm/product.vue | 85 +++++++++++++- hb_client/src/views/sam/sales.vue | 16 ++- hb_client/src/views/sam/salesdetail.vue | 56 +--------- hb_client/src/views/wpm/need.vue | 72 +++++++++++- hb_client/src/views/wpm/operationdo.vue | 140 +++++++++++++++++++++--- hb_client/src/views/wpm/productjy.vue | 2 +- hb_client/src/views/wpm/worktask.vue | 1 + 11 files changed, 334 insertions(+), 86 deletions(-) diff --git a/hb_client/src/api/inm.js b/hb_client/src/api/inm.js index 5eedd2c..ad0eab6 100644 --- a/hb_client/src/api/inm.js +++ b/hb_client/src/api/inm.js @@ -103,4 +103,14 @@ export function getiproductList(query) { method: 'get', params: query }) +} + +//军检 +//军检 +export function saleMtest(id, data) { + return request({ + url: `/inm/iproduct/${id}/mtest/`, + method: 'POST', + data + }) } \ No newline at end of file diff --git a/hb_client/src/api/mtm.js b/hb_client/src/api/mtm.js index 07d16f7..bac34b9 100644 --- a/hb_client/src/api/mtm.js +++ b/hb_client/src/api/mtm.js @@ -368,4 +368,5 @@ export function deletetechdoc(id, data) { method: 'delete', data }) -} \ No newline at end of file +} + diff --git a/hb_client/src/api/sam.js b/hb_client/src/api/sam.js index 0672a32..037a628 100644 --- a/hb_client/src/api/sam.js +++ b/hb_client/src/api/sam.js @@ -154,14 +154,7 @@ export function deleteSaleproduct(id, data) { }) } -//军检 -export function saleMtest(id, data) { - return request({ - url: `/sam/sale_product/${id}/mtest/`, - method: 'POST', - data - }) -} + //审核 export function saleAudit(id) { return request({ diff --git a/hb_client/src/api/wpm.js b/hb_client/src/api/wpm.js index b274167..e776157 100644 --- a/hb_client/src/api/wpm.js +++ b/hb_client/src/api/wpm.js @@ -261,6 +261,32 @@ export function createputins(data) { data }) } +//车间领料批量提交 +export function createInputs(data) { + return request({ + url: '/wpm/operation_input/creates/', + method: 'post', + data + }) +} +//产出批量提交 +export function createOutputs(data) { + return request({ + url: '/wpm/operation_output/creates/', + method: 'post', + data + }) +} + + +//表格初始化 + +export function recordInit(id) { + return request({ + url: `/wpm/operation_record/${id}/init/`, + method: 'GET', + }) +} diff --git a/hb_client/src/views/inm/product.vue b/hb_client/src/views/inm/product.vue index 2af5745..dc4d61f 100644 --- a/hb_client/src/views/inm/product.vue +++ b/hb_client/src/views/inm/product.vue @@ -28,8 +28,38 @@ + + + + + + + + + + + + + + + + + 合格 + 不合格 + + + + + + + +
+ 取消 + 确认 +
+
diff --git a/hb_client/src/views/sam/sales.vue b/hb_client/src/views/sam/sales.vue index f5fe5f9..75a1ebc 100644 --- a/hb_client/src/views/sam/sales.vue +++ b/hb_client/src/views/sam/sales.vue @@ -98,6 +98,7 @@ @@ -142,7 +144,7 @@
- +
@@ -224,7 +226,7 @@ export default { if (response.data) { response.data.forEach((item) => { this.iproductoptions.push({ - label: item.material_.name, + label: item.number+"__"+item.material_.name+"__"+(item.is_mtested==true?"已军检":"未军检") , key: item.id }) }); @@ -275,7 +277,7 @@ export default { if (response.data) { response.data.forEach((item) => { this.iproductoptions.push({ - label: item.material_.name, + label: item.number+"__"+item.material_.name+"__"+(item.is_mtested==true?"已军检":"未军检") , key: item.id }) }); @@ -292,7 +294,7 @@ export default { if (response.data) { response.data.forEach((item) => { this.iproductoptions.push({ - label: item.material_.name, + label: item.number+"__"+item.material_.name+"__"+(item.is_mtested==true?"已军检":"未军检") , key: item.id }) }); @@ -399,6 +401,10 @@ export default { diff --git a/hb_client/src/views/sam/salesdetail.vue b/hb_client/src/views/sam/salesdetail.vue index b766830..88e0b1a 100644 --- a/hb_client/src/views/sam/salesdetail.vue +++ b/hb_client/src/views/sam/salesdetail.vue @@ -60,11 +60,7 @@ > diff --git a/hb_client/src/views/wpm/need.vue b/hb_client/src/views/wpm/need.vue index 4ed28d8..3d8e4c4 100644 --- a/hb_client/src/views/wpm/need.vue +++ b/hb_client/src/views/wpm/need.vue @@ -157,6 +157,54 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + @@ -268,6 +316,9 @@ }, wproductList2: { count: 0, + }, + wproductList3: { + count: 0, }, listQuery: { page: 1, @@ -280,6 +331,10 @@ listQuery2: { page: 1, page_size: 20, + }, + listQuery3: { + page: 1, + page_size: 20, }, formLabelWidth:'', formLabelWidthL:'', @@ -291,6 +346,7 @@ 40: "库存中", 50: "不合格", 60: "待成品检验", + 26:"待夹层检验", }, choice: [ { @@ -331,6 +387,7 @@ this.getList(); this.getList2(); this.getList1(); + this.getList3(); // this.getLists(); }, methods: { @@ -361,7 +418,7 @@ getList1() { this.listQuery1.act_state = 30; - this.listQuery1.material__type = 1; + this.listQuery1.material__type = 2; getwproductList(this.listQuery1).then((response) => { if (response.data) { this.wproductList1 = response.data; @@ -369,7 +426,17 @@ }); }, + //夹层半成品列表 + getList3() { + this.listQuery3.act_state = 26; + getwproductList(this.listQuery3).then((response) => { + if (response.data) { + this.wproductList3 = response.data; + } + + }); + }, //半成品批量入库 handleCreate() { this.dialogFormVisibles = true; @@ -383,7 +450,7 @@ _this.mutipID = [] this.$refs.multipleTable.selection.forEach((item) => { _this.mutipID.push(item.id); - alert(_this.mutipID); + }); console.log(_this.mutipID); @@ -475,6 +542,7 @@ this.getList(); this.getList1(); this.getList2(); + this.getList3(); } }); diff --git a/hb_client/src/views/wpm/operationdo.vue b/hb_client/src/views/wpm/operationdo.vue index d3da9da..ace3ea3 100644 --- a/hb_client/src/views/wpm/operationdo.vue +++ b/hb_client/src/views/wpm/operationdo.vue @@ -50,6 +50,20 @@ 取消
+ + + + + + + + @@ -161,10 +175,10 @@ :model="tableForm" :visible.sync="dialogVisibleForm" :close-on-click-modal="false" - :title="tableForm.name" + :title="fieldList.name" > - + + + - + + + - + +
+ 取消 + 提交 +
+
@@ -404,7 +435,12 @@ stripe style="width: 100%" max-height="400" - > + ref="multipleTables" + > + + @@ -440,7 +476,7 @@ - + +
+ 取消 + 提交 +
@@ -493,9 +533,12 @@ import { deleteOperationwproduct, gettoolList, createTool, + createInputs, + recordInit, + createOutputs } from "@/api/wpm"; -import { getrffieldList } from "@/api/mtm"; +import { getrffieldList,gettechdocList } from "@/api/mtm"; import checkPermission from "@/utils/permission"; import { getprogressList } from "@/api/pm"; import Pagination from "@/components/Pagination"; // secondary package based on el-pagination @@ -505,9 +548,11 @@ export default { inject: ["reload"], data() { return { + techdocList:"", operationList: { count: 0, }, + drawer:false, listQuery: { page: 1, page_size: 20, @@ -633,7 +678,12 @@ export default { //作业指导书 readbook(){ - + this.drawer=true; + gettechdocList({operation:this.id,page:0}).then((response) => { + if (response.data) { + this.techdocList= response.data; + } + }); }, //是否使用边角料 @@ -719,9 +769,7 @@ export default { handlerecord(scope) { this.tableForm = Object.assign({}, scope.row); // copy obj this.formID = scope.row.id; - this.listQueryfield.form = scope.row.form_.id; - this.listQueryfield.page = 0; - getrffieldList(this.listQueryfield).then((response) => { + recordInit( this.formID).then((response) => { if (response.data) { this.fieldList = response.data; } @@ -784,6 +832,40 @@ export default { } }); }, + +//车间领料批量提交 + handlepicks() { + + + let _this = this; + + this.pickDatas=[], + this.$refs.multipleTable.selection.forEach((item) => { + if(item.pick_count>0) + { + this.pickDatas.push({ + "operation" :this.id, + "wmaterial":item.id, + "count": item.pick_count, + + }); + } + + + }); + + + createInputs(this.pickDatas).then((res) => { + if (res.code >= 200) { + this.dialogTablepick = false; + this.$message.success("提交成功!"); + _this.getinputLists(); + + } + }); + }, + + //操作产出物料列表 getoutputLists() { getoutputList({ operation: this.id, page: 0 }).then((response) => { @@ -816,6 +898,38 @@ export default { } }); }, + //车间产出物料批量提交 + handleoutputs() { + + + this.outputDatas=[], + this.$refs.multipleTables.selection.forEach((item) => { + if(item.output_count>0) + { + this.outputDatas.push({ + "operation" :this.id, + "subproduction_progress":item.id, + "count": item.output_count, + + }); + } + + + }); + + createOutputs(this.outputDatas).then((res) => { + if (res.code >= 200) { + this.dialogTableoutput = false; + + this.$message.success("提交成功!"); + this.getoutputLists(); + + + } + }); + }, + + //提交本次操作 handlesubmit() { submitOperation(this.id).then((res) => { diff --git a/hb_client/src/views/wpm/productjy.vue b/hb_client/src/views/wpm/productjy.vue index 37fd54b..638bb83 100644 --- a/hb_client/src/views/wpm/productjy.vue +++ b/hb_client/src/views/wpm/productjy.vue @@ -440,7 +440,7 @@ export default { _this.mutipID=[] this.$refs.multipleTable.selection.forEach((item) => { _this.mutipID.push( item.id ); - alert(_this.mutipID); + }); console.log(_this.mutipID); diff --git a/hb_client/src/views/wpm/worktask.vue b/hb_client/src/views/wpm/worktask.vue index 12da811..58efbcd 100644 --- a/hb_client/src/views/wpm/worktask.vue +++ b/hb_client/src/views/wpm/worktask.vue @@ -703,6 +703,7 @@ export default { 50: "不合格", 60: "待成品检验", 8:"操作准备中", + 26:"待夹层检验", }, state_: { 0: "制定中",