fix:库存导出新增可用数
This commit is contained in:
@@ -61,7 +61,7 @@ public class SapConstant {
|
||||
public static final String MDG019_TABLE_CSKS = "CSKS";
|
||||
|
||||
/** 物料查询同步来源系统 */
|
||||
public static final String MATERIAL_QUERY_SRC_SYSTEM = "WMS";
|
||||
public static final String MATERIAL_QUERY_SRC_SYSTEM = "WMS5";
|
||||
|
||||
/** 物料查询同步目标系统 */
|
||||
public static final String MATERIAL_QUERY_DEST_SYSTEM = "sap";
|
||||
|
||||
@@ -218,14 +218,22 @@ import request from '@/utils/request'
|
||||
import QRCode from 'qrcode'
|
||||
import { exportRowsToExcel } from '@/utils/export-excel'
|
||||
|
||||
// 导出列:仓库、库区、仓位、物料编码、物料名称、总数
|
||||
// 导出列:仓库、库区、仓位、物料编码、物料名称、总数、可用数
|
||||
// 可用数 = 总数 - 冻结数,与列表展示口径一致;按 3 位小数取整,避免浮点误差
|
||||
const calcAvailableQty = row => {
|
||||
const qty = Number(row.qty) || 0
|
||||
const frozen = Number(row.frozen_qty) || 0
|
||||
return Math.round((qty - frozen) * 1000) / 1000
|
||||
}
|
||||
|
||||
const EXPORT_COLUMNS = [
|
||||
{ label: '仓库', prop: 'stor_name', width: 18 },
|
||||
{ label: '库区', prop: 'sect_name', width: 18 },
|
||||
{ label: '仓位', prop: 'struct_code', width: 18 },
|
||||
{ label: '物料编码', prop: 'material_code', width: 20 },
|
||||
{ label: '物料名称', prop: 'material_name', width: 30 },
|
||||
{ label: '总数', prop: 'qty', width: 14 }
|
||||
{ label: '总数', prop: 'qty', width: 14 },
|
||||
{ label: '可用数', width: 14, value: calcAvailableQty }
|
||||
]
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user