Files
shanghaiganxiangtuzhuangwor…/pages/index/index.vue
qianhao.xu 42e18841a8 icon
2024-03-28 09:50:54 +08:00

154 lines
3.4 KiB
Vue

<template>
<view class="content background">
<view>
<u-notice-bar text="上海干巷车镜实业有限公司是上海市高新技术企业、上海市文明单位、上海市优秀企业形象单位、国家汽车零部件出口基地企业。"></u-notice-bar>
<image src="@/static/images/banner/banber.jpg" class="title-box"></image>
</view>
<view class="grid-box">
<uni-grid :column="3" @change="gridCheck" :showBorder="false" :highlight="false">
<uni-grid-item v-for="(item, index) in gridItemList" :index="index + 1">
<view class="item">
<uni-icons :type="item.icon" :size="55" color="#0081ff" />
<text class="text">{{ item.name }}</text>
</view>
</uni-grid-item>
</uni-grid>
</view>
<!-- 扫描操作 -->
<!-- <view>
<PdaScanInput @getInfo="handleWareHouseChange"></PdaScanInput>
</view> -->
</view>
</template>
<script>
export default {
data() {
return {
gridItemList: [
{ name: '入库', icon: 'download-filled' },
{ name: '出库', icon: 'upload-filled' },
{ name: '盘点', icon: 'wallet-filled' },
{ name: '移库', icon: 'cart-filled' },
{ name: '退库', icon: 'undo-filled' },
{ name: '拼箱', icon: 'folder-add-filled' },
{ name: '拆箱', icon: 'folder-add-filled' },
{ name: '货物查看', icon: 'eye-filled' },
{ name: '入库记录', icon: 'list' },
{ name: '出库记录', icon: 'list' },
{ name: '注销', icon: 'redo-filled' }
]
};
},
onLoad: function () {},
mounted() {
// setInterval(function () {
// uni.hideKeyboard(); //隐藏软键盘
// // plus.key.hideSoftKeybord();
// }, 60);
},
methods: {
gridCheck(item) {
const index = item.detail?.index;
switch (index) {
case 1:
uni.navigateTo({
url: '/pages/inWarehouse/inWarehouse'
});
break;
case 2:
uni.navigateTo({
url: '/pages/outWarehouse/outWarehouse'
});
break;
case 3:
uni.navigateTo({
url: '/pages/stocktake/stocktake'
});
break;
case 4:
uni.navigateTo({
url: '/pages/relocation/relocation'
});
break;
case 5:
uni.navigateTo({
url: '/pages/returnWarehose/returnWarehose'
});
break;
case 6:
//TODO 拼箱
// uni.navigateTo({
// url: '/pages/returnWarehose/returnWarehose'
// });
break;
case 7:
// 货物查看
// uni.navigateTo({
// url: '/pages/returnWarehose/returnWarehose'
// });
break;
case 8:
// 货物查看
// uni.navigateTo({
// url: '/pages/returnWarehose/returnWarehose'
// });
break;
case 9:
// 货物查看
// uni.navigateTo({
// url: '/pages/returnWarehose/returnWarehose'
// });
break;
case 11:
// 注销
uni.navigateTo({
url: '/pages/login/login'
});
break;
default:
break;
}
},
handleWareHouseChange(data) {
uni.showToast({
title: '扫描成功',
icon: 'success'
});
// console.log('handleWareHouseChange', data);
}
}
};
</script>
<style scoped>
.background {
/* background-color: #4671d5; */
}
.title-box {
width: 100%;
height: 150px;
}
.grid-box {
width: 100%;
height: 100%;
}
.grid-box .item {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.item {
background-color: rgba(128, 128, 128, 0.5);
}
.text {
font-size: 24px;
}
</style>