feat:某批次物料加入wpr(改版)

This commit is contained in:
shijing 2025-11-19 15:30:22 +08:00
parent 42ff12d769
commit f6c24f3902
3 changed files with 49 additions and 5 deletions

View File

@ -257,6 +257,10 @@ export default {
type: String,
default: "done",
},
wmItem: {
type: Object,
default: () => ({}),
},
},
components: {
scanDialog
@ -384,6 +388,11 @@ export default {
that.materialObj = materialObj;
that.form.handle_date =that.form.send_date =this.$TOOL.dateFormat2(new Date());
that.form.send_mgroup = that.mgroupId;
if(that.wmItem.wm){
that.form.new_batch = that.wmItem.batch;
that.form.material_changed = that.wmItem.material;
that.form.material_changed_fname = that.wmItem.material_name;
}
if(that.type==20||that.type==50){
that.form.recive_mgroup = that.mgroupId;
}

View File

@ -149,9 +149,9 @@
type="primary"
style="margin-left: 10px;"
>检验</el-link>
<!-- <el-link :underline="false" type="primary"
@click="handleWatch(scope.row)"
>流程图</el-link> -->
<el-link :underline="false" type="primary"
@click="handleAddWpr(scope.row)"
>添加物料</el-link>
</template>
</el-table-column>
</scTable>
@ -244,6 +244,7 @@
ref="scrapDialog"
:type="type"
:tag="tag"
:wmItem="wmItem"
:mgroupName="mgroup_name"
:mgroupId="mgroupId"
@success="handleScrapSuccess"
@ -377,6 +378,7 @@ export default {
search: "",
material: "",
},
wmItem:{},
wprParams:{
page:0,
wm: ""
@ -693,7 +695,22 @@ export default {
})
},
handleWprSuccess(row){}
handleAddWpr(row){
this.dialog.scrap = true;
this.type = 50;
let obj = {};
obj.wm = row.id;
obj.batch = row.batch;
obj.mgroup = row.mgroup;
obj.material = row.material;
obj.mgroup_name = row.mgroup_name;
obj.material_name = row.material_name;
this.wmItem = obj;
this.$nextTick(() => {
this.$refs.scrapDialog.open("add");
});
},
handleWprSuccess(row){},
},
};
</script>

View File

@ -233,7 +233,8 @@
width="120"
>
<template #default="scope">
<el-link :underline="false" @click="printMaterial(scope.row,'wpr')" type="primary">物料标签</el-link>
<el-link :underline="false" @click="printMaterial(scope.row,'wpr')" type="primary">物料标签</el-link>
<el-link :underline="false" type="primary" @click="handleAddWpr(scope.row)">添加物料</el-link>
</template>
</el-table-column>
</scTable>
@ -258,6 +259,7 @@
v-if="dialog.scrap"
ref="scrapDialog"
:type="type"
:wmItem="wmItem"
:mgroupName="mgroup_name"
:mgroupId="mgroupId"
@success="handleScrapSuccess"
@ -397,6 +399,7 @@ export default {
page:0,
wm: ""
},
wmItem:{},
number_out_last:'',
route_code:"",
wmMaterial:'',
@ -735,6 +738,21 @@ export default {
})
},
handleAddWpr(row){
this.dialog.scrap = true;
this.type = 50;
let obj = {};
obj.wm = row.id;
obj.batch = row.batch;
obj.mgroup = row.mgroup;
obj.material = row.material;
obj.mgroup_name = row.mgroup_name;
obj.material_name = row.material_name;
this.wmItem = obj;
this.$nextTick(() => {
this.$refs.scrapDialog.open("add");
});
},
},
};
</script>