1
This commit is contained in:
parent
2a7124d40d
commit
d530e997ca
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name" : "DOAN总装车间PDA",
|
||||
"appid" : "__UNI__25A9D80",
|
||||
"appid" : "__UNI__EFA389B",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"versionName" : "1.0.1",
|
||||
"versionCode" : 101,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
@ -35,8 +35,12 @@
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
"ios" : {},
|
||||
"sdkConfigs" : {}
|
||||
"ios" : {
|
||||
"dSYMs" : false
|
||||
},
|
||||
"sdkConfigs" : {
|
||||
"ad" : {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"quickapp" : {},
|
||||
|
||||
@ -98,6 +98,13 @@
|
||||
{
|
||||
"navigationBarTitleText" : "扫码配料"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/tool/scan",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "标签扫码"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
@ -114,7 +121,7 @@
|
||||
"pagePath": "pages/work/index",
|
||||
"iconPath": "static/images/tabbar/work.png",
|
||||
"selectedIconPath": "static/images/tabbar/work_.png",
|
||||
"text": "功能"
|
||||
"text": "工具箱"
|
||||
}, {
|
||||
"pagePath": "pages/mine/index",
|
||||
"iconPath": "static/images/tabbar/mine.png",
|
||||
|
||||
145
pages/index.vue
145
pages/index.vue
@ -1,27 +1,72 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<div class="scan-row">
|
||||
<ScanInput @scanConfirm="scanConfirm"></ScanInput>
|
||||
</div>
|
||||
<view class="container">
|
||||
<!-- 轮播图 -->
|
||||
<uni-swiper-dot class="uni-swiper-dot-box" :info="bannerList" :current="current" field="content">
|
||||
<swiper class="swiper-box" :current="swiperDotIndex" @change="changeSwiper">
|
||||
<swiper-item v-for="(item, index) in bannerList" :key="index">
|
||||
<view class="swiper-item" @click="clickBannerItem(item)">
|
||||
<image :src="item.image" mode="aspectFill" :draggable="false" />
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</uni-swiper-dot>
|
||||
|
||||
<!-- 宫格组件 -->
|
||||
<uni-section title="物料管理" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
<uni-grid :column="4" :showBorder="false" @change="changeGrid">
|
||||
<uni-grid-item v-for="(item, index) in materialOptions" :key="index" :index="index">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons :type="item.icon" size="30"></uni-icons>
|
||||
<text class="text">{{ item.name }}</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { analysisScanCode } from '@/api/scan/index';
|
||||
import { fail } from 'assert';
|
||||
export default {
|
||||
onLoad: function () {},
|
||||
onShow() {},
|
||||
data() {
|
||||
return {
|
||||
dateTime: this.$dayjs(),
|
||||
value: ''
|
||||
current: 0,
|
||||
swiperDotIndex: 0,
|
||||
bannerList: [
|
||||
{
|
||||
image: '/static/images/door/1.jpg'
|
||||
},
|
||||
{
|
||||
image: '/static/images/door/2.jpg'
|
||||
},
|
||||
{
|
||||
image: '/static/images/door/3.jpg'
|
||||
}
|
||||
],
|
||||
// 物料模块
|
||||
materialOptions: [
|
||||
{
|
||||
name: '备料管理',
|
||||
icon: 'upload-filled',
|
||||
url: '/pages/materialManagement/materialPreparation/index'
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
scanConfirm(val) {
|
||||
analysisScanCode({ materialCode: val }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
console.log(res.data);
|
||||
clickBannerItem(item) {
|
||||
console.info(item);
|
||||
},
|
||||
changeSwiper(e) {
|
||||
this.current = e.detail.current;
|
||||
},
|
||||
changeGrid(e) {
|
||||
const _url = this.materialOptions[e.detail.index].url;
|
||||
uni.navigateTo({
|
||||
url: _url,
|
||||
fail: () => {
|
||||
this.$modal.showToast('模块建设中~');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -29,31 +74,77 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.content {
|
||||
<style lang="scss">
|
||||
/* #ifndef APP-NVUE */
|
||||
page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
min-height: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
view {
|
||||
font-size: 14px;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
.text {
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.grid-item-box {
|
||||
flex: 1;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: white;
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 200rpx;
|
||||
width: 200rpx;
|
||||
margin-top: 200rpx;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 50rpx;
|
||||
.uni-margin-wrap {
|
||||
width: 690rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.text-area {
|
||||
.swiper {
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
height: 300rpx;
|
||||
line-height: 300rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
color: #8f8f94;
|
||||
@media screen and (min-width: 500px) {
|
||||
.uni-swiper-dot-box {
|
||||
width: 400px;
|
||||
/* #ifndef APP-NVUE */
|
||||
margin: 0 auto;
|
||||
/* #endif */
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -105,6 +105,13 @@ export default {
|
||||
},
|
||||
// 手动校验
|
||||
formValidate() {
|
||||
if(this.materialList.length === 0){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '无零件'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
for (let item of this.materialList) {
|
||||
if (item.quantity === 0) {
|
||||
uni.showToast({
|
||||
|
||||
@ -1,18 +1,7 @@
|
||||
<template>
|
||||
<view class="work-container">
|
||||
<!-- 轮播图 -->
|
||||
<uni-swiper-dot class="uni-swiper-dot-box" :info="bannerList" :current="current" field="content">
|
||||
<swiper class="swiper-box" :current="swiperDotIndex" @change="changeSwiper">
|
||||
<swiper-item v-for="(item, index) in bannerList" :key="index">
|
||||
<view class="swiper-item" @click="clickBannerItem(item)">
|
||||
<image :src="item.image" mode="aspectFill" :draggable="false" />
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</uni-swiper-dot>
|
||||
|
||||
<!-- 宫格组件 -->
|
||||
<uni-section title="物料管理" type="line"></uni-section>
|
||||
<uni-section title="便捷工具" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
<uni-grid :column="4" :showBorder="false" @change="changeGrid">
|
||||
<uni-grid-item v-for="(item, index) in materialOptions" :key="index" :index="index">
|
||||
@ -31,25 +20,12 @@ import { fail } from 'assert';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
current: 0,
|
||||
swiperDotIndex: 0,
|
||||
bannerList: [
|
||||
{
|
||||
image: '/static/images/banner/banner01.jpg'
|
||||
},
|
||||
{
|
||||
image: '/static/images/banner/banner02.jpg'
|
||||
},
|
||||
{
|
||||
image: '/static/images/banner/banner03.jpg'
|
||||
}
|
||||
],
|
||||
// 物料模块
|
||||
materialOptions: [
|
||||
{
|
||||
name: '备料管理',
|
||||
icon: 'upload-filled',
|
||||
url: '/pages/materialManagement/materialPreparation/index'
|
||||
name: '标签扫码',
|
||||
icon: 'scan',
|
||||
url: '/pages/tool/scan'
|
||||
},
|
||||
{
|
||||
name: '参数设置',
|
||||
@ -62,7 +38,7 @@ export default {
|
||||
url: ''
|
||||
},
|
||||
{
|
||||
name: '配料日志',
|
||||
name: '操作日志',
|
||||
icon: 'wallet-filled',
|
||||
url: ''
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user