rev:设备监控、新增手动入箱回传、出箱回传

This commit is contained in:
2023-06-16 16:25:30 +08:00
parent 5e8efe669c
commit eb8979c4d7
12 changed files with 308 additions and 105 deletions

View File

@@ -92,16 +92,29 @@
@change="crud.toQuery"
/>
</el-form-item>
<rrOperation :crud="crud" />
<rrOperation :crud="crud"/>
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-position"
size="mini"
:disabled="crud.selections.length !== 1"
@click="uploadMES"
>
回传MES
</el-button>
</crudOperation>
<!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="520px">
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
:title="crud.status.title" width="520px">
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
<el-form-item label="点位编码" prop="point_code">
<el-input v-model="form.point_code" style="width: 370px;" />
<el-input v-model="form.point_code" style="width: 370px;"/>
</el-form-item>
<el-form-item label="生产区域">
<el-select
@@ -136,13 +149,13 @@
</el-select>
</el-form-item>
<el-form-item label="母卷号">
<el-input v-model="form.container_name" style="width: 370px;" />
<el-input v-model="form.container_name" style="width: 370px;"/>
</el-form-item>
<el-form-item label="温度">
<el-input v-model="form.temperature" style="width: 370px;" />
<el-input v-model="form.temperature" style="width: 370px;"/>
</el-form-item>
<el-form-item label="是否启用" prop="is_used">
<el-switch v-model="form.is_used" active-value="1" inactive-value="0" />
<el-switch v-model="form.is_used" active-value="1" inactive-value="0"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -151,26 +164,27 @@
</div>
</el-dialog>
<!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55" />
<el-table-column prop="point_code" width="120px" show-overflow-tooltip label="点位编码" />
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;"
@selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55"/>
<el-table-column prop="point_code" width="120px" show-overflow-tooltip label="点位编码"/>
<el-table-column prop="point_status" label="点位状态">
<template slot-scope="scope">
{{ dict.label.sch_hot_point_status[scope.row.point_status] }}
</template>
</el-table-column>
<el-table-column prop="container_name" label="母卷号" width="150px" show-overflow-tooltip />
<el-table-column prop="ivt_qty" label="库存数" :formatter="crud.formatNum3" />
<el-table-column prop="instorage_time" label="入箱时间" width="150px" show-overflow-tooltip />
<el-table-column prop="container_name" label="母卷号" width="150px" show-overflow-tooltip/>
<el-table-column prop="ivt_qty" label="库存数" :formatter="crud.formatNum3"/>
<el-table-column prop="instorage_time" label="入箱时间" width="150px" show-overflow-tooltip/>
<el-table-column prop="product_area" label="生产区域">
<template slot-scope="scope">
{{ dict.label.product_area[scope.row.product_area] }}
</template>
</el-table-column>
<el-table-column prop="temperature" label="温度" />
<el-table-column prop="temperature" label="温度"/>
<el-table-column prop="last_time" label="倒计时" width="120"/>
<el-table-column prop="group_name" label="组别" />
<el-table-column prop="ext_code" label="外部编码" width="130" />
<el-table-column prop="group_name" label="组别"/>
<el-table-column prop="ext_code" label="外部编码" width="130"/>
<el-table-column prop="point_location" label="位置">
<template slot-scope="scope">
{{ dict.label.point_location[scope.row.point_location] }}
@@ -181,8 +195,8 @@
{{ dict.label.is_used[scope.row.is_used] }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" />
<el-table-column prop="update_time" label="修改时间" min-width="150" show-overflow-tooltip />
<el-table-column prop="remark" label="备注"/>
<el-table-column prop="update_time" label="修改时间" min-width="150" show-overflow-tooltip/>
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope">
<udOperation
@@ -194,8 +208,9 @@
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
<pagination/>
</div>
<Dialog :dialog-show.sync="dialogShow" :open-param="openParam"/>
</div>
</template>
@@ -206,11 +221,36 @@ import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import Dialog from '@/views/wms/pdm/ivt/hotpointivt/Dialog.vue'
const defaultForm = { ivt_id: null, point_code: null, point_status: null, container_name: null, workorder_id: null, full_vehicle_code: null, pcsn: null, ivt_qty: null, qty_unit_id: null, instorage_time: null, product_area: null, temperature: null, group_name: null, point_location: null, sort_seq: null, is_used: null, remark: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
const defaultForm = {
ivt_id: null,
point_code: null,
point_status: null,
container_name: null,
workorder_id: null,
full_vehicle_code: null,
pcsn: null,
ivt_qty: null,
qty_unit_id: null,
instorage_time: null,
product_area: null,
temperature: null,
group_name: null,
point_location: null,
sort_seq: null,
is_used: null,
remark: null,
create_id: null,
create_name: null,
create_time: null,
update_optid: null,
update_optname: null,
update_time: null
}
export default {
name: 'HotPointIvt',
components: { pagination, crudOperation, rrOperation, udOperation },
components: { Dialog, pagination, crudOperation, rrOperation, udOperation },
dicts: ['product_area', 'is_used', 'point_location', 'sch_hot_point_status'],
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
@@ -231,8 +271,9 @@ export default {
},
data() {
return {
permission: {
},
permission: {},
openParam: null,
dialogShow: false,
rules: {
point_code: [
{ required: true, message: '点位编码不能为空', trigger: 'blur' }
@@ -240,7 +281,8 @@ export default {
point_status: [
{ required: true, message: '点位状态不能为空', trigger: 'blur' }
]
}}
}
}
},
methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据
@@ -249,6 +291,15 @@ export default {
},
hand(value) {
this.crud.toQuery()
},
uploadMES() {
debugger
const _selectData = this.$refs.table.selection
if (_selectData.length !== 1) {
return this.crud.notify('请选择一个点位进行回传!', CRUD.NOTIFICATION_TYPE.INFO)
}
this.openParam = _selectData[0]
this.dialogShow = true
}
}
}