From fdd5c0737d285fdf55dadd3d34aab1ead2d27940 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期六, 16 三月 2024 13:05:45 +0800
Subject: [PATCH] #
---
pages/project/jmAGV/floorOne.vue | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 158 insertions(+), 5 deletions(-)
diff --git a/pages/project/jmAGV/floorOne.vue b/pages/project/jmAGV/floorOne.vue
index fee0577..a94ba37 100644
--- a/pages/project/jmAGV/floorOne.vue
+++ b/pages/project/jmAGV/floorOne.vue
@@ -11,6 +11,7 @@
<view class="zcard">
<view class="zcard-flex">
<view class="button-nk" style="background-color: brown;" @click="click('right')">涓嬫灦</view>
+ <view class="button-nk" style="background-color: brown;" @click="putOut('out2')">浠撳簱-婊℃墭鐩�(鍑哄簱)</view>
</view>
</view>
@@ -19,6 +20,43 @@
<view class="popup">
<view class="popup3-input-title">{{text}}</view>
<view class="button-nk" @click="option(item)" v-for="item in btns">{{item.name}}</view>
+ </view>
+ </uni-popup>
+ </view>
+
+ <view>
+ <uni-popup ref="numberPopup" type="dialog">
+ <view class="popup2">
+ <view class="popup3-input-title">{{tipsTitle}}</view>
+ <view class="button-nk" @click="goUp(2)">2涓�</view>
+ <view class="button-nk" @click="goUp(4)">4涓�</view>
+ </view>
+ </uni-popup>
+ </view>
+
+ <view>
+ <uni-popup ref="inputPopup" type="dialog">
+ <view class="popup3">
+ <view class="popup3-input-title">{{tipsTitle}}</view>
+ <view class="popup3-input-box2" :class="item.chose"
+ v-if="!meterShow" v-for="item in emptyMatList" @click="chose(item.matnr)">
+ <view>
+ {{item.maktx}}
+ </view>
+ </view>
+ <view class="popup3-input-box" v-if="meterShow">
+ <text>{{desc}}:</text>
+ <view style="margin-left: 3rpx;">
+ <input type="text" v-model="code"/>
+ </view>
+ </view>
+ <view class="popup3-input-box" v-if="meterShow">
+ <text>绫虫暟:</text>
+ <view style="margin-left: 3rpx;">
+ <input type="text" v-model="meter"/>
+ </view>
+ </view>
+ <view class="button-nk" @click="confirm(2)">纭畾</view>
</view>
</uni-popup>
</view>
@@ -44,7 +82,14 @@
outType: '',
text: '',
btnTitle: '',
- type: ''
+ type: '',
+ tipsTitle: '',
+ item: {},
+ meterShow: false,
+ code: '',
+ emptyMatList: '',
+ meter: ''
+
}
},
@@ -57,29 +102,89 @@
},
methods: {
jump() {
- uni.navigateTo({
+ uni.redirectTo({
url: '/pages/project/jmAGV/home'
})
+ },
+ // 婊$増鍑哄簱
+ putOut(type) {
+ this.type = type
+ this.inputPopup()
+ },
+ inputPopup() {
+ if (this.type == 'out1') {
+ this.tipsTitle = '绌烘墭鐩樺嚭搴�'
+ this.desc = '鐗╂枡鐮�'
+ this.meterShow = false
+ let that = this
+ uni.request({
+ url: `${that.baseUrl}/agv/getEmptyMat`,
+ header: { 'token': uni.getStorageSync('token') },
+ method: 'GET',
+ success(res) {
+ res = res.data
+ if (res.code === 200) {
+ res.data['chose'] = ''
+ that.emptyMatList = res.data
+
+ }
+ }
+ })
+ } else {
+ this.tipsTitle = '婊℃墭鐩樺嚭搴�'
+ this.desc = '璁㈠崟鍙�'
+ this.meterShow = true
+ this.$refs.inputPopup.open('center')
+ }
+ this.$refs.inputPopup.open('center')
},
click(type) {
if (type == 'left') {
this.btns = this.onBtns
this.text = '涓婃灦'
this.type = 'load'
+ this.tipsTitle = '涓婃灦鏁伴噺'
} else {
this.btns = this.outBtns
this.type = 'unload'
this.text = '涓嬫灦'
+ this.tipsTitle = '涓嬫灦鏁伴噺'
}
this.$refs.revise.open(type)
},
option(item) {
+ this.item = item
+ this.$refs.numberPopup.open('center')
+ },
+ goUp(num) {
let _this = this
let data = {
- originLocal: item.code,
- targetLocal: item.traget,
+ originLocal: this.item.code,
+ targetLocal: this.item.traget,
type: this.type,
+ anfme: num
}
+ this.webServer(data)
+ },
+ confirm() {
+ let data = {}
+ data = {
+ originLocal: '11-Q1',
+ targetLocal: '11-Q1',
+ type: this.type,
+ orderNo: this.code,
+ meter: this.meter
+ }
+ this.webServer(data)
+ setTimeout(()=>{
+ this.$refs.inputPopup.close()
+ this.code = ''
+ this.meter = ''
+ },300)
+ },
+ // 鎵�鏈夋湇鍔�
+ webServer(data) {
+ let _this = this
uni.request({
url: `${_this.baseUrl}/agv/requestTask`,
data: data,
@@ -124,7 +229,7 @@
margin: 10rpx 0rpx;
/* padding: 20rpx 70rpx; */
/* background-color: azure; */
- min-width: 150rpx;
+ min-width: 350rpx;
/* margin: 0 auto; */
height: 50rpx;
text-align: center;
@@ -152,6 +257,22 @@
flex-direction: column;
justify-content: space-around;
}
+ .popup2 {
+ background-color: #eee;
+ width: 30vw;
+ height: 100%;
+ padding: 0 10vw;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ border-radius: 10rpx;
+ }
+ .popup3-input-title {
+ text-align: center;
+ margin: 10rpx;
+ font-size: 18px;
+ font-weight: bold;
+ }
.select {
position: absolute;
bottom: 12px;
@@ -162,4 +283,36 @@
inset -2px -2px 2px rgba(255, 255, 255, .7),
-2px -2px 2px rgba(0, 0, 0, .4);
}
+ .popup3 {
+ background-color: #eee;
+ max-height: 80vw;
+ width: 50vw;
+ padding: 0 10vw;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ border-radius: 10rpx;
+ color: #565656;
+ }
+ .popup3-input-title {
+ text-align: center;
+ margin: 10rpx;
+ font-size: 18px;
+ font-weight: bold;
+ }
+ .popup3-input-box {
+ display: flex;
+ border: 1px solid #cecece;
+ border-radius: 5rpx;
+ padding: 2rpx 10rpx;
+ margin: 20rpx;
+ }
+ .popup3-input-box2 {
+ display: flex;
+ border: 1px solid #cecece;
+ border-radius: 5rpx;
+ padding: 2rpx 10rpx;
+ margin: 10rpx;
+ background-color: #FFF;
+ }
</style>
--
Gitblit v1.9.1