fix:玻纤车间inm变动
This commit is contained in:
parent
873c8b1a33
commit
1e0af7d96c
|
@ -35,7 +35,9 @@
|
||||||
<inm v-else-if="values == '库存'&&componentsShow"
|
<inm v-else-if="values == '库存'&&componentsShow"
|
||||||
:mgroup_code="mgroup_code"
|
:mgroup_code="mgroup_code"
|
||||||
:mgroupId="mgroupId"
|
:mgroupId="mgroupId"
|
||||||
:mgroupName="mgroupName"></inm>
|
:mgroupName="mgroupName"
|
||||||
|
:process = "mgroupProcess"
|
||||||
|
:deptId="mgroupDept"></inm>
|
||||||
|
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
|
@ -228,16 +228,6 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-drawer>
|
</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">
|
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
|
||||||
<scDegra
|
<scDegra
|
||||||
v-if="limitedWatch"
|
v-if="limitedWatch"
|
||||||
|
@ -259,10 +249,26 @@ import scrapDialog from "./handover_form.vue";
|
||||||
import saveDialog from "./inm_record.vue";
|
import saveDialog from "./inm_record.vue";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
deptId: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
mgroupId: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
mgroupName: {
|
mgroupName: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
|
mgroup_code: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
process: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,
|
||||||
|
@ -297,6 +303,7 @@ export default {
|
||||||
wprList:[],
|
wprList:[],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
|
templateList:[],
|
||||||
stateOptions:[
|
stateOptions:[
|
||||||
{ value: 10, name: "合格"},
|
{ value: 10, name: "合格"},
|
||||||
{ value: 20, name: "不合格"},
|
{ value: 20, name: "不合格"},
|
||||||
|
@ -316,13 +323,11 @@ export default {
|
||||||
showBatch: "",
|
showBatch: "",
|
||||||
wmMaterial:'',
|
wmMaterial:'',
|
||||||
cate_type:'',
|
cate_type:'',
|
||||||
process:'',
|
|
||||||
materialType: "wm",
|
materialType: "wm",
|
||||||
limitedWatch:false,
|
limitedWatch:false,
|
||||||
materialsVisible:false,
|
materialsVisible:false,
|
||||||
visibleDrawer: false,
|
visibleDrawer: false,
|
||||||
wprVisibleDrawer:false,
|
wprVisibleDrawer:false,
|
||||||
setNameVisible:false,
|
|
||||||
wprApiObj:this.$API.wpm.wpr.list,
|
wprApiObj:this.$API.wpm.wpr.list,
|
||||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||||
printer_name:localStorage.getItem("printer_name"),
|
printer_name:localStorage.getItem("printer_name"),
|
||||||
|
@ -331,39 +336,22 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let paths = this.$route.path;
|
let that = this;
|
||||||
|
let paths = that.$route.path;
|
||||||
let arr = paths.split("/");
|
let arr = paths.split("/");
|
||||||
this.route_code = arr[2];
|
that.route_code = arr[2];
|
||||||
this.getMgroupInfo();
|
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: {
|
methods: {
|
||||||
printSetting(){
|
getPrintTemplate(){
|
||||||
this.setNameVisible = true;
|
|
||||||
},
|
|
||||||
savePrinter() {
|
|
||||||
let that = this;
|
let that = this;
|
||||||
localStorage.setItem("printer_name", that.printer_name);
|
that.$API.cm.labeltemplate.list.req({process:that.process,page:0}).then((res) => {
|
||||||
that.setNameVisible = false;
|
that.templateList = res;
|
||||||
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();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
handleWatch(row) {
|
handleWatch(row) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -480,6 +468,14 @@ export default {
|
||||||
//打印物料标签
|
//打印物料标签
|
||||||
printMaterial(row,type){
|
printMaterial(row,type){
|
||||||
let that = this;
|
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(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
||||||
if(type=='wm'){
|
if(type=='wm'){
|
||||||
that.apiObjPrint.req({tid:row.id}).then((res) => {
|
that.apiObjPrint.req({tid:row.id}).then((res) => {
|
||||||
|
@ -503,26 +499,24 @@ export default {
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
// let code = 'wpr#'+row.id;
|
|
||||||
let code = row.number;
|
let code = row.number;
|
||||||
let str = [
|
let str = [
|
||||||
"SIZE 70 mm,100 mm",
|
"SIZE 70 mm,100 mm",
|
||||||
"GAP 7 mm,7 mm",
|
"GAP 7 mm,7 mm",
|
||||||
"CLS",
|
"CLS",
|
||||||
"REFERENCE 0,0",
|
"REFERENCE 0,0",
|
||||||
'QRCODE 30,400,H,5,A,0,"' +code +'"',
|
'QRCODE 30,400,H,5,A,0,"' +code +'"',
|
||||||
"WINTEXT 240,550,28,90,0,0,Simhei," + row.number,
|
"WINTEXT 240,550,28,90,0,0,Simhei," + row.number,
|
||||||
"PRINT 1",
|
"PRINT 1",
|
||||||
];
|
];
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.printer_commands = str;
|
obj.printer_commands = str;
|
||||||
obj.printer_name = that.printer_name;
|
obj.printer_name = that.printer_name;
|
||||||
that.$API.wpm.prints.req(obj).then((response) => {
|
that.$API.wpm.prints.req(obj).then((response) => {
|
||||||
that.$message.success("打印成功");
|
that.$message.success("打印成功");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
that.printSetting();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
inmCheck(row){
|
inmCheck(row){
|
||||||
|
|
Loading…
Reference in New Issue