From 4a6319fa5be9ef5f9741c3507825667f523d9b2b Mon Sep 17 00:00:00 2001
From: xiaojiao <xiaojiao@kaokeziliao.com>
Date: 星期四, 30 四月 2026 09:27:12 +0800
Subject: [PATCH] 4-30 叫料&拉出空框代码已写完
---
项目代码/PDA/pages/Inbound/Inbound.vue | 60 ++++++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 44 insertions(+), 16 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/Inbound/Inbound.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/Inbound/Inbound.vue"
index cdc3d28..c82de69 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/Inbound/Inbound.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/Inbound/Inbound.vue"
@@ -60,18 +60,22 @@
</view> -->
<view style="padding: 5%;">
<uni-forms label-width="120">
+ <uni-forms-item label="闆朵欢缂栧彿:">
+ <uni-easyinput type="text" placeholder="璇锋壂鎻忛浂浠跺彿" ref='midInput' :focus="focus" v-model="materSn" @blur="inputChangebarcode" />
+ </uni-forms-item>
<uni-forms-item label="杞藉叿缂栧彿">
- <uni-easyinput type="text" :focus="barcodefocus" @input="inputChangebarcode"
+ <uni-easyinput type="text" :focus="barcodefocus1"
v-model="VehicleNumber" placeholder="璇疯緭鍏ヨ浇鍏风紪鍙�" ref='midInput' />
</uni-forms-item>
- <uni-forms-item label="闆朵欢缂栧彿:">
- <uni-easyinput type="text" placeholder="璇锋壂鎻忛浂浠跺彿" ref='midInput' :focus="focus" v-model="materSn" />
+ <uni-forms-item label="杞﹀瀷淇℃伅">
+ <uni-easyinput type="text"
+ v-model="Carmodel" placeholder="鑷姩鑾峰彇杞﹀瀷(闄ゅ紑鎵嬪姩杈撳叆闆朵欢鍙�)" ref='midInput' />
</uni-forms-item>
<uni-forms-item label="褰撳墠浣嶇疆:">
<uni-easyinput type="text" placeholder="璇疯緭鍏ュ鏂欑偣浣�" ref='midInput' :focus="focus2" v-model="Position"/>
</uni-forms-item>
</uni-forms>
- <button @click="GroupPlate" type="primary" size="default" style="margin-top: 2%;">缁勭洏</button>
+ <button @click="GroupPlate" type="primary" size="default" style="margin-top: 2%;">缁勭洏缁戝畾</button>
</view>
</view>
<view v-show="current === 1">
@@ -82,7 +86,7 @@
placeholder="璇疯緭鍏ユ墭鐩樼紪鐮�" ref='midInput' />
</uni-forms-item>
</uni-forms>
- <button @click="SolvePlate" type="primary" size="default" style="margin-top: 2%;">瑙g洏</button>
+ <button @click="SolvePlate" type="primary" size="default" style="margin-top: 2%;">瑙g粦</button>
</view>
</view>
<u-toast ref="luToast" />
@@ -103,6 +107,7 @@
istrue: false,
addressFocus:false,
barcodefocus: false,
+ barcodefocus1:false,
range: [],
rangethree:[],
group: [{
@@ -125,6 +130,7 @@
items: ['鐗╂枡缁戝畾', '鐗╂枡瑙g粦'],
current: 0,
Position: '', //瀹瑰櫒鎵�鍦ㄤ綅缃�
+ Carmodel:'', // 杞﹀瀷
}
},
onLoad(res) {
@@ -214,7 +220,10 @@
// })
// return;
// }
- if (this.VehicleNumber.length <= 0 || this.materSn.length <= 0 || this.Position.length <= 0) {
+ if (this.VehicleNumber.length <= 0
+ || this.materSn.length <= 0
+ || this.Position.length <= 0
+ || this.Carmodel.length <= 0) {
this.$refs.luToast.show({
title: "鏁版嵁杈撳叆涓嶅畬鏁�!",
type: "error"
@@ -225,7 +234,8 @@
var param = {
"VehicleNumber": this.VehicleNumber,
"materSn":this.materSn,
- "Position": this.Position
+ "Position": this.Position,
+ "Carmodel":this.Carmodel
}
console.log(param)
@@ -235,9 +245,7 @@
title: res.message,
type: "success"
})
- this.PalletCode2 = "";
- this.group = [];
- this.barcodefocus = false;
+ this.Init();
} else {
this.$refs.luToast.show({
title: res.message,
@@ -246,7 +254,12 @@
}
})
},
-
+ Init(){
+ this.VehicleNumber = '';
+ this.materSn = '';
+ this.Position = '';
+ this.Carmodel = '';
+ },
SolvePlate() {
if (this.PalletCode3.length <= 0) {
this.$refs.luToast.show({
@@ -258,7 +271,7 @@
var param = {
"PalletCode": this.PalletCode3,
}
- this.$u.post('/api/BoxingInfo/DeleteGroupPlateAsync', param).then(res => {
+ this.$u.post('/api/PDA/DeleteGroupPlateAsync?PalletCode='+this.PalletCode3, '').then(res => {
if (res.status) {
this.$refs.luToast.show({
title: res.message,
@@ -276,9 +289,9 @@
},
updateFocus() {
this.$nextTick(() => {
- this.materSn = '';
- if (!this.focus) {
- this.focus = true;
+ this.VehicleNumber = '';
+ if (!this.barcodefocus1) {
+ this.barcodefocus1 = true;
}
});
},
@@ -327,6 +340,21 @@
})
},
inputChangebarcode() {
+ var materSns = this.materSn;
+ console.log(materSns)
+ this.barcodefocus1 = true;
+ if(materSns.indexOf(',') === -1){
+ return;
+ }
+
+ // 1. 澶勭悊闆朵欢鍙凤紝鍙栨渶鍚庝竴娈�
+ this.materSn = materSns.split(',').pop();
+ // // 2. 澶勭悊杞﹀瀷锛屽彇绗竴娈�
+ this.Carmodel = materSns.split(',')[0];
+
+ // 3. 鍏抽敭锛氳繑鍥炲鐞嗗悗鐨勫�硷紝uni-easyinput浼氳嚜鍔ㄦ洿鏂皏-model鍜岀晫闈�
+ console.log('澶勭悊鍚庣殑闆朵欢鍙�:', this.materSn);
+
// this.$nextTick(() => {
// this.$u.post('/api/BoxingInfo/GetPalletCodeInfo?palletCode=' + this.PalletCode2, "").then(
// res => {
@@ -340,7 +368,7 @@
// }
// })
// })
- setTimeout(this.updateFocus, 200);
+
},
removeScanItem(orderNo) {
this.group = this.group.filter(item => item.orderNo !== orderNo);
--
Gitblit v1.9.3