From 63dcb7fc55d32960f643f4040900ce9a0e33536d Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期一, 20 十月 2025 17:25:56 +0800
Subject: [PATCH] 1
---
项目代码/PDA/pages/task/Inbound.vue | 148 ++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 122 insertions(+), 26 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Inbound.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Inbound.vue"
index 888d8cf..01cda1b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Inbound.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Inbound.vue"
@@ -6,16 +6,20 @@
<view style="padding: 5%;">
<uni-forms label-width="120">
<uni-forms-item label="鎵樼洏缂栫爜">
- <uni-easyinput type="text" :focus="!istrue" @input="carNoInputChange" v-model="PalletCode"
- placeholder="璇疯緭鍏ユ墭鐩樼紪鐮�" ref='midInput' />
+ <uni-easyinput type="text" :focus="!istrue" v-model="PalletCode1" placeholder="璇疯緭鍏ユ墭鐩樼紪鐮�"
+ ref='midInput' />
</uni-forms-item>
<uni-forms-item label="鍏ュ簱璧风偣">
- <uni-easyinput type="text" :focus="istrue" v-model="SourceAddress"
- placeholder="璇疯緭鍏ュ叆搴撹捣鐐�" ref='midInput' />
+ <uni-easyinput type="text" :focus="istrue" v-model="SourceAddress" placeholder="璇疯緭鍏ュ叆搴撹捣鐐�"
+ ref='midInput' />
</uni-forms-item>
<uni-forms-item label="鍏ュ簱缁堢偣">
- <uni-easyinput type="text" :focus="!istrue" @input="carNoInputChange" v-model="TargetAddress"
- placeholder="璇疯緭鍏ュ叆搴撶粓鐐�" ref='midInput' />
+ <uni-easyinput type="text" :focus="istrue" v-model="TargetAddress" placeholder="璇疯緭鍏ュ叆搴撶粓鐐�"
+ ref='midInput' />
+ </uni-forms-item>
+ <uni-forms-item label="缁� 鐐� 鍖� 鍩�">
+ <uni-data-select :focus="!istrue" v-model="AreaId" :localdata="range"
+ placeholder="璇疯緭閫夋嫨鍏ュ簱缁堢偣鍖哄煙"></uni-data-select>
</uni-forms-item>
</uni-forms>
<button @click="InboundTask" type="primary" size="default" style="margin-top: 2%;">鍏ュ簱</button>
@@ -26,19 +30,50 @@
<view style="padding: 5%;">
<uni-forms label-width="120">
<uni-forms-item label="鎵樼洏缂栫爜">
- <uni-easyinput type="text" :focus="barcodefocus" @input="inputChangebarcode" v-model="Barcode"
+ <uni-easyinput type="text" :focus="barcodefocus" @input="inputChangebarcode"
+ v-model="PalletCode2" placeholder="璇疯緭鍏ユ墭鐩樼紪鐮�" ref='midInput' />
+ </uni-forms-item>
+ <uni-forms-item label="澶栫鏍囩:">
+ <uni-easyinput type="text" placeholder="璇锋壂鎻忓绠辨爣绛�" ref='midInput' :focus="focus" v-model="materSn"
+ @input="snInput" />
+ </uni-forms-item>
+ <uni-list>
+ <!-- <uni-list-item direction="column" v-for="item in InBoundOrder" :key="item.matCode">
+ <template v-slot:body>
+ <view class="uni-list-box">
+ <view class="uni-content">
+ <view class="uni-title-sub uni-ellipsis-2">璁㈠崟鍞竴缂栫爜锛歿{item.orderNo}}</view>
+ </view>
+ </view>
+ </template>
+ </uni-list-item> -->
+ <uni-list-item direction="column" v-for="(item,index) in InBoundOrder" :key="item.sn">
+ <template v-slot:body>
+ <view class="uni-list-box">
+ <uni-icons type="trash" size="22" style="position: absolute;right: 5%;"
+ @click="deleteList(item.orderNo)">
+ </uni-icons>
+ <view class="uni-content">
+ <view class="uni-title-sub uni-ellipsis-2">璁㈠崟鍙凤細{{item.orderNo}}</view>
+ </view>
+ </view>
+ </template>
+ </uni-list-item>
+ </uni-list>
+ </uni-forms>
+ <button @click="OutboundTask" type="primary" size="default" style="margin-top: 2%;">缁勭洏</button>
+ <u-toast ref="OutboundTaskluToast" />
+ </view>
+ </view>
+ <view v-show="current === 2">
+ <view style="padding: 5%;">
+ <uni-forms label-width="120">
+ <uni-forms-item label="鎵樼洏缂栫爜">
+ <uni-easyinput type="text" :focus="barcodefocus" @input="inputChange" v-model="PalletCode3"
placeholder="璇疯緭鍏ユ墭鐩樼紪鐮�" ref='midInput' />
</uni-forms-item>
- <uni-forms-item label="鍑哄簱璧风偣">
- <uni-easyinput type="text" :focus="barcodefocus" v-model="StartAddress"
- placeholder="璇疯緭鍏ュ嚭搴撹捣鐐�" ref='midInput' />
- </uni-forms-item>
- <uni-forms-item label="鍑哄簱缁堢偣">
- <uni-easyinput type="text" :focus="barcodefocus" v-model="EndAddress"
- placeholder="璇疯緭鍏ュ嚭搴撶粓鐐�" ref='midInput' />
- </uni-forms-item>
</uni-forms>
- <button @click="OutboundTask" type="primary" size="default" style="margin-top: 2%;">鍑哄簱</button>
+ <button @click="OutboundTask" type="primary" size="default" style="margin-top: 2%;">瑙g洏</button>
<u-toast ref="OutboundTaskluToast" />
</view>
</view>
@@ -47,21 +82,30 @@
</template>
<script>
+ import {
+ config
+ } from '../../common/config';
+ const innerAudioContext = uni.createInnerAudioContext();
export default {
data() {
return {
istrue: false,
barcodefocus: false,
range: [],
- EndAddress: "",
- StartAddress: "",
- Barcode: "",
- TargetAddress:"",
- PalletCode: "",
+ AreaId: "",
SourceAddress: "",
- items: ['鍏ュ簱', '鍑哄簱'],
+ TargetAddress: "",
+ PalletCode1: "",
+ PalletCode2: "",
+ PalletCode3: "",
+ materSn: "",
+ InBoundOrder: [],
+ items: ['鍏ュ簱', '缁勭洏', '瑙g洏'],
current: 0
}
+ },
+ onLoad(res) {
+ this.range = config.AreaId;
},
methods: {
onClickItem(e) {
@@ -80,7 +124,7 @@
var param = {
"PalletCode": this.PalletCode,
"Position": this.SourceAddress,
- "TargetAddress":this.TargetAddress
+ "TargetAddress": this.TargetAddress
}
console.log(param);
this.$u.post('/api/Task/RequestTaskAsync', param).then(res => {
@@ -91,7 +135,7 @@
})
this.PalletCode = "";
this.SourceAddress = "";
- this.TargetAddress="";
+ this.TargetAddress = "";
this.istrue = false;
} else {
this.$refs.InboundTaskluToast.show({
@@ -112,7 +156,7 @@
var param = {
"PalletCode": this.Barcode,
"Position": this.StartAddress,
- "TargetAddress":this.EndAddress
+ "TargetAddress": this.EndAddress
}
this.$u.post('/api/Task/RequestOutTaskAsync', param).then(res => {
if (res.status) {
@@ -122,7 +166,7 @@
})
this.Barcode = "";
this.EndAddress = "";
- this.StartAddress="";
+ this.StartAddress = "";
this.barcodefocus = false;
} else {
this.$refs.OutboundTaskluToast.show({
@@ -132,6 +176,58 @@
}
})
},
+ snInput() {
+ this.$nextTick(() => {
+ var matObj = {
+ orderNo: this.materSn,
+ }
+ var temp = this.InBoundOrder.find(x => x.orderNo == matObj.orderNo);
+ console.log(temp)
+ if (!temp) {
+ this.InBoundOrder.push(matObj);
+ setTimeout(this.updateFocus, 200);
+ setTimeout(() => {
+ this.voiceSpeech('../../static/success.mp3');
+ }, 100);
+ } else {
+ this.$refs.uToast.show({
+ title: "鎵爜閲嶅",
+ type: "error"
+ })
+ setTimeout(this.updateFocus, 200);
+ setTimeout(() => {
+ this.voiceSpeech('../../static/fail.mp3');
+ }, 100);
+ }
+
+ })
+ },
+ // deleteList(res) {
+ // this.matInfos.map((item, index) => {
+ // if (item.orderNo == res) {
+ // this.matInfos.splice(index, 1);
+
+ // }
+ // })
+ // this.orderNo.map((item, index) => {
+ // if (item == res) {
+ // this.orderNo.splice(index, 1);
+ // }
+ // })
+ // },
+ deleteList(res) {
+ // 鍒犻櫎matInfos涓璷rderNo鍖归厤椤�
+ this.matInfos = this.matInfos.filter(item => item.orderNo !== res);
+
+ // 鍒犻櫎orderNo涓尮閰嶉」
+ this.orderNo = this.orderNo.filter(item => item !== res);
+
+ // 鍙�夛細娣诲姞鍒犻櫎鍙嶉
+ this.$refs.uToast.show({
+ title: `宸插垹闄�: ${res}`,
+ type: "success"
+ });
+ }
}
}
</script>
--
Gitblit v1.9.3