diff --git a/src/views/wpm_bx/mlogbw_check_table.vue b/src/views/wpm_bx/mlogbw_check_table.vue index 0138e6cf..6590cc6a 100644 --- a/src/views/wpm_bx/mlogbw_check_table.vue +++ b/src/views/wpm_bx/mlogbw_check_table.vue @@ -41,6 +41,8 @@ 序号 物料批次 物料编号 + 生产设备 + 扭转日期 {{ item.testitem_name }} {{ item.defect_name }} 备注 @@ -64,6 +66,20 @@ {{ row.number }} ——{{ row.wpr_number_out }} + + + {{ row.equip_name }}{{ row.equip_number }} + + + +
+ {{ row.work_start_time}} +
+ {{ row[item.testitem_name] }} -1){ + hours =Number(row.work_start_time.split("T")[1].split(":")[0]); + minutes =Number(row.work_start_time.split("T")[1].split(":")[1]) ; + }else{ + hours =Number(row.work_start_time.split(" ")[1].split(":")[0]); + minutes =Number(row.work_start_time.split(" ")[1].split(":")[1]) ; + } + if((hours==0&&minutes>29)||hours==1||(hours==2&&minutes<30)){ + waveNum = 9; + }else if((hours==2&&minutes>29)||hours==3||(hours==4&&minutes<30)){ + waveNum = 10; + }else if(hours==7||hours==8){ + waveNum = 1; + }else if(hours==9||hours==10){ + waveNum = 2; + }else if(hours==11||hours==12){ + waveNum = 3; + }else if((hours==13&&minutes>29)||hours==14||(hours==15&&minutes<30)){ + waveNum = 4; + }else if((hours==15&&minutes>29)||hours==16||(hours==17&&minutes<30)){ + waveNum = 5; + }else if(hours==18||hours==19){ + waveNum = 6; + }else if(hours==20||hours==21){ + waveNum = 7; + }else if(hours==22||hours==23){ + waveNum = 8; + } + that.mlogbwlist[index].波数 = waveNum; + }, getList(){ let that = this; let params = {}; @@ -599,6 +654,12 @@ export default { obj.mlogb = row.mlogb; obj.wpr = row.wpr; obj.note = row.note; + if(row.work_start_time){ + obj.work_start_time = row.work_start_time.replace('T',' '); + } + if(row.equip){ + obj.equip = row.equip; + } //qct不为空,有检验表 if((that.qct!==''&&that.qct!==null)||(that.qctId!==''&&that.qctId!==null)){ obj.ftest = {}; @@ -640,6 +701,9 @@ export default { that.$API.wpm.mlogbw.update.req(row.id,obj).then((res) => { that.$message.success("保存成功"); that.mlogbwlist[editIndex].isEdit = false; + that.mlogbwlist[editIndex].equip_name = res.equip_name; + that.mlogbwlist[editIndex].equip_number = res.equip_number; + that.mlogbwlist[editIndex].work_start_time = res.work_start_time; // that.getList(); return res; }).catch((err) => { @@ -653,6 +717,9 @@ export default { that.$API.wpm.mlogbw.create.req(objNew).then((res) => { that.$message.success("添加成功"); that.mlogbwlist[editIndex].isEdit = false; + that.mlogbwlist[editIndex].equip_name = res.equip_name; + that.mlogbwlist[editIndex].equip_number = res.equip_number; + that.mlogbwlist[editIndex].work_start_time = res.work_start_time; // that.getList(); return res; }).catch((err) => { @@ -673,6 +740,7 @@ export default { 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'); + that.timeChange(that.mlogbwlist[index]) } let getEd = false; if(that.qct_testitems.length>0){