Files
shanghaiganxiangtuzhuangwor…/pages/index/index-backups.vue
2024-04-18 08:26:44 +08:00

207 lines
4.0 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="item.index">
<view class="item">
<uni-icons :type="item.icon" :size="40" color="#00aaff" />
<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',
index: 1
},
{
name: '出库',
icon: 'upload-filled',
index: 2
},
{
name: '盘点',
icon: 'wallet-filled',
index: 3
},
// {
// name: '移库',
// icon: 'cart-filled',
// index: 4
// },
// {
// name: '退库',
// icon: 'undo-filled',
// index: 5
// },
{
name: '拼箱',
icon: 'folder-add-filled',
index: 6
},
// {
// name: '拆箱',
// icon: 'folder-add-filled',
// index: 6
// },
{
name: '货物查看',
icon: 'eye-filled',
index: 7
},
// {
// name: '入库记录',
// icon: 'list',
// index: 8
// },
// {
// name: '出库记录',
// icon: 'list',
// index: 9
// },
{
name: '注销',
icon: 'redo-filled',
index: 10
}
]
};
},
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:
// 拼箱
uni.navigateTo({
url: '/pages/consolidation/consolidation'
});
break;
case 7:
// 货物查看
uni.navigateTo({
url: '/pages/watchGoods/watchGoods'
});
break;
case 8:
break;
case 9:
break;
case 10:
// 注销
uni.showModal({
title: '注销',
content: '是否注销当前账户?',
showCancel: true,
cancelText: '取消',
confirmText: '注销',
success: (res) => {
if (res.confirm) {
uni.reLaunch({
url: '/pages/login/login'
});
}
}
});
break;
default:
break;
}
},
handleWareHouseChange(data) {
uni.showToast({
title: '扫描成功',
icon: 'success'
});
// console.log('handleWareHouseChange', data);
}
}
};
</script>
<style scoped>
@import url('index.css');
.background {
margin-top: 20px;
height: 692px;
/* 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;
color: white;
}
</style>