From 733c975cd8647f6d006736f1863bad731e32e6fb Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期日, 26 十月 2025 17:15:52 +0800
Subject: [PATCH] 上传最新代码,ERP接口,MES接口优化,WMS业务优化等
---
项目代码/龙利得PDA/pages/stash/boxing.vue | 839 +++++++++++++++++++++++++----------------------------------
1 files changed, 359 insertions(+), 480 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 ead7682..3999008 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"
@@ -4,132 +4,110 @@
</uni-segmented-control>
<view class="content">
<view v-if="current === 0" class="headerstyle">
- <view class="itemstyle">
+ <view class="itemstyle" v-if="warehouseId==1">
<uni-forms label-width="180">
- <uni-forms-item label="鎵樼洏鏉$爜:">
+ <uni-forms-item label="鏉$爜:">
<uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="!focus"
- v-model="barcode" @input="barcodeInput" />
+ v-model="barcode" @confirm="barcodeInput" />
</uni-forms-item>
- <uni-forms-item label="鍐呯鏍囩:">
- <uni-easyinput type="text" placeholder="璇锋壂鎻忓唴绠辨爣绛�" ref='midInput' :focus="focus"
- v-model="materSn" @input="snInput" />
+ <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="Testlabel" v-if="Test">
- <uni-easyinput type="text" :placeholder="Testplaceholder" ref='midInput'
- v-model="Initiallife" />
+ <uni-forms-item label="鐗╂枡:">
+ <uni-easyinput type="text" placeholder="璇疯緭鍏ョ墿鏂�" ref='midInput' v-model="materSn" />
</uni-forms-item>
- <!-- <uni-forms-item>
- <checkbox checked="check">鏄惁婊$洏</checkbox>
- </uni-forms-item> -->
+ <uni-forms-item label="鐩村緞:">
+ <uni-easyinput type="text" placeholder="璇疯緭鍏ョ洿寰�(mm)" ref='midInput' v-model="thickness" />
+ </uni-forms-item>
+ <uni-forms-item label="骞呭:">
+ <uni-easyinput type="text" placeholder="璇疯緭鍏ュ箙瀹�(mm)" ref='midInput' v-model="wide" />
+ </uni-forms-item>
+ <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>
</uni-forms-item>
</uni-forms>
- <uni-list>
- <!-- <uni-list-item direction="column" v-for="item in matTotal" :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.matCode}}</view>
- <view class="uni-title-sub uni-ellipsis-2">鏁伴噺锛歿{item.matQuantity}}</view>
- </view>
- </view>
- </template>
- </uni-list-item> -->
- <uni-list-item direction="column" v-for="(item,index) in matInfos" :key="index">
- <template v-slot:body>
- <view class="uni-list-box">
- <uni-icons type="trash" size="22" style="position: absolute;right: 5%;"
- @click="deleteList(index)">
- </uni-icons>
- <view class="uni-content">
- <view class="uni-title-sub uni-ellipsis-2">閲囪喘鍗曞彿锛歿{item.purchaseOrderNo}}</view>
- <view class="uni-note">鐗╂枡缂栫爜锛歿{item.materielCode}}</view>
- <view class="uni-note">鎵规鍙凤細{{item.lotNo}}</view>
- <view class="uni-note">鏁伴噺锛歿{item.quantity}}</view>
- <view class="uni-note">鐢熶骇鏃ユ湡锛歿{item.productionDate}}</view>
- <view class="uni-note">鏈夋晥鏈燂細{{item.effectiveDate}}</view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
</view>
- </view>
- <view v-if="current === 1" class="headerstyle">
- <view class="itemstyle">
+ <view class="itemstyle" v-else>
<uni-forms label-width="120">
<uni-forms-item label="鎵樼洏鏉$爜">
- <uni-easyinput type="text" :focus="!addressFocus" v-model="inboundBarcode"
- placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' @input="inputChangebarcode" />
+ <uni-easyinput type="text" :focus="!addressEmptyFocus" v-model="inboundCode"
+ placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' @confirm="inputChangeemptyCode" />
</uni-forms-item>
<uni-forms-item label="鍦板潃鏉$爜">
- <uni-easyinput type="text" v-model="address" :disabled="addressdisabled"
- placeholder="璇锋壂鎻忓湴鍧�鏉$爜" ref='midInput' :focus="addressFocus" />
+ <uni-easyinput type="text" v-model="address" placeholder="璇锋壂鎻忓湴鍧�鏉$爜" ref='midInput'
+ :focus="addressEmptyFocus" />
+ </uni-forms-item>
+ <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="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>
</uni-forms-item>
</uni-forms>
</view>
- <view>
- <uni-list>
- <uni-list-item direction="column" v-if="inboundBarcode">
- <template v-slot:body>
- <view class="uni-list-box">
- <view class="uni-content">
- <view class="uni-title-sub uni-ellipsis-2">缁勭洏鎬绘暟閲忥細{{Summmary}}</view>
- </view>
- </view>
- </template>
- </uni-list-item>
- <uni-list-item direction="column" v-for="(item,index) in stockInfoDetail" :key="index">
- <template v-slot:body>
- <view class="uni-list-box">
- <view class="uni-content">
- <view class="uni-title-sub uni-ellipsis-2">鐗╂枡缂栧彿锛歿{item.materielCode}}</view>
- <view class="uni-note">鐗╂枡鍚嶇О锛歿{item.materielName}}</view>
- <view class="uni-note">鐗╂枡鎵规锛歿{item.batchNo}}</view>
- <view class="uni-note">缁勭洏鏁伴噺锛歿{item.stockQuantity}}</view>
- <view class="uni-note">鐢熶骇鏃ユ湡锛歿{item.productionDate}}</view>
- <view class="uni-note">鏈� 鏁� 鏈燂細{{item.effectiveDate}}</view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
+ </view>
+ <view v-if="current === 1" class="headerstyle">
+ <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"
+ placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' @confirm="inputChangeemptyCode" />
+ </uni-forms-item>
+ <uni-forms-item label="鍦板潃鏉$爜">
+ <uni-easyinput type="text" v-model="addressEmpty" placeholder="璇锋壂鎻忓湴鍧�鏉$爜" ref='midInput'
+ :focus="addressEmptyFocus" />
+ </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="180">
- <uni-forms-item label="鍐呯鏍囩:">
- <uni-easyinput type="text" placeholder="璇锋壂鎻忓唴绠辨爣绛�" ref='midInput' :focus="pkfocus"
- v-model="pkmaterSn" @input="pksnInput" />
+ <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="pksubmit" type="primary" size="default" style="margin-top: 2%;">鍏ュ钩搴�</button>
+ <button @click="OutBound" type="primary" size="default"
+ style="margin-top: 2%;">鍑哄簱纭</button>
</uni-forms-item>
</uni-forms>
- <uni-list>
- <uni-list-item direction="column" v-for="(item,index) in pkmatInfos" :key="index">
- <template v-slot:body>
- <view class="uni-list-box">
- <uni-icons type="trash" size="22" style="position: absolute;right: 5%;"
- @click="pkdeleteList(index)">
- </uni-icons>
- <view class="uni-content">
- <view class="uni-title-sub uni-ellipsis-2">閲囪喘鍗曞彿锛歿{item.purchaseOrderNo}}</view>
- <view class="uni-note">鐗╂枡缂栫爜锛歿{item.materielCode}}</view>
- <view class="uni-note">鎵规鍙凤細{{item.lotNo}}</view>
- <view class="uni-note">鏁伴噺锛歿{item.quantity}}</view>
- <view class="uni-note">鐢熶骇鏃ユ湡锛歿{item.productionDate}}</view>
- <view class="uni-note">鏈夋晥鏈燂細{{item.effectiveDate}}</view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
</view>
</view>
</view>
@@ -142,367 +120,110 @@
export default {
data() {
return {
- items: ['缁勭洏', '鍏ュ簱'], //, '鍗曟嵁淇℃伅', '瑙g洏'
- current: 0,
- matTotal: [],
- matInfos: [],
- orderNo: "",
- label: "",
- orderInfo: [],
- focus: false,
- pkfocus: false,
- barcode: "",
+ items: ['缁勭洏'], //, '鍗曟嵁淇℃伅', '瑙g洏'
materSn: "",
- Initiallife: 1000,
- sns: [],
- sn: "",
- addressFocus: false,
+ wide: "",
+ weight: "",
+ lengthStock: "",
+ thickness: "",
+ barcode: "",
+ focus: false,
inboundBarcode: "",
address: "",
- check: true,
- value: "",
- matInfo: [],
- value2: "",
- matTotals: [],
+ addressdisabled: true,
+ addressFocus: false,
+ current: 0,
+ inboundCode: "",
+ orderNo: "",
warehouseId: "",
Test: false,
- Testlabel: "",
- Testplaceholder: "",
- Testcheck: false,
- Summmary: 0,
- stockInfoDetail: [],
- addressdisabled: false,
- pksns: [],
- pkmaterSn: "",
- pkmatInfos: []
+ emptyCode: "",
+ 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.orderNo = res.orderNo;
+ this.Test = false;
this.warehouseId = res.warehouseId;
- if (this.warehouseId == 6) { //娴嬭瘯鏋朵粨搴撳尯ID
- this.Test = true;
- this.Testlabel = "鍒濆瀵垮懡:";
- this.Testplaceholder = "璇疯緭鍏ュ垵濮嬪鍛�";
- } else if (this.warehouseId == 2) { //娌瑰ⅷ浠撳簱鍖篒D
- this.Test = true;
- this.Testlabel = "鏁伴噺:";
- this.Testplaceholder = "璇疯緭鍏ユ暟閲�";
- this.Initiallife = 16;
- } else if (this.warehouseId == 5) { //杈呮枡浠撳簱鍖篒D
- this.address = "8005";
- this.items.push("鍏ュ钩搴�");
- this.items[1] = "鍏ョ珛搴�";
- this.address = "8005";
- } else if (this.warehouseId == 3) { //杈呮枡浠撳簱鍖篒D
- this.address = "1011";
- this.addressdisabled = true;
+ if (this.warehouseId == 1) {
+ this.items = ['缁勭洏','缁戝畾RFID'];
}
- this.label = "鍗曟嵁缂栧彿锛�" + this.orderNo;
- this.getData();
+ 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);
+ console.log(this.items)
+ this.getDictionary();
+ }
},
methods: {
- // voiceSpeech(src) {
- // innerAudioContext.src = src; // '../../static/success.mp3';
- // innerAudioContext.play();
- // },
- //wms鍏ュ钩搴�
- pksubmit() {
- if (this.pkmatInfos.length == 0) {
- this.$refs.uToast.show({
- title: "璇锋壂鎻忓唴绠辨爣绛�",
- type: 'error'
- })
- return;
- }
- this.$u.post('/api/InboundOrder/WMSInPinKu?warehouseId=' + this.warehouseId, this
- .pksns).then(res => {
- debugger
- if (res.status) {
- this.$refs.uToast.show({
- title: "鍏ュ簱鎴愬姛",
- type: "success"
- })
- this.focus = false;
- this.pkmatInfos = [];
- this.pksns = [];
- } else {
- this.$refs.uToast.show({
- title: res.message,
- type: "error"
- })
- }
- })
- },
- pksnInput() {
- this.$nextTick(() => {
- if (this.pkmaterSn != "") {
- this.focus = false;
- var matSn = this.pkmaterSn;
- setTimeout(() => {
- this.pkmaterSn = "";
- }, 10);
- this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => {
- if (res.status) {
- this.pksns.push(res.data.serialNumber);
- this.pkmatInfos.push(res.data);
- if (!res.status) {
- this.$refs.uToast.show({
- title: res.message,
- type: "error"
- })
- // setTimeout(() => {
- // this.voiceSpeech('../../static/fail.mp3');
- // }, 100);
- return;
- }
- // setTimeout(() => {
- // this.voiceSpeech('../../static/success.mp3');
- // }, 100);
- return;
- } else {
- this.$refs.uToast.show({
- title: res.message,
- type: "error"
- })
- // setTimeout(() => {
- // this.voiceSpeech('../../static/fail.mp3');
- // }, 100);
- }
- })
- }
- })
- },
- //瑙g洏
- releasebox() {
- if (this.value.length == 0) {
- this.$refs.uToast.show({
- title: "璇锋壂鐮�",
- type: "error"
- })
- return;
- }
- var param;
- var matInfo = this.value.split('|');
- if (matInfo.length == 7) {
- param = {
- MainData: {
- "innerCode": this.value
- }
- }
- } else {
- param = {
- MainData: {
- "barcode": this.value
- }
- }
- }
- this.$u.post('/api/StockOperate/ReleaseAllBox', param).then(resdt => {
- if (resdt.status) {
- uni.$showMsg('瑙g洏鎴愬姛!')
- this.value = "";
- this.matInfo = [];
- this.matTotals = [];
- this.value2 = "";
- } else {
- this.$refs.uToast.show({
- title: resdt.message,
- type: "error"
- })
- }
- })
- },
- releaseboxInput() {
- this.$nextTick(() => {
- if (this.value.length == 0) {
- return;
- }
- var matInfo = this.value.split('|');
- this.matInfo = [];
- if (matInfo.length == 7) {
- this.$u.post('/api/StockOperate/GetStockInfoByInnerCode', {
- MainData: {
- "innerCode": this.value
- }
- }).then(res => {
- if (res.status) {
- this.matInfo = res.data.stockInfo;
- this.matTotals = res.data.stockTotal;
- this.value2 = res.data.barcode;
- } else {
- this.$refs.uToast.show({
- title: res.message,
- type: "error"
- })
- }
- })
- } else {
- this.$u.post('/api/StockOperate/GetStockInfoByBarcode', {
- MainData: {
- "barcode": this.value
- }
- }).then(res => {
- if (res.status) {
- this.matInfo = res.data.stockInfo;
- this.matTotals = res.data.stockTotal;
- this.value2 = res.data.barcode;
- } else {
- this.$refs.uToast.show({
- title: res.message,
- type: "error"
- })
- }
- })
- }
- })
- },
-
- updateFocus() {
- debugger
- this.$nextTick(() => {
- this.materSn = '';
- if (!this.focus) {
- this.focus = true;
- }
- });
- },
- barcodeFocus() {
- debugger
- this.barcode = '';
- if (this.focus) {
- this.focus = false;
- }
- },
- getData() {
- var postData = {
- MainData: {
- orderNo: this.orderNo
- },
- }
- this.$u.post('/api/InboundOrderDetail/GetInboundOrderDetails', postData).then((res) => {
- if (res.status) {
- this.orderInfo = res.data;
- if (this.orderInfo.length > 3) {
- this.loadVisible = true;
- }
- }
- })
- },
onClickItem(e) {
+ this.barcodeFo = true;
this.focus = false;
this.addressFocus = false;
if (this.current !== e.currentIndex) {
this.current = e.currentIndex;
- if (this.current == 2) {
- this.getData();
- }
}
},
barcodeInput() {
this.$nextTick(function(x) {
if (this.barcode.length > 0) {
- // if (this.barcode.substring(0, 1) == 'A' || this.barcode.substring(0, 2) == 'TP') {
this.focus = true;
- // } else {
- // this.$refs.uToast.show({
- // title: "鎵爜閿欒,璇锋壂鎻忔墭鐩樼爜",
- // type: "error"
- // })
- // }
}
})
},
- snInput() {
- this.$nextTick(() => {
- if (this.warehouseId == 6 || this.warehouseId == 2 || this.warehouseId == 3) {
- if (this.sns.length > 0) {
- this.sns = [];
- }
- }
- if (this.materSn != "") {
- this.focus = false;
- if(this.warehouseId==11){
- this.materSn=this.materSn.replace(/,SC.*/, '');
- }
- if (this.materSn.split(',').length != 6) {
- this.materSn = "";
- return;
- }
- var matSn = this.materSn;
- //setTimeout(() => {
- this.materSn = "";
- //}, 10);
- this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => {
- this.Testcheck = false;
- if (res.status) {
- this.sns.push(res.data.serialNumber);
- if (this.warehouseId == 6 || this.warehouseId == 2 || this.warehouseId ==
- 3) {
- if (this.matInfos.length > 0) {
- this.matInfos = [];
- }
- }
- this.matInfos.push(res.data);
- if (!res.status) {
- this.$refs.uToast.show({
- title: res.message,
- type: "error"
- })
- // setTimeout(() => {
- // this.voiceSpeech('../../static/fail.mp3');
- // }, 100);
- return;
- }
- // setTimeout(() => {
- // this.voiceSpeech('../../static/success.mp3');
- // }, 100);
- } else {
- this.$refs.uToast.show({
- title: res.message,
- type: "error"
- })
- // setTimeout(() => {
- // this.voiceSpeech('../../static/fail.mp3');
- // }, 100);
- }
- })
- }
- })
+ inputChangeemptyCode() {
+ if (this.emptyCode.length > 0) {
+ this.addressEmptyFocus = true;
+ } else {
+ this.addressEmptyFocus = false;
+ }
+
+ if (this.inboundCode) {
+ this.addressEmptyFocus = true;
+ } else {
+ this.addressEmptyFocus = false;
+ }
},
- inbound() {
- if (this.inboundBarcode == "") {
+ inEmpty() {
+ if (this.emptyCode == "") {
this.$refs.uToast.show({
title: "璇锋壂鎻忔墭鐩樻潯鐮�",
type: "error"
})
return;
}
- if (this.address == "") {
+ if (this.addressEmpty == "") {
this.$refs.uToast.show({
title: "璇锋壂鎻忓湴鍧�鏉$爜",
type: "error"
})
return;
}
- var postData = {
- MainData: {
- "barcode": this.inboundBarcode,
- "startPoint": this.address,
- "warehouseId": this.warehouseId
- }
- }
- this.$u.post('/api/Task/RequestInboundTask', postData).then(res => {
+ var url = "?barCode=" + this.emptyCode + "&startPoint=" + this.addressEmpty;
+ this.$u.post('/api/Task/EmptyBackTask' + url, {}).then(res => {
if (res.status) {
- this.inboundBarcode = "";
- if (this.warehouseId != 5 && this.warehouseId != 3) this.address = "";
- this.stockInfoDetail = [];
+ this.emptyCode = "";
+ this.addressEmpty = "";
//鑾峰彇鎬绘暟閲�
- this.Summmary = 0;
setTimeout(() => {
- this.addressFocus = false;
+ this.addressEmptyFocus = false;
this.$refs.uToast.show({
title: "鎴愬姛",
type: "success"
@@ -521,88 +242,244 @@
})
})
},
- inputChangebarcode() {
- this.addressFocus = false;
- this.$nextTick(function(x) {
- if (this.inboundBarcode != '') {
- this.addressFocus = true;
- }
- })
- this.$nextTick(function(x) {
- if (this.inboundBarcode != '') {
- var postData = {
- MainData: {
- "barcode": this.inboundBarcode,
- "warehouseId": this.warehouseId,
- }
- };
- this.$u.post('/api/StockInfo/StockQueryData', postData).then(res => {
- // this.stockInfo = [];
- this.stockInfoDetail = [];
- if (res.status) {
- // this.stockInfo = res.data,
- this.stockInfoDetail = res.data.details
- //鑾峰彇鎬绘暟閲�
- this.stockInfoDetail.forEach(item => {
- this.Summmary += item.stockQuantity;
- });
- } else {
- this.$refs.uToast.show({
- // title: "鏈壘鍒版墭鐩樹俊鎭�",
- title: res.message,
- type: "error"
- })
- }
+ OutBound(){
+ if (this.materialCode == "") {
+ this.$refs.uToast.show({
+ title: "璇疯緭鍏ョ墿鏂�",
+ type: "error"
+ })
+ return;
+ }
+ if (this.outCount <= 0) {
+ this.$refs.uToast.show({
+ title: "璇疯緭鍏ュ嚭搴撴暟閲�",
+ type: "error"
+ })
+ 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"
+ })
})
},
- deleteList(res) {
- this.matInfos.splice(res, 1);
- this.sns.splice(res, 1);
+ 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: "璇锋壂鎻忔墭鐩樻潯鐮�",
+ type: "error"
+ })
+ return;
+ }
+ if (this.address == "") {
+ this.$refs.uToast.show({
+ title: "璇锋壂鎻忓湴鍧�鏉$爜",
+ type: "error"
+ })
+ return;
+ }
+ if (this.matCode == "") {
+ this.$refs.uToast.show({
+ title: "璇疯緭鍏ョ墿鏂欑紪鐮�",
+ type: "error"
+ })
+ 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 + "&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.OneCount = 0;
+ //鑾峰彇鎬绘暟閲�
+ setTimeout(() => {
+ this.addressEmptyFocus = false;
+ this.$refs.uToast.show({
+ title: "鎴愬姛",
+ type: "success"
+ })
+ }, 200);
+ } else {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: "error"
+ })
+ this.Test = false;
+ }
+ }).catch(err => {
+ this.$refs.uToast.show({
+ title: err.message,
+ type: "error"
+ })
+ })
},
submit() {
if (this.barcode == "") {
this.$refs.uToast.show({
- title: "璇锋壂鎻忔墭鐩樻潯鐮�",
+ title: "璇锋壂鎻忔潯鐮�",
type: 'error'
})
return;
}
- if (this.matInfos.length == 0) {
+ if(this.rfid==""){
this.$refs.uToast.show({
- title: "璇锋壂鎻忓唴绠辨爣绛�",
+ title: "璇锋壂鎻廟FID",
type: 'error'
})
return;
}
- if (this.Test) {
- if (!this.Testcheck) {
- this.Testcheck = true;
- if (this.warehouseId == 2) {
- this.$refs.uToast.show({
- title: "璇风‘璁ゆ暟閲�",
- type: 'error'
- })
- } else if (this.warehouseId == 6) {
- this.$refs.uToast.show({
- title: "璇风‘璁ゅ垵濮嬪鍛�",
- type: 'error'
- })
- }
- return;
- }
+ if (this.thickness == "") {
+ this.$refs.uToast.show({
+ title: "璇疯緭鍏ョ洿寰�",
+ type: 'error'
+ })
+ return;
}
- if (this.warehouseId == 2) { //娌瑰ⅷ浠撳簱鍖篒D
- this.sn = this.sns[0];
- for (var i = 0; i < this.Initiallife - 1; i++) {
- this.sns.push(this.sn);
- }
+ if (this.weight == "") {
+ this.$refs.uToast.show({
+ title: "璇疯緭鍏ラ噸閲�",
+ type: 'error'
+ })
+ return;
}
- let url = 'palletCode=' + this.barcode + '&initiallife=' + this.Initiallife + '&warehouseId=' + this
- .warehouseId;
-
- this.$u.post('/api/InboundOrder/ManualMaterielGroup?' + url, this.sns).then(res => {
+ 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,
+ "thickness": this.thickness,
+ "weight": this.weight,
+ "wide": this.wide,
+ "materSn": this.materSn,
+ "lengthStock": this.lengthStock,
+ "fridCode":this.rfid,
+ // "isFull": this.check
+ "warehouseId": this.warehouseId
+ },
+ }).then(res => {
this.Testcheck = false;
if (res.status) {
this.$refs.uToast.show({
@@ -611,9 +488,11 @@
})
this.focus = false;
this.barcode = "";
- this.matInfos = [];
- this.sns = [];
- this.matTotal = [];
+ this.materSn = "";
+ this.wide = "";
+ this.weight = "";
+ this.lengthStock = "";
+ this.thickness = "";
} else {
this.$refs.uToast.show({
title: res.message,
--
Gitblit v1.9.3