@@ -361,11 +341,7 @@ export default {
that.form.type = that.type;
let materialObj = that.$TOOL.data.get("MATERIAL_OBJECT");
that.materialObj = materialObj;
- let date = new Date();
- let year = date.getFullYear();
- let month = date.getMonth() + 1;
- let day = date.getDate();
- that.form.handle_date = year + "-" + month + "-" + day;
+ that.form.handle_date =that.form.send_date =this.$TOOL.dateFormat2(new Date());
that.form.send_mgroup = that.mgroupId;
if(that.type==20||that.type==50){
that.form.recive_mgroup = that.mgroupId;
@@ -480,8 +456,21 @@ export default {
//获取交送工段人员
getUserList() {
let that = this;
+ let userInfo = that.$TOOL.data.get("USER_INFO");
this.$API.system.user.list.req({ depts: that.deptID, page: 0 }).then((res) => {
that.userList = res;
+ let arr = res.filter(item=>{
+ return item.id==userInfo.id;
+ })
+ if(arr.length>0){
+ that.form.send_user = userInfo.id;
+ }else{
+ let obj = {};
+ obj.id = userInfo.id;
+ obj.name = userInfo.name;
+ that.userList.push(obj)
+ that.form.send_user = userInfo.id;
+ }
});
},
//获取仓库人员
@@ -532,8 +521,10 @@ export default {
this.countChange();
},
//显示
- open(mode = "add") {
+ open(mode = "add",data,mtype) {
this.mode = mode;
+ this.mtype = mtype;
+ this.form.handoverb = data;
this.visible = true;
return this;
},
diff --git a/src/views/wpm_bx/inm.vue b/src/views/wpm_bx/inm.vue
index cb0ac624..09aaaf46 100644
--- a/src/views/wpm_bx/inm.vue
+++ b/src/views/wpm_bx/inm.vue
@@ -4,6 +4,7 @@
领料
报废
+ 合批
入库
@@ -41,11 +42,13 @@
row-key="id"
:params="params"
:query="query"
+ @selection-change="selectionChange"
>
-
-
-
- {{wmState[scope.row.state]?.text}}
+
+
+
+
+ {{wmState[scope.row.state]?.text}}
@@ -56,9 +59,9 @@
>
{{ scope.row.material_name }}
- ({{ scope.row.material_origin_name }})
+
+ ({{ scope.row.material_origin_name }})
+
0){
+ let material = selection[0].material;
+ selection.forEach((item)=>{
+ if(item.material!==material){
+ that.$refs.table.toggleRowSelection(item, false);
+ that.$message.warning("该批次物料与前面的不一样");
+ }
+ })
+ }
},
//添加报废
table_add(type) {
@@ -376,6 +390,26 @@ export default {
this.$refs.scrapDialog.open("add");
});
},
+ //合批
+ batchConcat(){
+ this.changebatch = true;
+ let handoverb = [];
+ if(this.selection.length>0){
+ this.selection.forEach(item=>{
+ let obj = {};
+ obj.wm = item.id;
+ obj.batch = item.batch;
+ obj.count_cando = item.count_cando;
+ obj.count = item.count_cando;
+ handoverb.push(obj)
+ })
+ }
+ this.type = 10;
+ this.dialog.scrap = true;
+ this.$nextTick(() => {
+ this.$refs.scrapDialog.open("add",handoverb,30);
+ });
+ },
handleScrapSuccess(){
this.dialog.scrap = false;
this.$refs.table.refresh();