fix:coding#656

This commit is contained in:
shijing 2024-11-29 17:42:37 +08:00
parent 13d0d7d5f7
commit 5b676f7c4b
3 changed files with 83 additions and 2 deletions

View File

@ -424,7 +424,13 @@
<el-container>
<el-header>
<div class="left-panel">
<span style="font-size: 14px">交接记录</span>
<span style="font-size: 14px;margin-right: 10px;">交接记录</span>
<el-button
type="primary"
@click="addHandover"
v-auth="'handover.create'"
>新增
</el-button>
</div>
<div class="right-panel">
<el-input
@ -644,6 +650,14 @@
<el-button @click="addMtaskInfoVisible = false">取消</el-button>
</el-footer>
</el-dialog>
<handover-dialog
v-if="dialogHandover"
ref="handoverDialog"
:mgroup="mgroup"
:dept="currentDept.id"
@success="handleHandoverSuccess"
@closed="dialogHandover = false">
</handover-dialog>
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
<materials
style="height: 500px"
@ -656,6 +670,7 @@
</template>
<script>
import handoverDialog from "./handover_form.vue";
import saveDialog from "./worktask_form.vue";
import showDrawer from "./mlog_drawer.vue";
import materials from "./../mtm/materials.vue";
@ -664,6 +679,7 @@ export default {
saveDialog,
showDrawer,
materials,
handoverDialog
},
data() {
return {
@ -708,6 +724,7 @@ export default {
material_model: "",
queryMtaskState: false,
materialsVisible: false,
dialogHandover:false,
};
},
mounted() {
@ -934,6 +951,14 @@ export default {
this.mlogHandleLoading = false;
});
},
//
addHandover() {
this.dialogHandover = true;
this.$nextTick(() => {
this.$refs.handoverDialog.open('add');
})
},
handleHandoverSuccess(){},
},
};
</script>

View File

@ -158,6 +158,12 @@
<el-header>
<div class="left-panel">
<span style="font-size: 14px">交接记录</span>
<el-button
type="primary"
@click="addHandover"
v-auth="'handover.create'"
>新增
</el-button>
</div>
<div class="right-panel">
<el-input
@ -347,15 +353,24 @@
@choseChange="choseChange"
></materials>
</el-dialog>
<handover-dialog
v-if="dialogHandover"
ref="handoverDialog"
:dept="currentDeptId"
@success="handleHandoverSuccess"
@closed="dialogHandover = false">
</handover-dialog>
</template>
<script>
import handoverDialog from "./handover_form.vue";
import showDrawer from "./mlog_dept6_detail.vue";
import materials from "./../mtm/materials.vue";
export default {
components: {
showDrawer,
materials,
handoverDialog
},
data() {
return {
@ -405,17 +420,26 @@ export default {
queryMtask: {
state__in: "",
},
currentDeptId:'',
mtaskId: "",
dataWm: [],
dataWmOrigin: [],
materialType: "wm",
visibleDrawer: false,
dialogHandover:false,
};
},
mounted() {
let NowDate = new Date();
// this.queryMtask.start_date = NowDate.getFullYear() + '-' + (NowDate.getMonth() + 1) + '-' + NowDate.getDate();
this.apiObj = this.$API.pm.mtask.list;
this.$API.system.dept.list.req({ page: 0, name: "6车间" }).then((res) => {
if (res.length > 0) {
this.currentDeptId = res[0].id;
} else {
this.$message.error("未找到车间");
}
});
},
methods: {
tomio() {
@ -505,6 +529,13 @@ export default {
})
.catch((err) => {});
},
//
addHandover() {
this.dialogHandover = true;
this.$nextTick(() => {
this.$refs.handoverDialog.open('add');
})
},
},
};
</script>

View File

@ -394,7 +394,13 @@
<el-container>
<el-header>
<div class="left-panel">
<span style="font-size: 14px">交接记录</span>
<span style="font-size: 14px;margin-right: 10px">交接记录</span>
<el-button
type="primary"
@click="addHandover"
v-auth="'handover.create'"
>新增
</el-button>
</div>
<div class="right-panel">
<el-input
@ -584,6 +590,14 @@
@closed="dialogSave = false"
>
</save-dialog>
<handover-dialog
v-if="dialogHandover"
ref="handoverDialog"
:mgroup="mgroup"
:dept="currentDept.id"
@success="handleHandoverSuccess"
@closed="dialogHandover = false">
</handover-dialog>
<showDrawer
ref="showDrawer"
v-if="visibleDrawer"
@ -602,11 +616,13 @@
</el-container>
</template>
<script>
import handoverDialog from "./handover_form.vue";
import saveDialog from "./worktask_form.vue";
import showDrawer from "./mlog_drawer.vue";
import materials from "./../mtm/materials.vue";
export default {
components: {
handoverDialog,
saveDialog,
showDrawer,
materials,
@ -627,6 +643,7 @@ export default {
34: "已终止",
40: "已提交",
},
dialogHandover:false,
dialogSave: false,
visibleDrawer: false,
queryMtaskState: false,
@ -819,6 +836,7 @@ export default {
handleSaveSuccess() {
this.getMlogs();
},
handleHandoverSuccess(){},
table_show(row) {
this.mlogId = row.id;
this.visibleDrawer = true;
@ -840,6 +858,13 @@ export default {
this.mlogHandleLoading = false;
});
},
//
addHandover() {
this.dialogHandover = true;
this.$nextTick(() => {
this.$refs.handoverDialog.open('add');
})
},
},
};
</script>