feat(storegoods): 扣重改为扫码提交并展示细码重量
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -89,19 +89,33 @@ const FINE_COLUMNS = [
|
||||
{ label: '缸号', key: 'dye_factory_dyelot_number', width: 140 },
|
||||
];
|
||||
|
||||
const TARE_COLUMNS = [
|
||||
{ label: '纸筒重量', key: 'paper_tube_weight', width: 120 },
|
||||
{ label: '包装重量', key: 'package_weight', width: 120 },
|
||||
];
|
||||
|
||||
export default {
|
||||
props: {
|
||||
list: { type: Array, default: () => [] },
|
||||
title: { type: String, default: '进仓明细' },
|
||||
deletable: { type: Boolean, default: false },
|
||||
/** 加工/采购进仓:细码行展示扫码时提交的纸筒、包装重量 */
|
||||
showTareColumns: { type: Boolean, default: false },
|
||||
},
|
||||
computed: {
|
||||
groups() {
|
||||
return buildItemGroups(this.list);
|
||||
},
|
||||
fineColumns() {
|
||||
if (!this.deletable) return FINE_COLUMNS;
|
||||
return [...FINE_COLUMNS, { label: '操作', key: 'action', width: 90 }];
|
||||
const cols = [...FINE_COLUMNS];
|
||||
if (this.showTareColumns) {
|
||||
const idx = cols.findIndex((col) => col.key === 'weight');
|
||||
cols.splice(idx + 1, 0, ...TARE_COLUMNS);
|
||||
}
|
||||
if (this.deletable) {
|
||||
cols.push({ label: '操作', key: 'action', width: 90 });
|
||||
}
|
||||
return cols;
|
||||
},
|
||||
fineTableWidth() {
|
||||
const total = this.fineColumns.reduce((sum, col) => sum + (col.width || 100), 0);
|
||||
|
||||
Reference in New Issue
Block a user