fix:原料库添加物料类型

This commit is contained in:
shijing 2025-01-17 09:08:31 +08:00
parent 23570fd84b
commit d3db926789
1 changed files with 17 additions and 3 deletions

View File

@ -44,11 +44,11 @@
</el-table-column> </el-table-column>
<el-table-column label="物料名称" prop="material_name"> <el-table-column label="物料名称" prop="material_name">
</el-table-column> </el-table-column>
<!-- <el-table-column label="规格型号"> <el-table-column label="类型">
<template #default="scope"> <template #default="scope">
{{ scope.row.specification }} {{ scope.row.model }} <el-tag :type="getType(scope.row.state)">{{ state_[scope.row.state] }}</el-tag>
</template> </template>
</el-table-column> --> </el-table-column>
<el-table-column label="仓库" prop="warehouse_name"> <el-table-column label="仓库" prop="warehouse_name">
</el-table-column> </el-table-column>
<el-table-column label="物料存量" prop="count"> <el-table-column label="物料存量" prop="count">
@ -92,12 +92,26 @@ export default {
materialsVisible:false, materialsVisible:false,
apiObjPrint:this.$API.cm.labelmat.fromMb, apiObjPrint:this.$API.cm.labelmat.fromMb,
wmId:'', wmId:'',
state_:{
10:'合格品',
20:'不合格品',
30:'返修品',
},
}; };
}, },
mounted() { mounted() {
this.getWarehouse(); this.getWarehouse();
}, },
methods: { methods: {
getType(type){
if(type==10){
return 'success'
}else if(type==20){
return 'danger'
}else if(type==30){
return 'warning'
}
},
getWarehouse() { getWarehouse() {
this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => { this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => {
this.warehouseOptions = res; this.warehouseOptions = res;