覅下:废品库更改模式

This commit is contained in:
shijing 2025-12-10 14:12:48 +08:00
parent 066f1013c6
commit 413e5a8c17
2 changed files with 35 additions and 23 deletions

View File

@ -2,7 +2,8 @@
<el-container>
<el-header>
<div class="left-panel">
<el-button type="primary" v-auth="'handover.create'" @click="table_add(20)">返工交接</el-button>
<el-button type="primary" v-auth="'handover.create'">清除</el-button>
<el-button type="primary" v-auth="'handover.create'" @click="table_add(50)">改版</el-button>
<el-button type="primary" v-auth="'handover.create'" v-if="route_code=='scrap'" @click="table_bsofei(40,30)">合批报废</el-button>
</div>
<div class="right-panel">
@ -26,7 +27,9 @@
row-key="id"
:params="params"
:query="query"
@selection-change="selectionChange"
>
<el-table-column type="selection" width="50" />
<el-table-column label="状态" prop="state" width="100" >
<template #default="scope">
<el-tag :type="wmState[scope.row.state]?.type">
@ -41,9 +44,7 @@
>
<template #default="scope">
{{ scope.row.material_name }}
<span v-if="scope.row.material_origin != null"
>{{ scope.row.material_origin_name }}</span
>
<span v-if="scope.row.material_origin != null">{{ scope.row.material_origin_name }}</span>
</template>
</el-table-column>
<el-table-column
@ -91,6 +92,7 @@
:type="type"
:mgroupName="mgroupName"
:mgroupId="mgroupId"
:isFeiPinku="isFeiPinku"
@success="handleSaveSuccess"
@closed="dialog.save = false"
>
@ -98,20 +100,27 @@
</el-container>
</template>
<script>
import saveDialog from "../wpm_gx/handover_form.vue";
import saveDialog from "../wpm_bx/handover_form.vue";
import { wmState } from "@/utils/enum.js";
export default {
components: {
saveDialog
},
props: {
isFeiPinku: {
type: Boolean,
default: false,
},
},
name: "wmaterial",
data() {
return {
wmState,
apiObj: null,
params: {
state : 10,
state_all: 1
state_all: 1,
mgroup:"",
},
dialog: {
save: false,
@ -119,6 +128,7 @@ export default {
query:{
search:''
},
selectiones: [],
type:20,
mgroupName:'废品库',
mgroupId:'',
@ -129,25 +139,25 @@ export default {
that.route_code = that.$route.path.split("/")[2];
if(that.route_code=='scrap'){
that.params.material__type = 30;
}else{
that.params.state = 50;
}
that.$API.mtm.mgroup.list.req({ page: 0,name:'废品库'}).then((res) => {
that.mgroupId = that.params.mgroup = res[0].id;
that.apiObj = that.$API.wpm.wmaterial.list;
that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => {
that.mgroupOptions = res;
res.forEach(item=>{
if(item.name=="废品库"){
that.mgroupId = item.id;
}
})
});
},
methods: {
//
selectionChange(selection) {
this.selectiones = selection;
},
//
table_add(type) {
this.dialog.save = true;
this.type = type;
this.$nextTick(() => {
this.$refs.saveDialog.open("add");
this.$refs.saveDialog.open("add",this.selectiones);
});
},
table_bsofei(type,mtype) {

View File

@ -54,6 +54,7 @@
:mgroupName="mgroupName"
:mgroupId="mgroupId"
:deptId="mgroupDept"
:isFeiPinku="isFeiPinku"
:process = "mgroupProcess"
:processType = "mgroupProcessType"
:mgroup_code="mgroup_code"
@ -65,6 +66,7 @@
:mgroupName="mgroupName"
:mgroupId="mgroupId"
:deptId="mgroupDept"
:isFeiPinku="isFeiPinku"
:process = "mgroupProcess"
:processType = "mgroupProcessType"
:mgroup_code="mgroup_code"