diff --git a/src/views/wpm_bx/inmIn.vue b/src/views/wpm_bx/inmIn.vue
index 5dad22e8..48b87f11 100644
--- a/src/views/wpm_bx/inmIn.vue
+++ b/src/views/wpm_bx/inmIn.vue
@@ -7,6 +7,15 @@
合批
+
+
+
+
+
+
+ {{wmState[scope.row.state]?.text}}
+
+
+
+
+
+ {{ scope.row.material_name }}
+
+ ({{ scope.row.material_origin_name }})
+
+
+
+
+
+
+
+ {{ scope.row.material_name.split('|').at(-1) }}
+
+
+
+
+
+ {{ item.defect_name }}
+
+
+
+
+
+
+ 物料标签
+
+
+
{
@@ -457,10 +543,11 @@ export default {
});
},
//打印物料标签
- printMaterial(row){
+ printMaterial(row,type){
let that = this;
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
- let params = {};
+ if(type=='wm'){
+ let params = {};
params.tid = row.id;
let materialname = row.material_.name + '|' + row.material_.process_name;
let specification = row.material_.specification;
@@ -517,6 +604,79 @@ export default {
});
})
}
+
+ }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;
+ data.name=name;
+ data.ofrom_name=that.ofromName;
+ params.data = data;
+ if(that.route_code=='paiyicibang'){
+ params.label_template_name = '排一次棒单件打印模板';
+ }else{
+ params.label_template_name = '捆棒单件打印模板';
+ }
+ that.$API.cm.labeltemplate.commands.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(that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||
+ that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'||that.route_code=='banduangunyuanhoudama'||that.route_code=='banduangunyuantuihuo'
+ ){
+ let oinfo = [];
+ for(let key in row.oinfo){
+ oinfo.push(row.oinfo[key])
+ }
+ let data = {sigao:'',duibian:'',moban:'',hengya:'',istest:'否',number:row.number,name:name,ofrom_name:that.ofromName,ofrom_batch:that.ofromBatch};
+ if(that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'){
+ params.label_template_name = '脱膜测量单件标签模板';
+ }else{
+ params.label_template_name = '排扳单件打印模板';
+ }
+ if(oinfo.length>0){
+ oinfo.forEach((item)=>{
+ if(item.name=="丝高"){
+ data.sigao = item.val;
+ }else if(item.name=="横压"){
+ data.hengya = item.val;
+ }else if(item.name=="对边"){
+ data.duibian = item.val;
+ }else if(item.name=="模具号"){
+ data.moban = item.val;
+ }else if(item.name=="实验板段"){
+ data.istest = item.val?'是':'否';
+ }
+ })
+ }
+ params.data = data;
+ }else{
+ params.label_template_name = '单件打印模板';
+ params.data = {number:row.number,name:name};
+ }
+ that.$API.cm.labeltemplate.commands.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{
that.$message.warning("请先设置打印机");
}
diff --git a/src/views/wpm_bx/inmOut.vue b/src/views/wpm_bx/inmOut.vue
index 193d18c7..b4248808 100644
--- a/src/views/wpm_bx/inmOut.vue
+++ b/src/views/wpm_bx/inmOut.vue
@@ -8,6 +8,15 @@
入库
+
-
+
{{wmState[scope.row.state]?.text}}
@@ -160,6 +170,73 @@
+
+
+
+
+
+ {{wmState[scope.row.state]?.text}}
+
+
+
+
+
+ {{ scope.row.material_name }}
+
+ ({{ scope.row.material_origin_name }})
+
+
+
+
+
+
+
+ {{ scope.row.material_name.split('|').at(-1) }}
+
+
+
+
+
+ {{ item.defect_name }}
+
+
+
+
+
+
+ 物料标签
+
+
+
{
@@ -492,7 +578,8 @@ export default {
printMaterial(row,type){
let that = this;
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
- let params = {};
+ if(type=='wm'){
+ let params = {};
params.tid = row.id;
let materialname = row.material_.name + '|' + row.material_.process_name;
let specification = row.material_.specification;
@@ -563,6 +650,78 @@ export default {
});
})
}
+ }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;
+ data.name=name;
+ data.ofrom_name=that.ofromName;
+ params.data = data;
+ if(that.route_code=='paiyicibang'){
+ params.label_template_name = '排一次棒单件打印模板';
+ }else{
+ params.label_template_name = '捆棒单件打印模板';
+ }
+ that.$API.cm.labeltemplate.commands.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(that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||
+ that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'||that.route_code=='banduangunyuanhoudama'||that.route_code=='banduangunyuantuihuo'
+ ){
+ let oinfo = [];
+ for(let key in row.oinfo){
+ oinfo.push(row.oinfo[key])
+ }
+ let data = {sigao:'',duibian:'',moban:'',hengya:'',istest:'否',number:row.number,name:name,ofrom_name:that.ofromName,ofrom_batch:that.ofromBatch};
+ if(that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'){
+ params.label_template_name = '脱膜测量单件标签模板';
+ }else{
+ params.label_template_name = '排扳单件打印模板';
+ }
+ if(oinfo.length>0){
+ oinfo.forEach((item)=>{
+ if(item.name=="丝高"){
+ data.sigao = item.val;
+ }else if(item.name=="横压"){
+ data.hengya = item.val;
+ }else if(item.name=="对边"){
+ data.duibian = item.val;
+ }else if(item.name=="模具号"){
+ data.moban = item.val;
+ }else if(item.name=="实验板段"){
+ data.istest = item.val?'是':'否';
+ }
+ })
+ }
+ params.data = data;
+ }else{
+ params.label_template_name = '单件打印模板';
+ params.data = {number:row.number,name:name};
+ }
+ that.$API.cm.labeltemplate.commands.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{
that.$message.warning("请先设置打印机");
}
@@ -579,4 +738,5 @@ export default {
},
};
-
+