diff --git a/src/views/inm/mioitem.vue b/src/views/inm/mioitem.vue
index 360649aa..29d06503 100644
--- a/src/views/inm/mioitem.vue
+++ b/src/views/inm/mioitem.vue
@@ -200,6 +200,13 @@
>
删除
+
+ 物料标签
+
@@ -413,6 +420,29 @@ export default {
that.printVisible = true;
})
},//打印
+ //打印物料标签
+ printMaterial(row){
+ let that = this;
+ that.apiObj.req({tid:row.id}).then((res) => {
+ let code = res.code_label;
+ let str = [
+ "SIZE 40 mm,70 mm",
+ "GAP 7 mm,7 mm",
+ "CLS",
+ "REFERENCE 0,0",
+ 'QRCODE 30,400,H,5,A,0,"' +code +'"',
+ "WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
+ "WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
+ "PRINT 1",
+ ];
+ let obj = {};
+ obj.printer_commands = str;
+ obj.printer_name = that.printer_name;
+ that.$API.wpm.prints.req(obj).then((response) => {
+ that.$message.success("打印成功");
+ });
+ })
+ },
},
};
diff --git a/src/views/wpm_bx/mlogbw_check.vue b/src/views/wpm_bx/mlogbw_check.vue
index 5e515083..fcbb153d 100644
--- a/src/views/wpm_bx/mlogbw_check.vue
+++ b/src/views/wpm_bx/mlogbw_check.vue
@@ -18,21 +18,21 @@
{{ scope.row.number }}
+
-
-
-
+
+
@@ -105,6 +105,76 @@
>
+
{{ scope.row.note }}
@@ -277,31 +347,50 @@ export default {
obj.mlogb = row.mlogb;
obj.note = row.note;
obj.ftest = {};
- obj.ftest.test_date = that.handle_date;
- obj.ftest.test_user = that.handle_user;
- obj.ftest.qct = that.qct;
obj.ftest.ftestitems = [];
obj.ftest.ftestdefects = [];
if(row.id!=''&&row.id!==undefined&&row.id!==null){
obj.id = row.id;
+ obj.ftest.qct = row.ftest.qct;
+ obj.ftest.test_date = row.ftest.test_date;
+ obj.ftest.test_user = row.ftest.test_user;
+ row.ftest.ftestdefects.forEach((item) => {
+ let itemObj = {};
+ itemObj.id = item.id;
+ itemObj.defect = item.defect;
+ itemObj.test_user = item.test_user;
+ itemObj.has = row[item.defect_name]?row[item.defect_name]:false;
+ obj.ftest.ftestdefects.push(itemObj);
+ })
+ row.ftest.ftestitems.forEach((item1) => {
+ let itemObj1 = {};
+ itemObj1.id = item1.id;
+ itemObj1.testitem = item1.testitem;
+ itemObj1.test_user = item1.test_user;
+ itemObj1.test_val_json = row[item1.testitem_name];
+ obj.ftest.ftestitems.push(itemObj1);
+ })
+ }else{
+ obj.ftest.qct = that.qct;
+ obj.ftest.test_date = that.handle_date;
+ obj.ftest.test_user = that.handle_user;
+ that.qct_defects.forEach((item) => {
+ let itemObj = {};
+ itemObj.defect = item.defect;
+ itemObj.test_user = that.handle_user;
+ itemObj.has = row[item.defect_name]?row[item.defect_name]:false;
+ obj.ftest.ftestdefects.push(itemObj);
+ })
+ that.qct_testitems.forEach((item1) => {
+ let itemObj1 = {};
+ itemObj1.testitem = item1.testitem;
+ itemObj1.test_user = that.handle_user;
+ itemObj1.test_val_json = row[item1.testitem_name];
+ obj.ftest.ftestitems.push(itemObj1);
+ })
}
- that.qct_defects.forEach((item) => {
- let itemObj = {};
- itemObj.defect = item.defect;
- itemObj.test_user = that.handle_user;
- itemObj.has = row[item.defect_name]?row[item.defect_name]:false;
- obj.ftest.ftestdefects.push(itemObj);
- })
- that.qct_testitems.forEach((item1) => {
- let itemObj1 = {};
- itemObj1.testitem = item1.testitem;
- itemObj1.test_user = that.handle_user;
- itemObj1.test_val_json = row[item1.testitem_name];
- obj.ftest.ftestitems.push(itemObj1);
- })
- console.log('row:',row);
- console.log('obj:',obj);
if(row.id!==''&&row.id!==undefined&&row.id!==null){
+ obj.ftest.id = row.ftest.id;
that.$API.wpm.mlogbw.update.req(row.id,obj).then((res) => {
that.$message.success("保存成功");
that.getList();