diff --git a/src/api/model/qm.js b/src/api/model/qm.js index bcdacbe0..b15c4e2a 100644 --- a/src/api/model/qm.js +++ b/src/api/model/qm.js @@ -365,5 +365,11 @@ export default { return await http.post(`${config.API_URL}/qm/ftestwork/${id}/submit/`); }, }, + revert: { + name: "撤回检验工作", + req: async function (id) { + return await http.post(`${config.API_URL}/qm/ftestwork/${id}/revert/`); + }, + }, }, }; diff --git a/src/api/model/wpm.js b/src/api/model/wpm.js index 56b4e1f6..8d62634e 100644 --- a/src/api/model/wpm.js +++ b/src/api/model/wpm.js @@ -548,9 +548,9 @@ export default { }, prints: { name: "打印", - req: async function (data) { + req: async function (ip, data) { // return await http.post("http://localhost:8080/prints/", data); - return await http.post("http://127.0.0.1:8080/prints/", data); + return await http.post(`http://${ip}:8080/prints/`, data); }, }, ana:{ diff --git a/src/layout/components/userbar.vue b/src/layout/components/userbar.vue index 38b62c7b..36040479 100644 --- a/src/layout/components/userbar.vue +++ b/src/layout/components/userbar.vue @@ -90,6 +90,11 @@ + + + + + @@ -138,6 +143,7 @@ export default { scanId:'', scanType:'', printer_name:'', + printer_ip:'', scanVisible:false, }; }, @@ -157,6 +163,7 @@ export default { this.userName = userInfo.username; this.userNameF = this.userName.substring(0, 1); this.printer_name = localStorage.getItem("printer_name") || ""; + this.printer_ip = localStorage.getItem("printer_ip") || "127.0.0.1"; }, methods: { openBook() { @@ -250,7 +257,10 @@ export default { this.setNameVisible=true; }, savePrinter(){ - this.$TOOL.setPrint(this.printer_name); + this.$TOOL.setPrint({ + "printer_name":this.printer_name, + "printer_ip":this.printer_ip + }); this.setNameVisible=false; }, //显示短消息 diff --git a/src/utils/tool.js b/src/utils/tool.js index ddedb5d2..35d080dc 100644 --- a/src/utils/tool.js +++ b/src/utils/tool.js @@ -140,7 +140,12 @@ tool.screen = function (element) { } } tool.setPrint = function (val) { - localStorage.setItem('printer_name', val) + if (val.printer_name) { + localStorage.setItem('printer_name', val.printer_name) + localStorage.setItem('printer_ip', val.printer_ip) + }else{ + localStorage.setItem('printer_name', val) + } } /* 复制对象 */ tool.objCopy = function (obj) { diff --git a/src/views/em/ecate.vue b/src/views/em/ecate.vue index be3f6b2d..c1119eb2 100644 --- a/src/views/em/ecate.vue +++ b/src/views/em/ecate.vue @@ -31,21 +31,21 @@ {{ typeOptions_[scope.row.type] }} - + - + - + @@ -259,14 +259,14 @@ export default { .catch(() => {}); }, revert(row) { - this.$confirm(`确定撤销该操作吗?`, "提示", { + this.$confirm(`确定撤回该操作吗?`, "提示", { type: "warning", }) .then(() => { this.$API.inm.mio.revert .req(row.id) .then((res) => { - this.$message.success("撤销成功"); + this.$message.success("撤回成功"); this.$refs.table.refresh(); return res; }) diff --git a/src/views/inm/helpso.vue b/src/views/inm/helpso.vue index ad8fbf35..8c7ddb97 100644 --- a/src/views/inm/helpso.vue +++ b/src/views/inm/helpso.vue @@ -187,7 +187,7 @@ export default { resetQuery() { this.query = {}; }, - //打印物料标签 + //打签 printMaterial(row){ let that = this; that.wmId = row.id; diff --git a/src/views/inm/mainso.vue b/src/views/inm/mainso.vue index b81876a0..03b9f8c9 100644 --- a/src/views/inm/mainso.vue +++ b/src/views/inm/mainso.vue @@ -61,11 +61,11 @@ - + @@ -100,7 +100,7 @@ width="120" > @@ -441,7 +441,7 @@ export default { that.getCheckList(); }) }, - //打印物料标签 + //打印打签 printMaterial(row,type){ let that = this; let printer_name=localStorage.getItem("printer_name"); @@ -456,7 +456,8 @@ export default { let obj = {}; obj.printer_commands = res.commands; obj.printer_name = printer_name; - that.$API.wpm.prints.req(obj).then((response) => { + let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1'; +that.$API.wpm.prints.req(printer_ip, obj).then((response) => { that.$message.success("打印成功"); }); }) @@ -469,7 +470,8 @@ export default { let obj = {}; obj.printer_commands = res.commands; obj.printer_name = printer_name; - that.$API.wpm.prints.req(obj).then((response) => { + let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1'; +that.$API.wpm.prints.req(printer_ip, obj).then((response) => { that.$message.success("打印成功"); }); }); diff --git a/src/views/inm/mainso_mio.vue b/src/views/inm/mainso_mio.vue index 63ad6549..243f4aa3 100644 --- a/src/views/inm/mainso_mio.vue +++ b/src/views/inm/mainso_mio.vue @@ -154,7 +154,7 @@ v-auth="'mio.submit'" v-if="scope.row.state == 20" > - 撤销 + 撤回 @@ -275,14 +275,14 @@ export default { .catch(() => {}); }, revert(row) { - this.$confirm(`确定撤销该操作吗?`, "提示", { + this.$confirm(`确定撤回该操作吗?`, "提示", { type: "warning", }) .then(() => { this.$API.inm.mio.revert .req(row.id) .then((res) => { - this.$message.success("撤销成功"); + this.$message.success("撤回成功"); this.$refs.table.refresh(); return res; }) diff --git a/src/views/inm/mio.vue b/src/views/inm/mio.vue index c5e67611..5edfb9ec 100644 --- a/src/views/inm/mio.vue +++ b/src/views/inm/mio.vue @@ -127,7 +127,7 @@ (scope.row.type == 'other_in' || scope.row.type == 'other_out')" > - 撤销 + 撤回 { this.$API.inm.mio.revert .req(row.id) .then((res) => { - this.$message.success("撤销成功"); + this.$message.success("撤回成功"); this.$refs.table.refresh(); return res; }) diff --git a/src/views/inm/mioitem.vue b/src/views/inm/mioitem.vue index 0b19cc46..a1b0a974 100644 --- a/src/views/inm/mioitem.vue +++ b/src/views/inm/mioitem.vue @@ -203,7 +203,7 @@ type="primary" v-if="mioObj.type == 'do_out'" @click="printMaterial(scope.row,'mioitem')" - >物料标签 + >打签 @@ -601,9 +601,9 @@ export default { this.$message.error("导入失败,请重新尝试"); }); }, - //打印物料标签 + //打签 printMaterial(row,type){ - console.log('打印物料标签',row); + console.log('打签',row); let that = this; let is_mainso = this.url_code.includes('mainso'); if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){ @@ -616,7 +616,8 @@ export default { let obj = {}; obj.printer_commands = res.commands; obj.printer_name = that.printer_name; - that.$API.wpm.prints.req(obj).then((response) => { + let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1'; +that.$API.wpm.prints.req(printer_ip, obj).then((response) => { that.$message.success("打印成功"); }); }) @@ -629,7 +630,8 @@ export default { let obj = {}; obj.printer_commands = res.commands; obj.printer_name = that.printer_name; - that.$API.wpm.prints.req(obj).then((response) => { + let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1'; +that.$API.wpm.prints.req(printer_ip, obj).then((response) => { that.$message.success("打印成功"); }); }); diff --git a/src/views/inm/mioitem_check.vue b/src/views/inm/mioitem_check.vue index 20fa0bde..b061c83d 100644 --- a/src/views/inm/mioitem_check.vue +++ b/src/views/inm/mioitem_check.vue @@ -7,7 +7,7 @@ @closed="$emit('closed')" > - + - + + + + {{ objitem.material_name }} + + + + + {{ objitem.batch }} + + + + + + + + + + + + + + + + + + + + + + + + + 异常项: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ objitem.material_name }} @@ -605,16 +737,6 @@ - - - - - + - - - - - - - - - - - - + { this.tableHeight = document.getElementById('mioitemwMain').clientHeight-20; },500) @@ -1011,7 +1108,14 @@ export default { that.form.material_name = that.objitem.material_name; that.form.batch = that.objitem.batch; that.form.count = that.objitem.count; + that.form.count_ok = that.objitem.count; that.form.count_bag = that.objitem.count_bag; + if(that.project_code=='gx'){ + that.form.count_n_zw = 0;//直径 + that.form.count_n_zz = 0;//亮面 + that.form.count_n_b = 0;//崩面 + that.form.count_n_dl = 0;//长度 + } } if ( (that.type == "do_in" && that.cate == "halfgood") || @@ -1096,8 +1200,12 @@ export default { } return this; }, + gxPurInCountChange(){ + this.form.count_ok = this.form.count - this.form.count_notok; + }, nqtChange(){ - this.form.count_notok = this.form.count_n_qt; + this.form.count_notok = this.form.count_n_zw+this.form.count_n_zz+this.form.count_n_b+this.form.count_n_dl; + this.form.count_ok = this.form.count - this.form.count_notok; }, getMaterialItem(){ let that = this; @@ -1373,14 +1481,12 @@ export default { that.$message.success("操作成功"); }); } else { - that.$API.inm.mioitem.test - .req(that.mioitemId, that.form) - .then((res) => { - that.isSaveing = false; - that.$emit("success"); - that.visible = false; - that.$message.success("操作成功"); - }); + that.$API.inm.mioitem.test.req(that.mioitemId, that.form).then((res) => { + that.isSaveing = false; + that.$emit("success"); + that.visible = false; + that.$message.success("操作成功"); + }); } } catch (err) { //可以处理校验错误 diff --git a/src/views/inm/mioitemlist.vue b/src/views/inm/mioitemlist.vue index 9c1b575b..f3013649 100644 --- a/src/views/inm/mioitemlist.vue +++ b/src/views/inm/mioitemlist.vue @@ -29,6 +29,20 @@ > + + + { + let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1'; +that.$API.wpm.prints.req(printer_ip, obj).then((response) => { that.$message.success("打印成功"); }); }) @@ -388,7 +412,8 @@ export default { let obj = {}; obj.printer_commands = res.commands; obj.printer_name = that.printer_name; - that.$API.wpm.prints.req(obj).then((response) => { + let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1'; +that.$API.wpm.prints.req(printer_ip, obj).then((response) => { that.$message.success("打印成功"); }); }); diff --git a/src/views/inm/packPrint_form.vue b/src/views/inm/packPrint_form.vue index bf789752..71a713a8 100644 --- a/src/views/inm/packPrint_form.vue +++ b/src/views/inm/packPrint_form.vue @@ -257,7 +257,8 @@ export default { let obj = {}; obj.printer_commands = commands; obj.printer_name = that.printer_name; - that.$API.wpm.prints.req(obj).then((response) => { + let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1'; +that.$API.wpm.prints.req(printer_ip, obj).then((response) => { that.$message.success("打印成功"); that.isSaveing = false; that.$emit("success"); diff --git a/src/views/login/components/passwordForm.vue b/src/views/login/components/passwordForm.vue index 6943ee0d..fff7ff24 100644 --- a/src/views/login/components/passwordForm.vue +++ b/src/views/login/components/passwordForm.vue @@ -108,8 +108,10 @@ export default { }, }, mounted() { - this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code; - console.log('this.project_code',this.project_code); + this.$nextTick(()=>{ + this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code; + console.log('this.project_code',this.project_code); + }); }, methods: { async login() { diff --git a/src/views/qm/qct.vue b/src/views/qm/qct.vue index 8410e374..a79bf6f8 100644 --- a/src/views/qm/qct.vue +++ b/src/views/qm/qct.vue @@ -117,18 +117,12 @@ import recordDialog from "./qctDetail.vue"; tagsOptions: [ {value:"process",name:"过程检验"}, {value:"inm",name:"库存检验"}, - // {value:"purin",name:"入厂检验"}, - // {value:"first",name:"首件检验"}, - // {value:"prod",name:"成品检验"}, - // {value:"performance",name:"性能检验"}, + {value:"fix",name:"返修检验"}, ], tags_:{ - // "purin":"入厂检验", - // "first":"首件检验", - // "prod":"成品检验", "process":"过程检验", "inm":"库存检验", - // "performance":"性能检验" + "fix":"返修检验", }, } }, diff --git a/src/views/statistics/bxerp/cpccjc.vue b/src/views/statistics/bxerp/cpccjc.vue index ddae9801..cece0888 100644 --- a/src/views/statistics/bxerp/cpccjc.vue +++ b/src/views/statistics/bxerp/cpccjc.vue @@ -2,6 +2,11 @@
+ - 导出
@@ -31,6 +30,8 @@ stripe > + +