diff --git a/src/views/pm/utask_dept10.vue b/src/views/pm/utask_dept10.vue index e39a87c0..05151662 100644 --- a/src/views/pm/utask_dept10.vue +++ b/src/views/pm/utask_dept10.vue @@ -5,9 +5,9 @@
新增任务 + v-auth="'utask.create'">新增任务 任务分解并下达 + v-auth="'utask.assgin'">任务分解并下达
@@ -77,7 +77,7 @@ - + + + @@ -124,11 +125,13 @@ + + \ No newline at end of file diff --git a/src/views/wpm/mlog_dept10.vue b/src/views/wpm/mlog_dept10.vue index 2ea2c8ea..6366371e 100644 --- a/src/views/wpm/mlog_dept10.vue +++ b/src/views/wpm/mlog_dept10.vue @@ -53,7 +53,6 @@ - @@ -89,8 +88,7 @@ - + @@ -146,9 +144,7 @@ - - @@ -196,7 +192,6 @@ - @@ -236,12 +231,29 @@ + \ No newline at end of file +import saveDialog from "./mlog6_form.vue"; +export default { + components: { + saveDialog, + }, + data() { + return { + dialog: { + save: false, + }, + apiObj:null, + query: { + page: 1, + page_size: 20, + belong_dept_name: '6车间', + date: '2023-10-24' + }, + tableData: [], + selection: [], + processList: [],//工序进度 + state_: { + 10: '创建中', + 20: '已下达', + 30: '生产中', + 40: '已提交', + }, + hideDo: true, + currentMtask:{}, + apiObjWm: this.$API.wpm.wmaterial.list, + apiObjMlog:null, + paramsMlog:{ + mtask:'' + }, + paramsWm: { + belong_dept__name: '6车间' + }, + dialogSave:false, + } + }, + mounted() { + let NowDate = new Date(); + this.query.date = NowDate.getFullYear() + '-' + (NowDate.getMonth() + 1) + '-' + NowDate.getDate(); + this.apiObj = this.$API.pm.mtask.daylist; + }, + methods: { + tomio() { + this.$router.push({ name: "mio" }); + }, + //点击任务 + rowClick(row) { + let that = this; + this.$API.pm.mtask.list.req({ start_date: row.start_date, end_date: row.end_date, mgroup__belong_dept__name: '6车间', utask: row.utask }).then(res => { + that.processList = res.results; + }) + }, + //工序详情 + itemClick(row){ + this.currentMtask = row; + this.mgroup = row.mgroup; + this.mtask = row.id; + this.material_out = row.material_out_.id; + this.paramsMlog.mtask = this.mtask; + this.apiObjMlog = this.$API.wpm.mlog.list; + }, + handleQueryMtask(){}, + //添加 + addMlog() { + let that = this; + if (that.currentMtask && that.currentMtask.id) { + that.mgroup = that.currentMtask.mgroup; + that.material_out = that.currentMtask.material_out; + that.dialogSave = true; + that.$nextTick(() => { + that.$refs.saveDialog.open("add"); + }); + } else { + that.$message.warning("请选择任务"); + } + }, + //编辑 + table_edit(row) { + this.dialogSave = true; + this.$nextTick(() => { + this.$refs.saveDialog.open("edit").setData(row); + }); + }, + //查看 + table_show(row) { + this.$nextTick(() => { + this.$router.push({ + name: "worktaskFlog", + query: { mtask: row.id } + }); + }); + }, + //删除 + async table_del(row) { + this.$confirm(`确定删除吗?`, "提示", { + type: "warning", + }).then(() => { + this.$API.pm.mtask.delete.req(row.id).then((res) => { + this.$message.success("删除成功"); + return res; + }).catch((err) => { + return err; + }); + }).catch(() => { }); + }, + + //本地更新数据 + handleSaveSuccess(data, mode) { + this.$refs.mtaskMlogs.refresh(); + }, + handleQuery() { + this.$refs.table.queryData(this.query) + }, + resetQuery() { + this.query = {}; + }, + } +} + + \ No newline at end of file diff --git a/src/views/wpm/mlog_dept7.vue b/src/views/wpm/mlog_dept7.vue index bfd4ffd0..3efc2207 100644 --- a/src/views/wpm/mlog_dept7.vue +++ b/src/views/wpm/mlog_dept7.vue @@ -43,13 +43,13 @@ - + @@ -88,8 +88,7 @@ - + @@ -153,7 +152,6 @@ - @@ -241,12 +239,27 @@ + \ No newline at end of file diff --git a/src/views/wpm/mlog_hun.vue b/src/views/wpm/mlog_hun.vue index c0e09a6c..6b4de710 100644 --- a/src/views/wpm/mlog_hun.vue +++ b/src/views/wpm/mlog_hun.vue @@ -153,8 +153,7 @@ @@ -179,8 +178,7 @@ export default { dialogSave:false, deptOptions: [], userList: [], - userList2: [], - mtask:'', + userList2: [] } }, mounted() { @@ -207,7 +205,7 @@ export default { }).then(() => { this.$API.wpm.mlog.delete.req(row.id).then((res) => { this.$message.success("删除成功"); - + this.$refs.table.refresh(); return res; }).catch((err) => { return err; @@ -218,8 +216,8 @@ export default { this.$refs.table.refresh(); }, getDepts() { - this.$API.system.dept.list.req({ page: 0, name__in: '7车间,10车间' }).then(res => { - this.deptOptions = res + this.$API.system.dept.list.req({ page: 0, name__in: '7车间,8车间,10车间' }).then(res => { + this.deptOptions = res; }) }, getUserList2(val) { @@ -273,20 +271,19 @@ export default { 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; + }); }) - .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(() => { }); + .catch(() => { }); }, } } diff --git a/src/views/wpm/mlog_tui.vue b/src/views/wpm/mlog_tui.vue index abc264ab..18f9488f 100644 --- a/src/views/wpm/mlog_tui.vue +++ b/src/views/wpm/mlog_tui.vue @@ -11,6 +11,11 @@ + @@ -59,9 +64,10 @@ -