feat: 更新出仓扫码页并升至1.1.18
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<view class="fabric-out-summary">
|
||||
<scroll-view scroll-x class="fabric-out-summaryScroll">
|
||||
<wyb-table
|
||||
:headers="headers"
|
||||
:contents="contents"
|
||||
:width="tableWidth"
|
||||
height="auto"
|
||||
:font-size="[36, 36]"
|
||||
:min-height="[100, 100]"
|
||||
:padding="[16, 12]"
|
||||
:first-line-fixed="false"
|
||||
empty-string=""
|
||||
@onCellClick="$emit('cell-click', $event)"
|
||||
/>
|
||||
</scroll-view>
|
||||
<view v-if="!contents.length" class="fabric-out-summaryEmpty">暂无数据~~</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
import { SUMMARY_TABLE_COLUMNS } from '@/common/storeFabricBusinessOut';
|
||||
|
||||
export default {
|
||||
components: { wybTable },
|
||||
props: {
|
||||
rows: { type: Array, default: () => [] },
|
||||
},
|
||||
computed: {
|
||||
headers() {
|
||||
return SUMMARY_TABLE_COLUMNS;
|
||||
},
|
||||
tableWidth() {
|
||||
const total = this.headers.reduce((sum, col) => sum + (col.width || 160), 0);
|
||||
return `${total}rpx`;
|
||||
},
|
||||
contents() {
|
||||
return (this.rows || []).map((row) => ({
|
||||
...row,
|
||||
grey_fabric_code: row.grey_fabric_code || '',
|
||||
grey_fabric_name: row.grey_fabric_name || '',
|
||||
yarn_batch: row.yarn_batch || '',
|
||||
machine_number: row.machine_number || '',
|
||||
roll: row.roll != null && row.roll !== '' ? String(row.roll) : '0',
|
||||
weight: row.weight != null && row.weight !== '' ? String(row.weight) : '0',
|
||||
}));
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.fabric-out-summary {
|
||||
background: #fff;
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
.fabric-out-summaryScroll {
|
||||
width: 100%;
|
||||
}
|
||||
.fabric-out-summary ::v-deep .wyb-table-scroll-view {
|
||||
height: auto !important;
|
||||
overflow-x: auto;
|
||||
overflow-y: visible;
|
||||
}
|
||||
.fabric-out-summaryEmpty {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 36rpx;
|
||||
line-height: 100rpx;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user