fix: 套轴时间排序、AGV换托盘

opt: 下卷校验上下轴
fix: 下卷任务校验
feat: 管芯托盘界面查看
This commit is contained in:
2025-03-20 13:53:55 +08:00
parent e83dfde69e
commit 459bd30d25
27 changed files with 701 additions and 41 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@@ -24,4 +24,12 @@ export function edit(data) {
})
}
export default { add, edit, del }
export function showDetail(data) {
return request({
url: 'api/bstIvtStockingivt/showDetail',
method: 'post',
data
})
}
export default { add, edit, del, showDetail }

View File

@@ -83,12 +83,24 @@
</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
ref="table"
v-loading="crud.loading"
:data="crud.data"
size="mini"
style="width: 100%;"
:highlight-current-row="true"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="point_code" label="点位编码" :min-width="flexWidth('point_code',crud.data,'点位编码')" />
<el-table-column prop="point_code" label="点位编码" :min-width="flexWidth('point_code',crud.data,'点位编码')">
<template slot-scope="scope">
<el-link type="primary" @click="toView(scope.$index, scope.row)">{{ scope.row.point_code }}</el-link>
</template>
</el-table-column>
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')" />
<el-table-column prop="vehicle_code" label="托盘号" :min-width="flexWidth('vehicle_code',crud.data,'托盘号')" />
<el-table-column prop="product_area" label="区域" :min-width="flexWidth('product_area',crud.data,'区域')" />
<!-- <el-table-column prop="product_area" label="区域" :min-width="flexWidth('product_area',crud.data,'区域')" />-->
<el-table-column prop="point_type" label="点位类型" :min-width="flexWidth('point_type',crud.data,'点位类型')">
<template slot-scope="scope">
{{ dict.label.STOCK_POINT_TYPE[scope.row.point_type] }}
@@ -105,10 +117,12 @@
</template>
</el-table-column>
<el-table-column prop="sort_seq" label="顺序号" :min-width="flexWidth('sort_seq',crud.data,'顺序号')" />
<el-table-column prop="is_used" label="是否启用" :min-width="flexWidth('is_used',crud.data,'是否启用')" />
<el-table-column prop="is_used" label="是否启用" :min-width="flexWidth('is_used',crud.data,'是否启用')">
<template slot-scope="scope">
{{ scope.row.is_used === '1' ? '启用' : '禁用' }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
<el-table-column prop="update_optname" label="修改人" :min-width="flexWidth('update_optname',crud.data,'修改人')" />
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" />
<el-table-column prop="plan" label="规划" :min-width="flexWidth('plan',crud.data,'规划')" />
@@ -125,6 +139,7 @@
<!--分页组件-->
<pagination />
</div>
<tube-dialog :dialog-show.sync="showView" :rows="rows" :vehicle_code="vehicle_code" />
</div>
</template>
@@ -135,6 +150,7 @@ import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import TubeDialog from '@/views/b_lms/bst/ivt/stockingivt/tubeDialog.vue'
const defaultForm = {
ivt_id: null,
@@ -159,7 +175,7 @@ const defaultForm = {
export default {
name: 'BstIvtStockingivt',
dicts: ['STOCK_POINT_STATUS', 'STOCK_POINT_TYPE', 'point_location'],
components: { pagination, crudOperation, rrOperation, udOperation },
components: { TubeDialog, pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({
@@ -203,12 +219,28 @@ export default {
create_time: [
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
]
}}
},
showView: false,
vehicle_code: '',
rows: {}
}
},
methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
return true
},
toView(index, row) {
// vehicle_code point_code
console.log(row)
const param = {
vehicle_code: this.vehicle_code
}
crudBstIvtStockingivt.showDetail(param).then(res => {
this.vehicle_code = row.vehicle_code
this.showView = true
this.rows = res
})
}
}
}

View File

@@ -0,0 +1,125 @@
<template>
<el-dialog :visible.sync="dialogVisible" title="托盘详情">
<div class="grid-container">
<div
v-for="(row, rowIndex) in grid"
:key="rowIndex"
class="grid-row"
>
<div
v-for="(cell, colIndex) in row"
:key="colIndex"
class="grid-cell"
>
<img
:src="cell.have_qzz == '0' ? imageC : cell.have_qzz == '1' ? imageA : imageB"
alt="方块"
class="grid-image"
>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
import crudBstIvtStockingivt from './bstIvtStockingivt'
export default {
name: 'TubeDialog',
props: {
dialogShow: {
type: Boolean,
default: false
},
rows: {
type: Object
},
vehicleCode: {
type: String
}
},
data() {
return {
dialogVisible: false,
form: {},
imageA: require('@/assets/images/empty.png'), // 默认图片路径
imageC: require('@/assets/images/empty2.png'), // 默认图片路径
imageB: require('@/assets/images/showTube.png'), // 特殊状态图片路径
grid: Array(5).fill().map(() =>
Array(5).fill().map(() => ({
have_qzz: false
}))
)
}
},
watch: {
dialogShow: {
handler(newValue) {
this.dialogVisible = newValue
}
},
rows: {
handler(newValue) {
this.grid = newValue
}
}
},
methods: {
open() {
// this.queryTableDtl()
},
close() {
this.$emit('update:dialogShow', false)
this.currentDis = {}
this.currentdtl = null
this.tableDtl = []
this.tabledis = []
this.$emit('AddChanged')
},
// toggleCell(row, col) {
// console.log(this.grid)
// this.$set(this.grid[row], col, {
// ...this.grid[row][col],
// have_qzz: !this.grid[row][col].have_qzz
// })
// },
queryTableDtl() {
const param = {
vehicle_code: this.vehicle_code
}
crudBstIvtStockingivt.showDetail(param).then(res => {
this.grid = res
})
}
}
}
</script>
<style scoped>
.grid-container {
display: flex;
flex-direction: column;
gap: 5px;
}
.grid-row {
display: flex;
gap: 5px;
justify-content: center;
}
.grid-cell {
width: 50px;
height: 50px;
cursor: pointer;
border: 1px solid #ddd;
transition: all 0.3s;
}
.grid-image {
width: 100%;
height: 100%;
object-fit: cover;
}
</style>