From bb78eba9be59bc1c5dee027161b97bf6a7a021af Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期三, 03 九月 2025 09:42:05 +0800
Subject: [PATCH] 1.新增agv组托入库和组托并补空托盘 2.新增agv搬运任务 3.新增agv补空托盘功能
---
pages/pakin/bomPakin.vue | 84 ++++++++++++++++++++++++++++++++++++------
1 files changed, 72 insertions(+), 12 deletions(-)
diff --git a/pages/pakin/bomPakin.vue b/pages/pakin/bomPakin.vue
index 0a5a612..38aa3b7 100644
--- a/pages/pakin/bomPakin.vue
+++ b/pages/pakin/bomPakin.vue
@@ -4,7 +4,7 @@
<view class="item">
<view class="code-decs">bom鍙�:</view>
<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="bomCode" :focus="bomCodeFocus"
- @input="bomInput()">
+ @confirm="bomInput()">
</view>
<view class="item">
<view class="code-decs">鎵樼洏鐮�:</view>
@@ -98,7 +98,7 @@
<view class="popup-item">
<view class="popup-item-left">鏁伴噺:</view>
<view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step='1' :max="maxAn" color="#747474" @change="changeValue" />
</view>
</view>
<view class="btn">
@@ -157,12 +157,13 @@
messageText: '',
title: '',
content: '',
- barcodeFocus: true,
+ barcodeFocus: false,
matFocus: false,
matData: '',
removeNum: 0,
bomCode: '',
- bomCodeFocus: false
+ bomCodeFocus: true,
+ maxAn: 0
}
},
onLoad() {
@@ -178,7 +179,17 @@
this.$refs.message.open()
},
bomInput() {
-
+ setTimeout(() => {
+ this.barcodeFocuss()
+ }, 200)
+ },
+ bomFocuss() {
+ let that = this;
+ that.bomCodeFocus = false;
+ setTimeout(() => {
+ that.bomCode = '';
+ that.bomCodeFocus = true;
+ }, 100);
},
// barcode input 浜嬩欢
barcodeInput() {
@@ -219,15 +230,43 @@
checkBom() {
let _this = this
uni.request({
- url: that.baseUrl + '/mobile/comb/checkBom',
+ url: _this.baseUrl + '/mobile/comb/checkBom',
data: JSON.stringify({
- bomCode: that.bomCode,
- matnr: that.matnr
+ bomCode: _this.bomCode,
+ matnr: _this.matnr
}),
method: 'POST',
header: { 'token': uni.getStorageSync('token') },
success(res) {
- console.log(res);
+ // console.log(res);
+ res = res.data
+ if (res.code === 200) {
+ if (res.data) {
+ _this.maxAnfme = res.data.zpalletAnfme
+ _this.findMat()
+ } else {
+ _this.findMat()
+ }
+ } else if (res.code == 403) {
+ uni.showToast({
+ title: res.msg,
+ icon: "none",
+ position: 'top'
+ })
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '../login/login'
+ });
+ }, 1000);
+ } else {
+ _this.matnr = ''
+ uni.showToast({
+ title: res.msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+
}
})
},
@@ -248,6 +287,11 @@
that.matData = result.data
that.matnr = ''
that.matData['batch'] = ''
+ if (that.maxAnfme > 0) {
+ that.matData['maxNum'] = that.maxAnfme
+ } else if (that.maxAnfme == 0){
+ that.matData['maxNum'] = 0
+ }
uni.navigateTo({
url: "../mat/matSelected",
// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
@@ -330,16 +374,26 @@
} else {
// 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
- this.dataList[i].anfme += mat.anfme
+
+ if (this.maxAnfme) {
+ this.dataList[i].anfme = this.maxAnfme
+ } else {
+ this.dataList[i].anfme += mat.anfme
+ }
this.$forceUpdate() // 寮哄埗鍒锋柊
add = false
}
}
}
if (add) {
+ if (this.maxAnfme) {
+ mat['maxAnfme'] = this.maxAnfme
+ mat.anfme = this.maxAnfme
+ }
this.dataList.unshift(mat)
}
this.$forceUpdate() // 寮哄埗鍒锋柊
+ this.maxAnfme = ''
},
// 淇敼鎵瑰彿
revise(item, i) {
@@ -347,6 +401,7 @@
this.count = this.dataList[i].anfme
this.batch = this.dataList[i].batch
this.weight = this.dataList[i].weight
+ this.maxAn = this.dataList[i].maxNum
this.rowNum = i
this.eject()
},
@@ -417,8 +472,9 @@
}
}
uni.request({
- url: that.baseUrl + '/mobile/comb/auth',
+ url: that.baseUrl + '/mobile/comb/auth2',
data: JSON.stringify({
+ bomCode: that.bomCode,
barcode: that.barcode,
combMats: that.dataList
}),
@@ -459,8 +515,11 @@
// 纭閲嶇疆
resetConfirm() {
this.dataList = []
+ this.barcode = ''
+ this.bomCode = ''
this.messageText = "閲嶇疆瀹屾垚"
this.messageToggle('success')
+ this.bomFocuss()
},
// 鍙栨秷閲嶇疆
resetClose() {
@@ -470,7 +529,8 @@
resst() {
this.dataList = []
this.barcode = ''
- this.barcodeFocuss()
+ this.bomCode = ''
+ this.bomFocuss()
},
}
}
--
Gitblit v1.9.1