diff --git a/src/views/em/mpoint_form.vue b/src/views/em/mpoint_form.vue index 04b39002..655f5adb 100644 --- a/src/views/em/mpoint_form.vue +++ b/src/views/em/mpoint_form.vue @@ -261,21 +261,16 @@ - - - + + + @@ -465,6 +460,7 @@ export default { mpointOptions: [], epOptions: [], materials: [], + apiObjEq:this.$API.em.equipment.list, }; }, mounted() { diff --git a/src/views/inm/mioitem_form.vue b/src/views/inm/mioitem_form.vue index 0313534a..f7ff9cb3 100644 --- a/src/views/inm/mioitem_form.vue +++ b/src/views/inm/mioitem_form.vue @@ -38,6 +38,7 @@ @@ -500,6 +501,9 @@ export default { } else { this.getBatchOptions(); } + if(that.project_code=='gx'&&that.type == 'pur_in'){ + that.form.batch = '无' + } }, getItem(options, id) { for (var i = 0; i < options.length; i++) { diff --git a/src/views/statistics/bxerp/niuzhuanTotal.vue b/src/views/statistics/bxerp/niuzhuanTotal.vue index ef7b1c09..debd45ca 100644 --- a/src/views/statistics/bxerp/niuzhuanTotal.vue +++ b/src/views/statistics/bxerp/niuzhuanTotal.vue @@ -37,31 +37,41 @@ - + @@ -70,36 +80,46 @@ @@ -108,36 +128,46 @@ @@ -146,36 +176,46 @@ @@ -183,42 +223,42 @@ @@ -226,24 +266,24 @@ @@ -252,73 +292,83 @@ - + - - + @@ -332,8 +382,8 @@ export default { data() { return { params: { - ordering:'-data__扭转检测_小日期', - querys:[[{field:"data__has_key",compare:"",value:"扭转检测_日期"}]], + ordering:'-data__扭后检测_小日期', + querys:[[{field:"data__has_key",compare:"",value:"扭后检测_日期"}]], }, query:{ name__contains:'', @@ -341,7 +391,6 @@ export default { last_time__gte:'', last_time__lte:'', }, - // apiObj: this.$API.wpm.wpr.query, apiObj: this.$API.wpm.batchstquery, options:[], tableData:[], @@ -350,9 +399,9 @@ export default { methods: { handleQuery(){ let that = this; - let querys = [[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"扭转检测_批次号"}]]; + let querys = [[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"扭后检测_批次号"}]]; let obj = {},obj1 = {},obj2 = {},obj3 = {}; - obj.field = 'data__扭转检测_批次号'; + obj.field = 'data__扭后检测_批次号'; obj.value = that.query.batch__contains; obj.compare = ''; @@ -364,7 +413,7 @@ export default { obj2.value = that.query.last_time__lte; obj2.compare = 'lte'; - obj3.field = 'data__扭转检测_物料名'; + obj3.field = 'data__扭后检测_物料名'; obj3.value = that.query.name__contains; obj3.compare = ''; diff --git a/src/views/statistics/bxerp/workerTimes.vue b/src/views/statistics/bxerp/workerTimes.vue index 52db4926..e2c03d77 100644 --- a/src/views/statistics/bxerp/workerTimes.vue +++ b/src/views/statistics/bxerp/workerTimes.vue @@ -97,7 +97,12 @@ export default { }, handleQuery(){ let that = this; - that.getData(); + if(that.query.user_name==null||that.query.user_name==''){ + that.$message.error('请输入员工姓名'); + }else{ + that.getData(); + } + }, }, }; diff --git a/src/views/wpm_bx/inmIn.vue b/src/views/wpm_bx/inmIn.vue index 6c6c493d..246082c3 100644 --- a/src/views/wpm_bx/inmIn.vue +++ b/src/views/wpm_bx/inmIn.vue @@ -64,7 +64,7 @@ diff --git a/src/views/wpm_bx/inmOut.vue b/src/views/wpm_bx/inmOut.vue index b4248808..925af7a8 100644 --- a/src/views/wpm_bx/inmOut.vue +++ b/src/views/wpm_bx/inmOut.vue @@ -79,7 +79,7 @@ diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue index 98275249..5c632343 100644 --- a/src/views/wpm_bx/mlog_detail.vue +++ b/src/views/wpm_bx/mlog_detail.vue @@ -218,7 +218,6 @@ :apiObj="apiObj" row-key="id" stripe - height="250px" :params="paramsIn" hidePagination > @@ -600,9 +599,9 @@ export default { that.isSubmit = res.submit_time==null?false:true; if(that.processType=='10'&&that.mlogItem.material_out_&&that.mlogItem.material_out_.tracking==20){ that.getMlogbw(); - if(that.mlogItem.qct!==null){ - that.getdefects(that.mlogItem.qct); - } + // if(that.mlogItem.qct!==null){ + // that.getdefects(that.mlogItem.qct); + // } } if(res.route!==null){ that.hasRoute = true; @@ -649,51 +648,51 @@ export default { that.shiftOtions = res; }); }, - getdefects(qct){ - let that = this; - if(qct!==''&&qct!==null){//输出 - that.$API.qm.qct.item.req(qct).then((res) => { - that.qct_defects = []; - that.testdefectss(res); - }) - }else{ - that.$API.qm.qct.getQct.req({ material: that.mlogItem.material_out,type:'out',tag:'process' }).then((res) => { - that.testdefectss(res); - }).catch(()=>{ - // that.getList(); - }) - } - }, - testdefectss(res){ - let that = this; - res.qct_defects.forEach((item) => { - that.addTemplate[item.defect_name] = false; - let obj = Object.assign({}, item); - that.qct_defects.push(obj); - }) - that.qct_defects_origin = that.qct_defects; - that.qct_testitems = []; - res.qct_testitems.forEach((item2) => { - if(item2.testitem_type!=='20'){ - let obj2 = Object.assign({}, item2); - obj2.value = ''; - obj2.addto_wpr = item2.addto_wpr; - if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){ - obj2.value = null; - that.addTemplate[item2.testitem_name] = null; - } - if(item2.testitem_field_type=='select-text'||item2.testitem_field_type=='selects-text'){ - let str = obj2.testitem_choices.replace(/'/g, '"'); - let arr = JSON.parse(str); - obj2.testitem_choices = arr; - that.addTemplate[item2.testitem_name] = null; - } - that.qct_testitems.push(obj2); - } - }) - that.qct_testitems_origin = that.qct_testitems; - // that.getList(); - }, + // getdefects(qct){ + // let that = this; + // if(qct!==''&&qct!==null){//输出 + // that.$API.qm.qct.item.req(qct).then((res) => { + // that.qct_defects = []; + // that.testdefectss(res); + // }) + // }else{ + // that.$API.qm.qct.getQct.req({ material: that.mlogItem.material_out,type:'out',tag:'process' }).then((res) => { + // that.testdefectss(res); + // }).catch(()=>{ + // // that.getList(); + // }) + // } + // }, + // testdefectss(res){ + // let that = this; + // res.qct_defects.forEach((item) => { + // that.addTemplate[item.defect_name] = false; + // let obj = Object.assign({}, item); + // that.qct_defects.push(obj); + // }) + // that.qct_defects_origin = that.qct_defects; + // that.qct_testitems = []; + // res.qct_testitems.forEach((item2) => { + // if(item2.testitem_type!=='20'){ + // let obj2 = Object.assign({}, item2); + // obj2.value = ''; + // obj2.addto_wpr = item2.addto_wpr; + // if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){ + // obj2.value = null; + // that.addTemplate[item2.testitem_name] = null; + // } + // if(item2.testitem_field_type=='select-text'||item2.testitem_field_type=='selects-text'){ + // let str = obj2.testitem_choices.replace(/'/g, '"'); + // let arr = JSON.parse(str); + // obj2.testitem_choices = arr; + // that.addTemplate[item2.testitem_name] = null; + // } + // that.qct_testitems.push(obj2); + // } + // }) + // that.qct_testitems_origin = that.qct_testitems; + // // that.getList(); + // }, //获取生产工序的mlogbw getMlogbw(){ let that = this; diff --git a/src/views/wpm_bx/mlog_form.vue b/src/views/wpm_bx/mlog_form.vue index f40d39dd..6215a338 100644 --- a/src/views/wpm_bx/mlog_form.vue +++ b/src/views/wpm_bx/mlog_form.vue @@ -332,7 +332,7 @@ export default { res.results.forEach((item) => { let obj = {}; Object.assign(obj, item); - obj.value = ''; + obj.value = null; that.testitems.push(obj); }) }); diff --git a/src/views/wpm_bx/mlog_form2.vue b/src/views/wpm_bx/mlog_form2.vue index 982ee102..f58a2da6 100644 --- a/src/views/wpm_bx/mlog_form2.vue +++ b/src/views/wpm_bx/mlog_form2.vue @@ -295,7 +295,7 @@ export default { res.results.forEach((item) => { let obj = {}; Object.assign(obj, item); - obj.value = ''; + obj.value = null; that.testitems.push(obj); }) }); diff --git a/src/views/wpm_bx/mlogbw_check.vue b/src/views/wpm_bx/mlogbw_check.vue index 27e98ef3..ed50c5eb 100644 --- a/src/views/wpm_bx/mlogbw_check.vue +++ b/src/views/wpm_bx/mlogbw_check.vue @@ -546,7 +546,7 @@ export default { selectWprList:[], qct_defects_origin:[], selectWpr:[], - tableHeight:500, + tableHeight:null, apiObjPrint:this.$API.cm.labelmat.fromWm, printer_name:localStorage.getItem("printer_name") }; @@ -597,9 +597,7 @@ export default { } } that.visible = true; - setTimeout(() => { - that.tableHeight = document.getElementById('mlogbwMain').clientHeight-20; - },500) + that.tableHeight = document.getElementsByClassName('el-drawer__body')[0].clientHeight-40; }, //获取输入的testItem gettestitem(){ diff --git a/src/views/wpm_bx/mlogbw_check_table.vue b/src/views/wpm_bx/mlogbw_check_table.vue index 29e1f601..4ba7fe9c 100644 --- a/src/views/wpm_bx/mlogbw_check_table.vue +++ b/src/views/wpm_bx/mlogbw_check_table.vue @@ -134,13 +134,13 @@ 编辑 删除 { + if(item.id==row.id){ + editIndex = index; + } + }) let obj = {}; obj.number = row.number; obj.mlogb = row.mlogb; @@ -605,7 +612,7 @@ export default { obj.note = row.note; //qct不为空,有检验表 if(that.qct!==''&&that.qct!==null){ - that.qct_defects_origin.forEach(item => { + that.qct_defects.forEach(item => { if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){ let str = item.rule_expression.replace(/`/g, ''); str = str.replace(/\${(.*?)}/g, 'row.\$1') @@ -645,7 +652,8 @@ export default { obj.id = row.id; that.$API.wpm.mlogbw.update.req(row.id,obj).then((res) => { that.$message.success("保存成功"); - that.getList(); + that.mlogbwlist[editIndex].isEdit = false; + // that.getList(); return res; }).catch((err) => { return err; @@ -653,7 +661,8 @@ export default { }else{ that.$API.wpm.mlogbw.create.req(obj).then((res) => { that.$message.success("添加成功"); - that.getList(); + that.mlogbwlist[editIndex].isEdit = false; + // that.getList(); return res; }).catch((err) => { return err; @@ -667,32 +676,29 @@ export default { } }); }, - formTableEdit(row) { + formTableEdit(index) { let that = this; - if(that.route_code=='niuzhuan'&&that.optionsEq.length==0){ - that.getEquipment4(); + that.mlogbwlist[index].isEdit = true; + let date = new Date(); + if(that.mlogbwlist[index].work_start_time==''||that.mlogbwlist[index].work_start_time==null){ + that.mlogbwlist[index].work_start_time = that.$TOOL.dateFormat(date, 'yyyy-MM-dd hh:mm:ss'); + } + if(that.setForm.cd_req_addr!==null&&that.setForm.cd_req_addr!==""&&that.setForm.cd_req_addr!==undefined){ + that.getEqData(index); } - that.mlogbwlist.forEach((item, index) => { - if (item.id == row.id) { - that.mlogbwlist[index].isEdit = true; - let date = new Date(); - if(that.mlogbwlist[index].work_start_time==''||that.mlogbwlist[index].work_start_time==null){ - that.mlogbwlist[index].work_start_time = that.$TOOL.dateFormat(date, 'yyyy-MM-dd hh:mm:ss'); - } - } - }); }, formTableDelet(row){ this.mlogbwlist.pop(); }, //删除 - formTableDel(id) { + formTableDel(id,index) { let that = this; that.$confirm(`确定删除吗?`, "提示", { type: "warning", }).then(() => { that.$API.wpm.mlogbw.delete.req(id).then((res) => { that.getList(); + that.mlogbwlist.splice(index,1); that.$message.success("删除成功"); }).catch((err) => { return err; @@ -716,7 +722,7 @@ export default { defectCountSun(row){ let that = this; let index = that.mlogbwlist.indexOf(row); - that.qct_defects_origin.forEach(item => { + that.qct_defects.forEach(item => { if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){ let str = item.rule_expression.replace(/`/g, ''); str = str.replace(/\${(.*?)}/g, 'row.\$1') @@ -771,7 +777,7 @@ export default { that.equipmentOptions.forEach(item => { if(item.id == that.form.equipment){ that.form.equipment_name = item.name; - that.form.cd_req_addr=item.cd_req_addr; + that.form.cd_req_addr = that.setForm.cd_req_addr = item.cd_req_addr; } }); }, @@ -883,7 +889,7 @@ export default { that.mlogbwlist.splice(index,1); that.wprInputText = ""; that.mlogbwlist.unshift(obj); - if(that.setForm.cd_req_addr!==null){ + if(that.setForm.cd_req_addr!==null&&that.setForm.cd_req_addr!==""&&that.setForm.cd_req_addr!==undefined){ //执行cd_req_addr,获取检测设备的数据 that.getEqData(0); } @@ -899,6 +905,11 @@ export default { } }) }).catch((err) => { + console.log(err); + this.$notify.error({ + title: '获取数据失败', + message: err.data + }) return err; }); }, diff --git a/src/views/wpm_bx/mlogs.vue b/src/views/wpm_bx/mlogs.vue index a7f391a9..5e6bfae5 100644 --- a/src/views/wpm_bx/mlogs.vue +++ b/src/views/wpm_bx/mlogs.vue @@ -83,6 +83,15 @@ + + + - + - + - + - + @@ -143,7 +152,6 @@