From 731b3a23a6369aaef5c4fdc0ff4524eb6a7f3642 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期五, 13 九月 2024 19:07:12 +0800
Subject: [PATCH] update 合伙人、花店端

---
 sub_pages/partner/delivery/delivery-supplier-detail-list.vue |   62 +++++++++++++++++++++++++++----
 1 files changed, 54 insertions(+), 8 deletions(-)

diff --git a/sub_pages/partner/delivery/delivery-supplier-detail-list.vue b/sub_pages/partner/delivery/delivery-supplier-detail-list.vue
index cc1755d..ee3c99f 100644
--- a/sub_pages/partner/delivery/delivery-supplier-detail-list.vue
+++ b/sub_pages/partner/delivery/delivery-supplier-detail-list.vue
@@ -9,6 +9,7 @@
 					statusStr: '',
 					status: 'ARRIVED,PENDING',
 					warehouseLocationCode: '',
+					date: null
 				},
 				show_select_station: false,
 				show_select_status: false,
@@ -55,12 +56,14 @@
 					},
 				],
 				flg: '0',
+				ids: [],
 			}
 		},
 		onLoad(options) {
 			this.query.supplierId = options.supplierId || ''
 			this.query.stationId = options.stationId || ''
 			if (options.warehouseLocationCode) {
+				console.log('options',options)
 				this.query.warehouseLocationCode = options.warehouseLocationCode || ''
 			}
 
@@ -68,6 +71,9 @@
 
 			if (options.range == 'today') {
 				this.listApi += '/today'
+			}
+			if (options.date) {
+				this.query.date = options.date
 			}
 
 			this.getList()
@@ -104,7 +110,13 @@
 			uni.stopPullDownRefresh()
 		},
 		methods: {
-		
+			changeItem(item) {
+				if (this.ids.indexOf(item.orderNo) >= 0) {
+					this.ids.splice(this.ids.indexOf(item.orderNo), 1)
+				} else {
+					this.ids.push(item.orderNo)
+				}
+			},
 			callTel(tel) {
 				if (tel) {
 					uni.makePhoneCall({
@@ -134,7 +146,9 @@
 			},
 			printDeliveryOrder(item) {
 				// this.$message.showToast('敬请期待')
-				this.$storage.setItem('cache_delivery_order_print', JSON.stringify(item))
+				var arr = []
+				arr.push(item)
+				this.$storage.setItem('cache_delivery_order_print', JSON.stringify(arr))
 				uni.navigateTo({
 					url: '/sub_pages/supplier/print/print-list'
 				})
@@ -311,8 +325,29 @@
 			changeTab(flg) {
 				this.flg = '' + flg
 				this.query.status = this.tabs[flg].status
+				this.ids = []
 				this.refreshList()
 			},
+			selectAllOrder() {
+				if (this.ids.length > 0) {
+					// this.$message.showToast('敬请期待')
+					var arr = []
+					for (var item of this.list) {
+						if (this.ids.indexOf(item.orderNo)) {
+							for (var each of item.items) {
+								arr.push(each)
+							}
+						}
+					}
+					if (arr.length > 0) {
+						this.$storage.setItem('cache_delivery_order_print', JSON.stringify(arr))
+						uni.navigateTo({
+							url: '/sub_pages/supplier/print/print-list'
+						})
+					}
+
+				}
+			}
 		}
 	}
 </script>
@@ -340,21 +375,32 @@
 				</view>
 			</view>
 
-			<!-- <view class="search-container m-t-12 flex"> -->
-				
-				<!-- 	<view class="component-filter-container p10 bg-white m-l-10">
-					<view class="flex1" @click="show_select_status=true">
+			<view class="search-container m-t-12 flex" v-if="list&&list.length>0">
+				<view class="component-filter-container p10  m-l-10 flex flex1" style="text-align: right;">
+					<!-- 	<view class="flex1" @click="show_select_status=true">
 						配送单状态:{{ query.statusStr || '全部' }}
 						<image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
+					</view> -->
+					<view class="flex1 m-l-a m-r-10" @click="selectAllOrder"  style="text-align: right;">
+						点击打印全部(已选{{ids.length}}个)
+						<!-- <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image> -->
 					</view>
-				</view> -->
-			<!-- </view> -->
+				</view>
+			</view>
 
 
 			<no-data v-if="!list||list.length===0" style="width: 100%;"></no-data>
+			<!-- 			<view v-if="list&&list.length>0">
+				<view class="m-t-12">
+					<radio :checked="checkall" @click="selectAll"></radio>
+					全选
+				</view>
+			</view> -->
 			<view v-for="(item,index) in list" :key="index" class="m-b-24">
 				<view class="delivery-item bg-white br-4 p10">
 					<view class="title flex">
+						<radio class="m-r-10" :checked="ids.indexOf(item.orderNo)>=0" @click="changeItem(item)">
+						</radio>
 						<view>供应商:{{ item.supplierName }}</view>
 						<view class="w-fit m-l-a m-r-0 text-right" v-if="item.supplierTel"
 							@click="callTel(item.supplierTel)">{{ item.supplierTel }}</view>

--
Gitblit v1.9.3