fix:玻纤车间inm变动

This commit is contained in:
shijing 2025-05-07 10:57:19 +08:00
parent 873c8b1a33
commit 1e0af7d96c
2 changed files with 55 additions and 59 deletions

View File

@ -35,7 +35,9 @@
<inm v-else-if="values == '库存'&&componentsShow"
:mgroup_code="mgroup_code"
:mgroupId="mgroupId"
:mgroupName="mgroupName"></inm>
:mgroupName="mgroupName"
:process = "mgroupProcess"
:deptId="mgroupDept"></inm>
</el-main>
</el-container>

View File

@ -228,16 +228,6 @@
</div>
</template>
</el-drawer>
<el-dialog title="打印机设置" v-model="setNameVisible" width="600px">
<el-form label-width="100px">
<el-form-item label="打印机名称">
<el-input v-model="printer_name"></el-input>
</el-form-item>
</el-form>
<el-footer>
<el-button type="primary" @click="savePrinter">保存</el-button>
</el-footer>
</el-dialog>
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
<scDegra
v-if="limitedWatch"
@ -259,10 +249,26 @@ import scrapDialog from "./handover_form.vue";
import saveDialog from "./inm_record.vue";
export default {
props: {
deptId: {
type: String,
default: "",
},
mgroupId: {
type: String,
default: "",
},
mgroupName: {
type: String,
default: "",
},
mgroup_code: {
type: String,
default: "",
},
process: {
type: String,
default: "",
},
},
components: {
saveDialog,
@ -297,6 +303,7 @@ export default {
wprList:[],
tableData: [],
selection: [],
templateList:[],
stateOptions:[
{ value: 10, name: "合格"},
{ value: 20, name: "不合格"},
@ -316,13 +323,11 @@ export default {
showBatch: "",
wmMaterial:'',
cate_type:'',
process:'',
materialType: "wm",
limitedWatch:false,
materialsVisible:false,
visibleDrawer: false,
wprVisibleDrawer:false,
setNameVisible:false,
wprApiObj:this.$API.wpm.wpr.list,
apiObjPrint:this.$API.cm.labelmat.fromWm,
printer_name:localStorage.getItem("printer_name"),
@ -331,39 +336,22 @@ export default {
};
},
mounted() {
let paths = this.$route.path;
let that = this;
let paths = that.$route.path;
let arr = paths.split("/");
this.route_code = arr[2];
this.getMgroupInfo();
that.route_code = arr[2];
that.params.mgroupx = that.mgroupId;
that.params.belong_dept =that.deptId;
that.$TOOL.data.set('bx_deptID',that.deptId);
that.apiObj = that.$API.wpm.wmaterial.list;
that.getPrintTemplate();
},
methods: {
printSetting(){
this.setNameVisible = true;
},
savePrinter() {
getPrintTemplate(){
let that = this;
localStorage.setItem("printer_name", that.printer_name);
that.setNameVisible = false;
that.$message.success("打印机设置成功,请重新进行打印操作。");
},
getMgroupInfo(){
let that = this;
console.log('mgroupName',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.$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;
that.apiObj = that.$API.wpm.wmaterial.list;
that.$refs.table.refresh();
});
that.$API.cm.labeltemplate.list.req({process:that.process,page:0}).then((res) => {
that.templateList = res;
})
},
handleWatch(row) {
let that = this;
@ -480,6 +468,14 @@ export default {
//
printMaterial(row,type){
let that = this;
let str =[]
if(that.templateList.length==1){
str = that.templateList[0].commands;
}else if(that.templateList.length>1){
}else{
}
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
if(type=='wm'){
that.apiObjPrint.req({tid:row.id}).then((res) => {
@ -503,7 +499,6 @@ export default {
});
})
}else{
// let code = 'wpr#'+row.id;
let code = row.number;
let str = [
"SIZE 70 mm,100 mm",
@ -522,7 +517,6 @@ export default {
});
}
}else{
that.printSetting();
}
},
inmCheck(row){