diff --git a/src/views/wpm_gx/handover.vue b/src/views/wpm_gx/handover.vue
index 1a3c059f..b5211ce5 100644
--- a/src/views/wpm_gx/handover.vue
+++ b/src/views/wpm_gx/handover.vue
@@ -101,20 +101,15 @@
-
+
-
+
{{scope.row.handoverb.length}}批
-
拆批
diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue
index 2f8a4a99..4432ab6a 100644
--- a/src/views/wpm_gx/handover_form.vue
+++ b/src/views/wpm_gx/handover_form.vue
@@ -186,8 +186,16 @@
-
-
+
+
+
+
+
@@ -340,12 +348,14 @@ export default {
},
],
},
+ new_batch:'',
listParams:{},
totalCount: 0,
mtype:10,
deptID:'',
route_code:'',
codeText: "",
+ batchList:[],
fileList:[],
userList: [],
userList2: [],
@@ -406,6 +416,14 @@ export default {
}
that.getTid();
},
+ watch: {
+ batchList:{
+ deep:true,
+ handler (v) {
+ console.log('batchList',v)
+ }
+ }
+ },
methods: {
getTid (){
var that = this;
@@ -514,6 +532,44 @@ export default {
that.userList2 = res;
});
},
+ remoFun(val){
+ let that = this;
+ let params = {};
+ that.batchList = [];
+ params.material = that.form.handoverb[0].material;
+ params.batch = val;
+ params.mgroup = that.mgroupId;
+ params.count_all = 1;
+ params.defect = that.form.handoverb[0].defect!=null?that.form.handoverb[0].defect:'';
+ params.defect__isnull = that.form.handoverb[0].defect!=null?false:true;
+ params.page = 0;
+ that.$API.wpm.wmaterial.list.req(params).then(res=>{
+ if(res.length>0){
+ that.batchList = res;
+ }else{
+ let obj = {};
+ obj.batch = val;
+ obj.id = val;
+ that.batchList.push(obj);
+ }
+ })
+ },
+ new_batch_change(){
+ let that = this;
+ let arr = that.batchList.filter(item=>{
+ return item.batch == that.new_batch;
+ })
+ if(arr.length>0){
+ that.form.new_batch = arr[0].batch;
+ }else{
+ that.batchList.forEach(item=>{
+ if(item.id == that.new_batch){
+ that.form.new_batch = item.batch;
+ that.form.new_wm = item.id;
+ }
+ })
+ }
+ },
addMaterial(){
this.addShow = true;
},
@@ -538,6 +594,8 @@ export default {
obj.wm = item.wm;
obj.label = item.label;
obj.batch = item.batch;
+ obj.defect = item.defect;
+ obj.material = item.material;
obj.count_cando = item.count_canhandover;
obj.count = item.count_canhandover;
this.form.handoverb.push(obj);
@@ -617,6 +675,23 @@ export default {
that.form.mtype=30;
that.mtype==30
}
+ if(that.mtype==30&&that.form.new_batch==null&&that.form.new_batch==undefined&&that.new_batch!=''){
+ let arr = that.batchList.filter(item=>{
+ return item.batch == that.new_batch;
+ })
+ if(arr.length>0){
+ that.form.new_batch = arr[0].batch;
+ }else{
+ that.batchList.forEach(item=>{
+ if(item.id == that.new_batch){
+ that.form.new_batch = item.batch;
+ that.form.new_wm = item.id;
+ }
+ })
+ }
+ }
+ console.log('that.form.new_wm',that.form.new_wm);
+ console.log('that.form.new_batch',that.form.new_batch);
if(that.mtype==20||that.mtype==30||that.type==40){
that.$API.wpm.handover.createsubmit.req(that.form).then((res) => {
that.isSaveing = false;
diff --git a/src/views/wpm_gx/inm.vue b/src/views/wpm_gx/inm.vue
index dbc2ec58..0b0c0735 100644
--- a/src/views/wpm_gx/inm.vue
+++ b/src/views/wpm_gx/inm.vue
@@ -324,6 +324,8 @@ export default {
let obj = {};
obj.wm = item.id;
obj.batch = item.batch;
+ obj.defect = item.defect;
+ obj.material = item.material;
obj.count_canhandover = item.count_canhandover;
obj.count = item.count_canhandover;
obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';
diff --git a/src/views/wpm_gx/inmOut.vue b/src/views/wpm_gx/inmOut.vue
index 5a53122e..4383ff82 100644
--- a/src/views/wpm_gx/inmOut.vue
+++ b/src/views/wpm_gx/inmOut.vue
@@ -409,6 +409,8 @@ export default {
let obj = {};
obj.wm = item.id;
obj.batch = item.batch;
+ obj.defect = item.defect;
+ obj.material = item.material;
obj.count_canhandover = item.count_canhandover;
obj.count = item.count_canhandover;
obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';