|
@@ -1,49 +1,44 @@
|
|
|
<!-- 胎号查询成功页面 -->
|
|
|
<template>
|
|
|
<view>
|
|
|
- <view class="head" v-if="empty == true">
|
|
|
- <view class="tips">
|
|
|
- <br>
|
|
|
- <br>
|
|
|
- <u-empty icon-color="#FFFFFF" color="#FFFFFF" text="查询失败" mode="data"></u-empty>
|
|
|
- </view>
|
|
|
- <view class="stripe"></view>
|
|
|
- <view class="roll">
|
|
|
- <view>{{text}}</view>
|
|
|
+ <view class="head">
|
|
|
+ <view class="tips" @click="scanning">
|
|
|
<view>
|
|
|
- <view></view>
|
|
|
- <view></view>
|
|
|
- <u-line color="#f4f4f4" border-style="dashed" :hair-line="true" length="94%" style="margin: 0 auto;padding-top: 30rpx;" />
|
|
|
+ <view><text>点击扫码</text></view>
|
|
|
</view>
|
|
|
- <view class="Exhibition">
|
|
|
- <u-empty text="查询失败" mode="list"></u-empty>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <u-button type="primary" shape="circle" class="button" @click="scanning">立即查询</u-button>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="head" v-else>
|
|
|
- <view class="tips">
|
|
|
- <image src="../../../static/sailun/successful.png" mode=""></image>
|
|
|
- <view>查询成功</view>
|
|
|
</view>
|
|
|
<view class="stripe"></view>
|
|
|
<view class="roll">
|
|
|
- <view>{{tireNumber}}</view>
|
|
|
<view>
|
|
|
- <view></view>
|
|
|
- <view></view>
|
|
|
+ <view @click="show =! show">
|
|
|
+ <u-icon name="edit-pen"></u-icon>手动录入
|
|
|
+ </view>
|
|
|
+ <view class="lnput" v-if="show==false">
|
|
|
+ <input type="text" v-model="number" placeholder="请输入胎号" clearable="true" focus="true" />
|
|
|
+ <u-button type="primary" size="medium" @click="query">查询</u-button>
|
|
|
+ </view>
|
|
|
+ <view class="roll_s" v-else>
|
|
|
+ <view>{{datalist}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <view class="left"></view>
|
|
|
+ <view class="right"></view>
|
|
|
<u-line color="#f4f4f4" border-style="dashed" :hair-line="true" length="94%" style="margin: 0 auto;padding-top: 30rpx;" />
|
|
|
</view>
|
|
|
- <view class="Exhibition">
|
|
|
- <view><text>轮胎胎号</text><text>{{tireNumber}}</text></view>
|
|
|
- <view><text>轮胎类型</text><text>{{mouldType}}</text></view>
|
|
|
- <view><text>轮胎品牌</text><text>{{brand}}</text></view>
|
|
|
- <view><text>轮胎规格</text><text>{{specification}}</text></view>
|
|
|
- <view><text>创建时间</text><text>{{createTime}}</text></view>
|
|
|
+ <view class="Exhibition" v-if="show_s == false">
|
|
|
+ <view><text>轮胎胎号</text><text>{{Information.tireNumber}}</text></view>
|
|
|
+ <view><text>轮胎品牌</text><text>{{Information.brand}}</text></view>
|
|
|
+ <view><text>轮胎规格</text><text>{{Information.specification}}</text></view>
|
|
|
+ <view><text>操作类型</text><text>{{Information.mouldInType}}</text></view>
|
|
|
+ <view><text>操作时间</text><text>{{Information.mouldInTime}}</text></view>
|
|
|
+ <view><text>操作类型</text><text>{{Information.mouldOutType}}</text></view>
|
|
|
+ <view><text>操作时间</text><text>{{Information.mouldOutTime}}</text></view>
|
|
|
+ </view>
|
|
|
+ <view v-else style="margin-top: 100rpx;margin-bottom: 100rpx;">
|
|
|
+ <u-empty :text="text" mode="list"></u-empty>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <u-button type="primary" shape="circle" class="button" @click="scanning">继续查询</u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -56,14 +51,20 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- datalist: '',
|
|
|
+ datalist: '请扫码查询或手动录入',
|
|
|
+ number:'',
|
|
|
empty: true,
|
|
|
- tireNumber: "未查询",
|
|
|
- mouldType: '未查询',
|
|
|
- brand: '未查询',
|
|
|
- specification: '未查询',
|
|
|
- createTime: '未查询',
|
|
|
- text:'查询失败'
|
|
|
+ mouldOutTime: '',
|
|
|
+ mouldOutType: '',
|
|
|
+ mouldInTime: '',
|
|
|
+ mouldInType: '',
|
|
|
+ tireNumber: "",
|
|
|
+ brand: '',
|
|
|
+ specification: '',
|
|
|
+ text: '请扫码或输入胎号',
|
|
|
+ show: true,
|
|
|
+ show_s:true,
|
|
|
+ Information:[]
|
|
|
}
|
|
|
},
|
|
|
onReady() {
|
|
@@ -80,9 +81,9 @@
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- setTimeout(() => {
|
|
|
- this.scanning()
|
|
|
- }, 100)
|
|
|
+ // uni.$on('update', data => {
|
|
|
+ // this.datalist = data.materialList
|
|
|
+ // })
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
@@ -97,21 +98,20 @@
|
|
|
tireNumber: this.datalist,
|
|
|
}
|
|
|
}).then(res => {
|
|
|
+ this.Information = []
|
|
|
console.log(res.data)
|
|
|
- if(res.data.code == 0){
|
|
|
+ if (res.data.code == 0) {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
title: '查询成功',
|
|
|
position: "bottom"
|
|
|
})
|
|
|
this.empty = false
|
|
|
- this.tireNumber = res.data.data.tireNumber
|
|
|
- this.mouldType = res.data.data.mouldType
|
|
|
- this.brand = res.data.data.brand
|
|
|
- this.specification = res.data.data.specification
|
|
|
- this.createTime = res.data.data.createTime
|
|
|
- }else if (res.data.code == 500) {
|
|
|
+ this.show_s = false
|
|
|
+ this.Information = res.data.data
|
|
|
+ } else if (res.data.code == 500) {
|
|
|
this.empty = true
|
|
|
+ this.show_s = true
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
title: res.data.msg,
|
|
@@ -140,20 +140,99 @@
|
|
|
this_.rendering()
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ query() {
|
|
|
+ console.log(this.datalist)
|
|
|
+ request({
|
|
|
+ url: '/myapp/mouldSelect',
|
|
|
+ method: 'Post',
|
|
|
+ data: {
|
|
|
+ storeId: this.$store.state.storeInfo.storeId,
|
|
|
+ userId: this.$store.state.storeInfo.userId,
|
|
|
+ tireNumber: this.number,
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ this.Information = []
|
|
|
+ console.log(res.data)
|
|
|
+ if (res.data.code == 0) {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '查询成功',
|
|
|
+ position: "bottom"
|
|
|
+ })
|
|
|
+ this.empty = false
|
|
|
+ this.show_s = false
|
|
|
+ this.Information = res.data.data
|
|
|
+
|
|
|
+ } else if (res.data.code == 500) {
|
|
|
+ this.empty = true
|
|
|
+ this.show_s = true
|
|
|
+ this.text = res.data.msg
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: res.data.msg,
|
|
|
+ position: "bottom"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.text = res.data.msg
|
|
|
+ }).catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '出错了请联系管理员~',
|
|
|
+ position: "bottom"
|
|
|
+ })
|
|
|
+ }).finally(() => {
|
|
|
+ // Loading.close()
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+ .roll>view:nth-child(1)>view:nth-child(1) {
|
|
|
+ width: 200rpx;
|
|
|
+ color: #0094FE;
|
|
|
+ position: relative;
|
|
|
+ top: -40rpx;
|
|
|
+ left: 400rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .lnput>input {
|
|
|
+ background-color: none;
|
|
|
+ width: 50%;
|
|
|
+ font-size: 42rpx;
|
|
|
+ float: left;
|
|
|
+ margin-top: 10rpx;
|
|
|
+ margin-left: 20rpx;
|
|
|
+ margin-right: 20rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #0192FD;
|
|
|
+ }
|
|
|
+
|
|
|
+ .lnput>u-button {
|
|
|
+ margin-left: 10rpx;
|
|
|
+ }
|
|
|
+
|
|
|
.button {
|
|
|
width: 90%;
|
|
|
margin-top: 200rpx;
|
|
|
}
|
|
|
|
|
|
+ .roll_s {
|
|
|
+ font-size: 42rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #0192FD;
|
|
|
+ margin-bottom: 50rpx;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
.head {
|
|
|
width: 750rpx;
|
|
|
- height: 440rpx;
|
|
|
+ height: 650rpx;
|
|
|
background-color: #0095FF;
|
|
|
|
|
|
.stripe {
|
|
@@ -165,14 +244,6 @@
|
|
|
margin-top: 40rpx;
|
|
|
}
|
|
|
|
|
|
- .roll>view:nth-child(1) {
|
|
|
- font-size: 42rpx;
|
|
|
- font-weight: bold;
|
|
|
- color: #0192FD;
|
|
|
- text-align: center;
|
|
|
- margin-bottom: 50rpx;
|
|
|
- }
|
|
|
-
|
|
|
.roll {
|
|
|
width: 600rpx;
|
|
|
height: auto;
|
|
@@ -189,8 +260,7 @@
|
|
|
width: 100%;
|
|
|
height: auto;
|
|
|
|
|
|
- view:nth-child(1),
|
|
|
- {
|
|
|
+ .left {
|
|
|
width: 50rpx;
|
|
|
height: 50rpx;
|
|
|
background-color: #F4F4F4;
|
|
@@ -199,7 +269,7 @@
|
|
|
margin-left: -30rpx;
|
|
|
}
|
|
|
|
|
|
- view:nth-child(2) {
|
|
|
+ .right {
|
|
|
width: 50rpx;
|
|
|
height: 50rpx;
|
|
|
background-color: #F4F4F4;
|
|
@@ -212,19 +282,29 @@
|
|
|
|
|
|
.tips {
|
|
|
text-align: center;
|
|
|
-
|
|
|
- image {
|
|
|
- margin-top: 60rpx;
|
|
|
- width: 106rpx;
|
|
|
- height: 112rpx;
|
|
|
- margin-left: 10rpx;
|
|
|
- }
|
|
|
+ height: 500rpx;
|
|
|
|
|
|
view {
|
|
|
- margin-top: 50rpx;
|
|
|
+ width: 500rpx;
|
|
|
+ height: 500rpx;
|
|
|
+ background-color: rgba(255, 255, 255, 0.1);
|
|
|
+ border-radius: 20rpx;
|
|
|
+ margin: 0 auto;
|
|
|
color: #FFFFFF;
|
|
|
font-size: 32rpx;
|
|
|
font-weight: bold;
|
|
|
+ padding-top: 2%;
|
|
|
+
|
|
|
+ view {
|
|
|
+ width: 92%;
|
|
|
+ height: 96%;
|
|
|
+ background-color: #000000;
|
|
|
+ padding-top: 41%;
|
|
|
+
|
|
|
+ text {
|
|
|
+ font-size: 42rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|