fix:生产日志中mgroup重复请求问题
This commit is contained in:
parent
d8e2665bc4
commit
92143e53fe
|
|
@ -234,10 +234,30 @@ import saveDialog from "./handover_form.vue";
|
|||
import print from "./../setting/print/A4.vue";
|
||||
export default {
|
||||
props: {
|
||||
deptId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupName: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
processId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupcode: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
processtype:{
|
||||
type: String,
|
||||
default: "",
|
||||
}
|
||||
},
|
||||
name: "handover",
|
||||
components: {
|
||||
|
|
@ -268,65 +288,23 @@ export default {
|
|||
selection: [],
|
||||
handoverItem:{},
|
||||
values: "交送",
|
||||
deptId:'',
|
||||
mtask: "",
|
||||
mlogId: "",
|
||||
codeText:"",
|
||||
mgroupId: "",
|
||||
processId: "",
|
||||
processtype:"",
|
||||
processCate: "",
|
||||
printer_name: "",
|
||||
printVisible:false,
|
||||
setNameVisible: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getMgroupInfo();
|
||||
let that = this;
|
||||
that.printer_name = localStorage.getItem("printer_name");
|
||||
that.$TOOL.data.set('gx_deptID',that.deptId)
|
||||
that.params.mgroup = that.mgroupId;
|
||||
that.apiObj = that.$API.wpm.handover.list;
|
||||
that.$refs.table.refresh();
|
||||
},
|
||||
methods: {
|
||||
getMgroupInfo(){
|
||||
let that = this;
|
||||
if(that.mgroupName=="size"){//尺寸检验
|
||||
// that.params.material__process__name="一次超洗";
|
||||
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
||||
if(res.length>0){
|
||||
that.deptId = res[0].id;
|
||||
that.params.dept=res[0].id;
|
||||
}
|
||||
that.apiObj = that.$API.wpm.handover.list;
|
||||
that.$refs.table.refresh();
|
||||
})
|
||||
}else if(that.mgroupName=="facade"){//外观检验
|
||||
// that.params.material__process__name="二次超洗";
|
||||
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
||||
if(res.length>0){
|
||||
that.deptId = res[0].id;
|
||||
that.params.dept=res[0].id;
|
||||
}
|
||||
that.apiObj = that.$API.wpm.handover.list;
|
||||
that.$refs.table.refresh();
|
||||
})
|
||||
}else{//工段交接
|
||||
that.printer_name = localStorage.getItem("printer_name");
|
||||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, name: that.mgroupName })
|
||||
.then((res) => {
|
||||
if (res.length < 1) {
|
||||
that.$message.error("获取工段错误");
|
||||
return;
|
||||
}
|
||||
that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
|
||||
that.mgroupId = res[0].id;
|
||||
that.processId = res[0].process;
|
||||
that.processCate = res[0].process_cate;
|
||||
that.processtype = res[0].process_type;
|
||||
that.params.mgroup = that.mgroupId;
|
||||
that.apiObj = that.$API.wpm.handover.list;
|
||||
that.$refs.table.refresh();
|
||||
});
|
||||
}
|
||||
},
|
||||
printSetting(){
|
||||
this.setNameVisible = true;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
:mgroupName="mgroupName"
|
||||
:mgroupId="mgroupId"
|
||||
:mgroupcode="mgroup_code"
|
||||
:processId="mgroupProcess"
|
||||
:processId="processId"
|
||||
:deptId = "mgroupDept"
|
||||
style="height: 60%"
|
||||
></mlogs>
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
:mgroupId="mgroupId"
|
||||
:deptId = "mgroupDept"
|
||||
:mgroupName="mgroupName"
|
||||
:processId="mgroupProcess"
|
||||
:processId="processId"
|
||||
:mgroupcode="mgroup_code"
|
||||
style="height: 40%"
|
||||
></mtask>
|
||||
|
|
@ -34,29 +34,30 @@
|
|||
:mgroupId="mgroupId"
|
||||
:deptId = "mgroupDept"
|
||||
:mgroupName="mgroupName"
|
||||
:processId="mgroupProcess"
|
||||
:processId="processId"
|
||||
:mgroupcode="mgroup_code"
|
||||
:processtype="processtype"
|
||||
></handover>
|
||||
<!-- 库存 -->
|
||||
<inm v-else-if="values == '来料未完成'&&componentsShow"
|
||||
:mgroupId="mgroupId"
|
||||
:deptId = "mgroupDept"
|
||||
:mgroupName="mgroupName"
|
||||
:processId="mgroupProcess"
|
||||
:processId="processId"
|
||||
:mgroupcode="mgroup_code"
|
||||
></inm>
|
||||
<inmOut v-else-if="values == '出料已完成'"
|
||||
:mgroupId="mgroupId"
|
||||
:deptId = "mgroupDept"
|
||||
:mgroupName="mgroupName"
|
||||
:processId="mgroupProcess"
|
||||
:processId="processId"
|
||||
:mgroupcode="mgroup_code"
|
||||
></inmOut>
|
||||
<record v-else
|
||||
:mgroupId="mgroupId"
|
||||
:deptId = "mgroupDept"
|
||||
:mgroupName="mgroupName"
|
||||
:processId="mgroupProcess"
|
||||
:processId="processId"
|
||||
:mgroupcode="mgroup_code"
|
||||
></record>
|
||||
</el-main>
|
||||
|
|
@ -83,6 +84,8 @@ export default {
|
|||
selectedIndex:0,
|
||||
mgroup_code:'',
|
||||
mgroupDept:'',
|
||||
processtype:'',
|
||||
processId:'',
|
||||
componentsShow:false,
|
||||
};
|
||||
},
|
||||
|
|
@ -118,7 +121,8 @@ export default {
|
|||
that.mgroups = res;
|
||||
that.mgroupName = res[0].name;
|
||||
that.mgroupId = res[0].id;
|
||||
that.mgroupProcess = res[0].process;
|
||||
that.processId = res[0].process;
|
||||
that.processtype = res[0].process_type;
|
||||
that.mgroupDept = res[0].belong_dept;
|
||||
that.componentsShow = true;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
:mgroupName="mgroupName"
|
||||
:mgroupId="mgroupId"
|
||||
:mgroupcode="mgroup_code"
|
||||
:processId="mgroupProcess"
|
||||
:processId="processId"
|
||||
:deptId = "mgroupDept"
|
||||
style="height: 60%"
|
||||
></mlogs>
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
:mgroupId="mgroupId"
|
||||
:deptId = "mgroupDept"
|
||||
:mgroupName="mgroupName"
|
||||
:processId="mgroupProcess"
|
||||
:processId="processId"
|
||||
:mgroupcode="mgroup_code"
|
||||
style="height: 40%"
|
||||
></mtask>
|
||||
|
|
@ -34,29 +34,30 @@
|
|||
:mgroupId="mgroupId"
|
||||
:deptId = "mgroupDept"
|
||||
:mgroupName="mgroupName"
|
||||
:processId="mgroupProcess"
|
||||
:processId="processId"
|
||||
:mgroupcode="mgroup_code"
|
||||
:processtype="processtype"
|
||||
></handover>
|
||||
<!-- 库存 -->
|
||||
<inm v-else-if="values == '来料未完成'&&componentsShow"
|
||||
:mgroupId="mgroupId"
|
||||
:deptId = "mgroupDept"
|
||||
:mgroupName="mgroupName"
|
||||
:processId="mgroupProcess"
|
||||
:processId="processId"
|
||||
:mgroupcode="mgroup_code"
|
||||
></inm>
|
||||
<inmOut v-else-if="values == '出料已完成'"
|
||||
:mgroupId="mgroupId"
|
||||
:deptId = "mgroupDept"
|
||||
:mgroupName="mgroupName"
|
||||
:processId="mgroupProcess"
|
||||
:processId="processId"
|
||||
:mgroupcode="mgroup_code"
|
||||
></inmOut>
|
||||
<record v-else
|
||||
:mgroupId="mgroupId"
|
||||
:deptId = "mgroupDept"
|
||||
:mgroupName="mgroupName"
|
||||
:processId="mgroupProcess"
|
||||
:processId="processId"
|
||||
:mgroupcode="mgroup_code"
|
||||
></record>
|
||||
</el-main>
|
||||
|
|
@ -83,6 +84,8 @@ export default {
|
|||
selectedIndex:0,
|
||||
mgroup_code:'',
|
||||
mgroupDept:'',
|
||||
processtype:'',
|
||||
processId:'',
|
||||
componentsShow:false,
|
||||
};
|
||||
},
|
||||
|
|
@ -118,7 +121,8 @@ export default {
|
|||
that.mgroups = res;
|
||||
that.mgroupName = res[0].name;
|
||||
that.mgroupId = res[0].id;
|
||||
that.mgroupProcess = res[0].process;
|
||||
that.processId = res[0].process;
|
||||
that.processtype = res[0].process_type;
|
||||
that.mgroupDept = res[0].belong_dept;
|
||||
that.componentsShow = true;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -284,28 +284,8 @@ export default {
|
|||
that.params.tag="todo";
|
||||
that.$TOOL.data.set('gx_deptID',that.deptId)
|
||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||
// this.getMgroupInfo();
|
||||
},
|
||||
methods: {
|
||||
getMgroupInfo(){
|
||||
let that = this;
|
||||
console.log(that.mgroupName);
|
||||
that.$API.mtm.mgroup.list.req({ page: 0, name: that.mgroupName }).then((res) => {
|
||||
if (res.length < 1) {
|
||||
that.$message.error("获取工段错误");
|
||||
return;
|
||||
}
|
||||
that.mgroupId = res[0].id;
|
||||
that.process = res[0].process;
|
||||
that.belong_dept = res[0].belong_dept;
|
||||
that.process_type =res[0].process_type;
|
||||
that.params.mgroup = res[0].id;
|
||||
that.params.tag="todo";
|
||||
that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
|
||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||
that.$refs.table.refresh();
|
||||
});
|
||||
},
|
||||
selectionChange(selection) {
|
||||
let that = this;
|
||||
that.selection = selection;
|
||||
|
|
|
|||
|
|
@ -176,9 +176,9 @@
|
|||
v-if="dialog.inmRecord"
|
||||
ref="inmRecordDialog"
|
||||
:cate = "cate_type"
|
||||
:process = "process"
|
||||
:mgroupId = "params.mgroupx"
|
||||
:deptId = " params.belong_dept"
|
||||
:process = "processId"
|
||||
:mgroupId = "mgroupId"
|
||||
:deptId = "params.belong_dept"
|
||||
@success="handleinmSuccess"
|
||||
>
|
||||
</save-dialog>
|
||||
|
|
@ -202,10 +202,26 @@ import handoverDialog from "./handover_form2.vue";
|
|||
import saveDialog from "./inm_record.vue";
|
||||
export default {
|
||||
props: {
|
||||
deptId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupName: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
processId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupcode: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
components: {
|
||||
saveDialog,
|
||||
|
|
@ -250,7 +266,6 @@ export default {
|
|||
material: "",
|
||||
},
|
||||
cate_type:'',
|
||||
process:'',
|
||||
materialType: "wm",
|
||||
changebatch:false,
|
||||
materialsVisible:false,
|
||||
|
|
@ -260,26 +275,14 @@ export default {
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getMgroupInfo();
|
||||
let that = this;
|
||||
that.params.mgroup = that.mgroupId;
|
||||
that.params.tag = 'done';
|
||||
that.$TOOL.data.set('gx_deptID',that.deptId);
|
||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||
// that.$refs.table.refresh();
|
||||
},
|
||||
methods: {
|
||||
getMgroupInfo(){
|
||||
let that = this;
|
||||
console.log(that.mgroupName);
|
||||
that.$API.mtm.mgroup.list.req({ page: 0, name: that.mgroupName }).then((res) => {
|
||||
if (res.length < 1) {
|
||||
that.$message.error("获取工段错误");
|
||||
return;
|
||||
}
|
||||
that.mgroupId = res[0].id;
|
||||
that.process = res[0].process;
|
||||
that.params.mgroup = res[0].id;
|
||||
that.params.tag = 'done';
|
||||
that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
|
||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||
that.$refs.table.refresh();
|
||||
});
|
||||
},
|
||||
add() {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
|
|
|
|||
|
|
@ -157,8 +157,8 @@
|
|||
v-if="dialog.inmRecord"
|
||||
ref="inmRecordDialog"
|
||||
:cate = "cate_type"
|
||||
:process = "process"
|
||||
:mgroupId = "params.mgroup"
|
||||
:process = "processId"
|
||||
:mgroupId = "mgroupId"
|
||||
:deptId = " deptId"
|
||||
@success="handleinmSuccess"
|
||||
>
|
||||
|
|
@ -173,10 +173,26 @@ export default {
|
|||
saveDialog
|
||||
},
|
||||
props: {
|
||||
deptId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupName: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
processId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupcode: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -209,7 +225,6 @@ export default {
|
|||
apiObj: null,
|
||||
selection: [],
|
||||
type: "",
|
||||
deptId:"",
|
||||
process: "",
|
||||
cate: "good",
|
||||
mioId: "",
|
||||
|
|
@ -219,18 +234,8 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
that.$nextTick(() => {
|
||||
that.$API.mtm.mgroup.list.req({ page: 0, name: that.mgroupName }).then((res) => {
|
||||
if (res.length < 1) {
|
||||
that.$message.error("获取工段错误");
|
||||
return;
|
||||
}
|
||||
that.params.mgroup = res[0].id;
|
||||
that.deptId = res[0].belong_dept;
|
||||
that.process = res[0].process;
|
||||
that.apiObj = that.$API.inm.mio.list;
|
||||
});
|
||||
})
|
||||
that.params.mgroup = that.mgroupId;
|
||||
that.apiObj = that.$API.inm.mio.list;
|
||||
},
|
||||
methods: {
|
||||
tomio(type) {
|
||||
|
|
|
|||
|
|
@ -212,24 +212,8 @@ export default {
|
|||
let that = this;
|
||||
that.params.mgroup = that.mgroupId;
|
||||
that.apiObj = that.$API.wpm.mlog.list;
|
||||
// this.getMgroupInfo();
|
||||
},
|
||||
methods: {
|
||||
getMgroupInfo(){
|
||||
let that = this;
|
||||
that.$API.mtm.mgroup.list.req({ page: 0, name: that.mgroupName }).then((res) => {
|
||||
if (res.length < 1) {
|
||||
that.$message.error("获取工段错误");
|
||||
return;
|
||||
}
|
||||
that.mgroupId = res[0].id;
|
||||
that.deptId = res[0].belong_dept;
|
||||
that.processId = res[0].process;
|
||||
that.params.mgroup = res[0].id;
|
||||
that.apiObj = that.$API.wpm.mlog.list;
|
||||
that.$refs.table.refresh();
|
||||
});
|
||||
},
|
||||
getRemaTime(row){
|
||||
if(row.work_start_time !== null){
|
||||
let times = 0;
|
||||
|
|
|
|||
|
|
@ -20,14 +20,14 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="分配人数" prop="mtaskb">
|
||||
<!-- <el-table-column label="分配人数" prop="mtaskb">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.mtaskb.length>0">
|
||||
{{scope.row.mtaskb.length}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="可用批" v-if="mgroupName!='切片'">
|
||||
</el-table-column> -->
|
||||
<el-table-column label="可用批" v-if="mgroupName!='切片'" width="80">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
|
|
@ -160,28 +160,8 @@ export default {
|
|||
let that = this;
|
||||
that.params.mgroup = that.mgroupId;
|
||||
that.apiObj = this.$API.pm.mtask.list;
|
||||
// this.getMgroupInfo();
|
||||
},
|
||||
methods: {
|
||||
getMgroupInfo(){
|
||||
let that = this;
|
||||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, name: that.mgroupName })
|
||||
.then((res) => {
|
||||
if(res.length>0){
|
||||
that.mgroupId = res[0].id;
|
||||
that.deptId = res[0].belong_dept;
|
||||
that.processId = res[0].process;
|
||||
that.processCate = res[0].process_cate;
|
||||
that.params.mgroup = res[0].id;
|
||||
that.apiObj = this.$API.pm.mtask.list;
|
||||
that.$refs.table.refresh();
|
||||
}else{
|
||||
that.$message.error("获取工段错误");
|
||||
return;
|
||||
}
|
||||
});
|
||||
},
|
||||
viewBatches(row){
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue