From 1e40a94e41a811a30b49150b5feabe9b7797948a Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期二, 14 五月 2024 08:23:06 +0800 Subject: [PATCH] # --- pages/phyz/order/orderList.vue | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 46 insertions(+), 4 deletions(-) diff --git a/pages/phyz/order/orderList.vue b/pages/phyz/order/orderList.vue index 6e31484..fba7117 100644 --- a/pages/phyz/order/orderList.vue +++ b/pages/phyz/order/orderList.vue @@ -30,9 +30,15 @@ <view style="height: 100rpx;"></view> <!-- 搴曢儴鎿嶄綔鎸夐挳 --> - <view class="buttom"> + <view class="buttom" v-if="orderType == 'in'"> <button size="mini" @click="reset('warn')">閲嶇疆</button> <button size="mini" type="primary" @click="combConfirm('warn')">鍘荤粍鎵�</button> + </view> + + <!-- 搴曢儴鎿嶄綔鎸夐挳 --> + <view class="buttom" v-if="orderType == 'out'"> + <button size="mini" @click="reset('warn')">閲嶇疆</button> + <button size="mini" type="primary" @click="combConfirm2('warn')">鍘诲嚭搴�</button> </view> </view> @@ -53,6 +59,7 @@ newDataList: [], allCheck: false, allCheckBtnTitle: '鍏ㄩ��', + orderType: 'out' } }, onLoad() { @@ -72,7 +79,18 @@ }) that.getOrderDetl(data.item.id) - + that.orderType = 'in' + }) + eventChannel.on('item1', function(data) { + console.log(data); + that.orderId = data.item.orderId + console.log(data.item.id); + uni.setNavigationBarTitle({ + title: data.item.orderNo, + + }) + that.getOrderDetl(data.item.id) + that.orderType = 'out' }) }, onShow() { @@ -85,7 +103,6 @@ // 璁㈠崟鏄庣粏 getOrderDetl(id) { let _this = this - console.log(id); uni.request({ url: `${_this.baseUrl}/orderDetl/list/auth`, header: {'token': uni.getStorageSync('token')}, @@ -99,7 +116,9 @@ res = res.data console.log(res); if (res.code === 200) { + res.data.records _this.dataList = res.data.records + _this.oldDataList = [..._this.dataList] } } @@ -178,6 +197,7 @@ let _this = this let combList = [] for (let k of _this.dataList) { + k['csocode'] = k.threeCode if (k.checked) { combList.push(k) } @@ -187,7 +207,29 @@ return } uni.navigateTo({ - url: "../AGV/AGVPakin2", + url: "../AGV/AGVPakin3", + success: function(res) { + // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 + res.eventChannel.emit('mats', { + mats: combList + }) + }, + }); + }, + combConfirm2(type) { + let _this = this + let combList = [] + for (let k of _this.dataList) { + if (k.checked) { + combList.push(k) + } + } + if (combList.length == 0) { + uni.showToast({ title: '璇烽�夋嫨鍑哄簱鍟嗗搧', icon: "error", position: 'top'}) + return + } + uni.navigateTo({ + url: "./preview", success: function(res) { // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 res.eventChannel.emit('mats', { -- Gitblit v1.9.1