Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
d0d17a32e2
|
|
@ -557,11 +557,11 @@ export default {
|
|||
if(type=='wm'){
|
||||
let params = {};
|
||||
params.tid = row.id;
|
||||
that.wprParams.wm = 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'||that.route_code=='tuomoceliang'){
|
||||
if(that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'||that.route_code=='banduangunyuanhoudama'){
|
||||
params.label_template_name = '工序带板段号打印模板';
|
||||
that.wprParams.wm = row.id;
|
||||
let totalcount = 0;
|
||||
let numbers = ['','','','','','',''];
|
||||
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
|
||||
|
|
@ -588,41 +588,57 @@ export default {
|
|||
}
|
||||
}
|
||||
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;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
that.printFun(params);
|
||||
})
|
||||
})
|
||||
}else{
|
||||
if(that.route_code=='paiyicibang'){
|
||||
params.extra_data={orimaterial:row.material_ofrom_name};
|
||||
}else if(that.route_code=='yicifusi'){
|
||||
that.$API.mtm.route.list.req({material_out:row.material,page:0}).then((res) => {
|
||||
let namearr = row.material_name.split('排一次棒');
|
||||
let extra_data = res[0].params_json;
|
||||
extra_data.batch = row.batch;
|
||||
extra_data.material_name=namearr[0];
|
||||
extra_data.orimaterial=row.material_ofrom_name;
|
||||
params.extra_data = extra_data;
|
||||
params.label_template_name = '排一次棒打印模板';
|
||||
}else{
|
||||
that.printFun(params);
|
||||
})
|
||||
}else if(that.route_code=='qingxi'||that.route_code=='kunbang'||that.route_code=='ladansi'||that.route_code=='yicifusi'||that.route_code=='paiercibang'||
|
||||
that.route_code=='ercifusi'||that.route_code=='qiesi'||that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'){
|
||||
params.extra_data={orimaterial:row.material_ofrom_name,count:row.count};
|
||||
params.label_template_name = '其他工序打印模板';
|
||||
params.label_template_name = '脱模测量前工序打印模板';
|
||||
that.printFun(params);
|
||||
}else{
|
||||
let numbers = ['','','','','','','','','','','','','',''];
|
||||
let numberList = [];
|
||||
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
|
||||
let leng = res.length;
|
||||
if(leng>0){
|
||||
let mojuArr = res[0].number.match(/[a-zA-Z]/g) || [];
|
||||
let mojuhao = mojuArr[0];
|
||||
res.forEach(item=>{
|
||||
let num = mojuhao+item.number.split(mojuhao)[1];
|
||||
numberList.push(num);
|
||||
})
|
||||
numberList.forEach((item,index)=>{
|
||||
let index1 = Math.floor(index/6);
|
||||
if(index1<14){
|
||||
numbers[index1]+=item+'、';
|
||||
}
|
||||
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("打印成功");
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
params.extra_data={orimaterial:row.material_ofrom_name,count:'—'+row.count,numbers0:numbers[0],
|
||||
numbers1:numbers[1],numbers2:numbers[2],numbers3:numbers[3],numbers4:numbers[4],numbers5:numbers[5],
|
||||
numbers6:numbers[6],numbers7:numbers[7],numbers8:numbers[8],numbers9:numbers[9],numbers10:numbers[10],
|
||||
numbers11:numbers[11],numbers12:numbers[12],numbers13:numbers[13]};
|
||||
params.label_template_name = '其他工序打印模板';
|
||||
that.printFun(params);
|
||||
})
|
||||
}
|
||||
}else if(type=='wpr'){
|
||||
that.ofromBatch = row.wm_batch;
|
||||
that.ofromName = row.wm_material_ofrom_name;
|
||||
let params = {};
|
||||
let name = row.material_name.split('|')[0];
|
||||
if(that.route_code=='paiyicibang'||that.route_code=='kunbang'){
|
||||
console.log('that.route_code',that.route_code);
|
||||
console.log('that.ofromName',that.ofromName);
|
||||
that.$API.mtm.route.list.req({material_out:row.material,page:0}).then((res) => {
|
||||
let data = res[0].params_json;
|
||||
data.number = row.number;
|
||||
|
|
@ -691,6 +707,18 @@ export default {
|
|||
that.$message.warning("请先设置打印机");
|
||||
}
|
||||
},
|
||||
printFun(params){
|
||||
let that = this;
|
||||
console.log('params',params)
|
||||
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("打印成功");
|
||||
});
|
||||
})
|
||||
},
|
||||
inmCheck(row){
|
||||
let that = this;
|
||||
that.checkItem = row;
|
||||
|
|
|
|||
|
|
@ -581,12 +581,12 @@ export default {
|
|||
if(type=='wm'){
|
||||
let params = {};
|
||||
params.tid = row.id;
|
||||
that.wprParams.wm = 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'||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) => {
|
||||
|
|
@ -613,14 +613,7 @@ export default {
|
|||
}
|
||||
}
|
||||
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;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
that.printFun(params);
|
||||
})
|
||||
}else if(that.route_code=='paiyicibang'){
|
||||
that.$API.mtm.route.list.req({material_out:row.material,page:0}).then((res) => {
|
||||
|
|
@ -631,25 +624,38 @@ export default {
|
|||
extra_data.orimaterial=row.material_ofrom_name;
|
||||
params.extra_data = extra_data;
|
||||
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.printFun(params);
|
||||
})
|
||||
}else{
|
||||
}else if(that.route_code=='qingxi'||that.route_code=='kunbang'||that.route_code=='ladansi'||that.route_code=='yicifusi'||that.route_code=='paiercibang'||
|
||||
that.route_code=='ercifusi'||that.route_code=='qiesi'||that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'){
|
||||
params.extra_data={orimaterial:row.material_ofrom_name,count:row.count};
|
||||
params.label_template_name = '脱模测量前工序打印模板';
|
||||
that.printFun(params);
|
||||
}else{
|
||||
let numbers = ['','','','','','','','','','','','','',''];
|
||||
let numberList = [];
|
||||
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
|
||||
let leng = res.length;
|
||||
if(leng>0){
|
||||
let mojuArr = res[0].number.match(/[a-zA-Z]/g) || [];
|
||||
let mojuhao = mojuArr[0];
|
||||
res.forEach(item=>{
|
||||
let num = mojuhao+item.number.split(mojuhao)[1];
|
||||
numberList.push(num);
|
||||
})
|
||||
numberList.forEach((item,index)=>{
|
||||
let index1 = Math.floor(index/6);
|
||||
if(index1<14){
|
||||
numbers[index1]+=item+'、';
|
||||
}
|
||||
})
|
||||
}
|
||||
params.extra_data={orimaterial:row.material_ofrom_name,count:'—'+row.count,numbers0:numbers[0],
|
||||
numbers1:numbers[1],numbers2:numbers[2],numbers3:numbers[3],numbers4:numbers[4],numbers5:numbers[5],
|
||||
numbers6:numbers[6],numbers7:numbers[7],numbers8:numbers[8],numbers9:numbers[9],numbers10:numbers[10],
|
||||
numbers11:numbers[11],numbers12:numbers[12],numbers13:numbers[13]};
|
||||
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.printFun(params);
|
||||
})
|
||||
}
|
||||
}else if(type=='wpr'){
|
||||
|
|
@ -658,8 +664,6 @@ export default {
|
|||
let params = {};
|
||||
let name = row.material_name.split('|')[0];
|
||||
if(that.route_code=='paiyicibang'||that.route_code=='kunbang'){
|
||||
console.log('that.route_code',that.route_code);
|
||||
console.log('that.ofromName',that.ofromName);
|
||||
that.$API.mtm.route.list.req({material_out:row.material,page:0}).then((res) => {
|
||||
let data = res[0].params_json;
|
||||
data.number = row.number;
|
||||
|
|
@ -728,6 +732,17 @@ export default {
|
|||
that.$message.warning("请先设置打印机");
|
||||
}
|
||||
},
|
||||
printFun(params){
|
||||
let that = this;
|
||||
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("打印成功");
|
||||
});
|
||||
})
|
||||
},
|
||||
inmCheck(row){
|
||||
let that = this;
|
||||
that.checkItem = row;
|
||||
|
|
|
|||
Loading…
Reference in New Issue