hi 6 өдөр өмнө
parent
commit
51d97b7e43

+ 13 - 5
components/task-item/task-item.vue

@@ -23,7 +23,8 @@
 			</view>
 		</view>
 		<view class="task-bottom">
-			<view class="btn-1">去出库</view>
+			<view class="btn btn-1">去出库</view>
+			<!-- <view class="btn btn-2">详情</view> -->
 		</view>
 	</view>
 </template>
@@ -104,17 +105,24 @@
 			display: flex;
 			align-items: center;
 			justify-content: flex-end;
-			.btn-1 {
+			.btn {
 				width: 144rpx;
 				height: 56rpx;
 				border-radius: 8rpx;
-				background: #0256FF;
-				color: #FFF;
-				font-family: "PingFang SC";
 				font-size: 28rpx;
 				display: flex;
 				align-items: center;
 				justify-content: center;
+				font-family: "PingFang SC";
+			}
+			.btn-1 {
+				background: #0256FF;
+				color: #FFF;
+			}
+			.btn-2 {
+				border: 1px solid #0256FF;
+				background: rgba(2, 86, 255, 0.20);
+				color: #0256FF;
 			}
 		}
 	}

+ 6 - 0
pages.json

@@ -30,6 +30,12 @@
 			"style": {
 				"navigationBarTitleText": ""
 			}
+		},
+		{
+			"path": "pages/picking-task/delivery",
+			"style": {
+				"navigationBarTitleText": ""
+			}
 		}
 	],
 	/* 分包预载配置 */

+ 8 - 0
pages/picking-task/delivery.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 33 - 3
pages/picking-task/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="picking-task-page">
 		<u-navbar height="40px" title="拣货任务" bgColor="#F0F6FB" autoBack placeholder>
-			<view class="u-nav-slot btn-right" slot="right">
+			<view class="u-nav-slot btn-right" slot="right" @click="stashClick">
 				<view class="cang-name">{{cangName}}</view>
 				<u-icon name="arrow-down-fill" color="#999999" size="12"></u-icon>
 			</view>
@@ -34,7 +34,9 @@
 				</block>
 			</view>
 		</view>
-		
+		<!-- 中心仓弹窗 -->
+		<u-picker :show="stashShow" :defaultIndex="defaultIndex" :columns="columnsList" @confirm="pickerConfirm" @cancel="stashShow= false"></u-picker>
+
 	</view>
 </template>
 
@@ -50,7 +52,14 @@
 				cangName:'鹏越中心仓',
 				searchKey:'',
 				type1:'全部',
-				type2:'月份'
+				type2:'月份',
+				stashShow:false,
+				columnsList:[],
+				stashColumns:[
+					['鹏越中心仓','美团中心仓']
+				],
+				defaultIndex:[],
+				pickType:0,//1.中心仓
 			}
 		},
 		onLoad() {
@@ -58,6 +67,27 @@
 			let statusBarHeight = systemInfo.statusBarHeight;
 			this.offsetTop = statusBarHeight + 40
 			console.log('状态栏的高度是:' + statusBarHeight + 'px');
+		},
+		methods:{
+			stashClick() {
+				this.pickType = 1
+				this.columnsList = this.stashColumns
+				this.defaultIndex = this.getDefaultIndex(this.cangName)
+				this.stashShow = true
+			},
+			pickerConfirm(val) {
+				if(this.pickType == 1) {
+					this.cangName = val.value[0]
+				}
+				this.stashShow = false
+			},
+			// 获取picker默认index
+			getDefaultIndex(val) {
+				let arr = []
+				let index = this.columnsList[0].findIndex(item=>item == val)
+				arr = [index]
+				return arr
+			}
 		}
 	}
 </script>

BIN
static/image/scan-icon.png