From 9ffa3aedc9a537a16c2fff69a7161f87b5388020 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期一, 20 十月 2025 10:25:36 +0800
Subject: [PATCH] 新增agv拣料回库或者移动
---
pages/mat/moduleMat.vue | 138 ++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 127 insertions(+), 11 deletions(-)
diff --git a/pages/mat/moduleMat.vue b/pages/mat/moduleMat.vue
index 2810749..44c5a65 100644
--- a/pages/mat/moduleMat.vue
+++ b/pages/mat/moduleMat.vue
@@ -1,11 +1,34 @@
<template>
<view>
- <view class="card" v-for="item in data">
- <view class="card-title">
-
- </view>
-
+ <view class="back" @click="back()" v-show="backIds.length > 1">
+ <uni-icons class="opt-icon" type="left" size="20" color="#FFF"></uni-icons>
+ <text style="color: #FFF;">杩斿洖涓婁竴绾�</text>
</view>
+ <view class="card" v-for="item in data">
+ <view class="card-left" @click="getPageList(item.tagId,true)">
+ <view>搴忓彿: {{item.tagId}}</view>
+ <view>鍚嶇О: {{item.maktx}}</view>
+ <view>缂栫爜: {{item.matnr}}</view>
+ <view>瑙勬牸: {{item.specs}}</view>
+ </view>
+ <view class="card-right" @click="findBySelect(item.matnr)">
+ <uni-icons class="opt-icon" type="right" size="20" color="#b9b9b9"></uni-icons>
+ </view>
+ </view>
+ <!-- 寮圭獥閫夋嫨 -->
+ <uni-popup ref="inputDialog" type="dialog">
+ <view class="pop">
+ <view class="pop-btn" @click="select(1)">
+ 褰撳墠鐗╂枡
+ </view>
+ <view class="pop-btn" @click="select(2)">
+ 褰撳墠鑺傜偣鎵�鏈夌墿鏂�
+ </view>
+ <view class="pop-btn" @click="select(3)">
+ 瀛愯妭鐐规墍鏈夌墿鏂�
+ </view>
+ </view>
+ </uni-popup>
</view>
</template>
@@ -13,23 +36,116 @@
export default {
data() {
return {
- data: [
- {id:1,uuid:3},
- {id:2,uuid:4}
- ]
+ data: [],
+ uuid:1,
+ backId:1,
+ backIds: [],
+
}
},
+ onShow() {
+ this.baseUrl = uni.getStorageSync('baseUrl');
+ this.token = uni.getStorageSync('token');
+ this.getPageList('1',true)
+ },
methods: {
-
+ getPageList(tagId,flag) {
+ // console.log(tagId);
+
+ // console.log(this.backIds);
+ // console.log(this.backIds.length);
+ let _this = this
+ uni.request({
+ url: `${_this.baseUrl}/matV2/list/pda/page/auth`,
+ header: { 'token':uni.getStorageSync('token') },
+ data: {
+ curr: _this.curr,
+ limit: 20,
+ tagId: tagId
+ },
+ method:"GET",
+ success(res) {
+ res = res.data
+
+ if (res.data.records.length > 0) {
+ if (flag) {
+ _this.backIds.push(tagId)
+ }
+ _this.data = res.data.records
+ _this.backId = _this.uuid
+ _this.uuid = res.data.records[0].uuid
+ } else {
+ uni.showToast({title: '娌℃湁鏇村浜嗭紒', icon: "none", position: 'top'})
+ }
+ }
+ })
+ },
+ back() {
+ let a = this.backIds.length - 2
+ // console.log(this.backIds[a]);
+ this.getPageList(this.backIds[a],false)
+ this.backIds.pop()
+ // console.log("back:"+this.backIds);
+ },
+ typeShow() {
+ this.$refs.inputDialog.open()
+ },
+ findBySelect(matnr) {
+ this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: matnr});
+ uni.navigateBack({
+
+ })
+
+ }
}
}
</script>
<style>
+ .back {
+ height: 100rpx;
+ display: flex;
+ align-items: center;
+ line-height: 2;
+ background-color: #55aaff;
+ }
.card {
- background-color: antiquewhite;
+ background-color: #e3e3e3;
margin: 16rpx;
min-height: 50rpx;
border-radius: 16rpx;
+ display: flex;
+ align-items: stretch;
+ }
+ .card-left {
+ padding: 16rpx;
+ flex: 1;
+ }
+ .card-right {
+ width: 70rpx;
+ border-left: 1px solid #FFF;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ .opt-icon {
+ padding: 8rpx;
+ }
+ .pop {
+ min-height: 200rpx;
+ width: 80vw;
+ background-color: #55aaff;
+ border-radius: 20rpx;
+ color: #eee;
+ }
+ .pop-btn {
+ height: 100rpx;
+ line-height: 100rpx;
+ width: 100%;
+ text-align: center;
+ border-bottom: 1px solid #ccc;
+ }
+ .pop-btn:last-child {
+ border: none;
}
</style>
--
Gitblit v1.9.1