feat: mtask查看可用批次

This commit is contained in:
caoqianming 2024-11-15 18:31:35 +08:00
parent cbd7ec9e8d
commit 234e5ca216
1 changed files with 44 additions and 0 deletions

View File

@ -27,6 +27,18 @@
</span>
</template>
</el-table-column>
<el-table-column label="可用批" v-if="mgroupName!='切片'">
<template #default="scope">
<el-button
link
size="small"
type="primary"
v-if="scope.row.state == 20"
@click="viewBatches(scope.row)">
查看
</el-button>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="90">
<template #default="scope">
<el-button
@ -60,6 +72,27 @@
@closed="detailClose"
>
</deliver-drawer>
<el-dialog v-model="dialogVisible">
<scTable hidePagination hideDo :apiObj="m_apiObj" :query="m_query" ref="mTable">
<el-table-column
label="物料名称"
prop="material_name"
min-width="150"
>
<template #default="scope">
{{ scope.row.material_name }}
<span v-if="scope.row.material_origin != null"
>{{ scope.row.material_origin_name }}</span
>
</template>
</el-table-column>
<el-table-column
label="批次号"
prop="batch"
min-width="120"
></el-table-column>
</scTable>
</el-dialog>
</el-container>
</template>
<script>
@ -77,6 +110,9 @@ export default {
name: "mtask",
data() {
return {
dialogVisible: false,
m_apiObj: null,
m_query: null,
apiObj: null,
params: { mgroup: "",state:20 },
query: {},
@ -123,6 +159,14 @@ export default {
});
},
methods: {
viewBatches(row){
this.dialogVisible = true;
this.$nextTick(() => {
this.m_query = {mtaskx: row.id};
this.m_apiObj = this.$API.wpm.wmaterial.list;
this.$refs.mTable.queryData(this.m_query);
});
},
elTagType(state) {
return this.type_[state];
},