fix:玻纤脱模测量和退火工段的物料打印时,要带出板段号
This commit is contained in:
parent
4447c2495d
commit
bac9fcb414
|
@ -465,20 +465,54 @@ export default {
|
|||
if(type=='wm'){
|
||||
let params = {};
|
||||
params.tid = row.id;
|
||||
if(that.route_code=='paiyicibang'){
|
||||
params.label_template_name = '排一次棒打印模板';
|
||||
if(that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'){
|
||||
params.label_template_name = '工序带板段号打印模板';
|
||||
that.wprParams.wm = row.id;
|
||||
let numbers = ['','','','','','',''];
|
||||
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
|
||||
let leng = res.length;
|
||||
if(leng>0){
|
||||
let nums = leng/4;
|
||||
for(let i=0;i<nums;i++){
|
||||
let index = i*4;
|
||||
if(index+3<leng){
|
||||
numbers[i] =res[index].number+'、'+res[index+1].number+'、'+res[index+2].number+'、'+res[index+3].number;
|
||||
}else if(index+2<leng){
|
||||
numbers[i] =res[index].number+'、'+res[index+1].number+'、'+res[index+2].number;
|
||||
}else if(index+1<leng){
|
||||
numbers[i] =res[index].number+'、'+res[index+1].number;
|
||||
}else{
|
||||
numbers[i] =res[index].number;
|
||||
}
|
||||
}
|
||||
}
|
||||
params.extra_data={count:row.count,numbers0:numbers[0],numbers1:numbers[1],numbers2:numbers[2],numbers3:numbers[3],numbers4:numbers[4],numbers5:numbers[5],numbers6:numbers[6]};
|
||||
that.apiObjPrint.req(params).then((res) => {
|
||||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
})
|
||||
}else{
|
||||
params.extra_data={count:row.count};
|
||||
params.label_template_name = '其他工序打印模板';
|
||||
if(that.route_code=='paiyicibang'){
|
||||
params.label_template_name = '排一次棒打印模板';
|
||||
}else{
|
||||
params.extra_data={count:row.count};
|
||||
params.label_template_name = '其他工序打印模板';
|
||||
}
|
||||
that.apiObjPrint.req(params).then((res) => {
|
||||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
}
|
||||
that.apiObjPrint.req(params).then((res) => {
|
||||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
||||
}else if(type=='wpr'){
|
||||
let params = {};
|
||||
let name = row.material_name.split('|')[0];
|
||||
|
|
|
@ -466,20 +466,53 @@ export default {
|
|||
if(type=='wm'){
|
||||
let params = {};
|
||||
params.tid = row.id;
|
||||
if(that.route_code=='paiyicibang'){
|
||||
params.label_template_name = '排一次棒打印模板';
|
||||
if(that.route_code=='tuomoceliang'||that.route_code=='reyatuihuo'){
|
||||
params.label_template_name = '工序带板段号打印模板';
|
||||
that.wprParams.wm = row.id;
|
||||
let numbers = ['','','','','','',''];
|
||||
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
|
||||
let leng = res.length;
|
||||
if(leng>0){
|
||||
let nums = leng/4;
|
||||
for(let i=0;i<nums;i++){
|
||||
let index = i*4;
|
||||
if(index+3<leng){
|
||||
numbers[i] =res[index].number+'、'+res[index+1].number+'、'+res[index+2].number+'、'+res[index+3].number;
|
||||
}else if(index+2<leng){
|
||||
numbers[i] =res[index].number+'、'+res[index+1].number+'、'+res[index+2].number;
|
||||
}else if(index+1<leng){
|
||||
numbers[i] =res[index].number+'、'+res[index+1].number;
|
||||
}else{
|
||||
numbers[i] =res[index].number;
|
||||
}
|
||||
}
|
||||
}
|
||||
params.extra_data={count:row.count,numbers0:numbers[0],numbers1:numbers[1],numbers2:numbers[2],numbers3:numbers[3],numbers4:numbers[4],numbers5:numbers[5],numbers6:numbers[6]};
|
||||
that.apiObjPrint.req(params).then((res) => {
|
||||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
})
|
||||
}else{
|
||||
params.extra_data={count:row.count};
|
||||
params.label_template_name = '其他工序打印模板';
|
||||
if(that.route_code=='paiyicibang'){
|
||||
params.label_template_name = '排一次棒打印模板';
|
||||
}else{
|
||||
params.extra_data={count:row.count};
|
||||
params.label_template_name = '其他工序打印模板';
|
||||
}
|
||||
that.apiObjPrint.req(params).then((res) => {
|
||||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
}
|
||||
that.apiObjPrint.req(params).then((res) => {
|
||||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
}else if(type=='wpr'){
|
||||
let params = {};
|
||||
let name = row.material_name.split('|')[0];
|
||||
|
|
Loading…
Reference in New Issue