From fe8fb74ce94e7bee23ed47b7175236248ac93b98 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期二, 19 十一月 2024 16:24:04 +0800 Subject: [PATCH] Merge branch 'nbncPda' of http://47.97.1.152:5880/r/wms_app into nbncPda --- pages/pakin/WarehouseOutParallelBoard.vue | 169 ++++++++++++++++---------------------------------------- 1 files changed, 49 insertions(+), 120 deletions(-) diff --git a/pages/pakin/WarehouseOutParallelBoard.vue b/pages/pakin/WarehouseOutParallelBoard.vue index be22bab..57bc321 100644 --- a/pages/pakin/WarehouseOutParallelBoard.vue +++ b/pages/pakin/WarehouseOutParallelBoard.vue @@ -2,71 +2,43 @@ <view> <view class="code"> <view class="item"> - <view class="item" style="width: 50%;"> - <view class="code-decs" style="width: 100%;">搴撲綅鍙�:{{item.locNo}}</view> + <view class="item" style="width: 100%;"> + <view class="code-decs" style="width: 50%;">搴撲綅鍙�: {{item.locNo}}</view> + <view class="code-decs" style="width: 50%;">搴撳瓨鍙嚭鏁伴噺: {{item.anfme}}</view> </view> </view> <view class="item"> - <view class="item" style="width: 90%;"> - <view class="code-decs" style="width: 100%;">鐗╂枡:{{item.matnr}}</view> + <view class="item" style="width: 100%;"> + <view class="code-decs" style="width: 60%;">鐗╂枡: {{item.matnr}}</view> + <button size="mini" type="primary" @click="getOrder">鍑哄簱璁㈠崟</button> </view> - </view> - <view class="item"> - <view class="code-decs">璁㈠崟鍙�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="barcodeFocus" - @input="barcodeInput()"> </view> </view> <view class="mat-list-title"> <view style="width: 200rpx;"></view> - <view style="-webkit-flex: 1;flex: 1;">鍟嗗搧鍒楄〃</view> + <view style="-webkit-flex: 1;flex: 1;">鍑哄簱璁㈠崟</view> <view style="width: 200rpx;"></view> </view> <scroll-view> <checkbox-group class="list" v-for="(item,i) in dataList" :key="i" @change="checkboxChange"> - <!-- <view class="aside"> - <checkbox :value="item.matnr" :checked="item.checked" @click="set(i)"/> - </view> --> <view class="list-left" style="margin: 0;"> <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{i + 1}}</view> + <view class="desc">No锛歿{i + 1}}</view> </view> <view class="list-left-item"> - <view class="desc">璁㈠崟鍙凤細</view> - <view class="left-item"> - <uni-tag :text="item.orderNo" type="primary"></uni-tag> - </view> + <view class="desc">璁㈠崟鍙凤細{{item.orderNo}}</view> </view> <view class="list-left-item"> - <view class="desc">鏂欏彿锛�</view> - <view class="left-item"> - <uni-tag :text="item.matnr" type="primary"></uni-tag> - </view> + <view class="desc">鏂欏彿锛歿{item.matnr}}</view> </view> <view class="list-left-item"> - <view class="desc">鍚嶇О锛�</view> - <view class="left-item">{{item.maktx}}</view> + <view class="desc">鎵瑰彿锛歿{item.batch}}</view> </view> <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> - <view class="left-item">{{item.specs}}</view> + <view class="desc">鍙敤鏁伴噺锛歿{item.count}}</view> </view> - <view class="list-left-item"> - <view class="desc">鎵瑰彿锛�</view> - <view class="left-item"> - <uni-tag :text="item.batch" type="warning"></uni-tag> - </view> - </view> - <!-- <view class="list-left-item"> - <view class="desc">閲嶉噺锛�</view> - <view class="left-item"> - <uni-tag :text="item.weight" type="warning"></uni-tag> - </view> - </view> --> - <view class="list-left-item"> - <view class="desc">鏁伴噺锛�</view> - <view class="left-item">{{item.anfme}}</view> + <view class="list-left-item" > + <view class="desc">鏁伴噺锛歿{item.anfme}}</view> </view> </view> <view class="list-right"> @@ -105,7 +77,7 @@ <view class="popup-item"> <view class="popup-item-left">鏁伴噺:</view> <view class="popup-item-right" style="border: none;justify-content: center;"> - <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" + <uni-number-box :value="count" :step='1' :max="mastCount" color="#747474" @change="changeValue" /> </view> </view> @@ -182,7 +154,9 @@ orderNoList: [], orderNo: '', item:'', - locNo:'' + locNo:'', + mastCount: '', + mastAnfme: 0 } }, onLoad() { @@ -190,7 +164,7 @@ // const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE const eventChannel = this.getOpenerEventChannel(); eventChannel.on('item', function(data) { - // console.log(data.item); + that.mastAnfme = data.item.anfme that.item = data.item }) @@ -201,6 +175,23 @@ this.getOrderNoList() }, methods: { + getOrder() { + let _this = this + uni.navigateTo({ + url: '../order/pickOrderList2', + success(res) { + res.eventChannel.emit('item', { + item: _this.item + }) + }, + events: { + sMat: function(data) { + data.data['anfme'] = data.data.useCount + _this.dataList.push(data.data) + } + } + }) + }, set(e) { var ck = this.dataList[e].checked this.dataList[e].checked = ck ? false:true @@ -312,66 +303,6 @@ this.matFocus = true; }, 100); }, - // 鎼滅储鐗╂枡 - findMat() { - let that = this - var matnr = that.matnr.split(";") - that.order = matnr[0] - that.matnr = matnr[1] - uni.request({ - url: that.baseUrl + '/mat/auth', - data: { - matnr: that.matnr - }, - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - result = result.data - if (result.code === 200 && result.data) { - that.matData = result.data - that.matnr = '' - that.matData['batch'] = '' - result.data.batch = matnr[2] - uni.navigateTo({ - url: "../mat/matSelected", - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� - success: function(res) { - res.eventChannel.emit('mat', { - data: result.data - }) - }, - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - events: { - matList: function(data) { - that.checkMat(data.data) - that.focuss() - }, - }, - }); - } else if (result.code == 403) { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - } - - } - }); - - }, checkMat(mat) { mat['orderNo'] = this.order var len = this.dataList.length @@ -420,28 +351,25 @@ comb() { uni.vibrateShort(); let that = this; - if (that.orderNo === '') { - this.messageText = "璇疯緭鍏ヨ鍗曞彿" - this.messageToggle('error') - return; - } if (that.dataList.length === 0) { this.messageText = "璇锋坊鍔犲崟鎹槑缁嗗垪琛�" this.messageToggle('error') return; } - for (var i = 0; i < that.dataList.length; i++) { - if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') { - this.messageText = that.dataList[i].matnr + '鎷i�夋暟閲忎笉鑳戒负0' - this.messageToggle('error') - return; - } + var useAnfme = 0 + for (let order of that.dataList) { + useAnfme = useAnfme + order.anfme + } + + if (useAnfme > that.mastAnfme) { + this.messageText = "鍑哄簱鏁伴噺宸茶秴鏈�澶у簱瀛樻暟閲�" + this.messageToggle('error') + return; } uni.request({ url: that.baseUrl + '/mobile/pda/WarehouseOut/v1', data: JSON.stringify({ locno: that.item.locNo, - orderNo: that.dataList[0].orderNo, combMats: that.dataList }), method: 'POST', @@ -495,6 +423,7 @@ this.batch = this.dataList[i].batch this.weight = this.dataList[i].weight this.rowNum = i + this.mastCount = this.dataList[i].anfme this.eject() }, eject(type) { @@ -560,7 +489,7 @@ } .list:first-child { - margin-top: 360rpx; + margin-top: 260rpx; } .list:last-child { @@ -578,7 +507,7 @@ .code { width: 100%; position: fixed; - min-height: 200rpx; + min-height: 140rpx; background-color: #FFF; z-index: 10; } @@ -619,7 +548,7 @@ width: 100%; background-color: white; position: fixed; - margin-top: 200rpx; + margin-top: 140rpx; z-index: 9; /* border-top: 1px solid #DCDFE6; */ text-align: center; -- Gitblit v1.9.1