From ce40df5daffae0d17b4e9fa7cb6d677afaa4d66f Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期五, 17 十月 2025 11:20:30 +0800
Subject: [PATCH] 更新最新程序,ERP代码,MES代码等
---
项目代码/龙利得PDA/pages/stash/boxing.vue | 249 +++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 228 insertions(+), 21 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/pages/stash/boxing.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/pages/stash/boxing.vue"
index 2c7b93c..e99e356 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/pages/stash/boxing.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/pages/stash/boxing.vue"
@@ -10,6 +10,10 @@
<uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="!focus"
v-model="barcode" @confirm="barcodeInput" />
</uni-forms-item>
+ <uni-forms-item label="RFID:">
+ <uni-easyinput type="text" v-model="rfid" placeholder="璇锋壂鎻忕焊鍗稲FID" ref='midInput'
+ :focus="focus" />
+ </uni-forms-item>
<uni-forms-item label="鐗╂枡:">
<uni-easyinput type="text" placeholder="璇疯緭鍏ョ墿鏂�" ref='midInput' v-model="materSn" />
</uni-forms-item>
@@ -22,6 +26,10 @@
<uni-forms-item label="閲嶉噺:">
<uni-easyinput type="text" trim="all" placeholder="璇疯緭鍏ラ噸閲�(kg)" ref='midInput'
v-model="weight" />
+ </uni-forms-item>
+ <uni-forms-item label="鎬婚暱:">
+ <uni-easyinput type="text" trim="all" placeholder="璇疯緭鍏ユ�婚暱(m)" ref='midInput'
+ v-model="lengthStock" />
</uni-forms-item>
<uni-forms-item>
<button @click="submit" type="primary" size="default" style="margin-top: 2%;">缁勭洏</button>
@@ -41,8 +49,11 @@
<uni-forms-item label="鐗╂枡缂栫爜">
<uni-easyinput type="text" v-model="matCode" placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" ref='midInput' />
</uni-forms-item>
- <uni-forms-item label="鐗╂枡鏁伴噺">
- <uni-easyinput type="number" v-model="matCount" placeholder="璇疯緭鍏ョ墿鏂欐暟閲�" ref='midInput' />
+ <uni-forms-item label="鍗曚釜鏁伴噺">
+ <uni-easyinput type="number" v-model="OneCount" placeholder="璇疯緭鍏ュ崟涓暟閲�" ref='midInput' />
+ </uni-forms-item>
+ <uni-forms-item label="鐗╂枡鎬绘暟">
+ <uni-easyinput type="number" v-model="matCount" placeholder="璇疯緭鍏ョ墿鏂欐�绘暟" ref='midInput' />
</uni-forms-item>
<uni-forms-item>
<button @click="inbound" type="primary" size="default" style="margin-top: 2%;">鍏ュ簱纭</button>
@@ -51,7 +62,19 @@
</view>
</view>
<view v-if="current === 1" class="headerstyle">
- <view class="itemstyle">
+ <view class="itemstyle" v-if="warehouseId==1">
+ <uni-forms label-width="180">
+ <uni-forms-item label="鏉$爜:">
+ <uni-easyinput type="text" placeholder="璇锋壂鎻忕焊鍗锋潯鐮�" ref='midInput' :focus="!focus"
+ v-model="bindCode" @confirm="barcodeInput" />
+ </uni-forms-item>
+
+ <uni-forms-item>
+ <button @click="Bindrfid" type="primary" size="default" style="margin-top: 2%;">缁戝畾</button>
+ </uni-forms-item>
+ </uni-forms>
+ </view>
+ <view class="itemstyle" v-else>
<uni-forms label-width="120">
<uni-forms-item label="鎵樼洏鏉$爜">
<uni-easyinput type="text" :focus="!addressEmptyFocus" v-model="emptyCode"
@@ -63,6 +86,27 @@
</uni-forms-item>
<uni-forms-item>
<button @click="inEmpty" type="primary" size="default" style="margin-top: 2%;">鍏ュ簱纭</button>
+ </uni-forms-item>
+ </uni-forms>
+ </view>
+ </view>
+ <view v-if="current === 2" class="headerstyle">
+
+ <view class="itemstyle">
+ <uni-forms label-width="120">
+ <uni-forms-item label="鐗╂枡缂栫爜">
+ <uni-easyinput type="text" v-model="materialCode" placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" ref='midInput' />
+ </uni-forms-item>
+ <uni-forms-item label="鍑哄簱鏁伴噺">
+ <uni-easyinput type="number" v-model="outCount" placeholder="璇疯緭鍏ュ嚭搴撴暟閲�" ref='midInput' />
+ </uni-forms-item>
+ <uni-forms-item label="鍑哄簱鐐逛綅">
+ <uni-data-select placeholder="璇烽�夋嫨" v-model="targetId"
+ :localdata="startPointRange"></uni-data-select>
+ </uni-forms-item>
+ <uni-forms-item>
+ <button @click="OutBound" type="primary" size="default"
+ style="margin-top: 2%;">鍑哄簱纭</button>
</uni-forms-item>
</uni-forms>
</view>
@@ -81,6 +125,7 @@
materSn: "",
wide: "",
weight: "",
+ lengthStock: "",
thickness: "",
barcode: "",
focus: false,
@@ -97,24 +142,35 @@
matCount: 0,
matCode: "", //鐗╂枡缂栫爜
addressEmpty: "",
+ OneCount: 0,
+ targetId: "",
+ materialCode: "",
+ bindCode: "",
+ rfidCode: "",
+ rfid:"",
+ outCount: 0,
addressEmptyFocus: false,
+ startPointRange: []
}
},
onShow() {},
onLoad(res) {
this.focus = false;
this.addressFocus = false;
- this.Test=false;
+ this.Test = false;
this.warehouseId = res.warehouseId;
if (this.warehouseId == 1) {
- this.items = ['缁勭洏'];
+ this.items = ['缁勭洏','缁戝畾RFID'];
}
if (this.warehouseId == 2) {
//浠呮樉绀簎ni-segmented-control涓�1鍜�2鐨勫��
this.items.push('杈呮枡鍏ュ簱');
this.items.push('绌烘墭鍏ュ簱');
+ this.items.push('鎵嬪姩鍑哄簱');
//this.items绉婚櫎缁勭洏
- this.items.splice(0,1);
+ this.items.splice(0, 1);
+ console.log(this.items)
+ this.getDictionary();
}
},
methods: {
@@ -139,10 +195,10 @@
} else {
this.addressEmptyFocus = false;
}
-
- if(this.inboundCode){
+
+ if (this.inboundCode) {
this.addressEmptyFocus = true;
- }else {
+ } else {
this.addressEmptyFocus = false;
}
},
@@ -187,22 +243,113 @@
})
})
},
- inbound() {
- if (this.matCount <= 0) {
+ OutBound(){
+ if (this.materialCode == "") {
this.$refs.uToast.show({
- title: "璇疯緭鍏ョ墿鏂欐暟閲�",
+ title: "璇疯緭鍏ョ墿鏂�",
type: "error"
})
return;
}
- if(!this.Test){
+ if (this.outCount <= 0) {
this.$refs.uToast.show({
- title: "璇风‘璁ょ墿鏂欐暟閲�"+this.matCount,
- type: "info"
+ title: "璇疯緭鍏ュ嚭搴撴暟閲�",
+ type: "error"
})
- this.Test=true;
return;
}
+ if (this.targetId == "") {
+ this.$refs.uToast.show({
+ title: "璇烽�夋嫨鍑哄簱鐐逛綅",
+ type: "error"
+ })
+ return;
+ }
+ var url = "?materialCode=" + this.materialCode+ "&outCount=" + this.outCount + "&targetId=" + this.targetId;
+ this.$u.post('/api/Task/RequestCPWMSTaskOut' + url, {}).then(res => {
+ if (res.status) {
+ this.materialCode = "";
+ this.outCount = 0;
+ this.targetId = "";
+ setTimeout(() => {
+ this.$refs.uToast.show({
+ title: "鎴愬姛",
+ type: "success"
+ })
+ }, 200);
+ } else {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: "error"
+ })
+ }
+ }).catch(err => {
+ this.$refs.uToast.show({
+ title: err.message,
+ type: "error"
+ })
+ })
+ },
+ getDictionary() {
+ var param = ["agvStationAreaEnum"];
+ this.$u.post('api/Sys_Dictionary/GetVueDictionary', param).then(res => {
+ //灏唕es.data涓殑value鏀规垚text锛宬ey鏀规垚value
+ res[0].data.forEach(item => {
+ var obj = {
+ value: item.key,
+ text: item.value
+ }
+ this.startPointRange.push(obj);
+ })
+ }).catch(err => {
+ this.$refs.uToast.show({
+ title: err.message,
+ type: "error"
+ })
+ })
+ },
+ Bindrfid(){
+ if (this.bindCode == "") {
+ this.$refs.uToast.show({
+ title: "璇疯緭鍏ユ潯鐮�",
+ type: "error"
+ })
+ return;
+ }
+
+ var url = "?palletCode=" + this.bindCode;
+ this.$u.post('/api/Task/PurchaseBoxing' + url, {}).then(res => {
+ if (res.status) {
+ this.bindCode = "";
+ this.rfidCode = "";
+ setTimeout(() => {
+ this.$refs.uToast.show({
+ title: "鎴愬姛",
+ type: "success"
+ })
+ }, 200);
+ } else {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: "error"
+ })
+ }
+ }).catch(err => {
+ this.$refs.uToast.show({
+ title: err.message,
+ type: "error"
+ })
+ })
+ },
+ inbound() {
+ if (this.matCount <= 0) {
+ this.$refs.uToast.show({
+ title: "璇疯緭鍏ョ墿鏂欐�绘暟",
+ type: "error"
+ })
+ return;
+ }
+
if (this.inboundCode == "") {
this.$refs.uToast.show({
title: "璇锋壂鎻忔墭鐩樻潯鐮�",
@@ -210,7 +357,7 @@
})
return;
}
- if (this.address== "") {
+ if (this.address == "") {
this.$refs.uToast.show({
title: "璇锋壂鎻忓湴鍧�鏉$爜",
type: "error"
@@ -224,16 +371,31 @@
})
return;
}
-
+ if (this.OneCount <= 0) {
+ this.$refs.uToast.show({
+ title: "璇疯緭鍏ュ崟涓暟閲�",
+ type: "error"
+ })
+ return;
+ }
+ if (!this.Test) {
+ this.$refs.uToast.show({
+ title: "璇风‘璁ょ墿鏂欐暟閲�" + this.matCount,
+ type: "info"
+ })
+ this.Test = true;
+ return;
+ }
var url = "?barCode=" + this.inboundCode + "&startPoint=" + this.address + "&matCode=" + this
- .matCode + "&matCount=" + this.matCount;
+ .matCode + "&matCount=" + this.matCount + "&oneCount=" + this.OneCount;
this.$u.post('/api/Task/InboundFLTask' + url, {}).then(res => {
if (res.status) {
this.inboundCode = "";
this.address = "";
this.matCode = "";
this.matCount = 0;
- this.Test=false;
+ this.Test = false;
+ this.OneCount = 0;
//鑾峰彇鎬绘暟閲�
setTimeout(() => {
this.addressEmptyFocus = false;
@@ -247,7 +409,7 @@
title: res.message,
type: "error"
})
- this.Test=false;
+ this.Test = false;
}
}).catch(err => {
this.$refs.uToast.show({
@@ -264,6 +426,48 @@
})
return;
}
+ if(this.rfid==""){
+ this.$refs.uToast.show({
+ title: "璇锋壂鎻廟FID",
+ type: 'error'
+ })
+ return;
+ }
+ if (this.thickness == "") {
+ this.$refs.uToast.show({
+ title: "璇疯緭鍏ョ洿寰�",
+ type: 'error'
+ })
+ return;
+ }
+ if (this.weight == "") {
+ this.$refs.uToast.show({
+ title: "璇疯緭鍏ラ噸閲�",
+ type: 'error'
+ })
+ return;
+ }
+ if (this.wide == "") {
+ this.$refs.uToast.show({
+ title: "璇疯緭鍏ュ箙瀹�",
+ type: 'error'
+ })
+ return;
+ }
+ if (this.materSn == "") {
+ this.$refs.uToast.show({
+ title: "璇疯緭鍏ョ墿鏂�",
+ type: 'error'
+ })
+ return;
+ }
+ if (this.lengthStock == "") {
+ this.$refs.uToast.show({
+ title: "璇疯緭鍏ユ�婚暱",
+ type: 'error'
+ })
+ return;
+ }
this.$u.post('/api/StockInfo/ManualMaterielGroup', {
MainData: {
"palletCode": this.barcode,
@@ -271,6 +475,8 @@
"weight": this.weight,
"wide": this.wide,
"materSn": this.materSn,
+ "lengthStock": this.lengthStock,
+ "fridCode":this.rfid,
// "isFull": this.check
"warehouseId": this.warehouseId
},
@@ -286,6 +492,7 @@
this.materSn = "";
this.wide = "";
this.weight = "";
+ this.lengthStock = "";
this.thickness = "";
} else {
this.$refs.uToast.show({
--
Gitblit v1.9.3