Files
ftdlDTY_lms/lms/nladmin-ui/src/views/wms/pdm/group/ViewDialog.vue
2026-01-16 09:55:57 +08:00

174 lines
4.8 KiB
Vue

<template>
<el-dialog
append-to-body
title="组盘详情"
:visible.sync="dialogVisible"
destroy-on-close
fullscreen
@close="close"
@open="open"
>
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" size="mini" label-width="85px" label-suffix=":">
<el-form-item label="载具编码" prop="storagevehicle_code">
<label slot="label">载具编码:</label>
<el-input v-model="form.storagevehicle_code" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="KCODE" prop="material_code">
<label slot="label">KCODE:</label>
<el-input v-model="form.material_code" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="品种批号" prop="品种批号">
<label slot="label">品种批号:</label>
<el-input v-model="form.material_name" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<label slot="label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="true" />
</el-form-item>
</el-form>
<div class="crud-opts2">
<span class="role-span2">组盘明细</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
<!--表格渲染-->
<el-table
ref="table"
:data="tableDtl"
style="width: 100%;"
max-height="300"
size="mini"
border
:highlight-current-row="true"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@current-change="handleDtlCurrentChange"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="device_code" label="机台" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="doff_code" label="DOFF号" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="KCODE" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="品种批号" align="center" />
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
</el-table>
</el-card>
</el-dialog>
</template>
<script>
import { crud } from '@crud/crud'
import crudGroup from '@/views/wms/pdm/group/group'
export default {
name: 'ViewDialog',
components: { },
mixins: [crud()],
dicts: ['io_bill_status', 'work_status', 'task_status', 'SCH_TASK_TYPE_DTL', 'INANDOUT_BILL_TYPE'],
props: {
dialogShow: {
type: Boolean,
default: false
},
rowmst: {
type: Object
}
},
data() {
return {
dialogVisible: false,
tableDtl: [],
tabledis: [],
billtypelist: [],
storlist: [],
currentdtl: null,
currentDis: {},
form: {}
}
},
watch: {
dialogShow: {
handler(newValue) {
this.dialogVisible = newValue
}
},
rowmst: {
handler(newValue) {
this.form = newValue
}
}
},
methods: {
open() {
this.queryTableDtl()
},
close() {
this.$emit('update:dialogShow', false)
this.currentDis = {}
this.currentdtl = null
this.tableDtl = []
this.tabledis = []
this.$emit('TaskChanged')
},
bill_statusFormat(row) {
return this.dict.label.io_bill_status[row.bill_status]
},
taskdtl_typeFormat(row) {
return this.dict.label.SCH_TASK_TYPE_DTL[row.taskdtl_type]
},
task_statusFormat(row) {
return this.dict.label.task_status[row.task_status]
},
work_statusFormat(row) {
return this.dict.label.work_status[row.work_status]
},
handleDtlCurrentChange(current) {
if (current !== null) {
this.tabledis = []
this.currentdtl = current
this.queryTableDdis()
} else {
this.tabledis = []
this.currentdtl = {}
}
},
invtypeFormat(row, column) {
for (const item of this.billtypelist) {
if (item.code === row.source_bill_type) {
return item.name
}
}
},
handleDisCurrentChange(current) {
this.currentDis = current
},
queryTableDtl() {
crudGroup.getDtl({ 'group_id': this.form.group_id }).then(res => {
this.tableDtl = res
})
}
}
}
</script>
<style>
.crud-opts2 {
padding: 0;
display: -webkit-flex;
display: flex;
align-items: center;
}
.crud-opts2 .el-dialog__title2 {
line-height: 24px;
font-size:20px;
color:#303133;
}
.crud-opts2 .role-span2 {
padding: 0px 0px 20px 0px;
}
.crud-opts2 {
padding: 10px 0px 0px 50px;
}
</style>