From e6b2d108f49e2dc1d3c825704cb19e5557607420 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 06 八月 2025 10:11:35 +0800
Subject: [PATCH] PDA问题修复
---
pages/stock/changePallet.vue | 84 ++++++++++++++++++++---------------------
1 files changed, 41 insertions(+), 43 deletions(-)
diff --git a/pages/stock/changePallet.vue b/pages/stock/changePallet.vue
index 913c6ac..552613b 100644
--- a/pages/stock/changePallet.vue
+++ b/pages/stock/changePallet.vue
@@ -2,12 +2,12 @@
<view>
<view class="code">
<view class="item">
- <view class="code-decs">鍘熸墭鐩�:</view>
+ <view class="code-decs">婧愬簱浣�:</view>
<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
@input="barcodeInput()">
</view>
<view class="item">
- <view class="code-decs">鏂版墭鐩�:</view>
+ <view class="code-decs">鐩爣搴撲綅:</view>
<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="tBarcode" :focus="focus" @input="checkBarcode()">
</view>
</view>
@@ -24,16 +24,16 @@
<view class="list-left-item">
<view class="desc">缂栫爜锛�</view>
<view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
+ <uni-tag :text="item.mats.matnrNo" type="primary"></uni-tag>
</view>
</view>
<view class="list-left-item">
<view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
+ <view class="left-item">{{item.mats.matnrName}}</view>
</view>
<view class="list-left-item">
<view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
+ <view class="left-item">{{item.mats.tspec}}</view>
</view>
<view class="list-left-item">
<view class="desc">鎵瑰彿锛�</view>
@@ -123,37 +123,29 @@
// barcode input 浜嬩欢
barcodeInput() {
let that = this
- if (this.barcode.length != 8) {
- uni.showToast({title: '鎵樼洏鐮侀暱搴﹀紓甯�,璇烽噸鏂版壂鎻�', icon: "none", position: 'top'})
- this.barcodeFocuss()
- }
- if (that.barcode.length == 8) {
- uni.request({
- url: that.baseUrl + '/mobile/piking/auth',
- header: {
- 'token':uni.getStorageSync('token')
- },
- data: {barcode:that.barcode},
- success(res) {
- res = res.data
- if(res.code===200) {
- that.dataList = res.data
- that.focuss()
- } else if (res.code == 403) {
- uni.showToast({title: res.msg, icon: "none", position: 'top'})
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
- } else {
- that.barcodeFocuss()
- uni.showToast({title: res.msg, icon: "none",position: 'top'})
- }
- }
- })
-
- }
+ uni.request({
+ url: that.baseUrl + '/pda/flat/transfer/' + that.barcode,
+ header: {
+ 'token':uni.getStorageSync('token')
+ },
+ success(res) {
+ res = res.data
+ if(res.code===200) {
+ that.dataList = res.data
+ that.focuss()
+ } else if (res.code == 403) {
+ uni.showToast({title: res.msg, icon: "none", position: 'top'})
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '../login/login'
+ });
+ }, 1000);
+ } else {
+ that.barcodeFocuss()
+ uni.showToast({title: res.msg, icon: "none",position: 'top'})
+ }
+ }
+ })
},
// 鎵樼洏鐮佹湁璇噸缃�
barcodeFocuss() {
@@ -165,10 +157,11 @@
}, 100);
},
checkBarcode() {
- if (this.tBarcode.length != 8) {
- uni.showToast({title: '鎵樼洏鐮侀暱搴﹀紓甯�,璇烽噸鏂版壂鎻�', icon: "none", position: 'top'})
- this.focuss()
- }
+ // if (!this.tBarcode.indexOf("B") >= 0 || !this.tBarcode.indexOf("C") >= 0) {
+ // uni.showToast({title: '搴撲綅鐮佸紓甯�,璇烽噸鏂版壂鎻�', icon: "none", position: 'top'})
+ // this.focuss()
+ // }
+
},
// 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
focuss() {
@@ -214,11 +207,12 @@
changePallet() {
let that = this
uni.request({
- url: that.baseUrl + '/mobile/piking/to/full',
+ url: that.baseUrl + '/pda/locs/transfer',
+ method:'POST',
header: {
'token':uni.getStorageSync('token')
},
- data: {sBarcode:that.barcode,tBarcode:that.tBarcode},
+ data: {barcode:that.barcode, tarCode:that.tBarcode},
success(res) {
res = res.data
if (res.code === 200) {
@@ -246,7 +240,11 @@
<style>
@import url('../../static/css/wms.css/wms.css');
-
+
+ .list:first-child {
+ margin-top: 340rpx;
+ }
+
.code {
width: 100%;
position: fixed;
--
Gitblit v1.9.1