diff --git a/src/views/wpm/mlog_dept10.vue b/src/views/wpm/mlog_dept10.vue index 4cf8bd4f..aa5adee6 100644 --- a/src/views/wpm/mlog_dept10.vue +++ b/src/views/wpm/mlog_dept10.vue @@ -1,519 +1,864 @@ - - - - - - - - - - - - - - - {{ - scope.row.material_out_.name - }} - - - - - - {{ - scope.row.material_out_.specification - }}|{{ scope.row.material_out_.model }} - - - - - - - - - - - - - {{ state_[scope.row.state] }} - - - {{ state_[scope.row.state] }} - - - - - - - 提交 - - - - - - - - - - - - - - - 任务信息 - - - - - {{ currentMtask.number }} - {{ state_[currentMtask.state] - }} - - {{ currentMtask.material_out_.name - }} - {{ - currentMtask.material_out_.specification - }} - {{ currentMtask.count_ok - }} - {{ currentMtask.count_notok - }} - - - - - - - - - 新增 - - - - - - - - - - - - - - {{ item.material_out_name }}| - {{ - item.count_ok - }} - - - {{ scope.row.material_out_name }} - - - - - - - - {{ Math.floor(scope.row.count_ok / scope.row.count_real * 100) - }}% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 编辑 - - 删除 - - 提交 - - 撤回 - - - 日志记录 - - - - - - - - - - - - - - - - - - 交接记录 - - - - - - - - - - {{ - scope.row.material_.name - }} - - - - - - - - - - - - - 是 - 否 - - - - - - - 确认 - - - - - - - - - - - - 车间库存 - - - 领料 - 入库 - - - - - - - {{ - scope.row.material_.name - }} - - - - {{ - scope.row.material_.specification - }} - - - - {{ - scope.row.material_.model - }} - - - - {{ - scope.row.material_.process_name - }} - - - - - - - - - - - - - - - - - - - - - - 确定 - 取消 - - - + + + + + + + + 新增 + + + + + + + + + + + + + + {{ + item.material_out_name + }}| + {{ + item.count_ok + }} + + + + {{ + scope.row + .material_out_name + }} + + + + + + + + {{ + Math.floor( + (scope.row + .count_ok / + scope.row + .count_real) * + 100 + ) + }}% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + 删除 + + 提交 + + 撤回 + + + 日志记录 + + + + + + + + + + + + + + + + + + 交接记录 + + + + + + + + + {{ + scope.row.material_.name + }} + + + + + + + + + + + + + 是 + 否 + + + + + + 确认 + + + + + + + + + + + + 车间库存 + + + 领料 + 入库 + + + + + + {{ + scope.row.material_.name + }} + + + {{ + scope.row.material_.specification + }} + + + {{ + scope.row.material_.model + }} + + + {{ + scope.row.material_.process_name + }} + + + + + + + + + + + + + + + + + + + + + + + 确定 + 取消 + + + \ No newline at end of file + // }) + // }, + table_show(row) { + this.mlogId = row.id; + this.visibleDrawer = true; + this.$nextTick(() => { + this.$refs.showDrawer.open(); + }); + }, + table_edit(row) { + this.brothersList = row.mlogb; + this.dialogSave = true; + this.$nextTick(() => { + this.$refs.saveDialog.open("edit").setData(row); + }); + }, + //删除 + table_del(row) { + let that = this; + this.$confirm(`确定删除吗?`, "提示", { + type: "warning", + }) + .then(() => { + that.$API.wpm.mlog.delete + .req(row.id) + .then((res) => { + that.$message.success("删除成功"); + that.getMlogs(); + return res; + }) + .catch((err) => { + return err; + }); + }) + .catch(() => {}); + }, + handleSaveSuccess() { + this.getMlogs(); + }, + mlog_submit(row) { + this.mlogHandleLoading = true; + this.$API.wpm.mlog.submit + .req(row.id) + .then((res) => { + this.$message.success("操作成功"); + this.mtaskClick(this.currentMtask); + this.$refs.table_wm.refresh(); + this.mlogHandleLoading = false; + }) + .catch((err) => { + this.mlogHandleLoading = false; + }); + }, + }, +}; + diff --git a/src/views/wpm/mlog_dept6.vue b/src/views/wpm/mlog_dept6.vue index 524b308a..7ad85391 100644 --- a/src/views/wpm/mlog_dept6.vue +++ b/src/views/wpm/mlog_dept6.vue @@ -1,293 +1,446 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - {{ state_[scope.row.state] }} - - - {{ state_[scope.row.state] }} - - - - - - - - - - - - 各工序进度 - - - - - - - - - - - - - - - - - - - - 提交 - - - - - - - - - - - - - - - - - - 交接记录 - - - - - - - - - - - - - - - - - - - 是 - 否 - - - - - - - 确认 - - - - - - - - - - - - - 车间库存 - - - 领料 - 入库 - - - - - - - - {{ scope.row.material_.name }} - - - - - - {{ scope.row.material_.specification }} - - - - - - {{ scope.row.material_.model }} - - - - - {{ - scope.row.material_.process_name - }} - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ state_[scope.row.state] }} + + + {{ state_[scope.row.state] }} + + + {{ state_[scope.row.state] }} + + + {{ state_[scope.row.state] }} + + + + + + + + + + + + 各工序进度 + + + + + + + + + + + + + + + + + + + 提交 + + + + + + + + + + + + + + + + + + 交接记录 + + + + + + + + + + + + + + + + + + + 是 + 否 + + + + + + 确认 + + + + + + + + + + + + + 车间库存 + + + 领料 + 入库 + + + + + + + {{ scope.row.material_.name }} + + + + + {{ scope.row.material_.specification }} + + + + + {{ scope.row.material_.model }} + + + + {{ + scope.row.material_.process_name + }} + + + + + + + + + + + + \ No newline at end of file + diff --git a/src/views/wpm/mlog_dept7.vue b/src/views/wpm/mlog_dept7.vue index 833fdf30..e64d298a 100644 --- a/src/views/wpm/mlog_dept7.vue +++ b/src/views/wpm/mlog_dept7.vue @@ -1,448 +1,770 @@ - - - - - - - - - - - - - - - {{ - scope.row.material_out_.name - }} - - - - - {{ - scope.row.material_out_.specification - }}|{{ scope.row.material_out_.model }} - - - - - - - - - - - - {{ state_[scope.row.state] }} - - - {{ state_[scope.row.state] }} - - - - - - 提交 - - - - - - - - - - - - - - 任务信息 - - - - {{ currentMtask.number }} - {{ state_[currentMtask.state] }} - - {{ currentMtask.material_out_.name - }} - {{ - currentMtask.material_out_.specification - }} - {{ currentMtask.count_ok - }} - {{ currentMtask.count_notok - }} - - - - - - - - 新增 - - - - - - - - - {{ - scope.row.material_out_.name - }} - - - - - - - {{ - scope.row.material_out_.specification - }} - - - - - - - - {{ Math.floor(scope.row.count_ok / scope.row.count_real * 100) - }}% - - - - - - - - - - - - - - - - - - - - - - - - - - 编辑 - - 删除 - - 提交 - - 撤回 - - - 日志记录 - - - - - - - - - - - - - - - - - - - 交接记录 - - - - - - - - - {{ - scope.row.material_.name - }} - - - - - - - - - - - - 是 - 否 - - - - - - 确认 - - - - - - - - - - - - - 车间库存 - - - 领料 - 入库 - - - - - - {{ - scope.row.material_.name - }} - - - {{ - scope.row.material_.specification - }} - - - {{ - scope.row.material_.model - }} - - - {{ - scope.row.material_.process_name - }} - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + {{ + scope.row.material_out_.name + }} + + + + + {{ + scope.row.material_out_ + .specification + }}|{{ + scope.row.material_out_.model + }} + + + + + + + + + + + + + + {{ state_[scope.row.state] }} + + + {{ state_[scope.row.state] }} + + + {{ state_[scope.row.state] }} + + + {{ state_[scope.row.state] }} + + + + + + 提交 + + + + + + + + + + + + + + 任务信息 + + + + {{ + currentMtask.number + }} + {{ + state_[currentMtask.state] + }} + + {{ + currentMtask.material_out_.name + }} + {{ + currentMtask.material_out_ + .specification + }} + {{ + currentMtask.count_ok + }} + {{ + currentMtask.count_notok + }} + + + + + + + + 新增 + + + + + + + + + {{ + scope.row.material_out_ + .name + }} + + + + + + + {{ + scope.row.material_out_ + .specification + }} + + + + + + + + + {{ + Math.floor( + (scope.row + .count_ok / + scope.row + .count_real) * + 100 + ) + }}% + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + 删除 + + 提交 + + 撤回 + + + 日志记录 + + + + + + + + + + + + + + + + + + 交接记录 + + + + + + + + + {{ + scope.row.material_.name + }} + + + + + + + + + + + + + 是 + 否 + + + + + + 确认 + + + + + + + + + + + + 车间库存 + + + 领料 + 入库 + + + + + + {{ + scope.row.material_.name + }} + + + {{ + scope.row.material_.specification + }} + + + {{ + scope.row.material_.model + }} + + + {{ + scope.row.material_.process_name + }} + + + + + + + + + + + + + + + + \ No newline at end of file + this.paramsWm.belong_dept = this.currentDept.id; + this.paramsWm.count__gte = 1; + this.apiObjWm = this.$API.wpm.wmaterial.list; + } else { + this.$message.error("未找到车间"); + } + }); + }, + handleQueryMtask() { + if (this.queryMtaskState) { + this.queryMtask.state__in = "20,30,34,40"; + } else { + this.queryMtask.state__in = "20,30,40"; + } + this.$refs.table_mtask.queryData(this.queryMtask); + }, + handover_submit(row) { + this.$API.wpm.handover.submit + .req(row.id) + .then((res) => { + this.$refs.table_handover.refresh(); + this.$message.success("操作成功"); + }) + .catch((e) => {}); + }, + getMlogs() { + this.$API.wpm.mlog.list + .req({ mtask: this.currentMtask.id, page: 0 }) + .then((res) => { + this.mlogs = res; + }); + }, + getMtask() { + this.$API.pm.mtask.item.req(this.currentMtask.id).then((res) => { + this.currentMtask = res; + }); + }, + mtaskClick(row) { + this.currentMtask = row; + this.getMtask(); + this.getMlogs(); + }, + mtask_submit(row) { + let lengths = row.mlogs.length, + infoText = ""; + if (lengths > 0) { + infoText = "该任务有" + lengths + "条日志,确定提交吗?"; + } else { + infoText = "该任务没有日志,确定提交吗?"; + } + this.$confirm(infoText, "提示", { + type: "warning", + }).then(() => { + this.$API.pm.mtask.submit + .req(row.id) + .then((res) => { + this.$message.success("操作成功"); + this.$refs.table_mtask.refresh(); + this.mtaskClick(this.currentMtask); + }) + .catch((err) => {}); + }); + }, + handleSaveSuccess() { + this.getMlogs(); + }, + table_show(row) { + this.mlogId = row.id; + this.visibleDrawer = true; + this.$nextTick(() => { + this.$refs.showDrawer.open(); + }); + }, + mlog_submit(row) { + this.mlogHandleLoading = true; + this.$API.wpm.mlog.submit + .req(row.id) + .then((res) => { + this.$message.success("操作成功"); + this.mtaskClick(this.currentMtask); + this.$refs.table_wm.refresh(); + this.mlogHandleLoading = false; + }) + .catch((err) => { + this.mlogHandleLoading = false; + }); + }, + }, +}; +