diff --git a/src/views/wpm_bx/check_drawer.vue b/src/views/wpm_bx/check_drawer.vue index e29a9233..01f2c644 100644 --- a/src/views/wpm_bx/check_drawer.vue +++ b/src/views/wpm_bx/check_drawer.vue @@ -15,7 +15,6 @@ stripe :params="paramsObj" > - @@ -28,43 +27,16 @@ - + - - - {{ scope.row.count_sampling }} - {{ scope.row.count }} - - - - - {{ scope.row.count_sampling_ok }} - {{ scope.row.count_ok }} - + - - - {{ scope.row.count_sampling_ok/scope.row.count_sampling*100 }}% - {{ scope.row.count_ok/scope.row.count*100 }}% - - - diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue index 6b04a48c..fbd2b890 100644 --- a/src/views/wpm_bx/handover_form.vue +++ b/src/views/wpm_bx/handover_form.vue @@ -144,7 +144,7 @@ :value="item.id" > {{ item.batch }} - ({{ item.material_.process_name }}) + ({{ item.material_.process_name }}) {{ item.count }} @@ -168,8 +168,16 @@ {{ listItem.count_cando }} - - + + + 交接数量 + + + + + + + {{ item2.number }} + 删除 + + 总计:{{ totalCount }} @@ -292,6 +310,7 @@ export default { }, totalCount: 0, deptID:'', + bwIndex:0, userList: [], userList2: [], deptOptions:[], @@ -299,6 +318,7 @@ export default { materialOptions: [], addShow: false, visible: false, + bwVisible:false, scanVisible:false, isSaveing: false, setFiltersVisible: false, @@ -338,6 +358,18 @@ export default { that.getMgroupOptions(); }, methods: { + deletebw(index){ + this.form.handoverb[this.bwIndex].handoverbw.splice(index,1); + this.form.handoverb[this.bwIndex].count--; + }, + showbw(index){ + this.bwIndex = index; + console.log('this.form.handoverb[index].handoverbw',this.form.handoverb[index].handoverbw); + this.bwVisible = true; + }, + bwVisibleClose(){ + this.bwVisible = false; + }, //获取部门列表 getDeptOptions() { this.$API.system.dept.list @@ -557,7 +589,7 @@ export default { indexs = index; return item.wm == res.wm; }) - //有handoverb + //handoverb里有这个物料批次 if(arr.length>0){ //判断是否有wpr,若无将wpr放进去 if(arr[0].handoverbw&&arr[0].handoverbw.length>0){ @@ -570,28 +602,36 @@ export default { }else{ let obj1 = {}; obj1.wpr = res.id; + obj1.number = res.number; + that.form.handoverb[indexs].count+=1; that.form.handoverb[indexs].handoverbw.push(obj1); + console.log('1',that.form); } }else{ that.form.handoverb[indexs].handoverbw = []; let obj1 = {}; obj1.wpr = res.id; + obj1.number = res.number; + that.form.handoverb[indexs].count=1; that.form.handoverb[indexs].handoverbw.push(obj1); + console.log('2',that.form); } - }else{//无handoverb + }else{//handoverb里没有有这个物料批次 that.materialOptions.forEach((item) => { console.log('item.id',item.id); if(item.id == res.wm){ let obj2 = {}; obj2.wm = item.id; obj2.batch = item.batch; - obj2.counts = item.count; + obj2.count_cando = item.count; obj2.handoverbw = []; obj2.count = 1; let obj3 = {}; obj3.wpr = res.id; + obj3.number = res.number; obj2.handoverbw.push(obj3); that.form.handoverb.push(obj2); + console.log('3',that.form); } }) } @@ -600,7 +640,7 @@ export default { }else{ this.$API.cm.labelmat.item.req(id).then((res) => { let arr = that.form.handoverb.filter((item) => { - return item.batch == res.batch; + return item.batch == res.batch&&item.state==res.state; }) if(arr.length>0){ that.$message.error("该批次已存在") @@ -610,9 +650,10 @@ export default { let obj = {}; obj.wm = item.id; obj.batch = item.batch; - obj.counts = item.count; + obj.count_cando = item.count; obj.count = item.count; - that.form.handoverb.push(obj) + that.form.handoverb.push(obj); + console.log('4',that.form); } }) }