{
+ that.$refs.table.refresh();
+ });
+ },
//退回
table_reBack(row){
let that = this;
diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue
index fd9ad916..faf791d8 100644
--- a/src/views/wpm_bx/handover_form.vue
+++ b/src/views/wpm_bx/handover_form.vue
@@ -52,7 +52,7 @@
(原料棒)
- {{ item.count }}
+ {{ item.count_canhandover }}
({{ item.notok_sign_name }})
@@ -70,7 +70,7 @@
- {{ listItem.count_cando }}
+ {{ listItem.count_canhandover }}
@@ -91,7 +91,7 @@
controls-position="right"
:min="0"
:step="1"
- :max="listItem.count_cando"
+ :max="listItem.count_canhandover"
:disabled="mode==='show'||listItem.tracking==20"
:step-strictly="true"
style="width: 100%"
@@ -442,7 +442,9 @@ export default {
}
that.materialOptions = [];
this.$API.wpm.wmaterial.list.req(req).then((res) => {
- that.materialOptions = res;
+ that.materialOptions = res.filter(item=>{
+ return item.count_canhandover>0;
+ })
});
},
//获取车间不合格物料
@@ -455,7 +457,9 @@ export default {
state__in:'20,34'
};
this.$API.wpm.wmaterial.list.req(req).then((res) => {
- that.materialOptions = res;
+ that.materialOptions = res.filter(item=>{
+ return item.count_canhandover>0;
+ })
});
},
//获取废品库物料
@@ -468,7 +472,9 @@ export default {
state_all: 1
};
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
- that.materialOptions = res;
+ that.materialOptions = res.filter(item=>{
+ return item.count_canhandover>0;
+ })
});
},
getMaterialOkFangong(){
@@ -480,7 +486,9 @@ export default {
mgroup: that.mgroupId,
};
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
- that.materialOptions = res;
+ that.materialOptions = res.filter(item=>{
+ return item.count_canhandover>0;
+ })
});
},
//获取交送工段人员
@@ -591,8 +599,8 @@ export default {
})
data.forEach((item,index)=>{
item.wm = item.id;
- item.count = item.count_cando;
- totalCount += Number(item.count_cando);
+ item.count = item.count_canhandover;
+ totalCount += Number(item.count_canhandover);
item.tracking = item.material_.tracking;
if(item.material_.process_name){
item.process = item.material_.process_name;
@@ -734,7 +742,7 @@ export default {
let arr = [];
if(that.form.handoverb&&that.form.handoverb.length>0){
that.form.handoverb.forEach((item) => {
- if(item.batch == res.batch&&item.state==res.state){
+ if(item.batch == res.batch&&item.state==res.state&&item.defect==res.defect){
arr.push(item);
}
})
@@ -760,9 +768,10 @@ export default {
if(item.material_.process_name){
obj.process = item.material_.process_name;
}
- obj.count_cando = item.count;
- obj.count = item.count;
+ obj.count_cando = item.count_canhandover;
+ obj.count = item.count_canhandover;
obj.state = res.state;
+ obj.defect = res.defect;
obj.handoverbw = [];
that.$API.wpm.wpr.list.req({wm:item.id,page:0}).then((res) => {
let handoverbw = [];
@@ -810,8 +819,8 @@ export default {
if(arr[0].material_.process_name){
obj2.process = arr[0].material_.process_name;
}
- obj2.count_cando = arr[0].count;
- obj2.count = arr[0].count;
+ obj2.count_cando = arr[0].count_canhandover;
+ obj2.count = arr[0].count_canhandover;
that.form.handoverb.push(obj2);
that.wm_in = "";
}
@@ -866,7 +875,7 @@ export default {
if(item.material_.process_name){
obj2.process = item.material_.process_name;
}
- obj2.count_cando = item.count;
+ obj2.count_cando = item.count_canhandover;
obj2.handoverbw = [];
obj2.count = 1;
let obj3 = {};
diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue
index be8bb86f..536355e4 100644
--- a/src/views/wpm_bx/mlog_detail.vue
+++ b/src/views/wpm_bx/mlog_detail.vue
@@ -355,7 +355,7 @@
编辑
diff --git a/src/views/wpm_gx/handover.vue b/src/views/wpm_gx/handover.vue
index 15f41672..10dd6d13 100644
--- a/src/views/wpm_gx/handover.vue
+++ b/src/views/wpm_gx/handover.vue
@@ -193,6 +193,15 @@
@click="table_show(scope.row)"
type="success"
>查看
+
+
+ 撤消
+
+
{
+ that.$refs.table.refresh();
+ });
+ },
//退回
table_reBack(row){
let that = this;
diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue
index ea64b8e1..82f2f53b 100644
--- a/src/views/wpm_gx/handover_form.vue
+++ b/src/views/wpm_gx/handover_form.vue
@@ -37,11 +37,12 @@
@@ -52,29 +53,8 @@
{{ scope.row.defect_name }}
-
+
-
@@ -254,9 +234,11 @@ export default {
recive_mgroup: null,
handoverb:[],
},
+ selectObjIds:[],
apiObjM:null,
paramsM:{},
selectObj:{},
+ selectObjs:[],
rules: {
batch: [
{
@@ -379,33 +361,6 @@ export default {
}
});
},
- //获取车间物料
- // getMaterial() {
- // let that = this;
- // var req = {
- // page: 0,
- // state:10,
- // tag:'done'
- // };
- // that.materialOptions = [];
- // req.mgroup = that.mgroupId;
- // that.listParams = req;
- // this.$API.wpm.wmaterial.list.req(req).then((res) => {
- // that.materialOptions = res;
- // res.forEach(item=>{
- // if(that.codeText!==''&&item.batch === that.codeText){
- // let obj = {};
- // obj.wm = item.id;
- // obj.batch = item.batch;
- // obj.count = item.count_cando;
- // obj.count_cando = item.count_cando;
- // that.totalCount = item.count_cando;
- // that.form.handoverb.push(obj)
- // that.getResaveMgroups(item.material);
- // }
- // })
- // });
- // },
getResaveMgroups(material){
let that = this;
let params = {
@@ -419,46 +374,6 @@ export default {
}
})
},
- //获取车间不合格物料
- // getMaterialNotok() {
- // let that = this;
- // that.materialOptions = [];
- // var req = {
- // mgroupx: that.mgroupId,
- // page: 0,
- // state:20
- // };
- // that.listParams = req;
- // this.$API.wpm.wmaterial.list.req(req).then((res) => {
- // that.materialOptions = res;
- // });
- // },
- // getMaterialRework(){
- // let that = this;
- // that.materialOptions = [];
- // var req = {
- // mgroup: that.mgroupId,
- // page: 0,
- // tag : 'done'
- // };
- // that.listParams = req;
- // this.$API.wpm.wmaterial.list.req(req).then((res) => {
- // that.materialOptions = res;
- // });
- // },
- //获取废品库物料
- // getMaterialFP() {
- // let that = this;
- // that.materialOptions = [];
- // var obj = {
- // page: 0,
- // state : 50,
- // state_all: 1
- // };
- // that.$API.wpm.wmaterial.list.req(obj).then((res) => {
- // that.materialOptions = res;
- // });
- // },
//获取交送工段人员
getUserList() {
let that = this;
@@ -529,16 +444,18 @@ export default {
},
//显示
open(mode = "add",data,mtype) {
+ console.log(data)
this.mode = mode;
this.mtype = mtype;
if(data!==''&&data!==null&&data!==undefined){
+ console.log(typeof(data)=='string')
if(typeof(data)=='string'){
this.codeText = data.replace(" ","");
this.codeTextChange(this.codeText)
}else{
this.form.handoverb = data;
data.forEach(item=>{
- this.totalCount += Number(item.count_cando);
+ this.totalCount += Number(item.count);
})
}
}
@@ -550,45 +467,24 @@ export default {
},
materialChange0(){
let that = this;
- let obj = {};
- obj.wm = that.selectObj.id;
- obj.batch = that.selectObj.batch;
- obj.label = that.selectObj.defect !== null?that.selectObj.batch+'('+that.selectObj.material_name+')'+that.selectObj.defect_name:that.selectObj.batch+'('+that.selectObj.material_name+')';
- obj.count = that.selectObj.count_cando;
- obj.defect_name = that.selectObj.defect_name;
- obj.count_cando = that.selectObj.count_cando;
- obj.material = that.selectObj.material;
- if(that.form.handoverb.length>0){
- let datas = that.form.handoverb.filter((item) => {
- return item.wm==that.selectObj.id;
- });
- if(datas.length>0){
- that.$message.warning('该物料已存在');
- }else{
- that.totalCount += Number(obj.count_cando);
- that.form.handoverb.push(obj);
- }
- }else{
- that.totalCount += Number(obj.count_cando);
+ that.form.handoverb = [];
+ that.totalCount = 0;
+ that.selectObjs.forEach(item=>{
+ let obj = {};
+ obj.wm = item.id;
+ obj.state = item.state;
+ obj.batch = item.batch;
+ obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';
+ obj.count = item.count_canhandover;
+ obj.defect = item.defect;
+ obj.defect_name = item.defect_name;
+ obj.count_cando = item.count_canhandover;
+ obj.material = item.material;
+ that.totalCount += Number(obj.count);
that.form.handoverb.push(obj);
- }
- that.getResaveMgroups(obj.material);
+ that.getResaveMgroups(obj.material);
+ })
},
- // materialChange() {
- // let that = this;
- // let totalCount = 0;
- // let data = that.materialOptions.filter((item) => {
- // return that.selectItems.indexOf(item.id)>-1;
- // });
- // data.forEach(item=>{
- // item.wm = item.id;
- // item.count = item.count_cando;
- // totalCount += Number(item.count_cando);
- // })
- // that.totalCount = totalCount;
- // that.form.handoverb = data;
- // that.getResaveMgroups(data[0].material);
- // },
countChange(){
let that = this;
let totalCount = 0;
@@ -650,11 +546,19 @@ export default {
},
//表单注入数据
setData(data) {
+ console.log(data)
+ let that = this;
Object.assign(this.form, data);
+ that.totalCount = 0;
+ that.form.handoverb = data.handoverb;
+ data.handoverb.forEach(item=>{
+ item.label = item.batch;
+ that.totalCount += Number(item.count);
+ })
if(data.type==30){
- this.getUserList3();
+ that.getUserList3();
}else{
- this.getUserList2();
+ that.getUserList2();
}
},
//设置过滤项
@@ -676,7 +580,7 @@ export default {
let id = data.split('#')[1];
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&&item.defect==res.defect;
})
if(arr.length>0){
that.$message.error("该批次已存在")
@@ -691,21 +595,21 @@ export default {
if(res1.length>0){
res1.forEach(item=>{
let cando = Number(item.count_canhandover);
- if(cando>0&&item.defect_name==res.defect_name){
+ if(cando>0&&(item.defect==null||item.defect_name==res.defect_name)){
let obj = {};
obj.wm = item.id;
obj.batch = item.batch;
obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';
- obj.count = item.count_cando;
+ obj.count = cando;
+ obj.state = item.state;
+ obj.defect = item.defect;
obj.defect_name = item.defect_name;
- obj.count_cando = item.count_cando;
+ obj.count_cando = cando;
obj.material = item.material;
that.form.handoverb.push(obj)
+ that.totalCount += Number(obj.count);
that.getResaveMgroups(obj.material);
}
- // else{
- // that.$message.error("该批次物料没有可交接的数量")
- // }
})
}
that.codeText = '';
diff --git a/src/views/wpm_gx/mlog_form.vue b/src/views/wpm_gx/mlog_form.vue
index 511551df..7bd1c45a 100644
--- a/src/views/wpm_gx/mlog_form.vue
+++ b/src/views/wpm_gx/mlog_form.vue
@@ -214,6 +214,8 @@
+
+
+
+
@@ -385,15 +386,20 @@ export default {
},
materialBatchChange(){
let that = this;
- that.materialOptions.forEach(item => {
- if(item.id==that.form.wm_in){
- that.form.batch = item.batch;
- that.form.count_use = item.count;
- that.batch_count = item.count;
- that.materialFix = item.material;
- that.getdefects();
- }
- });
+ that.form.batch = that.selectObj.batch;
+ that.form.count_use = that.selectObj.count;
+ that.batch_count = that.selectObj.count;
+ that.materialFix = that.selectObj.material;
+ that.getdefects();
+ // that.materialOptions.forEach(item => {
+ // if(item.id==that.form.wm_in){
+ // that.form.batch = item.batch;
+ // that.form.count_use = item.count;
+ // that.batch_count = item.count;
+ // that.materialFix = item.material;
+ // that.getdefects();
+ // }
+ // });
},
//添加层组
cellsAdd(){