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 | 136 +++++++++++++++++++++++++++++++++------------
1 files changed, 100 insertions(+), 36 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 5c0f969..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"
@@ -2,7 +2,7 @@
<view>
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem">
</uni-segmented-control>
- <view v-show="current === 0">
+ <!-- <view v-show="current === 0">
<view style="padding: 5%;">
<uni-forms label-width="120">
<uni-forms-item label="鎵樼洏缂栫爜">
@@ -20,9 +20,9 @@
</uni-forms>
<button @click="InboundTask" type="primary" size="default" style="margin-top: 2%;">鎼繍</button>
</view>
- </view>
- <view v-show="current === 1">
- <view style="padding: 5%;">
+ </view> -->
+ <view v-show="current === 0">
+ <!-- <view style="padding: 5%;">
<uni-forms label-width="120">
<uni-forms-item label="鎵樼洏缂栫爜">
<uni-easyinput type="text" :focus="barcodefocus" @input="inputChangebarcode"
@@ -57,9 +57,28 @@
</view>
</uni-forms>
<button @click="GroupPlate" type="primary" size="default" style="margin-top: 2%;">缁勭洏</button>
+ </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="barcodefocus1"
+ v-model="VehicleNumber" placeholder="璇疯緭鍏ヨ浇鍏风紪鍙�" ref='midInput' />
+ </uni-forms-item>
+ <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>
</view>
</view>
- <view v-show="current === 2">
+ <view v-show="current === 1">
<view style="padding: 5%;">
<uni-forms label-width="120">
<uni-forms-item label="鎵樼洏缂栫爜">
@@ -67,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" />
@@ -84,12 +103,19 @@
return {
barcodeFocus:true,
focus: false,
+ focus2:false,
istrue: false,
addressFocus:false,
barcodefocus: false,
+ barcodefocus1:false,
range: [],
rangethree:[],
- group: [],
+ group: [{
+ orderNo:1,
+ warehouseName:'hello娴嬭瘯',
+ materialNo:'123'
+ }
+ ],
AreaId: 0,
acrossFloor:0,
quantity: "",
@@ -97,10 +123,14 @@
TargetAddress: "",
PalletCode1: "",
PalletCode2: "",
+ VehicleNumber:"",// 杞藉叿缂栧彿
PalletCode3: "",
materSn: "",
- items: ['鍏ュ簱','鐗╂枡缁戝畾', '鐗╂枡瑙g粦'],
- current: 0
+ //items: ['鍏ュ簱','鐗╂枡缁戝畾', '鐗╂枡瑙g粦'],
+ items: ['鐗╂枡缁戝畾', '鐗╂枡瑙g粦'],
+ current: 0,
+ Position: '', //瀹瑰櫒鎵�鍦ㄤ綅缃�
+ Carmodel:'', // 杞﹀瀷
}
},
onLoad(res) {
@@ -182,27 +212,40 @@
}
})
},
- GroupPlate() {
- if (this.PalletCode2.length <= 0 && this.InBoundOrder.length) {
+ GroupPlate() { // 缁勭洏 鐗╂枡缁戝畾
+ // if (this.PalletCode2.length <= 0 && this.InBoundOrder.length) {
+ // this.$refs.luToast.show({
+ // title: "璇疯緭鍏ヨ捣鐐圭珯鍙�",
+ // type: "error"
+ // })
+ // return;
+ // }
+ if (this.VehicleNumber.length <= 0
+ || this.materSn.length <= 0
+ || this.Position.length <= 0
+ || this.Carmodel.length <= 0) {
this.$refs.luToast.show({
- title: "璇疯緭鍏ヨ捣鐐圭珯鍙�",
+ title: "鏁版嵁杈撳叆涓嶅畬鏁�!",
type: "error"
})
return;
}
+
var param = {
- "PalletCode": this.PalletCode2,
- "groups": this.group
+ "VehicleNumber": this.VehicleNumber,
+ "materSn":this.materSn,
+ "Position": this.Position,
+ "Carmodel":this.Carmodel
}
- this.$u.post('/api/BoxingInfo/AddGroupPlateAsync', param).then(res => {
+ console.log(param)
+
+ this.$u.post('/api/PDA/ContainerbindingAsync', param).then(res => {
if (res.status) {
this.$refs.luToast.show({
title: res.message,
type: "success"
})
- this.PalletCode2 = "";
- this.group = [];
- this.barcodefocus = false;
+ this.Init();
} else {
this.$refs.luToast.show({
title: res.message,
@@ -211,7 +254,12 @@
}
})
},
-
+ Init(){
+ this.VehicleNumber = '';
+ this.materSn = '';
+ this.Position = '';
+ this.Carmodel = '';
+ },
SolvePlate() {
if (this.PalletCode3.length <= 0) {
this.$refs.luToast.show({
@@ -223,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,
@@ -241,9 +289,9 @@
},
updateFocus() {
this.$nextTick(() => {
- this.materSn = '';
- if (!this.focus) {
- this.focus = true;
+ this.VehicleNumber = '';
+ if (!this.barcodefocus1) {
+ this.barcodefocus1 = true;
}
});
},
@@ -292,19 +340,35 @@
})
},
inputChangebarcode() {
- this.$nextTick(() => {
- this.$u.post('/api/BoxingInfo/GetPalletCodeInfo?palletCode=' + this.PalletCode2, "").then(
- res => {
- if (res.status) {
- this.group = res.data;
- console.log(this.group);
- setTimeout(this.updateFocus, 200);
- setTimeout(() => {
- this.voiceSpeech('../../static/success.mp3');
- }, 100);
- }
- })
- })
+ 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 => {
+ // if (res.status) {
+ // this.group = res.data;
+ // console.log(this.group);
+ // setTimeout(this.updateFocus, 200);
+ // setTimeout(() => {
+ // this.voiceSpeech('../../static/success.mp3');
+ // }, 100);
+ // }
+ // })
+ // })
+
},
removeScanItem(orderNo) {
this.group = this.group.filter(item => item.orderNo !== orderNo);
--
Gitblit v1.9.3