|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <view class="main_app"> | 
|---|
|  |  |  | <view class="main_name"> | 
|---|
|  |  |  | <text class="mr12">物流入库月台</text> | 
|---|
|  |  |  | <text class="mr12" @click="showPlat = true">{{ | 
|---|
|  |  |  | activePlatform.name | 
|---|
|  |  |  | }}</text> | 
|---|
|  |  |  | <u-icon name="arrow-down" color="#777777"></u-icon> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <!--  --> | 
|---|
|  |  |  | <view class="main_list"> | 
|---|
|  |  |  | <view class="item" @click="handleCheck()"> | 
|---|
|  |  |  | <view class="item" @click="handleCheck(1)"> | 
|---|
|  |  |  | <view class="h1">作业中车辆</view> | 
|---|
|  |  |  | <view class="h2"> | 
|---|
|  |  |  | <text>4</text> | 
|---|
|  |  |  | <text v-if="activePlatform.signJobList">{{ | 
|---|
|  |  |  | activePlatform.workJobList.length | 
|---|
|  |  |  | }}</text> | 
|---|
|  |  |  | <text class="unit">辆</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <image | 
|---|
|  |  |  | 
|---|
|  |  |  | mode="" | 
|---|
|  |  |  | ></image> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="item cyan"> | 
|---|
|  |  |  | <view class="h1">作业中车辆</view> | 
|---|
|  |  |  | <view class="item cyan" @click="handleCheck(0)"> | 
|---|
|  |  |  | <view class="h1">已签到车辆</view> | 
|---|
|  |  |  | <view class="h2"> | 
|---|
|  |  |  | <text>4</text> | 
|---|
|  |  |  | <text v-if="activePlatform.workJobList">{{ | 
|---|
|  |  |  | activePlatform.signJobList.length | 
|---|
|  |  |  | }}</text> | 
|---|
|  |  |  | <text class="unit">辆</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <image | 
|---|
|  |  |  | 
|---|
|  |  |  | ></image> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <u-picker | 
|---|
|  |  |  | :show="showPlat" | 
|---|
|  |  |  | keyName="name" | 
|---|
|  |  |  | :columns="[platformGroupList]" | 
|---|
|  |  |  | @cancel="showPlat = false" | 
|---|
|  |  |  | @confirm="platConfirm" | 
|---|
|  |  |  | ></u-picker> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | import { driverLineUpDetail } from '@/api' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | activePlatform: {}, | 
|---|
|  |  |  | platformGroupList: [], | 
|---|
|  |  |  | showPlat: false, | 
|---|
|  |  |  | jobId: '' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | onLoad(option) { | 
|---|
|  |  |  | this.jobId = option.jobId | 
|---|
|  |  |  | this.getData(option.jobId || '') | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | handleCheck() { | 
|---|
|  |  |  | uni.navigateTo({ | 
|---|
|  |  |  | url: "/pages/driver/queueUpRecord" | 
|---|
|  |  |  | getData(jobId) { | 
|---|
|  |  |  | driverLineUpDetail({ | 
|---|
|  |  |  | mobile: jobId ? '' : uni.getStorageSync('driverInfo').mobile, | 
|---|
|  |  |  | queryType: jobId ? 1 : 0, | 
|---|
|  |  |  | jobId: jobId, | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | this.platformGroupList = res.data.platformGroupList | 
|---|
|  |  |  | if (res.data && res.data.platformGroupList && res.data.platformGroupList.length > 0) { | 
|---|
|  |  |  | this.activePlatform = res.data.platformGroupList[0] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | platConfirm(e) { | 
|---|
|  |  |  | const index = e.indexs[0] | 
|---|
|  |  |  | this.activePlatform = this.platformGroupList[index] | 
|---|
|  |  |  | this.showPlat = false | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handleCheck(type) { | 
|---|
|  |  |  | if(this.jobId){ | 
|---|
|  |  |  | uni.navigateTo({ | 
|---|
|  |  |  | url: `/pages/driver/queueUpRecord?type=${type}&platformId=${this.activePlatform.id}&jobId=${this.jobId}` | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | uni.navigateTo({ | 
|---|
|  |  |  | url: `/pages/driver/queueUpRecord?type=${type}&platformId=${this.activePlatform.id}` | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|