From dc2accf9c90ee7aa2a3f5b3132b6c8407330604e Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期五, 19 一月 2024 15:52:18 +0800 Subject: [PATCH] # --- pages/order/orderDetls2.vue | 66 ++++++++++++++++++++++ pages/order/orderPakin2.vue | 76 ++++++++++++++++++++----- pages.json | 8 ++ 3 files changed, 135 insertions(+), 15 deletions(-) diff --git a/pages.json b/pages.json index 3b1ad52..53d28a9 100644 --- a/pages.json +++ b/pages.json @@ -224,6 +224,14 @@ "navigationBarTitleText" : "璁㈠崟鏄庣粏", "enablePullDownRefresh" : false } + }, + { + "path" : "pages/order/orderDetls2", + "style" : + { + "navigationBarTitleText" : "璁㈠崟鍒楄〃", + "enablePullDownRefresh" : false + } } ], "globalStyle": { diff --git a/pages/order/orderDetls2.vue b/pages/order/orderDetls2.vue new file mode 100644 index 0000000..8622960 --- /dev/null +++ b/pages/order/orderDetls2.vue @@ -0,0 +1,66 @@ +<template> + <view> + <view class="data-list" v-for="item in dataList"> + <view class="data-item"> + <view><text>璁㈠崟鍙�:</text><text>{{item.orderNo}}</text></view> + <view><text>璁㈠崟鏁伴噺:</text><text>{{item.combMats.length}}</text></view> + </view> + <view class="data-options"> + <uni-icons type="right" color="#FFF" size="50rpx" @click="back(item)"></uni-icons> + </view> + </view> + </view> +</template> + +<script> + export default { + data() { + return { + dataList:[{}] + } + }, + onLoad(option) { + let _this = this + // #ifdef APP-NVUE + const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE + // #endif + // #ifndef APP-NVUE + const eventChannel = this.getOpenerEventChannel(); + // #endif + // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� + eventChannel.on('orderDetls', function(data) { + _this.dataList = data.data + }) + }, + methods: { + back(item) { + this.getOpenerEventChannel().emit('detls', {data: item}); + uni.navigateBack({ + + }) + } + } + } +</script> + +<style> + .data-list { + margin: 16rpx; + background-color: antiquewhite; + display: flex; + background-color: #888; + color: #fff; + border-radius: 16rpx; + } + .data-item { + flex: 1; + padding: 16rpx 24rpx; + } + .data-options { + width: 15%; + border-left: 1px solid #ddd; + display: flex; + align-items: center; + justify-content: center; + } +</style> diff --git a/pages/order/orderPakin2.vue b/pages/order/orderPakin2.vue index 347b6a2..ecc8941 100644 --- a/pages/order/orderPakin2.vue +++ b/pages/order/orderPakin2.vue @@ -4,24 +4,27 @@ <view class="item"> <view class="code-decs">璁㈠崟鍙�:</view> <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="orderNoFocus" @input="findOrder()"> + <view class="item-right" @click="clearOrderNo()"> + <uni-icons type="close" color="#c1c1c1"></uni-icons> + </view> </view> - <view class="item"> + <!-- <view class="item"> <view class="code-decs">鏈ㄧ绫诲瀷:</view> <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="boxType" :focus="boxTypeFocus"> - </view> - <view class="item"> + </view> --> + <!-- <view class="item"> <view class="code-decs">鐮佸灈浣�:</view> <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="palletizingNo2" :focus="palletizingNo2Focus"> <view class="item-right" @click="selectPst()"> <uni-icons type="right" color="#c1c1c1"></uni-icons> </view> - </view> + </view> --> </view> <view class="mat-list-title"> <view class="title-item"></view> <view class="title-item">鍟嗗搧鍒楄〃</view> <view class="title-item"> - <!-- <button size="mini" type="primary" @click="addMat()">娣诲姞</button> --> + <button size="mini" type="primary" @click="orderSelect()">鎻愬彇</button> </view> </view> @@ -62,7 +65,7 @@ <view class="left-item">{{item.anfme}}</view> </view> --> <view class="list-left-item"> - <view class="desc">鎵瑰彿锛�</view> + <view class="desc">绠卞彿锛�</view> <view class="left-item"> <uni-tag :text="item.batch" type="warning"></uni-tag> </view> @@ -165,7 +168,7 @@ boxType: '', createTime: '', dataList: [], - count: 0, + count: 1, rowNum: '', matnr: '', batch: '', @@ -193,6 +196,14 @@ this.token = uni.getStorageSync('token'); }, methods: { + // clearOrderNo + clearOrderNo() { + this.orderNo = '' + this.orderNoFocus = false + setTimeout(()=>{ + this.orderNoFocus = true + },100) + }, // 鑾峰彇閫�搴撳崟 findOrder() { let _this = this @@ -207,9 +218,6 @@ success(result) { result = result.data if (result.code === 200 && result.data) { - // for(let k of result.data[0].combMats) { - // _this.dataList.push(k) - // } uni.navigateTo({ url: "../order/orderDetls", // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� @@ -227,7 +235,7 @@ }); } else { - uni.showToast({ title: res.msg, icon: "none", position: 'top' }) + uni.showToast({ title: result.msg, icon: "none", position: 'top' }) } } }) @@ -239,7 +247,43 @@ select(e) { this.palletizingNo2 = e this.$refs.inputDialog.close() - console.log(this.palletizingNo); + }, + // 鎻愬彇璁㈠崟 + orderSelect() { + let _this = this + uni.request({ + url: `${_this.baseUrl}/mobile/order/search/orderNo/auth/v2`, + header: { + 'token': uni.getStorageSync('token'), + 'content-type': 'application/x-www-form-urlencoded' + }, + data: {orderNo: ''}, + method: 'POST', + success(result) { + result = result.data + if (result.code === 200 && result.data) { + uni.navigateTo({ + url: "../order/orderDetls2", + // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� + success: function(res) { + res.eventChannel.emit('orderDetls', { + data: result.data + }) + }, + // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� + events: { + detls: function(data) { + _this.orderNo = data.data.orderNo + _this.findOrder() + }, + }, + }); + + } else { + uni.showToast({ title: result.msg, icon: "none", position: 'top' }) + } + } + }) }, // 娣诲姞鐗╂枡 addMat() { @@ -414,6 +458,7 @@ this.count = this.dataList[i].anfme this.batch = this.dataList[i].batch this.weight = this.dataList[i].weight + this.position = this.dataList[i].position this.rowNum = i this.eject() }, @@ -443,6 +488,7 @@ this.dataList[this.rowNum].anfme = this.count this.dataList[this.rowNum].batch = this.batch this.dataList[this.rowNum].weight = this.weight + this.dataList[this.rowNum].position = this.position this.matnr = '' this.messageText = "淇敼鎴愬姛" this.messageToggle('success') @@ -552,7 +598,7 @@ <style> @import url('../../static/css/wms.css/wms.css'); .list:first-child { - margin-top: 320rpx; + margin-top: 200rpx; } .empty-list { height: 50%; @@ -564,7 +610,7 @@ .code { width: 100%; position: fixed; - min-height: 200rpx; + min-height: 70rpx; background-color: #FFF; z-index: 10; } @@ -612,7 +658,7 @@ width: 100%; background-color: white; position: fixed; - margin-top: 210rpx; + margin-top: 70rpx; z-index: 9; /* border-top: 1px solid #DCDFE6; */ text-align: center; -- Gitblit v1.9.1