feat: 坯布出仓增加操作语音并精简扫码明细

This commit is contained in:
2026-10-13 17:13:01 +08:00
parent 322ada8428
commit 7b199ba559
14 changed files with 78 additions and 159 deletions
@@ -12,12 +12,14 @@
<text class="fabric-out-scanDetailLabel">客户:</text>
<text class="fabric-out-scanDetailValue">{{ detail.customer_name || '' }}</text>
</view>
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
<view class="fabric-out-scanDetailRow">
<view class="fabric-out-scanDetailCheck" @click="toggleGroup('produce_order_no')">
<checkbox :checked="isGroupChecked('produce_order_no')" />
<text class="fabric-out-scanDetailLabel">生产通知单:</text>
<text class="fabric-out-scanDetailValue">{{ detail.produce_order_no || '' }}</text>
</view>
</view>
<view class="fabric-out-scanDetailRow">
<view class="fabric-out-scanDetailCheck" @click="toggleGroup('grey_fabric_code')">
<checkbox :checked="isGroupChecked('grey_fabric_code')" />
<text class="fabric-out-scanDetailLabel">布编:</text>
@@ -58,67 +60,16 @@
<text class="fabric-out-scanDetailValue">{{ formatWeight(detail.weight) }}Kg</text>
</view>
</view>
<scroll-view scroll-x class="fabric-out-scanDetailTableScroll">
<view class="fabric-out-scanDetailTable" :style="{ width: tableWidth }">
<view class="fabric-out-scanDetailTableRow fabric-out-scanDetailTableHead">
<view
v-for="col in columns"
:key="col.key"
class="fabric-out-scanDetailTableCell"
:style="cellStyle(col)"
>{{ col.label }}</view>
</view>
<view v-if="!tableRows.length" class="fabric-out-scanDetailEmpty">暂无数据~~</view>
<view
v-for="(row, rowIndex) in tableRows"
:key="rowIndex"
class="fabric-out-scanDetailTableRow"
>
<view
v-for="col in columns"
:key="col.key"
class="fabric-out-scanDetailTableCell"
:style="cellStyle(col)"
>{{ formatCell(row, col.key) }}</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
import {
SCAN_DETAIL_TABLE_COLUMNS,
getScanDetailTableWidth,
buildScanDetailTableRows,
} from '@/common/storeFabricBusinessOut';
export default {
props: {
detail: { type: Object, default: () => ({}) },
itemData: { type: Array, default: () => [] },
groupKeys: { type: Array, default: () => [] },
},
computed: {
columns() {
return SCAN_DETAIL_TABLE_COLUMNS;
},
tableWidth() {
return getScanDetailTableWidth(this.columns);
},
tableRows() {
return buildScanDetailTableRows(this.itemData, this.groupKeys);
},
},
methods: {
cellStyle(col) {
return {
width: `${col.width}rpx`,
minWidth: `${col.width}rpx`,
maxWidth: `${col.width}rpx`,
};
},
isGroupChecked(key) {
return (this.groupKeys || []).includes(key);
},
@@ -140,11 +91,6 @@ export default {
const n = Number(value || 0);
return Number(n.toFixed(2));
},
formatCell(row, key) {
if (key === 'roll') return this.formatRoll(row.roll);
if (key === 'weight') return this.formatWeight(row.weight);
return row[key] || '';
},
},
};
</script>