From 5472dae39d4604828772493595ee2e8b41f4e145 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期二, 21 十月 2025 09:17:41 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/wldlz' into wldlz
---
pages/order/orderPakin2.vue | 5 ++
pages/pakin/pakinQuery.vue | 88 ++++++++++++-------------------------------
2 files changed, 29 insertions(+), 64 deletions(-)
diff --git a/pages/order/orderPakin2.vue b/pages/order/orderPakin2.vue
index 938edcf..e035dc9 100644
--- a/pages/order/orderPakin2.vue
+++ b/pages/order/orderPakin2.vue
@@ -4,7 +4,8 @@
<view class="item">
<view class="code-decs">璁㈠崟鍙�:</view>
<view style="flex: 1;">
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="orderNoFocus">
+ <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="orderNoFocus"
+ @input="orderNoInput()">
</view>
<view style="height:100%;line-height:2;width:40rpx;margin-right: 20rpx;">
<uni-icons type="clear" color="#c1c1c1" @click="clearOrderNo()"></uni-icons>
@@ -191,6 +192,7 @@
}, 100);
},
orderNoInput() {
+ this.orderNo = this.orderNo.replace(/^\{|\}$/g, '')
// 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
setTimeout(() => {
var len = this.orderNo.length
@@ -199,6 +201,7 @@
},
// barcode input 浜嬩欢
barcodeInput() {
+ this.barcode = this.barcode.replace(/^\{|\}$/g, '')
// 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
setTimeout(() => {
var len = this.barcode.length
diff --git a/pages/pakin/pakinQuery.vue b/pages/pakin/pakinQuery.vue
index 0a9b59f..2c55755 100644
--- a/pages/pakin/pakinQuery.vue
+++ b/pages/pakin/pakinQuery.vue
@@ -6,18 +6,10 @@
<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
@input="barcodeInput()">
</view>
- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <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>
- <uni-icons type="right" color="#c1c1c1"></uni-icons>
- </view>
- </view>
</view>
<view class="mat-list-title">
- 鍟嗗搧鍒楄〃
+ 鍟嗗搧鍒楄〃--鎵樼洏鐮侊細{{abarcode}}
+
</view>
<scroll-view>
<view class="list" v-for="(item,i) in dataList" :key="i">
@@ -46,27 +38,17 @@
<uni-tag :text="item.batch" type="warning"></uni-tag>
</view>
</view>
- <!-- <view class="list-left-item">
- <view class="desc">閲嶉噺锛�</view>
- <view class="left-item">
- <uni-tag :text="item.weight" type="warning"></uni-tag>
- </view>
- </view> -->
<view class="list-left-item">
<view class="desc">鏁伴噺锛�</view>
<view class="left-item">{{item.anfme}}</view>
</view>
- </view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
</view>
</view>
</scroll-view>
<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
<view class="buttom">
<button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">缁勬墭</button>
+ <!-- <button size="mini" type="primary" @click="combConfirm('warn')">缁勬墭</button> -->
</view>
<!-- 寮圭獥 -->
<!-- 淇敼鏁伴噺 -->
@@ -156,6 +138,7 @@
matFocus: false,
matData: '',
removeNum: 0,
+ abarcode: '',
}
},
onLoad() {
@@ -199,55 +182,20 @@
},
// 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
focuss() {
- this.barcodeFocus = false;
- this.matFocus = false;
- setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
- }, 100);
- },
- // 鎼滅储鐗╂枡
- findMat() {
let that = this
- var mat = that.matnr
- let submitMat
- let newMatnr
- if (mat.includes(';')) {
- newMatnr = mat.split(';')
- submitMat = newMatnr[1]
- } else {
- submitMat = mat
- }
uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: submitMat
- },
+ url: that.baseUrl + '/mobile/barcode/auth?barcode='+this.barcode,
header: {
'token': uni.getStorageSync('token')
},
success(result) {
result = result.data
+ console.log(result.data)
if (result.code === 200 && result.data) {
- that.matData = result.data
- that.matnr = ''
- that.matData['batch'] = ''
- uni.navigateTo({
- url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
- res.eventChannel.emit('mat', {
- data: result.data
- })
- },
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- events: {
- matList: function(data) {
- that.checkMat(data.data)
- that.focuss()
- },
- },
- });
+ that.dataList=result.data;
+ that.barcode = "";
+ that.abarcode = result.data[0].zpallet
+ that.barcodeFocus = true
} else if (result.code == 403) {
uni.showToast({
title: result.msg,
@@ -266,9 +214,22 @@
position: 'top'
})
}
-
+
}
});
+ },
+ // 鎼滅储鐗╂枡
+ findMat() {
+ let that = this
+ var mat = that.matnr
+ let submitMat
+ let newMatnr
+ if (mat.includes(';')) {
+ newMatnr = mat.split(';')
+ submitMat = newMatnr[1]
+ } else {
+ submitMat = mat
+ }
},
selectMat() {
@@ -443,6 +404,7 @@
// 纭閲嶇疆
resetConfirm() {
this.dataList = []
+ this.barcode = ''
this.messageText = "閲嶇疆瀹屾垚"
this.messageToggle('success')
},
--
Gitblit v1.9.1