From 885092869d8a27a0b77d6e55d3dd3f00f29e8002 Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期四, 04 十二月 2025 15:45:48 +0800
Subject: [PATCH] 1
---
项目代码/PDA/pages/task/Outbound.vue | 113 +++++++++++---------------------------------------------
1 files changed, 23 insertions(+), 90 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Outbound.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Outbound.vue"
index 4f75041..24d74b8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Outbound.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/PDA/pages/task/Outbound.vue"
@@ -5,63 +5,31 @@
<view v-show="current === 0">
<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-forms-item>
- <uni-forms-item label="鎼繍璧风偣">
- <uni-easyinput type="text" :focus="istrue" v-model="SourceAddress"
- placeholder="璇疯緭鍏GV鎼繍璧风偣" ref='midInput' />
- </uni-forms-item>
- <uni-forms-item label="鎼繍缁堢偣">
- <uni-easyinput type="text" :focus="!istrue" @input="carNoInputChange" v-model="TargetAddress"
- placeholder="璇疯緭鍏GV鎼繍缁堢偣" ref='midInput' />
+ <uni-forms-item label="鎵樼洏鏉$爜">
+ <uni-easyinput type="text" :focus="barcodeFocus" v-model="PalletCode" placeholder="璇疯緭鍏ユ墭鐩樻潯鐮�"
+ ref='midInput'/>
</uni-forms-item>
</uni-forms>
- <button @click="InboundTask" type="primary" size="default" style="margin-top: 2%;">鎼繍</button>
- <u-toast ref="InboundTaskluToast" />
+ <button @click="InboundTask" type="primary" size="default" style="margin-top: 2%;">鍑哄簱</button>
</view>
</view>
- <view v-show="current === 1">
- <view style="padding: 5%;">
- <uni-forms label-width="120">
- <uni-forms-item label="鎵� 鐩� 缂� 鐮�">
- <uni-easyinput type="text" :focus="barcodefocus" @input="inputChangebarcode" v-model="Barcode"
- 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>
- <u-toast ref="OutboundTaskluToast" />
- </view>
- </view>
- </view>
+ <u-toast ref="luToast" />
</view>
</template>
<script>
+ const innerAudioContext = uni.createInnerAudioContext();
export default {
data() {
return {
- istrue: false,
- barcodefocus: false,
- range: [],
- EndAddress: "",
- StartAddress: "",
- Barcode: "",
- TargetAddress:"",
+ barcodeFocus:true,
PalletCode: "",
- SourceAddress: "",
- items: ['鎼繍', '璺ㄦゼ灞�'],
+ items: ['鍑哄簱'],
current: 0
}
+ },
+ onLoad() {
+
},
methods: {
onClickItem(e) {
@@ -69,70 +37,35 @@
this.current = e.currentIndex;
}
},
+ voiceSpeech(src) {
+ innerAudioContext.src = src; // '../../static/success.mp3';
+ innerAudioContext.play();
+ },
InboundTask() {
- if (this.PalletCode.length <= 0 && this.Point.length) {
- this.$refs.InboundTaskluToast.show({
- title: "鎵樼洏缂栫爜璺熺粦瀹氳揣浣嶄笉鑳戒负绌�",
+ if (this.PalletCode.length <= 0) {
+ this.$refs.luToast.show({
+ title: "鎵樼洏鏉$爜涓嶈兘涓虹┖",
type: "error"
})
return;
}
- var param = {
- "PalletCode": this.PalletCode,
- "Position": this.SourceAddress,
- "TargetAddress":this.TargetAddress
- }
- console.log(param);
- this.$u.post('/api/Task/RequestAGVCarryTaskAsync', param).then(res => {
+ this.$u.post('/api/Task/OutBoundTaskAsync?palletCode='+this.PalletCode+'&remark=""').then(res => {
if (res.status) {
- this.$refs.InboundTaskluToast.show({
+ this.$refs.luToast.show({
title: res.message,
type: "success"
})
this.PalletCode = "";
- this.SourceAddress = "";
- this.TargetAddress="";
- this.istrue = false;
+ this.barcodeFocus=true;
} else {
- this.$refs.InboundTaskluToast.show({
+ this.$refs.luToast.show({
title: res.message,
type: "error"
})
}
})
},
- OutboundTask() {
- if (this.EndAddress.length <= 0 && this.Barcode.length) {
- this.$refs.OutboundTaskluToast.show({
- title: "璇疯緭鍏ヨ捣鐐圭珯鍙�",
- type: "error"
- })
- return;
- }
- var param = {
- "PalletCode": this.Barcode,
- "Position": this.StartAddress,
- "TargetAddress":this.EndAddress
- }
- this.$u.post('/api/Task/RequestAcrossFloorTaskAsync', param).then(res => {
- if (res.status) {
- this.$refs.OutboundTaskluToast.show({
- title: res.message,
- type: "success"
- })
- this.Barcode = "";
- this.EndAddress = "";
- this.StartAddress="";
- this.barcodefocus = false;
- } else {
- this.$refs.OutboundTaskluToast.show({
- title: res.message,
- type: "error"
- })
- }
- })
- },
- }
+ }
}
</script>
--
Gitblit v1.9.3