From 05bd41aab8c9dba2cf7afcd78493415761f11d9d Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期四, 26 九月 2024 08:54:08 +0800
Subject: [PATCH] update 供应商刷新问题

---
 sub_pages/partner/delivery/delivery-supplier-detail-list.vue |   73 +++++++++++++++++++++++++++++++-----
 1 files changed, 63 insertions(+), 10 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..8e0eb65 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,30 @@
 			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) >= 0) {
+							for (var each of item.items) {
+								arr.push(each)
+							}
+						}
+					}
+					if (arr.length > 0) {
+						// console.log('cache_delivery_order_print', arr)
+						this.$storage.setItem('cache_delivery_order_print', JSON.stringify(arr))
+						uni.navigateTo({
+							url: '/sub_pages/supplier/print/print-list'
+						})
+					}
+
+				}
+			}
 		}
 	}
 </script>
@@ -340,21 +376,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>
@@ -394,6 +441,12 @@
 
 
 					<view class="line-gray"></view>
+					<view class="m-t-12 flex" v-if="item.arriveRemarks">
+						<view>备注:</view>
+						<view class="text-left m-l-10 m-r-0 flex1">
+							{{item.arriveRemarks}}
+						</view>
+					</view>
 					<view class="m-t-12 flex" v-if="item.arriveImageList&&item.arriveImageList.length>0">
 						<view class="m-t-12 m-r-10 " v-for="(timg,vv) of item.arriveImageList" :key="vv">
 							<image class="arrive-img" :src="timg" @click.stop="previewImg(timg)">
@@ -520,7 +573,7 @@
 					</view>
 					<view class="form-item" v-if="form.status==='reduce'">
 						<view class="form-item-label require">
-							扣款金额
+							每扎扣款
 						</view>
 						<view class="form-item-value">
 							<input v-model="form.deductAmount" placeholder="请输入扣款金额" type="digit"
@@ -537,7 +590,7 @@
 							<input v-model="form.remarks" placeholder="请输入质检备注" class="form-input"></input>
 						</view>
 					</view>
-					<view class="form-item" v-if="form.status==='reduce'">
+					<view class="form-item" v-if="form.status==='reduce' || form.status === 'lack'">
 						<view class="form-item-label require">
 							图片
 						</view>

--
Gitblit v1.9.3