From e6b2d108f49e2dc1d3c825704cb19e5557607420 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 06 八月 2025 10:11:35 +0800
Subject: [PATCH] PDA问题修复
---
pages/pakin/pakinSelector.vue | 99 +++++++++++++++++++++++++++++++++++++++++++++++--
pages/pakin/pakin.vue | 8 ++--
pages/stock/orderBindSeed.vue | 2
3 files changed, 99 insertions(+), 10 deletions(-)
diff --git a/pages/pakin/pakin.vue b/pages/pakin/pakin.vue
index a30f575..8d5e75a 100644
--- a/pages/pakin/pakin.vue
+++ b/pages/pakin/pakin.vue
@@ -214,18 +214,18 @@
// 鎼滅储鐗╂枡
findMat() {
let that = this
- if (that.matnr == null && that.matnr == '') {
+ if (that.matnr == null || that.matnr == '') {
uni.showToast({
- title: "鐗╂枡鐮佷笉鑳戒负绌猴紒锛�",
+ title: "璁㈠崟鍙蜂笉鑳戒负绌猴紒锛�",
icon: "none",
position: "top"
})
return;
- } else {
+ }
uni.navigateTo({
url: "../pakin/pakinSelector?barcode=" + that.matnr,
});
- }
+
},
checkMat(mat) {
diff --git a/pages/pakin/pakinSelector.vue b/pages/pakin/pakinSelector.vue
index 931a7ad..eb8e799 100644
--- a/pages/pakin/pakinSelector.vue
+++ b/pages/pakin/pakinSelector.vue
@@ -1,5 +1,13 @@
<template>
<view>
+ <view class="item">
+ <view class="code-decs">鐗╂枡鐮�:</view>
+ <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" >
+ <view class="item-right">
+ <text style="text-align: right;color: #409EFF;" @click="findMat()">鏌ヨ</text>
+ <uni-icons type="right" color="#c1c1c1"></uni-icons>
+ </view>
+ </view>
<scroll-view>
<view class="tag-list" v-for="(item,i) in matData" :key="i" @click="showTag(item)">
<!-- <view class="tag">
@@ -49,6 +57,8 @@
return {
matData: [],
barcode: '',
+ matnr: null,
+ matFocus: false,
}
},
onLoad(option) {
@@ -56,8 +66,7 @@
},
onShow() {
-
- this.getMats(this.barcode)
+ this.getMats(this.barcode, null)
},
methods: {
@@ -78,20 +87,27 @@
},
},
});
+ },
+
+ findMat() {
+ console.log("--------->");
+ this.getMats(this.barcode, this.matnr)
},
/**
* 鑾峰彇褰撳墠璁㈠崟涓嬫墍鏈夌墿鏂欐槑缁�
* @param {Object} barcode
*/
- getMats(barcode) {
+ getMats(barcode, matnr) {
+ console.log(matnr);
let that = this
uni.request({
// url: that.baseUrl + '/mat/auth',
url: uni.getStorageSync('baseUrl') + '/pda/mat/auth',
method:'POST',
data: JSON.stringify({
- barcode: barcode,
+ barcode: barcode,
+ matnr: matnr
}),
header: {
'token': uni.getStorageSync('token')
@@ -130,7 +146,7 @@
<style>
@import url('../../static/css/wms.css/wms.css');
.tag-list {
- width: 94%;
+ width: 92%;
min-height: 160rpx;
margin: 15rpx;
padding: 15rpx;
@@ -161,3 +177,76 @@
font-size: 14px;
}
</style>
+<style>
+ @import url('../../static/css/wms.css/wms.css');
+
+ .uni-section {
+ margin-top: 0rpx;
+
+ .uni-section__content-title {
+ font-size: 16px !important;
+ }
+ }
+
+ .list {
+ border-radius: unset;
+ margin: auto;
+ margin-top: 20rpx;
+ padding: 10rpx;
+ }
+
+ .list-view {
+ width: 100%;
+ position: relative;
+ }
+
+ .list:first-child {
+ margin-top: 320rpx;
+ }
+ .code {
+ width: 100%;
+ position: fixed;
+ min-height: 200rpx;
+ background-color: #FFF;
+ z-index: 10;
+ }
+
+ .item {
+ display: flex;
+ align-items: center;
+ height: 100rpx;
+ margin-left: 20rpx;
+ border-bottom: 1px solid #DCDFE6;
+ }
+
+ .item input {
+ height: 50rpx;
+ line-height: 50rpx;
+ /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
+ font-size: 36upx;
+ font-family: PingFang SC;
+ width: 55vw;
+
+ }
+
+ .code-decs {
+ width: 20vw;
+ font-size: 18px;
+ color: #303133;
+ }
+
+ .item-right {
+ margin-left: auto;
+ margin-right: 20rpx;
+ }
+
+ .mat-list-title {
+ height: 80rpx;
+ line-height: 80rpx;
+ width: 100%;
+ background-color: white;
+ position: relative;
+ font-weight: 500;
+ z-index: 9;
+ }
+</style>
\ No newline at end of file
diff --git a/pages/stock/orderBindSeed.vue b/pages/stock/orderBindSeed.vue
index fd22ef6..735fb73 100644
--- a/pages/stock/orderBindSeed.vue
+++ b/pages/stock/orderBindSeed.vue
@@ -11,7 +11,7 @@
</view>
<view class="view-bg">
<uni-section title="瀹瑰櫒" type="line" />
- <input maxlength="8" placeholder="PDA鎵弿鎵樼洏/鏂欑鏍囩" v-model="barcode"/>
+ <input maxlength="20" placeholder="PDA鎵弿鎵樼洏/鏂欑鏍囩" v-model="barcode"/>
</view>
<view class="button-sp-buttom">
--
Gitblit v1.9.1