更新工序工价、库存查询、库位、领料、出库明细、入库等仓储模块,新增采购合同入库单移动端设计及SQL脚本
This commit is contained in:
@@ -478,22 +478,36 @@ export default {
|
||||
},
|
||||
getInventoryLocationRows(row) {
|
||||
var param = []
|
||||
var materialName_check = row.物料名称 ? 1 : 0
|
||||
var specificationsModel_check = row.图号或型号 ? 1 : 0
|
||||
param[0] = ['物料名称_check', materialName_check]
|
||||
param[1] = ['物料名称', row.物料名称]
|
||||
param[2] = ['图号或型号_check', specificationsModel_check]
|
||||
param[3] = ['图号或型号', row.图号或型号]
|
||||
var materialCode_check = row.物料编码 ? 1 : 0
|
||||
param[0] = ['物料名称_check', 0]
|
||||
param[1] = ['物料名称', '']
|
||||
param[2] = ['图号或型号_check', 0]
|
||||
param[3] = ['图号或型号', '']
|
||||
param[4] = ['库位_check', 0]
|
||||
param[5] = ['库位', '']
|
||||
param[6] = ['排序名称', '']
|
||||
param[7] = ['排序方式', '']
|
||||
param[8] = ['物料编码_check', materialCode_check]
|
||||
param[9] = ['物料编码', row.物料编码 || '']
|
||||
var Data = this.CreateData('11', '仓储管理_库存盘点_查询', param)
|
||||
return this.ExecDatabase(Data).then(response => {
|
||||
var rows = response.data.rows || response.data || []
|
||||
// 备注:修改人:Ld 修改时间:2026-07-15 17:14:07; 库存小窗只显示有库存的库位和对应数量。
|
||||
return rows.filter(function(item) {
|
||||
return Number(item.货位存量 || item.库存 || 0) > 0
|
||||
var locationMap = {}
|
||||
// 备注:修改人:Ld 修改时间:2026-07-17 17:23:23; 库存小窗按物料编码精确过滤并按库位汇总,避免同名称或相似图号物料混入。
|
||||
rows.filter(function(item) {
|
||||
return (!row.物料编码 || item.物料编码 === row.物料编码) && Number(item.货位存量 || item.库存 || 0) > 0
|
||||
}).forEach(function(item) {
|
||||
var locationName = item.货位名称 || ''
|
||||
if (!locationMap[locationName]) {
|
||||
locationMap[locationName] = {
|
||||
货位名称: locationName,
|
||||
货位存量: 0
|
||||
}
|
||||
}
|
||||
locationMap[locationName].货位存量 = Number(locationMap[locationName].货位存量) + Number(item.货位存量 || item.库存 || 0)
|
||||
})
|
||||
return Object.keys(locationMap).map(function(key) {
|
||||
return locationMap[key]
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user