优化货位和库存查询排序逻辑,调整表格字段显示,增加空库位选择限制
This commit is contained in:
@@ -111,7 +111,8 @@
|
||||
<el-table-column label="产品型号" align="center" prop="spec" width="260"/>
|
||||
<el-table-column label="产品分类" align="center" prop="parentId" />
|
||||
<el-table-column label="价格" align="center" prop="price" />
|
||||
<el-table-column label="单位id" align="center" prop="unit" />
|
||||
<el-table-column label="单位" align="center" prop="spare6" />
|
||||
<!-- 中unit为原项目单位 spare6为对方接口中的units,包含单位和辅助单位的json -->
|
||||
<el-table-column label="单位名称" align="center" prop="spare1" />
|
||||
<!-- <el-table-column label="url" align="center" prop="spare3" />
|
||||
<el-table-column label="btnurl" align="center" prop="spare4" />
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库位编码" align="center" prop="cargoSpaceId" width="160"/>
|
||||
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" width="160"/>
|
||||
<el-table-column label="托盘" align="center" prop="trayCode"/>
|
||||
<el-table-column label="物料编码" align="center" prop="productId"/>
|
||||
<el-table-column label="物料名称" align="center" prop="productName" width="160" />
|
||||
@@ -258,6 +258,7 @@
|
||||
v-loading="cargoSpaceLoading"
|
||||
:data="cargoSpaceList"
|
||||
@row-click="handleCargoSpaceRowClick"
|
||||
:row-class-name="cargoSpaceRowClassName"
|
||||
highlight-current-row
|
||||
max-height="400">
|
||||
<el-table-column label="货位编码" align="center" prop="cargoSpaceId" />
|
||||
@@ -654,11 +655,21 @@ export default {
|
||||
},
|
||||
/** 货位选择行点击 */
|
||||
handleCargoSpaceRowClick(row) {
|
||||
this.selectedCargoSpace = row
|
||||
// 仅允许选择状态为 '1' 的空库位
|
||||
if (row && row.status === '1') {
|
||||
this.selectedCargoSpace = row
|
||||
} else {
|
||||
this.selectedCargoSpace = null
|
||||
this.$modal.msgWarning('只能选择空库位)')
|
||||
}
|
||||
},
|
||||
/** 确认选择货位 */
|
||||
confirmCargoSpaceSelect() {
|
||||
if (this.selectedCargoSpace) {
|
||||
if (this.selectedCargoSpace.status !== '1') {
|
||||
this.$modal.msgWarning('只能选择空库位')
|
||||
return
|
||||
}
|
||||
this.form.cargoSpaceId = this.selectedCargoSpace.cargoSpaceId
|
||||
this.form.cargoSpaceName = this.selectedCargoSpace.cargoSpaceName
|
||||
this.cargoSpaceSelectVisible = false
|
||||
@@ -667,6 +678,14 @@ export default {
|
||||
this.$modal.msgWarning("请选择一个货位")
|
||||
}
|
||||
}
|
||||
|
||||
,
|
||||
cargoSpaceRowClassName({row, rowIndex}) {
|
||||
if (row && row.status !== '1') {
|
||||
return 'cargo-space-disabled'
|
||||
}
|
||||
return ''
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -675,4 +694,9 @@ export default {
|
||||
.no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.cargo-space-disabled {
|
||||
color: #999 !important;
|
||||
background-color: #fbfbfb !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user