From b38d60e4cc25c1a6f809c9652f87071d92179f2f Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 24 九月 2025 15:25:20 +0800
Subject: [PATCH] pda新增修改
---
pages/AGV/AGVMoveCall.vue | 5 +
pages/home/home.vue | 2
pages/mat/matSelected.vue | 27 ++++++--
pages/mat/matQuery.vue | 70 +++++++++++++----------
pages/AGV/AGVPakin.vue | 41 +++++++------
5 files changed, 87 insertions(+), 58 deletions(-)
diff --git a/pages/AGV/AGVMoveCall.vue b/pages/AGV/AGVMoveCall.vue
index d2932da..c8a0fbe 100644
--- a/pages/AGV/AGVMoveCall.vue
+++ b/pages/AGV/AGVMoveCall.vue
@@ -11,7 +11,8 @@
</view>
<view class="item">
<view class="code-decs">鐩爣搴撲綅:</view>
- <uni-combox :candidates="staList" placeholder="璇烽�夋嫨绔欑偣" v-model="tarSite"></uni-combox>
+ <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="tarSite" >
+ <!-- <uni-combox :candidates="staList" placeholder="璇烽�夋嫨绔欑偣" v-model="tarSite"></uni-combox> -->
</view>
</view>
<view class="mat-list-title">
@@ -157,7 +158,7 @@
success(result) {
result = result.data
if (result.code === 200 && result.data) {
- staResults.push(...result.data);
+ staResults.push(...result.data);
staResults.forEach(item => {
that.staList.push(item?.locNo)
})
diff --git a/pages/AGV/AGVPakin.vue b/pages/AGV/AGVPakin.vue
index 67a6b9e..f4bb153 100644
--- a/pages/AGV/AGVPakin.vue
+++ b/pages/AGV/AGVPakin.vue
@@ -16,7 +16,7 @@
<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
<view class="item-right">
<button></button>
- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
+ <!-- <text style="text-align: right;color: #409EFF;" @click="findMat()">鎻愬彇+</text> -->
<uni-icons type="right" color="#c1c1c1"></uni-icons>
</view>
</view>
@@ -30,6 +30,12 @@
<view class="list-left-item">
<view class="desc">No锛�</view>
<view class="left-item">{{i + 1}}</view>
+ </view>
+ <view class="list-left-item">
+ <view class="desc">璁㈠崟鍙凤細</view>
+ <view class="left-item">
+ <uni-tag :text="item.orderNo" type="primary"></uni-tag>
+ </view>
</view>
<view class="list-left-item">
<view class="desc">鏂欏彿锛�</view>
@@ -146,7 +152,7 @@
baseUrl: '',
token: '',
barcode: '',
- orderNo: '',
+ orderNo: null,
dataList: [],
count: 0,
rowNum: '',
@@ -182,7 +188,7 @@
// 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
setTimeout(() => {
var len = this.orderNo.length
- this.barcodeFocuss()
+ // this.barcodeFocuss()
}, 200)
},
barcodeInput() {
@@ -221,16 +227,11 @@
// 鎼滅储鐗╂枡
findMat() {
let that = this
- // 鍒ゆ柇鐗╂枡闀垮害鏄惁涓�1
- // if (that.dataList.length >= 1) {
- // this.messageText = "鍙兘娣诲姞涓�绉嶇墿鏂�"
- // this.messageToggle('warn')
- // that.matnr = ''
- // return
- // }
uni.request({
- url: that.baseUrl + '/mat/auth',
+ url: that.baseUrl + '/mobile/scan/order/mats',
+ method: 'POST',
data: {
+ orderNo: that.orderNo,
matnr: that.matnr
},
header: {
@@ -258,9 +259,9 @@
},
},
});
- } else if (res.code == 403) {
+ } else if (result.code == 403) {
uni.showToast({
- title: res.msg,
+ title: result.msg,
icon: "none",
position: 'top'
})
@@ -271,24 +272,28 @@
}, 1000);
} else {
uni.showToast({
- title: res.msg,
+ title: result.msg,
icon: "none",
position: 'top'
})
}
-
}
});
-
},
selectMat() {
let that = this
+ if (that.orderNo == null || that.orderNo == undefined ) {
+ that.messageText = '璇峰~鍐欒鍗曠紪鍙凤紒锛�'
+ that.messageToggle('error')
+ return;
+ }
+
uni.navigateTo({
url: "../mat/matQuery",
success: function(res) {
// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('commonUrl', {
- commonUrl: ''
+ res.eventChannel.emit('orderNo', {
+ orderNo: that.orderNo
})
},
events: {
diff --git a/pages/home/home.vue b/pages/home/home.vue
index ebc5de7..1d1b162 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -68,7 +68,7 @@
url: '/AGV/AGVPakin'
},
{
- title: '鍛煎彨Agv',
+ title: 'Agv鍏ュ簱',
name: 'AGVMoveCall',
color: 'green',
cuIcon: 'pullup',
diff --git a/pages/mat/matQuery.vue b/pages/mat/matQuery.vue
index 7ae5f5a..557ea98 100644
--- a/pages/mat/matQuery.vue
+++ b/pages/mat/matQuery.vue
@@ -1,30 +1,36 @@
<template>
<view>
- <!-- 鎼滅储妗� -->
- <view class="search-bar">
- <uni-search-bar v-model="condition" placeholder=" 鎵爜 / 杈撳叆" bgColor="#EEEEEE" @confirm="search" />
+ <view class="form">
+ <view class="form-item">
+ <view class="form-item-desc"><text>鍟嗗搧缂栫爜</text></view>
+ <view class="form-item-content"><text>{{mat.matnr}}</text></view>
+ </view>
+ <view class="form-item">
+ <view class="form-item-desc"><text>鍟嗗搧鍚嶇О</text></view>
+ <view class="form-item-content" style="word-break: break-all;line-height: 1.5;"><text>{{mat.maktx}}</text></view>
+ </view>
+ <view class="form-item">
+ <view class="form-item-desc"><text>瑙勬牸</text></view>
+ <view class="form-item-content"><text>{{mat.specs}}</text></view>
+ </view>
+ <view class="form-item">
+ <view class="form-item-desc"><text>鎵瑰彿</text></view>
+ <view class="form-item-content">
+ <view class="form-input">
+ <input type="text" v-model="mat.batch">
+ </view>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="form-item-desc"><text>鏁伴噺</text></view>
+ <view class="form-item-content">
+ <uni-number-box :value="mat.anfme" :max="99999999" :step='1' color="#747474" @change="changeValue" />
+ </view>
+ </view>
</view>
- <scroll-view>
- <view class="tag-list" v-for="(item,i) in tagList" :key="i" @click="showTag(item.id)">
- <view class="tag">
- <view style="display: flex;">
- <view class="wms-tag" :style="baColor" >鍒嗙被</view>
- </view>
- </view>
- <view class="tag-item">{{item.name}}</view>
- </view>
- </scroll-view>
- <view>
- <view class="tag-list" v-for="(item,i) in matList" :key="i" @click="findBySelect(item.matnr)">
- <view class="tag">
- <view style="display: flex;">
- <view class="wms-tag" :style="baColor" >鍟嗗搧</view>
- </view>
- </view>
- <view class="tag-item">鍟嗗搧缂栧彿锛� {{item.matnr}}</view>
- <view class="tag-item" style="word-break: break-all;width: 90%;">鍟嗗搧鍚嶇О锛� {{item.maktx ? item.maktx : '--'}}</view>
- <view class="tag-item">鍟嗗搧瑙勬牸锛� {{item.specs ? item.specs : '--'}}</view>
- </view>
+ <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
+ <view class="buttom">
+ <button size="mini" type="primary" @click="back()">鎻愬彇</button>
</view>
<uni-load-more v-show="matList.length != 0" :status="status" :icon-size="16" :content-text="contentText" />
</view>
@@ -43,6 +49,7 @@
baColor: "background-color: #0081ff;",
desc: '鍟嗗搧缂栧彿:',
baseUrl: '',
+ orderNo: '',
token: '',
status: 'more',
contentText: {
@@ -60,21 +67,24 @@
this.showMat(this.tagIdNow);
}
},
- onLoad() {
+ onLoad(option) {
// 娌″暐鐢ㄤ簡
let that = this
- // const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
+ // #ifdef APP-NVUE
+ const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
+ // #endif
+ // #ifndef APP-NVUE
const eventChannel = this.getOpenerEventChannel();
-
+ // #endif
// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- eventChannel.on('commonUrl', function(data) {
- that.commonUrl = data.commonUrl
+ eventChannel.on('orderNo', function(data) {
+ that.orderNo = data.orderNo
+ that.showTag(data.orderNo)
})
},
onShow() {
this.baseUrl = uni.getStorageSync('baseUrl');
this.token = uni.getStorageSync('token');
- this.showTag(10009)
},
methods: {
search() {
diff --git a/pages/mat/matSelected.vue b/pages/mat/matSelected.vue
index efaaf5a..552ed50 100644
--- a/pages/mat/matSelected.vue
+++ b/pages/mat/matSelected.vue
@@ -1,6 +1,10 @@
<template>
<view>
- <view class="form">
+ <view class="form" v-for="mat in mats">
+ <view class="form-item">
+ <view class="form-item-desc"><text>璁㈠崟鍙�</text></view>
+ <view class="form-item-content"><text>{{mat.orderNo}}</text></view>
+ </view>
<view class="form-item">
<view class="form-item-desc"><text>鍟嗗搧缂栫爜</text></view>
<view class="form-item-content"><text>{{mat.matnr}}</text></view>
@@ -24,7 +28,7 @@
<view class="form-item">
<view class="form-item-desc"><text>鏁伴噺</text></view>
<view class="form-item-content">
- <uni-number-box :value="mat.anfme" :max="99999999" :step='1' color="#747474" @change="changeValue" />
+ <uni-number-box :value="mat.enableQty" :max="99999999" :step='1' color="#747474" @change="changeValue" />
</view>
</view>
</view>
@@ -46,6 +50,8 @@
batch: null,
anfme: 0,
},
+ selectNum: null,
+ mats: null,
baseIP:'',
basePORT:'',
}
@@ -61,8 +67,7 @@
// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
eventChannel.on('mat', function(data) {
- that.mat = data.data
- that.mat.anfme = 0
+ that.mats = data.data
})
@@ -75,14 +80,22 @@
},
changeValue(value) {
- this.mat.anfme = value
+ this.mats[0].anfme = value
+ this.selectNum = value
},
back() {
- if (this.mat.anfme === 0) {
+ if (this.mats[0].anfme === 0) {
uni.showToast({title: '璇疯緭鍏ユ暟閲�', icon: "none", position: 'top'});
return;
}
- this.getOpenerEventChannel().emit('matList', {data: this.mat});
+ console.log("=======>");
+ console.log(this.mats[0]);
+ if (this.selectNum != null) {
+ this.mats[0].anfme = this.selectNum
+ } else {
+ this.mats[0].anfme = this.mats[0].enableQty
+ }
+ this.getOpenerEventChannel().emit('matList', {data: this.mats[0]});
uni.navigateBack({
})
--
Gitblit v1.9.1