新增出库单列表、出库计划清单和成品出库页面 添加防抖函数工具和PDA出库相关API接口 重构出库逻辑,支持按计划批次出库和严格校验 优化扫码录入和出库操作流程,增加计划完成状态显示
195 lines
4.1 KiB
Vue
195 lines
4.1 KiB
Vue
<template>
|
||
<view class="home-container">
|
||
<view v-for="type in 4" :key="type" class="section-container">
|
||
<view class="section-card">
|
||
<text class="section-title">{{ getSectionTitle(type) }}</text>
|
||
<view class="grid-container">
|
||
<view v-for="(item, index) in getItemsByType(type)" :key="index" class="grid-item"
|
||
@click="gridCheck(item.url)">
|
||
<image :src="'/static/images/index-icons/' + item.icon + '.svg'" class="grid-icon"></image>
|
||
<text class="grid-text">{{ item.name }}</text>
|
||
</view>
|
||
<!-- 当一行不满4个时,添加占位元素以保持布局 -->
|
||
<view v-for="index in (4 - getItemsByType(type).length % 4) % 4" :key="`placeholder-${index}`"
|
||
class="grid-item placeholder">
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="section-gap" v-if="type < 4"></view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import {
|
||
mapActions
|
||
} from 'vuex'
|
||
export default {
|
||
data() {
|
||
return {
|
||
// 页面按钮参数
|
||
gridItemList: [{
|
||
name: '成品入库',
|
||
icon: 'inbound/finished-product-inbound',
|
||
url: '/pages/inWarehouse/inWarehouse?isStrict=true',
|
||
type: 1,
|
||
index: 1
|
||
},
|
||
{
|
||
name: '油漆入库',
|
||
icon: 'inbound/paint-inbound',
|
||
url: '',
|
||
type: 1,
|
||
index: 2
|
||
},
|
||
{
|
||
name: '毛坯入库',
|
||
icon: 'inbound/rough-casting-inbound',
|
||
url: '',
|
||
type: 1,
|
||
index: 3
|
||
},
|
||
{
|
||
name: '备件入库',
|
||
icon: 'inbound/spare-parts-inbound',
|
||
url: '',
|
||
type: 1,
|
||
index: 4
|
||
},
|
||
{
|
||
name: '无校验入库',
|
||
icon: 'inbound/no-validation-inbound',
|
||
url: '/pages/inWarehouse/inWarehouse?isStrict=false',
|
||
type: 1,
|
||
index: 14
|
||
},
|
||
{
|
||
name: '成品出库',
|
||
icon: 'outbound/finished-product-outbound',
|
||
url: '/pages/outWarehouse/outWarehouse',
|
||
type: 2,
|
||
index: 5
|
||
},
|
||
{
|
||
name: '出库单',
|
||
icon: 'outbound/finished-product-outbound',
|
||
url: '/pages/outWarehouse/outboundList/outboundList',
|
||
type: 2,
|
||
index: 16
|
||
},
|
||
{
|
||
name: '无校验出库',
|
||
icon: 'outbound/no-outbound-order',
|
||
url: '/pages/returnWarehouse/returnWarehouse',
|
||
type: 2,
|
||
index: 15
|
||
},
|
||
{
|
||
name: '出货',
|
||
icon: 'outbound/shipping',
|
||
url: '',
|
||
type: 2,
|
||
index: 6
|
||
},
|
||
{
|
||
name: '退货',
|
||
icon: 'outbound/return',
|
||
url: '',
|
||
type: 2,
|
||
index: 7
|
||
},
|
||
{
|
||
name: '盘点',
|
||
icon: 'inventory-management/stocktake',
|
||
url: '/pages/stocktake/stocktake',
|
||
type: 3,
|
||
index: 8
|
||
},
|
||
{
|
||
name: '库存查询',
|
||
icon: 'inventory-management/inventory-query',
|
||
url: '/pages/watchGoods/watchGoods',
|
||
type: 3,
|
||
index: 9
|
||
},
|
||
{
|
||
name: '操作记录',
|
||
icon: 'inventory-management/operation-record',
|
||
url: '/pages/warehoseActionList/warehoseActionList',
|
||
type: 3,
|
||
index: 10
|
||
},
|
||
{
|
||
name: '扫描管理',
|
||
icon: 'inventory-management/scan-management',
|
||
url: '/pages/scan/scan',
|
||
type: 3,
|
||
index: 14
|
||
},
|
||
{
|
||
name: '拼箱',
|
||
icon: 'warehouse-management/consolidation',
|
||
url: '/pages/consolidation/consolidation',
|
||
type: 4,
|
||
index: 11
|
||
},
|
||
{
|
||
name: '拆箱',
|
||
icon: 'warehouse-management/unpacking',
|
||
url: '/pages/unpacking/unpacking',
|
||
type: 4,
|
||
index: 12
|
||
},
|
||
{
|
||
name: '移库',
|
||
icon: 'warehouse-management/relocation',
|
||
url: '/pages/relocation/relocation',
|
||
type: 4,
|
||
index: 13
|
||
}
|
||
]
|
||
};
|
||
},
|
||
methods: {
|
||
...mapActions([
|
||
'LogOut',
|
||
'GetInfo'
|
||
]),
|
||
gridCheck(url) {
|
||
|
||
if (url === '') {
|
||
return;
|
||
}
|
||
try {
|
||
uni.navigateTo({
|
||
url
|
||
});
|
||
} catch (error) {
|
||
uni.showToast({
|
||
title: '页面不存在',
|
||
icon: 'none'
|
||
});
|
||
}
|
||
|
||
},
|
||
getSectionTitle(type) {
|
||
const titles = ['', '入库', '出库', '库存管理', '库内管理'];
|
||
return titles[type] || '';
|
||
},
|
||
getItemsByType(type) {
|
||
return this.gridItemList.filter(item => item.type === type);
|
||
}
|
||
},
|
||
onLoad: function () {
|
||
this.GetInfo();
|
||
},
|
||
mounted() {
|
||
// console.log('屏幕宽度', uni.getWindowInfo().screenWidth)
|
||
// console.log('可用高度', uni.getWindowInfo().windowHeight)
|
||
}
|
||
};
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
@import url('index.scss');
|
||
</style> |