|
|
@ -368,15 +368,15 @@ |
|
|
<el-row :gutter="20"> |
|
|
<el-row :gutter="20"> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="标签号"> |
|
|
<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-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="物料编码"> |
|
|
<el-form-item label="物料编码"> |
|
|
<div style="display: flex; gap: 8px;"> |
|
|
<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;"> |
|
|
<el-button type="primary" @click="querySamePartInventory" :loading="samePartLoading" style="flex-shrink: 0;"> |
|
|
查询同物料 |
|
|
|
|
|
|
|
|
查询IFS库存 |
|
|
</el-button> |
|
|
</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
@ -391,7 +391,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="库位" prop="locationId"> |
|
|
|
|
|
|
|
|
<el-form-item label="库位(选择)" prop="locationId"> |
|
|
<el-select |
|
|
<el-select |
|
|
v-model="editInventoryForm.locationId" |
|
|
v-model="editInventoryForm.locationId" |
|
|
filterable |
|
|
filterable |
|
|
@ -412,9 +412,14 @@ |
|
|
|
|
|
|
|
|
<!-- 第三行:仓库编码、WDR - rqrq --> |
|
|
<!-- 第三行:仓库编码、WDR - rqrq --> |
|
|
<el-row :gutter="20"> |
|
|
<el-row :gutter="20"> |
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
|
<el-col :span="6"> |
|
|
<el-form-item label="仓库编码"> |
|
|
<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-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
@ -461,6 +466,15 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</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> |
|
|
</el-form> |
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
@ -522,7 +536,7 @@ |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- IFS同物料库存列表弹窗 - rqrq --> |
|
|
<!-- IFS同物料库存列表弹窗 - rqrq --> |
|
|
<el-dialog |
|
|
|
|
|
|
|
|
<el-dialog v-drag |
|
|
title="IFS同物料库存列表(双击选择)" |
|
|
title="IFS同物料库存列表(双击选择)" |
|
|
:visible.sync="samePartInventoryDialogVisible" |
|
|
:visible.sync="samePartInventoryDialogVisible" |
|
|
:close-on-click-modal="false" |
|
|
:close-on-click-modal="false" |
|
|
@ -537,19 +551,19 @@ |
|
|
height="400" |
|
|
height="400" |
|
|
style="width: 100%" |
|
|
style="width: 100%" |
|
|
@row-dblclick="handleSamePartRowDblClick"> |
|
|
@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"> |
|
|
<template slot-scope="scope"> |
|
|
{{ scope.row.expirationDate ? scope.row.expirationDate.substring(0, 10) : '' }} |
|
|
|
|
|
|
|
|
{{ scope.row.ExpirationDate ? scope.row.ExpirationDate.substring(0, 10) : '' }} |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</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> |
|
|
</el-table> |
|
|
<div style="margin-top: 10px; color: #909399; font-size: 12px;"> |
|
|
<div style="margin-top: 10px; color: #909399; font-size: 12px;"> |
|
|
<i class="el-icon-info"></i> 数据来源:IFS系统库存。双击行可将该记录的批次号、WDR、版本号、失效日期覆盖到编辑表单 |
|
|
<i class="el-icon-info"></i> 数据来源:IFS系统库存。双击行可将该记录的批次号、WDR、版本号、失效日期覆盖到编辑表单 |
|
|
@ -562,7 +576,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<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 { getInventoryPartInStock } from '@/api/base/ifsInventoryQuery' // 查询IFS库存 - rqrq |
|
|
import { getLocationList } from '@/api/warehouse/location' |
|
|
import { getLocationList } from '@/api/warehouse/location' |
|
|
import { searchSysLanguagePackList, saveUserFavorite, searchUserFavorite } from '@/api/sysLanguage' |
|
|
import { searchSysLanguagePackList, saveUserFavorite, searchUserFavorite } from '@/api/sysLanguage' |
|
|
@ -775,6 +789,16 @@ export default { |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
showOverflowTooltip: true, |
|
|
showOverflowTooltip: true, |
|
|
fixed: "" |
|
|
fixed: "" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
columnProp: "availabilityControlId", |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "center", |
|
|
|
|
|
columnLabel: "AvailabilityControlId", |
|
|
|
|
|
columnWidth: 150, |
|
|
|
|
|
columnSortable: false, |
|
|
|
|
|
showOverflowTooltip: true, |
|
|
|
|
|
fixed: "" |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
queryHeaderData: { |
|
|
queryHeaderData: { |
|
|
@ -876,7 +900,8 @@ export default { |
|
|
engChgLevel: '', |
|
|
engChgLevel: '', |
|
|
expiredDate: '', |
|
|
expiredDate: '', |
|
|
qty: '', |
|
|
qty: '', |
|
|
inStockFlag: '' |
|
|
|
|
|
|
|
|
inStockFlag: '', |
|
|
|
|
|
availabilityControlId: '' // AvailabilityControlId - rqrq |
|
|
}, |
|
|
}, |
|
|
// 去除非栈板库存相关 - rqrq |
|
|
// 去除非栈板库存相关 - rqrq |
|
|
removeNonPalletDialogVisible: false, |
|
|
removeNonPalletDialogVisible: false, |
|
|
@ -1320,7 +1345,8 @@ export default { |
|
|
engChgLevel: row.engChgLevel || '', |
|
|
engChgLevel: row.engChgLevel || '', |
|
|
expiredDate: row.expiredDate ? row.expiredDate.substring(0, 10) : '', |
|
|
expiredDate: row.expiredDate ? row.expiredDate.substring(0, 10) : '', |
|
|
qty: row.qty || '', |
|
|
qty: row.qty || '', |
|
|
inStockFlag: row.inStockFlag || 'Y' |
|
|
|
|
|
|
|
|
inStockFlag: row.inStockFlag || 'Y', |
|
|
|
|
|
availabilityControlId: row.availabilityControlId || '' // AvailabilityControlId - rqrq |
|
|
} |
|
|
} |
|
|
// 加载库位下拉选项 - rqrq |
|
|
// 加载库位下拉选项 - rqrq |
|
|
this.loadLocationOptions() |
|
|
this.loadLocationOptions() |
|
|
@ -1386,7 +1412,8 @@ export default { |
|
|
engChgLevel: this.editInventoryForm.engChgLevel, |
|
|
engChgLevel: this.editInventoryForm.engChgLevel, |
|
|
expiredDate: this.editInventoryForm.expiredDate, |
|
|
expiredDate: this.editInventoryForm.expiredDate, |
|
|
qty: this.editInventoryForm.qty ? parseFloat(this.editInventoryForm.qty) : null, |
|
|
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 }) => { |
|
|
updateHandlingUnitInventory(saveData).then(({ data }) => { |
|
|
@ -1538,16 +1565,98 @@ export default { |
|
|
* @param row IFS库存行数据 |
|
|
* @param row IFS库存行数据 |
|
|
*/ |
|
|
*/ |
|
|
handleSamePartRowDblClick(row) { |
|
|
handleSamePartRowDblClick(row) { |
|
|
// 覆盖可编辑字段(使用IFS字段名)- rqrq |
|
|
|
|
|
this.editInventoryForm.batchNo = row.lotBatchNo || '' |
|
|
|
|
|
this.editInventoryForm.wdr = row.waivDevRejNo || '' |
|
|
|
|
|
this.editInventoryForm.engChgLevel = row.engChgLevel || '' |
|
|
|
|
|
|
|
|
|
|
|
this.editInventoryForm.expiredDate = row.expirationDate ? row.expirationDate.substring(0, 10) : '' |
|
|
|
|
|
|
|
|
// 覆盖可编辑字段(使用IFS字段名,IFS返回的字段名为大写开头)- 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 || '' |
|
|
|
|
|
|
|
|
|
|
|
// 查询location表,检查库位是否存在,带出warehouseId - rqrq |
|
|
|
|
|
if (ifsLocationNo) { |
|
|
|
|
|
this.checkLocationAndSetWarehouse(ifsLocationNo) |
|
|
|
|
|
} else { |
|
|
|
|
|
// 如果IFS没有库位信息,不做替换 - rqrq |
|
|
|
|
|
this.samePartInventoryDialogVisible = false |
|
|
|
|
|
this.$message.success('已将IFS库存记录的批次号、WDR、版本号、失效日期、AvailabilityControlId覆盖到表单') |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 检查库位是否存在并设置仓库编码 - 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 { |
|
|
|
|
|
// 库位不存在,warehouseId赋值为TEMP - rqrq |
|
|
|
|
|
this.editInventoryForm.locationId = locationId |
|
|
|
|
|
this.editInventoryForm.warehouseId = 'TEMP' |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
// 查询失败,默认赋值TEMP - rqrq |
|
|
|
|
|
this.editInventoryForm.locationId = locationId |
|
|
|
|
|
this.editInventoryForm.warehouseId = 'TEMP' |
|
|
|
|
|
} |
|
|
// 关闭弹窗 - rqrq |
|
|
// 关闭弹窗 - rqrq |
|
|
this.samePartInventoryDialogVisible = false |
|
|
this.samePartInventoryDialogVisible = false |
|
|
this.$message.success('已将IFS库存记录的批次号、WDR、版本号、失效日期覆盖到表单') |
|
|
|
|
|
|
|
|
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 |
|
|
|
|
|
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 { |
|
|
|
|
|
// 库位不存在,warehouseId赋值为TEMP - rqrq |
|
|
|
|
|
this.editInventoryForm.warehouseId = 'TEMP' |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
// 查询失败,warehouseId赋值为TEMP - rqrq |
|
|
|
|
|
this.editInventoryForm.warehouseId = 'TEMP' |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
// 查询异常,warehouseId赋值为TEMP - rqrq |
|
|
|
|
|
this.editInventoryForm.warehouseId = 'TEMP' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|