fix:工序带板段号打印模板添加切片总数

This commit is contained in:
shijing 2025-12-08 14:15:16 +08:00
parent ee65f15665
commit a6ac97a906
2 changed files with 8 additions and 4 deletions

View File

@ -557,9 +557,10 @@ export default {
params.tid = row.id;
let materialname = row.material_.name + '|' + row.material_.process_name;
let specification = row.material_.specification;
if(that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'){
if(that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'||that.route_code=='tuomoceliang'){
params.label_template_name = '工序带板段号打印模板';
that.wprParams.wm = row.id;
let totalcount = 0;
let numbers = ['','','','','','',''];
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
let leng = res.length;
@ -571,6 +572,7 @@ export default {
}
}
if(leng>0){
totalcount = leng*slice_count;
let nums = leng/3;
for(let i=0;i<nums;i++){
let index = i*3;
@ -583,7 +585,7 @@ export default {
}
}
}
params.extra_data={orimaterial:row.material_ofrom_name,materialname:materialname,specification:specification,count:row.count,slicecount:slice_count,numbers0:numbers[0],numbers1:numbers[1],numbers2:numbers[2],numbers3:numbers[3],numbers4:numbers[4],numbers5:numbers[5],numbers6:numbers[6]};
params.extra_data={orimaterial:row.material_ofrom_name,materialname:materialname,specification:specification,count:row.count,slicecount:slice_count,totalcount:totalcount,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;

View File

@ -586,10 +586,11 @@ export default {
params.tid = row.id;
let materialname = row.material_.name + '|' + row.material_.process_name;
let specification = row.material_.specification;
if(that.route_code=='tuomoceliang'||that.route_code=='reyatuihuo'){
if(that.route_code=='tuomoceliang'||that.route_code=='reyatuihuo'||that.route_code=='tuomoceliang'){
console.log('route_code',that.route_code);
params.label_template_name = '工序带板段号打印模板';
that.wprParams.wm = row.id;
let totalcount = 0;
let numbers = ['','','','','','',''];
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
let leng = res.length;
@ -601,6 +602,7 @@ export default {
}
}
if(leng>0){
totalcount = leng*slice_count;
let nums = leng/3;
for(let i=0;i<nums;i++){
let index = i*3;
@ -613,7 +615,7 @@ export default {
}
}
}
params.extra_data={orimaterial:row.material_ofrom_name,materialname:materialname,specification:specification,count:row.count,slicecount:slice_count,numbers0:numbers[0],numbers1:numbers[1],numbers2:numbers[2],numbers3:numbers[3],numbers4:numbers[4],numbers5:numbers[5],numbers6:numbers[6]};
params.extra_data={orimaterial:row.material_ofrom_name,materialname:materialname,specification:specification,count:row.count,slicecount:slice_count,totalcount:totalcount,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;