From 4852f6f84b3d357aaf9e99135778d87b816822aa Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 28 Jun 2024 17:12:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=BD=A6=E9=97=B4=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mtm/materials.vue | 550 ++++++++++------- src/views/qm/process.vue | 42 +- src/views/wpm/mlog_dept10.vue | 75 +++ src/views/wpm/mlog_dept6.vue | 101 +++- src/views/wpm/mlog_dept7.vue | 75 +++ src/views/wpm/mlog_hun.vue | 1057 +++++++++++++++++++++------------ src/views/wpm/mlog_tui.vue | 1026 ++++++++++++++++++++------------ 7 files changed, 1937 insertions(+), 989 deletions(-) diff --git a/src/views/mtm/materials.vue b/src/views/mtm/materials.vue index d76623e7..57ad61ec 100644 --- a/src/views/mtm/materials.vue +++ b/src/views/mtm/materials.vue @@ -1,222 +1,344 @@ \ No newline at end of file + diff --git a/src/views/qm/process.vue b/src/views/qm/process.vue index 506b8453..7a51b071 100644 --- a/src/views/qm/process.vue +++ b/src/views/qm/process.vue @@ -3,7 +3,11 @@
- + + + 选择物料 + + + \ No newline at end of file + this.paramsWm.belong_dept = + this.currentMgroup.belong_dept; + this.paramsWm.material__name__contains = "混料"; + this.paramsWm.count__gte = 1; + this.apiObjWm = this.$API.wpm.wmaterial.list; + + this.$API.system.user.list + .req({ + page: 0, + belong_dept: this.currentMgroup.belong_dept, + }) + .then((res) => { + this.userList = res; + }); + } else { + this.$message.error("未找到工段"); + } + }); + }, + //从生产日志生成交接记录 + addHandover() { + this.getWmaterial(); + this.handoverForm.wm = ""; + this.handoverForm.send_date = ""; + this.handoverForm.send_user = ""; + this.handoverForm.recive_user = ""; //接收人 + this.handoverForm.recive_dept = ""; //接收车间 + this.handoverForm.send_dept = this.currentMgroup.belong_dept; + this.handoverForm.send_mgroup = this.currentMgroup.id; + this.handoverType = "add"; + this.handoverVisible = true; + }, + getWmaterial() { + let obj = {}; + obj.belong_dept = this.currentMgroup.belong_dept; + obj.material__name__contains = "混料"; + obj.page = 0; + obj.count__gte = 1; + this.$API.wpm.wmaterial.list.req(obj).then((res) => { + this.wmaterialList = res; + }); + }, + selectWmChange(item) { + this.handoverForm.count = item.count; + this.handoverForm.count_eweight = item.count_eweight; + this.handoverForm.wm = item.id; + this.handoverForm.send_dept = this.currentMgroup.belong_dept; + this.handoverForm.send_mgroup = this.currentMgroup.id; + this.handoverForm.material = item.material; + this.handoverForm.batch = item.batch; + }, + submitHandover() { + this.$API.wpm.handover.create.req(this.handoverForm).then((res) => { + this.$message.success("创建成功"); + this.handoverVisible = false; + this.$refs.table2.refresh(); + }); + }, + handover_edit(row) { + Object.assign(this.handoverForm, row); + this.getUserList2(row.recive_dept); + this.handoverVisible = true; + }, + handover_delete(row) { + this.$confirm(`确定删除吗?`, "提示", { + type: "warning", + }) + .then(() => { + this.$API.wpm.handover.delete + .req(row.id) + .then((res) => { + this.$message.success("删除成功"); + this.$refs.table2.refresh(); + return res; + }) + .catch((err) => { + return err; + }); + }) + .catch(() => {}); + }, + }, +}; + diff --git a/src/views/wpm/mlog_tui.vue b/src/views/wpm/mlog_tui.vue index 6a7b4589..395d223b 100644 --- a/src/views/wpm/mlog_tui.vue +++ b/src/views/wpm/mlog_tui.vue @@ -1,389 +1,663 @@ + + + + + + + + +
+ 车间库存 +
+
+ + + 选择物料 + 领料 + 入库 +
+
+ + + + + + + + + + +
+
+ + + + + + + + + + + {{ item.material_name }}---{{ + item.batch + }} + {{ item.count }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 取消 + 提交 + + + + + + + \ No newline at end of file + this.$API.system.user.list + .req({ + page: 0, + belong_dept: this.currentMgroup.belong_dept, + }) + .then((res) => { + this.userList = res; + }); + } else { + this.$message.error("未找到工段"); + } + }); + }, + //创建交接记录 + addHandover(row) { + this.getWmaterial(); + this.handoverForm.wm = ""; + this.handoverForm.send_date = ""; + this.handoverForm.send_user = ""; + + this.handoverForm.recive_user = ""; //接收人 + this.handoverForm.recive_dept = ""; //接收车间 + this.handoverForm.send_mgroup = this.currentMgroup.id; + this.handoverType = "add"; + this.handoverVisible = true; + }, + selectWmChange(item) { + this.handoverForm.count = item.count; + this.handoverForm.count_eweight = item.count_eweight; + this.handoverForm.wm = item.id; + this.handoverForm.send_dept = this.currentMgroup.belong_dept; + this.handoverForm.send_mgroup = this.currentMgroup.id; + this.handoverForm.material = item.material; + this.handoverForm.batch = item.batch; + }, + getWmaterial() { + let obj = {}; + obj.belong_dept = this.currentMgroup.belong_dept; + obj.material__process = this.currentMgroup.process; + obj.page = 0; + obj.count__gte = 1; + this.$API.wpm.wmaterial.list.req(obj).then((res) => { + this.wmaterialList = res; + }); + }, + submitHandover() { + this.$API.wpm.handover.create.req(this.handoverForm).then((res) => { + this.$message.success("创建成功"); + this.handoverVisible = false; + this.$refs.table2.refresh(); + }); + }, + handover_edit(row) { + Object.assign(this.handoverForm, row); + this.getUserList2(row.recive_dept); + this.handoverType = "edit"; + this.handoverVisible = true; + }, + handover_delete(row) { + this.$confirm(`确定删除吗?`, "提示", { + type: "warning", + }) + .then(() => { + this.$API.wpm.handover.delete + .req(row.id) + .then((res) => { + this.$message.success("删除成功"); + this.$refs.table2.refresh(); + return res; + }) + .catch((err) => { + return err; + }); + }) + .catch(() => {}); + }, + }, +}; +