feat(storefabric): 新增坯布库存管理功能
- 在http.api.js中添加坯布库存接口前缀和相关API定义 - 更新工作台页面,将坯布库存菜单链接到新的库存查询页面 - 在pages.json中注册坯布库存相关的三个新页面路由 - 创建storeFabricWarehouse.js文件,包含库存查询的常量、格式化函数和参数处理逻辑 - 新增storeFabricWarehouseDetail.vue页面,实现细码明细查看功能 - 添加storeFabricWarehouseGroupList.vue页面,实现坯布库存汇总查询 - 创建storeFabricWarehouseStockList.vue页面,实现库存维度汇总功能 - 新增storeFabricWarehouseGroupItem.vue和storeFabricWarehouseStockItem.vue组件,用于显示库存卡片 - 添加WarehouseDataTable.vue组件,提供可滚动的表格展示功能
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<view class="myCard">
|
||||
<view class="cardTopName">
|
||||
<text>{{ item.grey_fabric_code || '-' }}</text>
|
||||
<text class="stockTag">{{ item.stock_roll_display }} 匹</text>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>坯布名称:</view>
|
||||
<view>{{ item.grey_fabric_name || '-' }}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>仓 库:</view>
|
||||
<view>{{ item.warehouse_name || item.receiver_name || '-' }}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>库存数量:</view>
|
||||
<view>{{ item.stock_weight_display }} KG{{ item.unit_label }}</view>
|
||||
</view>
|
||||
<view v-if="!isDetail" class="lookDetail">
|
||||
<text>查看维度汇总</text>
|
||||
<u-icon name="arrow-right" size="36" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
item: { type: Object, default: () => ({}) },
|
||||
index: { type: Number, default: 0 },
|
||||
isDetail: { type: Boolean, default: false },
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.cardTopName {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.stockTag {
|
||||
font-size: 24rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 6rpx;
|
||||
font-weight: normal;
|
||||
background: #e6f7ff;
|
||||
color: #1890ff;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<view class="myCard">
|
||||
<view class="cardTopName">
|
||||
<text>{{ item.gray_fabric_color_name || '未分色' }}</text>
|
||||
<text class="stockTag">{{ item.stock_roll_display }} 匹</text>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>织 厂:</view>
|
||||
<view>{{ item.supplier_name || '-' }}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>机 台 号:</view>
|
||||
<view>{{ item.machine_number || '-' }}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>纱 批:</view>
|
||||
<view>{{ item.yarn_batch || '-' }}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>仓 库:</view>
|
||||
<view>{{ item.warehouse_name || '-' }}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>幅宽/克重:</view>
|
||||
<view>{{ item.grey_fabric_width_and_unit_name || '-' }} / {{ item.grey_fabric_gram_weight_and_unit_name || '-' }}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>库存数量:</view>
|
||||
<view>{{ item.stock_weight_display }} KG{{ item.unit_label }}</view>
|
||||
</view>
|
||||
<view v-if="!isDetail" class="lookDetail">
|
||||
<text>查看细码明细</text>
|
||||
<u-icon name="arrow-right" size="36" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
item: { type: Object, default: () => ({}) },
|
||||
index: { type: Number, default: 0 },
|
||||
isDetail: { type: Boolean, default: false },
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.cardTopName {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.stockTag {
|
||||
font-size: 24rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 6rpx;
|
||||
font-weight: normal;
|
||||
background: #e6f7ff;
|
||||
color: #1890ff;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<view class="warehouse-table-wrap">
|
||||
<scroll-view scroll-x class="tableScrollX">
|
||||
<wyb-table
|
||||
ref="table"
|
||||
:headers="headers"
|
||||
:contents="contents"
|
||||
:width="tableWidth"
|
||||
:height="height"
|
||||
:first-line-fixed="firstLineFixed"
|
||||
@onCellClick="onCellClick"
|
||||
/>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
|
||||
export default {
|
||||
components: { wybTable },
|
||||
props: {
|
||||
headers: { type: Array, default: () => [] },
|
||||
contents: { type: Array, default: () => [] },
|
||||
height: { type: String, default: 'auto' },
|
||||
firstLineFixed: { type: Boolean, default: true },
|
||||
},
|
||||
computed: {
|
||||
tableWidth() {
|
||||
const total = (this.headers || []).reduce((sum, col) => sum + (col.width || 160), 0);
|
||||
return `${total}rpx`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onCellClick(event) {
|
||||
if (event && event.lineData) {
|
||||
this.$emit('row-click', event.lineData, event);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.warehouse-table-wrap {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
}
|
||||
.tableScrollX {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user