Compare commits

..

2 Commits

2 changed files with 8 additions and 4 deletions

View File

@ -557,9 +557,10 @@ export default {
params.tid = row.id; params.tid = row.id;
let materialname = row.material_.name + '|' + row.material_.process_name; let materialname = row.material_.name + '|' + row.material_.process_name;
let specification = row.material_.specification; 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 = '工序带板段号打印模板'; params.label_template_name = '工序带板段号打印模板';
that.wprParams.wm = row.id; that.wprParams.wm = row.id;
let totalcount = 0;
let numbers = ['','','','','','','']; let numbers = ['','','','','','',''];
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => { this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
let leng = res.length; let leng = res.length;
@ -571,6 +572,7 @@ export default {
} }
} }
if(leng>0){ if(leng>0){
totalcount = leng*slice_count;
let nums = leng/3; let nums = leng/3;
for(let i=0;i<nums;i++){ for(let i=0;i<nums;i++){
let index = i*3; 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) => { that.apiObjPrint.req(params).then((res) => {
let obj = {}; let obj = {};
obj.printer_commands = res.commands; obj.printer_commands = res.commands;

View File

@ -586,10 +586,11 @@ export default {
params.tid = row.id; params.tid = row.id;
let materialname = row.material_.name + '|' + row.material_.process_name; let materialname = row.material_.name + '|' + row.material_.process_name;
let specification = row.material_.specification; 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); console.log('route_code',that.route_code);
params.label_template_name = '工序带板段号打印模板'; params.label_template_name = '工序带板段号打印模板';
that.wprParams.wm = row.id; that.wprParams.wm = row.id;
let totalcount = 0;
let numbers = ['','','','','','','']; let numbers = ['','','','','','',''];
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => { this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
let leng = res.length; let leng = res.length;
@ -601,6 +602,7 @@ export default {
} }
} }
if(leng>0){ if(leng>0){
totalcount = leng*slice_count;
let nums = leng/3; let nums = leng/3;
for(let i=0;i<nums;i++){ for(let i=0;i<nums;i++){
let index = i*3; 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) => { that.apiObjPrint.req(params).then((res) => {
let obj = {}; let obj = {};
obj.printer_commands = res.commands; obj.printer_commands = res.commands;