diff --git a/src/views/wpm_gx/handover.vue b/src/views/wpm_gx/handover.vue
index d1ab097e..9b7da4f9 100644
--- a/src/views/wpm_gx/handover.vue
+++ b/src/views/wpm_gx/handover.vue
@@ -14,7 +14,7 @@
icon="el-icon-plus"
@click="table_add(20)"
v-auth="'handover.create'"
- v-if="mgroupName!=='切片'"
+ v-if="mgroup_name!=='切片'&&mgroup_name!=='拉单丝'&&mgroup_name!=='一次复丝'&&mgroup_name!=='二次复丝'&&mgroup_name!=='切丝排版'"
>返工
检验
@@ -104,7 +104,7 @@
-
+
交送
接收
@@ -211,7 +211,7 @@
v-if="dialog.save"
ref="saveDialog"
:type="type"
- :mgroupName="mgroupName"
+ :mgroupName="mgroup_name"
:mgroupId="mgroupId"
@success="handleSaveSuccess"
@closed="dialog.save = false"
@@ -279,92 +279,70 @@ export default {
printer_name: "",
printVisible:false,
setNameVisible: false,
- testCode: "mat:3689278065261125632",
+ mgroup_name:'',
};
},
+ watch: {
+ mgroupName: {
+ handler: function (newval,odlval) {
+ let that = this;
+ that.params.dept = "";
+ that.params.mgroup = "";
+ that.apiObj = null;
+ that.mgroup_name = newval;
+ that.getMgroupInfo();
+ },
+ },
+ },
mounted() {
- let that = this;
- console.log('that.mgroupName',that.mgroupName);
- if(that.mgroupName=="size"){//尺寸检验
- // that.params.material__process__name="一次超洗";
- that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
- if(res.length>0){
- that.deptId = res[0].id;
- that.params.dept=res[0].id;
- console.log('that.deptId',that.deptId);
- }
- that.apiObj = that.$API.wpm.handover.list;
- })
- }else if(that.mgroupName=="facade"){//外观检验
- // that.params.material__process__name="二次超洗";
- that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
- if(res.length>0){
- that.deptId = res[0].id;
- that.params.dept=res[0].id;
- console.log('that.deptId',that.deptId);
- }
- that.apiObj = that.$API.wpm.handover.list;
- })
- }else{//工段交接
- that.printer_name = localStorage.getItem("printer_name");
- that.$API.mtm.mgroup.list
- .req({ page: 0, name: that.mgroupName })
- .then((res) => {
- if (res.length < 1) {
- that.$message.error("获取工段错误");
- return;
- }
- that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
- that.mgroupId = res[0].id;
- that.processId = res[0].process;
- that.processCate = res[0].process_cate;
- that.params.mgroup = that.mgroupId;
- that.apiObj = that.$API.wpm.handover.list;
- });
- }
+ // this.getMgroupInfo();
},
methods: {
+ getMgroupInfo(){
+ let that = this;
+ console.log('that.mgroup_name',that.mgroup_name);
+ if(that.mgroup_name=="size"){//尺寸检验
+ // that.params.material__process__name="一次超洗";
+ that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
+ if(res.length>0){
+ that.deptId = res[0].id;
+ that.params.dept=res[0].id;
+ }
+ that.apiObj = that.$API.wpm.handover.list;
+ that.$refs.table.refresh();
+ })
+ }else if(that.mgroup_name=="facade"){//外观检验
+ // that.params.material__process__name="二次超洗";
+ that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
+ if(res.length>0){
+ that.deptId = res[0].id;
+ that.params.dept=res[0].id;
+ }
+ that.apiObj = that.$API.wpm.handover.list;
+ that.$refs.table.refresh();
+ })
+ }else{//工段交接
+ that.printer_name = localStorage.getItem("printer_name");
+ that.$API.mtm.mgroup.list
+ .req({ page: 0, name: that.mgroup_name })
+ .then((res) => {
+ if (res.length < 1) {
+ that.$message.error("获取工段错误");
+ return;
+ }
+ that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
+ that.mgroupId = res[0].id;
+ that.processId = res[0].process;
+ that.processCate = res[0].process_cate;
+ that.params.mgroup = that.mgroupId;
+ that.apiObj = that.$API.wpm.handover.list;
+ that.$refs.table.refresh();
+ });
+ }
+ },
printSetting(){
this.setNameVisible = true;
},
- handoverPrint(row) {
- let that = this;
- let str = [
- "SIZE 60 mm,90 mm",
- "GAP 0 mm,0 mm",
- "CLS",
- 'QRCODE 0,60,H,5,A,0,"' +that.testCode +'"',
- "WINTEXT 0,200,36,0,0,0,Simhei," +row.material_name,
- "WINTEXT 0,240,36,0,0,0,Simhei,批次:" +
- row.batch,
- ];
- if(row.wm_notok_sign!==null){
- str.push("WINTEXT 0,280,36,0,0,0,Simhei,不合格原因:" +
- row.wm_notok_sign,)
- }
- //供应商----原料、辅料
- // if(row.type==30||row.type==40){
- // str.push("WINTEXT 50,460,36,0,0,0,Simhei,供应商:" +
- // row.supplier_name,)
- // }
- str.push("PRINT 1",)
- // let str = [
- // "SIZE 60 mm,90 mm",
- // "GAP 0 mm,0 mm",
- // "CLS",
- // "WINTEXT 0,10,36,0,0,0,Simhei," +row.material_name,
- // 'QRCODE 0,60,H,5,A,0,"' +that.testCode +'"',
- // "WINTEXT 50,340,36,0,0,0,Simhei,批次:" +
- // row.batch,
- // "WINTEXT 50,400,36,0,0,0,Simhei,不合格原因:" +
- // row.wm_notok_sign,
- // "PRINT 1",
- // ];
- let obj = {};
- obj.printer_commands = str;
- obj.printer_name = that.printer_name;
- this.$API.wpm.prints.req(obj).then((response) => {});
- },
//添加
table_add(type) {
this.dialog.save = true;
@@ -410,7 +388,7 @@ export default {
searchTypeQuery() {
let that = this;
if (that.searchType == "send") {
- if(that.mgroupName=="size"||that.mgroupName=="facade"){
+ if(that.mgroup_name=="size"||that.mgroup_name=="facade"){
that.query.send_dept = that.deptId;
that.query.recive_dept = "";
}else{
@@ -418,7 +396,7 @@ export default {
that.query.recive_mgroup = "";
}
} else if (that.searchType == "recive") {
- if(that.mgroupName=="size"||that.mgroupName=="facade"){
+ if(that.mgroup_name=="size"||that.mgroup_name=="facade"){
that.query.send_dept = "";
that.query.recive_dept =that.deptId;
}else{
@@ -445,19 +423,6 @@ export default {
let that = this;
that.handoverItem = row;
that.printVisible = true;
- //打印
- // if (
- // that.printer_name == null ||
- // that.printer_name == "" ||
- // that.printer_name == undefined
- // ) {
- // this.setNameVisible = true;
- // } else {
- // that.$API.wpm.handover.item.req(row.id).then((res) => {
- // that.handoverItem = res;
- // that.handoverPrint(row);
- // });
- // }
},
savePrinter() {
let that = this;
diff --git a/src/views/wpm_gx/inm.vue b/src/views/wpm_gx/inm.vue
index 811280ae..fd48c6ea 100644
--- a/src/views/wpm_gx/inm.vue
+++ b/src/views/wpm_gx/inm.vue
@@ -13,9 +13,6 @@
报废
-
{
- if(res.length>0){
- that.params.mgroupx = null;
- that.params.belong_dept=res[0].id;
- }
- that.apiObj = that.$API.wpm.wmaterial.list;
- })
- }else if(that.mgroupName=="facade"){
- // that.params.material__process__name = "二次超洗";
- that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
- if(res.length>0){
- that.params.mgroupx = null;
- that.params.belong_dept=res[0].id;
- }
- that.apiObj = that.$API.wpm.wmaterial.list;
- })
- }else{
- that.$API.mtm.mgroup.list
- .req({ page: 0, name: that.mgroupName })
- .then((res) => {
- if (res.length < 1) {
- that.$message.error("获取工段错误");
- return;
- }
- that.mgroupId = res[0].id;
- that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
- that.process = res[0].process;
- that.params.mgroupx = res[0].id;
- that.params.belong_dept = res[0].belong_dept;
- that.apiObj = that.$API.wpm.wmaterial.list;
- });
- }
+ mounted() {},
+ watch: {
+ mgroupName: {
+ handler: function (newval,odlval) {
+ let that = this;
+ that.params.mgroupx = "";
+ that.apiObj = null;
+ that.mgroup_name = newval;
+ that.getMgroupInfo();
+ },
+ },
},
methods: {
+ getMgroupInfo(){
+ let that = this;
+ console.log(that.mgroupName);
+ if(that.mgroupName=="size"){
+ // that.params.material__process__name = "一次超洗";
+ that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
+ if(res.length>0){
+ that.params.mgroupx = null;
+ that.params.belong_dept=res[0].id;
+ }
+ that.apiObj = that.$API.wpm.wmaterial.list;
+ that.$refs.table.refresh();
+ })
+ }else if(that.mgroupName=="facade"){
+ // that.params.material__process__name = "二次超洗";
+ that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
+ if(res.length>0){
+ that.params.mgroupx = null;
+ that.params.belong_dept=res[0].id;
+ }
+ that.apiObj = that.$API.wpm.wmaterial.list;
+ that.$refs.table.refresh();
+ })
+ }else{
+ that.$API.mtm.mgroup.list
+ .req({ page: 0, name: that.mgroupName })
+ .then((res) => {
+ if (res.length < 1) {
+ that.$message.error("获取工段错误");
+ return;
+ }
+ that.mgroupId = res[0].id;
+ that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
+ that.process = res[0].process;
+ that.params.mgroupx = res[0].id;
+ that.params.belong_dept = res[0].belong_dept;
+ that.apiObj = that.$API.wpm.wmaterial.list;
+ that.$refs.table.refresh();
+ });
+ }
+ },
add() {
this.dialog.save = true;
this.$nextTick(() => {
diff --git a/src/views/wpm_gx/mlog_bx.vue b/src/views/wpm_gx/mlog_bx.vue
new file mode 100644
index 00000000..281fe1d7
--- /dev/null
+++ b/src/views/wpm_gx/mlog_bx.vue
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/mlogs.vue b/src/views/wpm_gx/mlogs.vue
index 41f6fc11..ce321a34 100644
--- a/src/views/wpm_gx/mlogs.vue
+++ b/src/views/wpm_gx/mlogs.vue
@@ -54,7 +54,7 @@
prop="equipment_name"
min-width="150"
>
-
+
{{customMethod(scope.row,3)}}
@@ -72,7 +72,7 @@
prop="handle_user_name"
width="80"
>
-
+
{{ getRemaTime(scope.row) }}
@@ -146,7 +146,7 @@
:process="processId"
:mgroup="mgroupId"
:dept="deptId"
- :mgroupName = "mgroupName"
+ :mgroup_name = "mgroup_name"
@success="handleSaveSuccess"
@closed="dialog.save = false"
>
@@ -193,13 +193,27 @@ export default {
deptId: null,
processId: "",
processCate: "",
+ mgroup_name:''
};
},
+ watch: {
+ mgroupName: {
+ handler: function (newval,odlval) {
+ let that = this;
+ that.params.mgroup = "";
+ that.apiObj = null;
+ that.mgroup_name = newval;
+ that.getMgroupInfo();
+ },
+ },
+ },
mounted() {
- let that = this;
- that.$API.mtm.mgroup.list
- .req({ page: 0, name: that.mgroupName })
- .then((res) => {
+ // this.getMgroupInfo();
+ },
+ methods: {
+ getMgroupInfo(){
+ let that = this;
+ that.$API.mtm.mgroup.list.req({ page: 0, name: that.mgroup_name }).then((res) => {
if (res.length < 1) {
that.$message.error("获取工段错误");
return;
@@ -210,9 +224,9 @@ export default {
that.processCate = res[0].process_cate;
that.params.mgroup = res[0].id;
that.apiObj = that.$API.wpm.mlog.list;
+ that.$refs.table.refresh();
});
- },
- methods: {
+ },
getRemaTime(row){
if(row.work_start_time !== null){
let times = 0;
diff --git a/src/views/wpm_gx/mtask.vue b/src/views/wpm_gx/mtask.vue
index 4223eb7a..469cd07e 100644
--- a/src/views/wpm_gx/mtask.vue
+++ b/src/views/wpm_gx/mtask.vue
@@ -27,7 +27,7 @@
-
+
{
if(res.length>0){
that.mgroupId = res[0].id;
@@ -153,13 +169,13 @@ export default {
that.processCate = res[0].process_cate;
that.params.mgroup = res[0].id;
that.apiObj = this.$API.pm.mtask.list;
+ that.$refs.table.refresh();
}else{
that.$message.error("获取工段错误");
return;
}
});
- },
- methods: {
+ },
viewBatches(row){
this.dialogVisible = true;
this.$nextTick(() => {