fix:bx页面方法变动

This commit is contained in:
shijing 2024-12-31 09:18:50 +08:00
parent 75b09a9ce1
commit ec021374ca
2 changed files with 35 additions and 73 deletions

View File

@ -295,50 +295,26 @@ export default {
},
},
mounted() {
// this.getMgroupInfo();
this.getMgroupInfo();
},
methods: {
getMgroupInfo(){
let that = this;
console.log('that.mgroup_name',that.mgroup_name);
if(that.mgroup_name=="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.mgroup_name=="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.mgroup_name })
.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.params.mgroup = that.mgroupId;
that.apiObj = that.$API.wpm.handover.list;
that.$refs.table.refresh();
});
}
console.log('that.mgroupName',that.mgroupName);
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.params.mgroup = that.mgroupId;
that.apiObj = that.$API.wpm.handover.list;
that.$refs.table.refresh();
});
},
printSetting(){
this.setNameVisible = true;

View File

@ -3,7 +3,7 @@
<el-header>
<div class="left-panel">
<el-button type="primary" @click="tomio('do_out')" v-auth="'mio.do'"
v-if="mgroupName=='qingxi'"
v-if="mgroupName=='清洗'"
>领料</el-button
>
<el-button type="primary" @click="tomio('do_in')" v-auth="'mio.do'"
@ -106,22 +106,6 @@
width="120"
>
<template #default="scope">
<el-button
link size="small"
@click="table_Check(scope.row)"
v-auth="'ftestwork.create'"
type="primary"
v-if="scope.row.notok_sign_name == null"
>检验
</el-button>
<!-- v-if="mgroupName!=='size'&&mgroupName!=='facade'&&scope.row.notok_sign_name == null" -->
<el-button
link size="small"
type="warning"
@click="tableCheckList(scope.row)"
v-if="scope.row.notok_sign_name == null"
>检验记录
</el-button>
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
</template>
</el-table-column>
@ -135,7 +119,7 @@
@choseChange="choseChange"
></materials>
</el-dialog>
<check-dialog
<!-- <check-dialog
v-if="dialog.save"
ref="saveDialog"
:mgroup="mgroupId"
@ -144,7 +128,7 @@
@success="handleSaveSuccess"
@closed="dialog.save = false"
>
</check-dialog>
</check-dialog> -->
<scrap-dialog
v-if="dialog.scrap"
ref="scrapDialog"
@ -155,13 +139,13 @@
@closed="dialog.scrap = false"
>
</scrap-dialog>
<showDrawer
<!-- <showDrawer
ref="showDrawer"
v-if="visibleDrawer"
:wm="wm"
@closed="visibleDrawer = false"
>
</showDrawer>
</showDrawer> -->
<save-dialog
v-if="dialog.inmRecord"
ref="inmRecordDialog"
@ -248,22 +232,24 @@ export default {
mgroup_name:''
};
},
mounted() {},
mounted() {
this.getMgroupInfo();
},
watch: {
mgroupName: {
handler: function (newval,odlval) {
let that = this;
that.params.mgroupx = "";
that.apiObj = null;
that.mgroup_name = newval;
that.getMgroupInfo();
},
},
// mgroupName: {
// handler: function (newval,odlval) {
// let that = this;
// that.params.mgroupx = "";
// that.apiObj = null;
// that.mgroup_name = newval;
// that.getMgroupInfo();
// },
// },
},
methods: {
getMgroupInfo(){
let that = this;
console.log(that.mgroupName);
console.log('mgroupName',that.mgroupName);
if(that.mgroupName=="size"){
// that.params.material__process__name = "";
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
@ -293,7 +279,7 @@ export default {
return;
}
that.mgroupId = res[0].id;
that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
that.$TOOL.data.set('bx_deptID',res[0].belong_dept);
that.process = res[0].process;
that.params.mgroupx = res[0].id;
that.params.belong_dept = res[0].belong_dept;