Browse Source

feat(warehouse): 更新大盘点标签变更功能

- 将只读字段改为禁用状态以提升用户体验
- 查询按钮文本从"查询同物料"更改为"查询IFS库存"
- 库位标签更新为"库位(选择)"以明确功能
- 添加库位编码手输功能和仓库编码自动带出逻辑
- 新增AvailabilityControlId字段支持
- 为IFS库存查询添加拖拽功能支持
- 修复IFS库存字段名大小写不一致问题
- 实现库位存在性检查并自动设置仓库编码
- 添加手动输入库位时的仓库编码查询功能
master
常熟吴彦祖 2 weeks ago
parent
commit
17d8cd07a1
  1. 5
      src/api/warehouse/labelQuery.js
  2. 167
      src/views/modules/warehouse/labelChangeForDaPanDian.vue

5
src/api/warehouse/labelQuery.js

@ -27,4 +27,7 @@ export const restoreNonPalletInventory = data => createAPI('/warehouse/labelQuer
export const getFailedPrintTasks = data => createAPI('/warehouse/labelQuery/getFailedPrintTasks', 'POST', data)
// 重试失败的打印任务
export const retryFailedPrintTasks = data => createAPI('/warehouse/labelQuery/retryFailedPrintTasks', 'POST', data)
export const retryFailedPrintTasks = data => createAPI('/warehouse/labelQuery/retryFailedPrintTasks', 'POST', data)
// 根据库位ID查询库位信息(获取仓库编码)- rqrq
export const getLocationByLocationId = data => createAPI('/warehouse/labelQuery/getLocationByLocationId', 'POST', data)

167
src/views/modules/warehouse/labelChangeForDaPanDian.vue

@ -368,15 +368,15 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="标签号">
<el-input v-model="editInventoryForm.unitId" readonly></el-input>
<el-input v-model="editInventoryForm.unitId" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料编码">
<div style="display: flex; gap: 8px;">
<el-input v-model="editInventoryForm.partNo" readonly style="width: 100px;"></el-input>
<el-input v-model="editInventoryForm.partNo" disabled style="width: 100px;"></el-input>
<el-button type="primary" @click="querySamePartInventory" :loading="samePartLoading" style="flex-shrink: 0;">
查询同物料
查询IFS库存
</el-button>
</div>
</el-form-item>
@ -391,7 +391,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="库位" prop="locationId">
<el-form-item label="库位(选择)" prop="locationId">
<el-select
v-model="editInventoryForm.locationId"
filterable
@ -412,9 +412,14 @@
<!-- 第三行仓库编码WDR - rqrq -->
<el-row :gutter="20">
<el-col :span="12">
<el-col :span="6">
<el-form-item label="仓库编码">
<el-input v-model="editInventoryForm.warehouseId" readonly placeholder="选择库位后自动带出"></el-input>
<el-input v-model="editInventoryForm.warehouseId" disabled placeholder="选择库位后自动带出"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="库位编码(手输)">
<el-input v-model="editInventoryForm.locationId" @blur="handleManualLocationBlur"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
@ -461,6 +466,15 @@
</el-form-item>
</el-col>
</el-row>
<!-- 第六行AvailabilityControlId - rqrq -->
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="AvailabilityControlId" prop="availabilityControlId">
<el-input v-model="editInventoryForm.availabilityControlId" placeholder="请输入AvailabilityControlId"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
@ -522,7 +536,7 @@
</el-dialog>
<!-- IFS同物料库存列表弹窗 - rqrq -->
<el-dialog
<el-dialog v-drag
title="IFS同物料库存列表(双击选择)"
:visible.sync="samePartInventoryDialogVisible"
:close-on-click-modal="false"
@ -537,19 +551,19 @@
height="400"
style="width: 100%"
@row-dblclick="handleSamePartRowDblClick">
<el-table-column prop="lotBatchNo" label="批次号" min-width="120" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="locationNo" label="库位" min-width="100" align="center" header-align="center"></el-table-column>
<el-table-column prop="warehouse" label="仓库" min-width="80" align="center" header-align="center"></el-table-column>
<el-table-column prop="waivDevRejNo" label="WDR" min-width="80" align="center" header-align="center"></el-table-column>
<el-table-column prop="engChgLevel" label="版本号" min-width="80" align="center" header-align="center"></el-table-column>
<el-table-column prop="expirationDate" label="失效日期" min-width="100" align="center" header-align="center">
<el-table-column prop="LotBatchNo" label="批次号" min-width="120" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="LocationNo" label="库位" min-width="100" align="center" header-align="center"></el-table-column>
<el-table-column prop="Warehouse" label="仓库" min-width="80" align="center" header-align="center"></el-table-column>
<el-table-column prop="WaivDevRejNo" label="WDR" min-width="80" align="center" header-align="center"></el-table-column>
<el-table-column prop="EngChgLevel" label="版本号" min-width="80" align="center" header-align="center"></el-table-column>
<el-table-column prop="ExpirationDate" label="失效日期" min-width="100" align="center" header-align="center">
<template slot-scope="scope">
{{ scope.row.expirationDate ? scope.row.expirationDate.substring(0, 10) : '' }}
{{ scope.row.ExpirationDate ? scope.row.ExpirationDate.substring(0, 10) : '' }}
</template>
</el-table-column>
<el-table-column prop="qtyOnhand" label="在库数量" min-width="100" align="right" header-align="center"></el-table-column>
<el-table-column prop="qtyReserved" label="预留数量" min-width="100" align="right" header-align="center"></el-table-column>
<el-table-column prop="availabilityControlId" label="可用控制" min-width="80" align="center" header-align="center"></el-table-column>
<el-table-column prop="QtyOnhand" label="在库数量" min-width="100" align="right" header-align="center"></el-table-column>
<el-table-column prop="QtyReserved" label="预留数量" min-width="100" align="right" header-align="center"></el-table-column>
<el-table-column prop="AvailabilityControlId" label="AvailabilityControlId" min-width="80" align="center" header-align="center"></el-table-column>
</el-table>
<div style="margin-top: 10px; color: #909399; font-size: 12px;">
<i class="el-icon-info"></i> 数据来源IFS系统库存双击行可将该记录的批次号WDR版本号失效日期覆盖到编辑表单
@ -562,7 +576,7 @@
</template>
<script>
import { getHandlingUnitLabelList, reprintLabel, deleteLabel, getFailedPrintTasks, retryFailedPrintTasks, updateHandlingUnitInventory, removeNonPalletInventory, restoreNonPalletInventory } from '@/api/warehouse/labelQuery'
import { getHandlingUnitLabelList, reprintLabel, deleteLabel, getFailedPrintTasks, retryFailedPrintTasks, updateHandlingUnitInventory, removeNonPalletInventory, restoreNonPalletInventory, getLocationByLocationId } from '@/api/warehouse/labelQuery'
import { getInventoryPartInStock } from '@/api/base/ifsInventoryQuery' // IFS - rqrq
import { getLocationList } from '@/api/warehouse/location'
import { searchSysLanguagePackList, saveUserFavorite, searchUserFavorite } from '@/api/sysLanguage'
@ -775,6 +789,16 @@ export default {
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "availabilityControlId",
headerAlign: "center",
align: "center",
columnLabel: "AvailabilityControlId",
columnWidth: 150,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
}
],
queryHeaderData: {
@ -876,7 +900,8 @@ export default {
engChgLevel: '',
expiredDate: '',
qty: '',
inStockFlag: ''
inStockFlag: '',
availabilityControlId: '' // AvailabilityControlId - rqrq
},
// - rqrq
removeNonPalletDialogVisible: false,
@ -1320,7 +1345,8 @@ export default {
engChgLevel: row.engChgLevel || '',
expiredDate: row.expiredDate ? row.expiredDate.substring(0, 10) : '',
qty: row.qty || '',
inStockFlag: row.inStockFlag || 'Y'
inStockFlag: row.inStockFlag || 'Y',
availabilityControlId: row.availabilityControlId || '' // AvailabilityControlId - rqrq
}
// - rqrq
this.loadLocationOptions()
@ -1386,7 +1412,8 @@ export default {
engChgLevel: this.editInventoryForm.engChgLevel,
expiredDate: this.editInventoryForm.expiredDate,
qty: this.editInventoryForm.qty ? parseFloat(this.editInventoryForm.qty) : null,
inStockFlag: this.editInventoryForm.inStockFlag
inStockFlag: this.editInventoryForm.inStockFlag,
availabilityControlId: this.editInventoryForm.availabilityControlId // AvailabilityControlId - rqrq
}
updateHandlingUnitInventory(saveData).then(({ data }) => {
@ -1538,16 +1565,98 @@ export default {
* @param row IFS库存行数据
*/
handleSamePartRowDblClick(row) {
// 使IFS- rqrq
this.editInventoryForm.batchNo = row.lotBatchNo || ''
this.editInventoryForm.wdr = row.waivDevRejNo || ''
this.editInventoryForm.engChgLevel = row.engChgLevel || ''
// 使IFSIFS- rqrq
this.editInventoryForm.batchNo = row.LotBatchNo || row.lotBatchNo || ''
this.editInventoryForm.wdr = row.WaivDevRejNo || row.waivDevRejNo || ''
this.editInventoryForm.engChgLevel = row.EngChgLevel || row.engChgLevel || ''
// AvailabilityControlId - rqrq
this.editInventoryForm.availabilityControlId = row.AvailabilityControlId || row.availabilityControlId || ''
// - rqrq
const expirationDate = row.ExpirationDate || row.expirationDate || ''
this.editInventoryForm.expiredDate = expirationDate ? expirationDate.substring(0, 10) : ''
// IFS - rqrq
const ifsLocationNo = row.LocationNo || row.locationNo || ''
// locationwarehouseId - rqrq
if (ifsLocationNo) {
this.checkLocationAndSetWarehouse(ifsLocationNo)
} else {
// IFS - rqrq
this.samePartInventoryDialogVisible = false
this.$message.success('已将IFS库存记录的批次号、WDR、版本号、失效日期、AvailabilityControlId覆盖到表单')
}
},
this.editInventoryForm.expiredDate = row.expirationDate ? row.expirationDate.substring(0, 10) : ''
/**
* 检查库位是否存在并设置仓库编码 - rqrq
* @param locationId 库位ID
*/
checkLocationAndSetWarehouse(locationId) {
getLocationByLocationId({
site: localStorage.getItem('site'),
locationId: locationId
}).then(({ data }) => {
if (data && data.code === 0) {
if (data.row) {
// warehouseId - rqrq
this.editInventoryForm.locationId = locationId
this.editInventoryForm.warehouseId = data.row.warehouseId || 'TEMP'
} else {
// warehouseIdTEMP - rqrq
this.editInventoryForm.locationId = locationId
this.editInventoryForm.warehouseId = 'TEMP'
}
} else {
// TEMP - rqrq
this.editInventoryForm.locationId = locationId
this.editInventoryForm.warehouseId = 'TEMP'
}
// - rqrq
this.samePartInventoryDialogVisible = false
this.$message.success('已将IFS库存记录的批次号、库位、仓库、WDR、版本号、失效日期、AvailabilityControlId覆盖到表单')
}).catch(() => {
// TEMP - rqrq
this.editInventoryForm.locationId = locationId
this.editInventoryForm.warehouseId = 'TEMP'
this.samePartInventoryDialogVisible = false
this.$message.success('已将IFS库存记录的批次号、库位、仓库、WDR、版本号、失效日期、AvailabilityControlId覆盖到表单')
})
},
/**
* 库位编码(手输)失去焦点时查询仓库编码 - rqrq
*/
handleManualLocationBlur() {
const locationId = this.editInventoryForm.locationId
// - rqrq
this.samePartInventoryDialogVisible = false
this.$message.success('已将IFS库存记录的批次号、WDR、版本号、失效日期覆盖到表单')
// - rqrq
if (!locationId || locationId.trim() === '') {
return
}
// location - rqrq
getLocationByLocationId({
site: localStorage.getItem('site'),
locationId: locationId.trim()
}).then(({ data }) => {
if (data && data.code === 0) {
if (data.row) {
// warehouseId - rqrq
this.editInventoryForm.warehouseId = data.row.warehouseId || 'TEMP'
} else {
// warehouseIdTEMP - rqrq
this.editInventoryForm.warehouseId = 'TEMP'
}
} else {
// warehouseIdTEMP - rqrq
this.editInventoryForm.warehouseId = 'TEMP'
}
}).catch(() => {
// warehouseIdTEMP - rqrq
this.editInventoryForm.warehouseId = 'TEMP'
})
}
}
}

Loading…
Cancel
Save