fix:原料库添加物料存量展开

This commit is contained in:
shijing 2025-02-25 17:31:52 +08:00
parent af2ae10c2f
commit 59e5f391bd
1 changed files with 50 additions and 1 deletions

View File

@ -52,7 +52,10 @@
</el-table-column>
<el-table-column label="仓库" width="80" prop="warehouse_name">
</el-table-column>
<el-table-column label="物料存量" prop="count">
<el-table-column label="物料存量">
<template #default="scope">
<el-link @click="handleWpr(scope.row)" type="primary">{{ scope.row.count }}</el-link>
</template>
</el-table-column>
<el-table-column label="有效期" prop="expiration_date">
</el-table-column>
@ -72,6 +75,39 @@
:mtype="wmtype"
:apiObj="apiObjPrint"
></print-dialog>
<el-drawer v-model="wprVisibleDrawer" :size="'70%'">
<template #header>
<h4>关联产品</h4>
</template>
<template #default>
<scTable ref="wprTable" hidePagination :data="wprList">
<el-table-column type="index" width="50"></el-table-column>
<el-table-column label="产品编号" prop="number" min-width="100px"></el-table-column>
<el-table-column label="缺陷项" min-width="200px">
<template #default="scope">
<span v-for="item in scope.row.wprdefect" :key="item.id">
<el-tag type="warning">{{ item.defect_name }}</el-tag>
</span>
</template>
</el-table-column>
<el-table-column
label="操作"
fixed="right"
align="center"
width="120"
>
<template #default="scope">
<el-link :underline="false" @click="printMaterial(scope.row,'wpr')" type="primary">打印标签</el-link>
</template>
</el-table-column>
</scTable>
</template>
<template #footer>
<div style="flex: auto">
<el-button @click="wprVisibleDrawer=false">关闭</el-button>
</div>
</template>
</el-drawer>
</el-container>
</template>
<script>
@ -86,10 +122,12 @@ export default {
apiObj: this.$API.inm.warehouse.batch,
params: { count__gte: 1, material__type__in: "30" },
selection: [],
wprList:[],
query: {},
warehouseOptions: [],
wmtype:0,
print_m:false,
wprVisibleDrawer:false,
materialsVisible:false,
apiObjPrint:this.$API.cm.labelmat.fromMb,
wmId:'',
@ -98,6 +136,9 @@ export default {
20:'不合格',
30:'返修',
},
wprParams:{
page:0
},
};
},
mounted() {
@ -124,6 +165,14 @@ export default {
resetQuery() {
this.query = {};
},
handleWpr(row){
let that = this;
that.wprParams.mb = row.id;
that.wprVisibleDrawer = true;
that.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
that.wprList = res;
})
},
//
printMaterial(row){
let that = this;