rev:设备监控、新增手动入箱回传、出箱回传
This commit is contained in:
@@ -146,7 +146,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
flag: '1'
|
||||
flag: 'A1'
|
||||
},
|
||||
chargeLoading: false,
|
||||
listA1: [],
|
||||
@@ -154,11 +154,11 @@ export default {
|
||||
agvList: [
|
||||
],
|
||||
agvRegionList: [
|
||||
{ 'label': 'A1', 'value': '1' },
|
||||
{ 'label': 'A2', 'value': '2' },
|
||||
{ 'label': 'A3', 'value': '3' },
|
||||
{ 'label': 'A4', 'value': '4' },
|
||||
{ 'label': 'LK', 'value': '5' }
|
||||
{ 'label': 'A1', 'value': 'A1' },
|
||||
{ 'label': 'A2', 'value': 'A2' },
|
||||
{ 'label': 'A3', 'value': 'A3' },
|
||||
{ 'label': 'A4', 'value': 'A4' },
|
||||
{ 'label': 'LK', 'value': 'LK' }
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -199,6 +199,7 @@ export default {
|
||||
},
|
||||
charge_task(data) {
|
||||
this.chargeLoading = true
|
||||
data.product_area = this.form.flag
|
||||
sendAgvChargeTask(data).then(res => {
|
||||
this.chargeLoading = false
|
||||
this.$message({
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
v-for="item in product_area"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -104,7 +104,7 @@
|
||||
<el-table-column prop="solve_mode" label="解决方式" show-overflow-tooltip width="250px" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<!-- <pagination />-->
|
||||
<!-- <pagination />-->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -132,6 +132,9 @@ export default {
|
||||
add: false,
|
||||
reset: true
|
||||
},
|
||||
query: {
|
||||
plant_code: 'A1'
|
||||
},
|
||||
idField: 'device_id',
|
||||
sort: 'device_id,desc',
|
||||
crudMethod: { ...crudFaultdevice }
|
||||
@@ -141,6 +144,7 @@ export default {
|
||||
return {
|
||||
permission: {},
|
||||
tableData: [],
|
||||
product_area: [{ 'value': 'A1', 'label': 'A1' }, { 'value': 'A2', 'label': 'A2' }, { 'value': 'A3', 'label': 'A3' }, { 'value': 'A4', 'label': 'A4' }, { 'value': 'LK', 'label': 'LK' }],
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
|
||||
90
lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/Dialog.vue
Normal file
90
lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/Dialog.vue
Normal file
@@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="回传MES"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
:before-close="handleClose"
|
||||
width="500px"
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
>
|
||||
<el-form ref="form" :model="form1" size="mini" label-width="110px">
|
||||
<el-form-item label="母卷号" prop="container_name">
|
||||
<el-input v-model="form1.container_name" clearable size="mini"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="烘烤时间" prop="oven_time">
|
||||
<el-input v-model="form1.oven_time" clearable size="mini"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="烘烤温度" prop="temperature">
|
||||
<el-input v-model="form1.temperature" clearable size="mini"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="close">取消</el-button>
|
||||
<el-button type="primary" @click="confirm('1')">入箱回传</el-button>
|
||||
<el-button type="primary" @click="confirm('2')">出箱回传</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import crudHotpointivt from '@/views/wms/pdm/ivt/hotpointivt/hotpointivt'
|
||||
|
||||
export default {
|
||||
name: 'SunShowDialog',
|
||||
mixins: [crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
this.form1 = this.openParam
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form1: {},
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done()
|
||||
})
|
||||
.catch(_ => {
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.form1 = {}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
confirm(flag) {
|
||||
this.form1.flag = flag
|
||||
crudHotpointivt.uploadMes(this.form1).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.close()
|
||||
this.crud.notify('回传成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -24,4 +24,12 @@ export function edit(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
export function uploadMes(data) {
|
||||
return request({
|
||||
url: 'api/hotpointivt/uploadMes',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, uploadMes }
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user