123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <template>
- <view class="picking-task-page">
- <u-navbar height="40px" title="拣货任务" bgColor="#F0F6FB" autoBack placeholder>
- <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>
- </u-navbar>
- <view class="container_main">
- <u-sticky :offsetTop="offsetTop" bgColor="#F0F6FB">
- <view class="search-box">
- <u-search placeholder="请输入单据编号" bgColor="#fff" shape="square" v-model="searchKey" :showAction="false"></u-search>
- <view class="flex_box">
- <view class="scan-text">扫描单据二维码</view>
- <view class="scan-icon">
- <image src="@/static/image/scan-icon.png" mode=""></image>
- </view>
- </view>
- </view>
- <view class="type-box flex_box">
- <view class="type-item">
- <view class="type-val">{{type1}}</view>
- <u-icon name="arrow-down-fill" color="#999999" size="12"></u-icon>
- </view>
- <view class="type-item">
- <view class="type-val">{{type2}}</view>
- <u-icon name="arrow-down-fill" color="#999999" size="12"></u-icon>
- </view>
- </view>
- </u-sticky>
- <view class="task-cont">
- <block v-for="item in 10" :key="">
- <task-item @toStorage="toStorage"></task-item>
- </block>
- </view>
- </view>
- <!-- 中心仓弹窗 -->
- <u-picker :show="stashShow" :defaultIndex="defaultIndex" :columns="columnsList" @confirm="pickerConfirm" @cancel="stashShow= false"></u-picker>
- </view>
- </template>
- <script>
- import taskItem from '@/components/task-item/task-item.vue'
- export default{
- components:{
- taskItem
- },
- data() {
- return {
- offsetTop:0,
- cangName:'鹏越中心仓',
- searchKey:'',
- type1:'全部',
- type2:'月份',
- stashShow:false,
- columnsList:[],
- stashColumns:[
- ['鹏越中心仓','美团中心仓']
- ],
- defaultIndex:[],
- pickType:0,//1.中心仓
- }
- },
- onLoad() {
- let systemInfo = uni.getSystemInfoSync();
- let statusBarHeight = systemInfo.statusBarHeight;
- this.offsetTop = statusBarHeight + 40
- },
- 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
- },
- // 出库
- toStorage(val) {
- uni.navigateTo({
- url:'/pages/picking-task/delivery'
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .btn-right {
- display: flex;
- align-items: center;
- .cang-name {
- color: #0256FF;
- text-align: center;
- font-family: "PingFang SC";
- font-size: 28rpx;
- font-weight: 600;
- margin-right: 10rpx;
- }
- }
- .picking-task-page {
- min-height: 100vh;
- background: #F0F6FB;
- .container_main {
- .search-box {
- display: flex;
- align-items: center;
- padding: 0 32rpx;
- .scan-text {
- color: #333;
- font-family: "PingFang SC";
- font-size: 24rpx;
- font-weight: 400;
- margin-right: 20rpx;
- margin-left: 30rpx;
- }
- .scan-icon {
- width: 36rpx;
- height: 36rpx;
- background-color: #fff;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- image {
- width: 24rpx;
- height: 24rpx;
- }
- }
- }
-
- .type-box {
- .type-item {
- width: 50%;
- height: 88rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- .type-val {
- color: #000;
- font-family: "PingFang SC";
- font-size: 28rpx;
- font-weight: 400;
- margin-right: 10rpx;
- }
- }
- }
-
- .task-cont {
- padding: 0 24rpx;
- }
- }
- }
- </style>
|