From 8983271395e1179c5ec50a2b1c5af8580c2f4702 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期三, 17 四月 2024 20:45:48 +0800
Subject: [PATCH] #3
---
pages/phyz/order/orderList.vue | 39 ++++++++++++++++++++++++++++++++++++---
1 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/pages/phyz/order/orderList.vue b/pages/phyz/order/orderList.vue
index 6e816e0..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,17 +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() {
@@ -108,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]
}
}
@@ -187,6 +197,7 @@
let _this = this
let combList = []
for (let k of _this.dataList) {
+ k['csocode'] = k.threeCode
if (k.checked) {
combList.push(k)
}
@@ -205,6 +216,28 @@
},
});
},
+ 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', {
+ mats: combList
+ })
+ },
+ });
+ },
}
}
</script>
--
Gitblit v1.9.1