From 80a401825d5038854f6bc59076de356d59074c96 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期二, 31 十月 2023 14:36:34 +0800 Subject: [PATCH] # --- pages/tzsk/pakin/locPick.vue | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- pages/tzsk/pakin/checkOut.vue | 3 2 files changed, 159 insertions(+), 7 deletions(-) diff --git a/pages/tzsk/pakin/checkOut.vue b/pages/tzsk/pakin/checkOut.vue index ec65b94..2eecdaf 100644 --- a/pages/tzsk/pakin/checkOut.vue +++ b/pages/tzsk/pakin/checkOut.vue @@ -250,11 +250,12 @@ barcodeInput() { let _this = this uni.request({ - url: `${_this.baseUrl}`, + url: `${_this.baseUrl}/mobile/locdetl/auth`, data: { barcode: _this.barcode }, header: { 'token': uni.getStorageSync('token') }, success(res) { res = res.data + console.log(res); if (res.code === 200) { _this.barcodeFocus = false; setTimeout(() => { diff --git a/pages/tzsk/pakin/locPick.vue b/pages/tzsk/pakin/locPick.vue index 21c858a..8012eec 100644 --- a/pages/tzsk/pakin/locPick.vue +++ b/pages/tzsk/pakin/locPick.vue @@ -2,9 +2,9 @@ <view> <view class="container" v-for="(item,i) in tree" :key="i"> <view :class="item.key"> - <view class="title" @click="switchbtn(item)"> - <view>{{item.title}}</view> - <view > + <view class="title" > + <view @click="chose(item)" style="width: 50%;">{{item.title}}</view> + <view @click="switchbtn(item)"> <uni-icons type="top" v-show="item.switch"></uni-icons> <uni-icons type="bottom" v-show="!item.switch"></uni-icons> </view> @@ -34,7 +34,52 @@ </view> </view> </view> + + <view class="pick-list" v-show="pickData != ''"> + <view class="list-item"> + <text class="list-title">璁㈠崟鍙凤細</text><text class="val-text">{{pickData.docNum ? pickData.docNum : '--'}}</text> + </view> + <view class="list-item"> + <text>搴撲綅鍙凤細</text><text>{{pickData.locNo}}</text> + </view> + <view class="list-item"> + <text>鎵樼洏鐮侊細</text><text>{{pickData.zpallet ? pickData.zpallet : '--'}}</text> + </view> + <view class="list-item"> + <text>鏂欑鐮侊細</text><text>{{pickData.containerCode ? pickData.containerCode : '--'}}</text> + </view> + <view class="list-item"> + <text>閿�鍞鍙凤細</text><text>{{pickData.csocode ? pickData.csocode : '--'}}</text> + </view> + <view class="list-item"> + <text>璁㈠崟琛屽彿锛�</text><text>{{pickData.isoseg ? pickData.isoseg : '--'}}</text> + </view> + <view class="list-item"> + <text>鐗╂枡鍙凤細</text><text>{{pickData.matnr ? pickData.matnr : '--'}}</text> + </view> + <view class="list-item"> + <text>鐗╂枡鍚嶇О锛�</text><text>{{pickData.maktx}}</text> + </view> + <view class="list-item"> + <text>鐘舵�侊細</text><text>{{pickData.status$}}</text> + </view> + <view class="list-item"> + <text>鏁伴噺锛�</text><text class="val-num">{{pickData.anfme}}</text> + </view> + </view> + <view style="height: 100rpx;"></view> + + <view class="z-floor" v-show="pickData != ''"> + <button size="mini" type="primary" @click="picked()">鎷h揣</button> + </view> + + <view> + <!-- 鎻愮ず淇℃伅寮圭獥 --> + <uni-popup ref="message" type="message"> + <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message> + </uni-popup> + </view> </view> </template> @@ -42,7 +87,14 @@ export default { data() { return { - tree: [] + tree: [], + pickList: [], + pickData: '', + index: 1, + len: 5, + msgType1: 'success', + msgType: 'success', + messageText: '', } }, onShow() { @@ -135,9 +187,65 @@ }) }, chose(data) { - console.log(data); + let that = this + uni.request({ + url: `${that.baseUrl}/node/order/pakout`, + header: {'token': uni.getStorageSync('token')}, + data: {locType: data.title}, + success(res) { + // console.log(res); + res = res.data + if (res.code === 200 && res.data.length > 0) { + that.pickList = res.data + that.len = res.data.length + that.pickData = res.data[0] + that.index = 1 + } else if (res.data.length == 0) { + that.getNodeTree() + } + } + }) this.tree = [] - } + }, + picked() { + let that = this + // console.log(that.len); + // console.log(that.index); + if (that.len < that.index) { + that.pickData = '' + that.index = 1 + that.getNodeTree() + return + } else { + that.pickData.orderNo = that.pickData.docNum + uni.request({ + url: `${that.baseUrl}/mobile/node/pakout`, + header: {'token': uni.getStorageSync('token')}, + data: that.pickData, + method: 'POST' + }).then((res)=>{ + res = res.data + // console.log(res); + if (res.code === 200) { + if (that.index == that.len) { + that.pickData = '' + that.index = 1 + that.getNodeTree() + } else { + that.index++ + that.pickData = that.pickList[that.index] + } + that.messageText = "鎷h揣鎴愬姛" + that.messageToggle('success') + } + }) + + } + }, + messageToggle(type) { + this.msgType1 = type + this.$refs.message.open() + }, } } @@ -175,4 +283,47 @@ .locarea:active { background-color: #55aa7f; } + .pick-list { + margin: 8px; + background-color: #FFF; + min-height: 70rpx; + border-radius: 20rpx; + } + .list-item { + min-height: 70rpx; + display: flex; + align-items: center; + padding-left: 32rpx; + } + .list-item:first-child { + padding-top: 8rpx; + } + .list-item:last-child { + padding-bottom: 8rpx; + } + .z-floor { + position: fixed; + bottom: 0; + left: 0; + height: 100rpx; + width: 100%; + background-color: #FFF; + display: flex; + align-items: center; + + } + .list-title { + vertical-align: text-bottom; + } + .val-text { + background-color: #00aeec; + padding: 2px 4px; + border-radius: 4px; + color: #FFF; + } + .val-num { + font-weight: 900; + color: #d19a66; + font-size: 16px; + } </style> \ No newline at end of file -- Gitblit v1.9.1