| | |
| | | NODE_ENV = 'development' |
| | | |
| | | VUE_APP_API_URL = 'http://localhost:10010' |
| | | #VUE_APP_API_URL = 'http://192.168.0.173/admin_interface' |
| | | VUE_APP_API_URL = 'http://192.168.0.136:10010' |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // 月台列表 |
| | | export function getPlatform (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/platform/page', data, { |
| | | trim: true |
| | | }) |
| | | export function getPlatformGroupList (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/platformGroup/getPlatformGroupList', data) |
| | | } |
| | | // 月台列表 编辑 |
| | | export function PlatformEdit (data) { |
| | |
| | | color: #999999 !important; |
| | | font-size: 28rpx; |
| | | } |
| | | .red{ |
| | | color: red; |
| | | } |
| | | |
| | | //设置圆角 |
| | | checkbox .uni-checkbox-input { |
| | |
| | | .ml12 { |
| | | margin-left: 12rpx; |
| | | } |
| | | .ml6 { |
| | | margin-left: 6rpx; |
| | | } |
| | | .mt6 { |
| | | margin-top: 6rpx; |
| | | } |
| | |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 任务确认 |
| | | export const driverConfirmTask = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/driverPlatform/confirmTask', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 任务签到 |
| | | export const driverSignInTask = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/driverPlatform/signIn', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | |
| | | Vue.prototype.$jump = (url) => {uni.navigateTo({url})} |
| | | Vue.prototype.$goBack = () => { uni.navigateBack() } |
| | | Vue.prototype.showToast = (str) => { |
| | | uni.showToast({ |
| | | title: str, |
| | | icon: 'none', |
| | | duration: 2000 |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: str, |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | | } |
| | | Vue.prototype.$eventBus = new Vue() |
| | |
| | | "/admin_interface" : { |
| | | // 这个字段名需与你配置的basePrefixUrl一致,系统识别到带有/dev-api请求的地址时,会在前面拼接上代理服务器地址 |
| | | // "target" : "http://192.168.0.173/admin_interface", // 代理服务器域名或IP地址 |
| | | "target" : "http://192.168.0.135:10010", // 代理服务器域名或IP地址 |
| | | "target" : "http://192.168.0.136:10010", // 代理服务器域名或IP地址 |
| | | "changeOrigin" : true, // 允许跨域 |
| | | "pathRewrite" : { |
| | | "^/admin_interface" : "" // 重写地址,如果实际接口中是不带/dev-api,需要将这个前缀置空,因为这个前缀只是为了识别用,识别完之后就没用了 |
| | |
| | | <view class="time" v-if="item.arriveDate">{{ item.arriveDate.slice(5) }}</view> |
| | | <view v-if="item.status == 0" class="sub_btn" @click="handleTask(item)">确认任务</view> |
| | | <view v-if="item.status == 1" class="sub_btn" @click="handleSign(item)">立即签到</view> |
| | | <view v-if="item.status == 2" class="sub_btn" @click="handleQueup(item)">查看排队</view> |
| | | <view v-if="item.status == 2" class="sub_btn" @click="handleQueue(item)">查看排队</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | url: '/pages/driver/taskDetail?id=' + item.id |
| | | }); |
| | | }, |
| | | handleQueup(item) {}, |
| | | handleQueue(item) { |
| | | uni.navigateTo({ |
| | | url:'/pages/driver/queueUp?jobId=' + item.id |
| | | }) |
| | | }, |
| | | initData() { |
| | | driverHomeData().then(res => { |
| | | if (res.code == 200) { |
| | | uni.setStorageSync('driverGuide', { |
| | | bookingTips: res.data.bookingTips, |
| | | reservationMap: res.data.reservationMap |
| | | reservationMap: res.data.reservationMap, |
| | | signDistance: res.data.signDistance |
| | | }); |
| | | this.taskList = res.data.platformJobList || [] |
| | | } |
| | |
| | | url: '/pages/driver/login' |
| | | }); |
| | | }, |
| | | handleTask(status) { |
| | | if (status == 1) { |
| | | return uni.navigateTo({ |
| | | url: '/pages/driver/taskDetail' |
| | | }); |
| | | } |
| | | handleTask(item) { |
| | | uni.navigateTo({ |
| | | url: '/pages/driver/taskConfirm' |
| | | url: '/pages/driver/taskConfirm?id=' + item.id |
| | | }); |
| | | } |
| | | } |
| | |
| | | <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="item" @click="handleCheck()"> |
| | | <view class="h1">作业中车辆</view> |
| | | <view class="h2"> |
| | | <text>4</text> |
| | | <text v-if="activePlatform.signJobList">{{ |
| | | activePlatform.signJobList.length |
| | | }}</text> |
| | | <text class="unit">辆</text> |
| | | </view> |
| | | <image |
| | |
| | | ></image> |
| | | </view> |
| | | <view class="item cyan"> |
| | | <view class="h1">作业中车辆</view> |
| | | <view class="h1">已签到车辆</view> |
| | | <view class="h2"> |
| | | <text>4</text> |
| | | <text v-if="activePlatform.workJobList">{{ |
| | | activePlatform.workJobList.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' |
| | | import { driverLineUpDetail } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | activePlatform: {}, |
| | | platformGroupList: [], |
| | | showPlat: false |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getData() |
| | | }, |
| | | onLoad(option) { |
| | | this.getData(option.jobId || '') |
| | | }, |
| | | methods: { |
| | | getData() { |
| | | driverLineUpDetail({ |
| | | mobile: uni.getStorageSync('driverInfo').mobile, |
| | | queryType: 0 |
| | | }) |
| | | }, |
| | | 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() { |
| | | uni.navigateTo({ |
| | | url: "/pages/driver/queueUpRecord" |
| | |
| | | this.$forceUpdate(); |
| | | this.closeInput(); |
| | | }, |
| | | closeInput() { |
| | | this.$refs.keyboard.close(); |
| | | }, |
| | | copy(){ |
| | | if(this.param.carCodeFront){ |
| | | this.$set(this.param, 'carCodeBack', this.param.carCodeFront) |
| | | this.showToast('复制成功'); |
| | | } |
| | | |
| | | }, |
| | | handleUpload() { |
| | | let token = uni.getStorageSync('token') || '' |
| | |
| | | } |
| | | }) |
| | | }, |
| | | closeInput() { |
| | | this.$refs.keyboard.close(); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="status_wrap"> |
| | | <image |
| | | class="bg" |
| | | src="../../static/driver/bg_renwu@2x.png" |
| | | mode="" |
| | | ></image> |
| | | <view class="name">作业已完成</view> |
| | | <view class="id_card">皖AD1212</view> |
| | | <view class="status">作业完成</view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="main_content"> |
| | | <view class="line"> |
| | | <view class="label">司机姓名</view> |
| | | <view class="value">刘某</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">手机号</view> |
| | | <view class="value">188</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">运输单号</view> |
| | | <view class="value" @click="showDetail = true"> |
| | | <text class="waybill_num">Y111</text> |
| | | <text class="btn">运单详情</text> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">作业类型</view> |
| | | <view class="value">入园装货</view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="label">车前牌照号</view> |
| | | <view class="value" @click="openInput(1)"> |
| | | <text :style="{ color: param.carNos ? '#000000' : '#999999' }">{{ |
| | | param.carNos ? param.carNos : "请输入车前牌照号" |
| | | }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">车后牌照号</view> |
| | | <view class="value"> |
| | | <text |
| | | @click="openInput(1)" |
| | | :style="{ color: param.carNos ? '#000000' : '#999999' }" |
| | | >{{ param.carNos ? param.carNos : "请输入车后牌照号" }}</text |
| | | > |
| | | <text class="copy">复制车前牌照号</text> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | </view> |
| | | <view class="space"></view> |
| | | <!-- 等待叫号 --> |
| | | <view class="sub_wrap"> |
| | | <view class="btn check">确认任务</view> |
| | | </view> |
| | | <view class="main_app"> |
| | | <view class="status_wrap"> |
| | | <image class="bg" src="../../static/driver/bg_renwu@2x.png" mode=""></image> |
| | | <view class="name">请确认任务</view> |
| | | <view class="id_card">{{ param.carCodeFront }}</view> |
| | | <view class="status">任务待确认</view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="main_content"> |
| | | <view class="line"> |
| | | <view class="label">司机姓名</view> |
| | | <view class="value">{{ param.driverName }}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">手机号</view> |
| | | <view class="value">{{ param.drivierPhone }}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">运输单号</view> |
| | | <view class="value" @click="showDetail = true"> |
| | | <text class="waybill_num">{{ param.contractNum }}</text> |
| | | <text class="btn">运单详情</text> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">作业类型</view> |
| | | <view class="value">{{ param.inType == 0 ? '整托盘' : '件烟' }}</view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="label">到场日期<text class="red ml6">*</text></view> |
| | | <view class="value" @click="showDate = true"> |
| | | <view :class="param.date ? '' : 'placeholder9'">{{ param.date ? param.date : '请选择' }}</view> |
| | | <u-icon color="#999999" name="arrow-right"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">车前牌照号</view> |
| | | <view class="value" @click="openInput(1)"> |
| | | <text :style="{ color: param.carCodeFront ? '#000000' : '#999999' }">{{ param.carCodeFront ? param.carCodeFront : '请输入车前牌照号' }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">车后牌照号<text class="red ml6">*</text></view> |
| | | <view class="value"> |
| | | <text @click="openInput(2)" :style="{ color: param.carCodeBack ? '#000000' : '#999999' }">{{ param.carCodeBack ? param.carCodeBack : '请输入车后牌照号' }}</text> |
| | | <text class="copy" @click="copy">复制车前牌照号</text> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | </view> |
| | | <view class="space"></view> |
| | | <!-- 等待叫号 --> |
| | | <view class="sub_wrap"><view class="btn check" @click="onSubmit">确认任务</view></view> |
| | | |
| | | <!-- modal --> |
| | | <u-popup |
| | | :show="showDetail" |
| | | :round="10" |
| | | :safeAreaInsetBottom="true" |
| | | closeOnClickOverlay |
| | | :closeable="true" |
| | | mode="bottom" |
| | | @close="showDetail = false" |
| | | > |
| | | <view class="detail_modal"> |
| | | <view class="modal_title">运单详情</view> |
| | | <view class="id_card"> |
| | | <view class="last">皖</view> |
| | | <view class="name">AD1111</view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="info"> |
| | | <view class="line"> |
| | | <view class="label">运输单号</view> |
| | | <view class="value">2222</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">驾驶员</view> |
| | | <view class="value">2222</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">总运输量</view> |
| | | <view class="value">2222</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">运输公司</view> |
| | | <view class="value">2222</view> |
| | | </view> |
| | | </view> |
| | | <view class="separate"></view> |
| | | <view class="contract_list"> |
| | | <view class="title">合同号:111</view> |
| | | <view class="address">aadd</view> |
| | | <view class="list"> |
| | | <view class="line"> |
| | | <view class="label">物料:</view> |
| | | <view class="value">黄山黑马</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">数量:</view> |
| | | <view class="value">黄山黑马</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">物料:</view> |
| | | <view class="value">黄山黑马</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">数量:</view> |
| | | <view class="value">黄山黑马</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <keyboardInput ref="keyboard" @export="setPlate" @close="closeInput" /> |
| | | </view> |
| | | <!-- --> |
| | | <!-- modal --> |
| | | <u-popup :show="showDetail" :round="10" :safeAreaInsetBottom="true" closeOnClickOverlay :closeable="true" mode="bottom" @close="showDetail = false"> |
| | | <view class="detail_modal"> |
| | | <view class="modal_title">运单详情</view> |
| | | <view class="id_card"> |
| | | <view class="last">皖</view> |
| | | <view class="name">AD1111</view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="info"> |
| | | <view class="line"> |
| | | <view class="label">运输单号</view> |
| | | <view class="value">2222</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">驾驶员</view> |
| | | <view class="value">2222</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">总运输量</view> |
| | | <view class="value">2222</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">运输公司</view> |
| | | <view class="value">2222</view> |
| | | </view> |
| | | </view> |
| | | <view class="separate"></view> |
| | | <view class="contract_list"> |
| | | <view class="title">合同号:111</view> |
| | | <view class="address">aadd</view> |
| | | <view class="list"> |
| | | <view class="line"> |
| | | <view class="label">物料:</view> |
| | | <view class="value">黄山黑马</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">数量:</view> |
| | | <view class="value">黄山黑马</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">物料:</view> |
| | | <view class="value">黄山黑马</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">数量:</view> |
| | | <view class="value">黄山黑马</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <u-datetime-picker :show="showDate" v-model="param.date" :minDate="minDate" @confirm="dateEnter" @cancel="showDate = false" mode="datetime"></u-datetime-picker> |
| | | <keyboardInput ref="keyboard" @export="setPlate" @close="closeInput" /> |
| | | </view> |
| | | <!-- --> |
| | | </template> |
| | | |
| | | <script> |
| | | import keyboardInput from '@/components/keyboard-input/keyboard-input.vue' |
| | | import keyboardInput from '@/components/keyboard-input/keyboard-input.vue'; |
| | | import { driverTaskJobDetail, driverConfirmTask } from '@/api'; |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | components: { |
| | | keyboardInput |
| | | }, |
| | | data() { |
| | | return { |
| | | param: { |
| | | status: '0' |
| | | }, |
| | | showDetail: false, |
| | | components: { |
| | | keyboardInput |
| | | }, |
| | | data() { |
| | | return { |
| | | param: {}, |
| | | showDate: false, |
| | | showDetail: false, |
| | | minDate: '', |
| | | |
| | | inputType: '' |
| | | } |
| | | }, |
| | | methods: { |
| | | handleSignIn() { |
| | | const { param } = this |
| | | this.param.status = param.status == '0' ? '1' : '0' |
| | | }, |
| | | getLocation() { |
| | | uni.getLocation({ |
| | | type: 'wgs84', |
| | | success: function (res) { |
| | | console.log('当前位置的经度:' + res.longitude) |
| | | console.log('当前位置的纬度:' + res.latitude) |
| | | } |
| | | }) |
| | | }, |
| | | openInput(type) { |
| | | this.inputType = type |
| | | this.$refs.keyboard.open() |
| | | }, |
| | | setPlate(e) { |
| | | if (this.inputType === 1) { |
| | | this.param.carNos = e |
| | | } else if (this.inputType === 2) { |
| | | this.param.carNos = e |
| | | } |
| | | this.$forceUpdate() |
| | | this.closeInput() |
| | | }, |
| | | closeInput() { |
| | | this.$refs.keyboard.close() |
| | | } |
| | | } |
| | | } |
| | | inputType: '' |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | | this.getDetail(option.id); |
| | | this.minDate = new Date().getTime() |
| | | }, |
| | | methods: { |
| | | onSubmit(){ |
| | | const { param } = this |
| | | if(!param.date) return this.showToast('请选择到场日期') |
| | | if(!param.carCodeBack) return this.showToast('请输入车后牌照号') |
| | | driverConfirmTask({ |
| | | id: param.id, |
| | | carCodeBack: param.carCodeBack, |
| | | arriveDate: param.date + ':59' |
| | | }).then(res =>{ |
| | | this.showToast('确认成功') |
| | | uni.navigateBack() |
| | | }) |
| | | }, |
| | | getDetail(jobId) { |
| | | driverTaskJobDetail({ |
| | | jobId |
| | | }).then(ress => { |
| | | this.param = { ...ress.data, carCodeBack: '' }; |
| | | }); |
| | | }, |
| | | dateEnter(e) { |
| | | setTimeout(() => { |
| | | this.$set(this.param, 'date', dayjs(e.value).format('YYYY-MM-DD HH:mm')) |
| | | }) |
| | | this.showDate = false |
| | | }, |
| | | openInput(type) { |
| | | this.inputType = type; |
| | | this.$refs.keyboard.open(); |
| | | }, |
| | | copy() { |
| | | if (this.param.carCodeFront) { |
| | | this.$set(this.param, 'carCodeBack', this.param.carCodeFront); |
| | | this.showToast('复制成功'); |
| | | } |
| | | }, |
| | | setPlate(e) { |
| | | if (this.inputType === 1) { |
| | | this.$set(this.param, 'carCodeFront', e); |
| | | } else if (this.inputType === 2) { |
| | | this.$set(this.param, 'carCodeBack', e); |
| | | } |
| | | this.$forceUpdate(); |
| | | this.closeInput(); |
| | | }, |
| | | closeInput() { |
| | | this.$refs.keyboard.close(); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | page { |
| | | background-color: #f7f7f7; |
| | | background-color: #f7f7f7; |
| | | } |
| | | |
| | | .main_app { |
| | | padding: 0; |
| | | padding: 0; |
| | | |
| | | .main_content { |
| | | background: #ffffff; |
| | | border-radius: 20rpx 20rpx 0rpx 0rpx; |
| | | padding: 16rpx 30rpx; |
| | | position: relative; |
| | | bottom: 32rpx; |
| | | .main_content { |
| | | background: #ffffff; |
| | | border-radius: 20rpx 20rpx 0rpx 0rpx; |
| | | padding: 16rpx 30rpx; |
| | | position: relative; |
| | | bottom: 32rpx; |
| | | z-index: 999; |
| | | .line { |
| | | padding: 24rpx 0 28rpx; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | |
| | | .line { |
| | | padding: 24rpx 0 28rpx; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | .label { |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | |
| | | .label { |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | .value { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | font-size: 30rpx; |
| | | |
| | | .value { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | font-size: 30rpx; |
| | | .waybill_num { |
| | | flex: 1; |
| | | } |
| | | |
| | | .waybill_num { |
| | | flex: 1; |
| | | } |
| | | .copy { |
| | | font-size: 26rpx; |
| | | color: $uni-color-primary; |
| | | } |
| | | |
| | | .copy { |
| | | font-size: 26rpx; |
| | | color: $uni-color-primary; |
| | | } |
| | | .btn { |
| | | font-size: 28rpx; |
| | | color: $uni-color-primary; |
| | | display: flex; |
| | | } |
| | | } |
| | | } |
| | | .empty { |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | } |
| | | .warnning { |
| | | display: flex; |
| | | color: #ed4545; |
| | | align-items: center; |
| | | margin: 40rpx 0; |
| | | } |
| | | |
| | | .btn { |
| | | font-size: 28rpx; |
| | | color: $uni-color-primary; |
| | | display: flex; |
| | | } |
| | | } |
| | | } |
| | | .empty { |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | } |
| | | .warnning { |
| | | display: flex; |
| | | color: #ed4545; |
| | | align-items: center; |
| | | margin: 40rpx 0; |
| | | } |
| | | .signIn_wrap { |
| | | margin: 80rpx auto; |
| | | width: 260rpx; |
| | | height: 260rpx; |
| | | position: relative; |
| | | color: #fff; |
| | | z-index: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | .signIn_wrap { |
| | | margin: 80rpx auto; |
| | | width: 260rpx; |
| | | height: 260rpx; |
| | | position: relative; |
| | | color: #fff; |
| | | z-index: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | .handle { |
| | | font-weight: 600; |
| | | font-size: 40rpx; |
| | | line-height: 56rpx; |
| | | } |
| | | |
| | | .handle { |
| | | font-weight: 600; |
| | | font-size: 40rpx; |
| | | line-height: 56rpx; |
| | | } |
| | | .time { |
| | | color: rgba(255, 255, 255, 0.7); |
| | | } |
| | | |
| | | .time { |
| | | color: rgba(255, 255, 255, 0.7); |
| | | } |
| | | .img { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | z-index: -1; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .img { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | z-index: -1; |
| | | } |
| | | } |
| | | } |
| | | .status_wrap { |
| | | height: 200rpx; |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | position: relative; |
| | | z-index: 99; |
| | | color: #fff; |
| | | .bg { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | z-index: -1; |
| | | } |
| | | |
| | | .status_wrap { |
| | | height: 200rpx; |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | position: relative; |
| | | z-index: 99; |
| | | color: #fff; |
| | | .bg { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | z-index: -1; |
| | | } |
| | | .name { |
| | | font-weight: 600; |
| | | font-size: 40rpx; |
| | | line-height: 56rpx; |
| | | margin-bottom: 12rpx; |
| | | } |
| | | |
| | | .name { |
| | | font-weight: 600; |
| | | font-size: 40rpx; |
| | | line-height: 56rpx; |
| | | margin-bottom: 12rpx; |
| | | } |
| | | .id_card { |
| | | color: rgba(255, 255, 255, 0.8); |
| | | } |
| | | .status { |
| | | position: absolute; |
| | | right: 0; |
| | | top: 30rpx; |
| | | height: 68rpx; |
| | | line-height: 68rpx; |
| | | background: #ffffff; |
| | | padding: 0 24rpx; |
| | | border-radius: 34rpx 0rpx 0rpx 34rpx; |
| | | font-size: 26rpx; |
| | | color: $uni-color-primary; |
| | | } |
| | | } |
| | | |
| | | .id_card { |
| | | color: rgba(255, 255, 255, 0.8); |
| | | } |
| | | .status { |
| | | position: absolute; |
| | | right: 0; |
| | | top: 30rpx; |
| | | height: 68rpx; |
| | | line-height: 68rpx; |
| | | background: #ffffff; |
| | | padding: 0 24rpx; |
| | | border-radius: 34rpx 0rpx 0rpx 34rpx; |
| | | font-size: 26rpx; |
| | | color: $uni-color-primary; |
| | | } |
| | | } |
| | | .space { |
| | | width: 750rpx; |
| | | height: 200rpx; |
| | | } |
| | | |
| | | .space { |
| | | width: 750rpx; |
| | | height: 200rpx; |
| | | } |
| | | .sub_wrap { |
| | | position: fixed; |
| | | padding: 16rpx 30rpx 64rpx; |
| | | bottom: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | display: flex; |
| | | z-index: 1; |
| | | justify-content: space-between; |
| | | background-color: #fff; |
| | | .btn { |
| | | height: 96rpx; |
| | | line-height: 96rpx; |
| | | text-align: center; |
| | | width: 690rpx; |
| | | font-size: 36rpx; |
| | | color: #333333; |
| | | background: #ffffff; |
| | | border-radius: 48rpx; |
| | | border: 1rpx solid #999999; |
| | | } |
| | | |
| | | .sub_wrap { |
| | | position: fixed; |
| | | padding: 16rpx 30rpx 64rpx; |
| | | bottom: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | display: flex; |
| | | z-index: 1; |
| | | justify-content: space-between; |
| | | background-color: #fff; |
| | | .btn { |
| | | height: 96rpx; |
| | | line-height: 96rpx; |
| | | text-align: center; |
| | | width: 690rpx; |
| | | font-size: 36rpx; |
| | | color: #333333; |
| | | background: #ffffff; |
| | | border-radius: 48rpx; |
| | | border: 1rpx solid #999999; |
| | | } |
| | | |
| | | .check { |
| | | background: $uni-color-primary; |
| | | border: 1rpx solid $uni-color-primary; |
| | | color: #fff; |
| | | } |
| | | } |
| | | .check { |
| | | background: $uni-color-primary; |
| | | border: 1rpx solid $uni-color-primary; |
| | | color: #fff; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .detail_modal { |
| | | padding: 36rpx 30rpx; |
| | | padding: 36rpx 30rpx; |
| | | |
| | | .modal_title { |
| | | font-weight: 600; |
| | | font-size: 32rpx; |
| | | color: #222222; |
| | | line-height: 44rpx; |
| | | text-align: center; |
| | | margin-bottom: 36rpx; |
| | | } |
| | | .modal_title { |
| | | font-weight: 600; |
| | | font-size: 32rpx; |
| | | color: #222222; |
| | | line-height: 44rpx; |
| | | text-align: center; |
| | | margin-bottom: 36rpx; |
| | | } |
| | | |
| | | .contract_list { |
| | | .list { |
| | | background: #f7f7f7; |
| | | border-radius: 8rpx; |
| | | padding: 20rpx; |
| | | .contract_list { |
| | | .list { |
| | | background: #f7f7f7; |
| | | border-radius: 8rpx; |
| | | padding: 20rpx; |
| | | |
| | | .line { |
| | | display: flex; |
| | | margin-bottom: 20rpx; |
| | | .line { |
| | | display: flex; |
| | | margin-bottom: 20rpx; |
| | | |
| | | &:nth-of-type(3n) { |
| | | border-top: 1rpx solid #e5e5e5; |
| | | padding-top: 20rpx; |
| | | } |
| | | &:nth-of-type(3n) { |
| | | border-top: 1rpx solid #e5e5e5; |
| | | padding-top: 20rpx; |
| | | } |
| | | |
| | | .label { |
| | | color: #666666; |
| | | width: 86rpx; |
| | | } |
| | | .label { |
| | | color: #666666; |
| | | width: 86rpx; |
| | | } |
| | | |
| | | .value { |
| | | flex: 1; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | .value { |
| | | flex: 1; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .title { |
| | | font-weight: 600; |
| | | font-size: 30rpx; |
| | | color: $uni-color-primary; |
| | | margin-bottom: 12rpx; |
| | | } |
| | | .title { |
| | | font-weight: 600; |
| | | font-size: 30rpx; |
| | | color: $uni-color-primary; |
| | | margin-bottom: 12rpx; |
| | | } |
| | | |
| | | .address { |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | } |
| | | .address { |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | } |
| | | |
| | | .info { |
| | | .line { |
| | | display: flex; |
| | | margin-bottom: 20rpx; |
| | | .info { |
| | | .line { |
| | | display: flex; |
| | | margin-bottom: 20rpx; |
| | | |
| | | .label { |
| | | font-size: 30rpx; |
| | | color: #666666; |
| | | width: 150rpx; |
| | | } |
| | | .label { |
| | | font-size: 30rpx; |
| | | color: #666666; |
| | | width: 150rpx; |
| | | } |
| | | |
| | | .value { |
| | | flex: 1; |
| | | font-size: 30rpx; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | .value { |
| | | flex: 1; |
| | | font-size: 30rpx; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .separate { |
| | | width: 750rpx; |
| | | height: 2rpx; |
| | | margin: 30rpx -30rpx; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | | .separate { |
| | | width: 750rpx; |
| | | height: 2rpx; |
| | | margin: 30rpx -30rpx; |
| | | border: 1rpx solid #e5e5e5; |
| | | } |
| | | |
| | | .id_card { |
| | | border-radius: 8rpx; |
| | | display: flex; |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | font-weight: 600; |
| | | font-size: 36rpx; |
| | | color: #111111; |
| | | text-align: center; |
| | | margin-bottom: 30rpx; |
| | | .id_card { |
| | | border-radius: 8rpx; |
| | | display: flex; |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | font-weight: 600; |
| | | font-size: 36rpx; |
| | | color: #111111; |
| | | text-align: center; |
| | | margin-bottom: 30rpx; |
| | | |
| | | .last { |
| | | background: #e9f5f6; |
| | | width: 60rpx; |
| | | border-radius: 8rpx 0rpx 0rpx 8rpx; |
| | | border: 1rpx solid #dfdede; |
| | | } |
| | | .last { |
| | | background: #e9f5f6; |
| | | width: 60rpx; |
| | | border-radius: 8rpx 0rpx 0rpx 8rpx; |
| | | border: 1rpx solid #dfdede; |
| | | } |
| | | |
| | | .name { |
| | | width: 186rpx; |
| | | border: 1rpx solid #dfdede; |
| | | } |
| | | } |
| | | .name { |
| | | width: 186rpx; |
| | | border: 1rpx solid #dfdede; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <view class="main_content"> |
| | | <view class="line"> |
| | | <view class="label">司机姓名</view> |
| | | <view class="value">{{param.lineUpNum}}</view> |
| | | <view class="value">{{param.driverName}}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">手机号</view> |
| | | <view class="value">{{param.lineUpNum}}</view> |
| | | <view class="value">{{param.drivierPhone}}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">运输单号</view> |
| | | <view class="value" @click="showDetail = true"> |
| | | <text class="waybill_num">{{param.lineUpNum}}</text> |
| | | <text class="btn">运单详情</text> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">作业类型</view> |
| | | <view class="value">{{param.lineUpNum}}</view> |
| | | </view> |
| | | <template v-if="param.type == 4"> |
| | | <view class="line"> |
| | | <view class="label">运输单号</view> |
| | | <view class="value" @click="showDetail = true"> |
| | | <text class="waybill_num">{{param.code}}</text> |
| | | <text class="btn">运单详情</text> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">作业类型</view> |
| | | <view class="value">市公司外协车卸货</view> |
| | | </view> |
| | | </template> |
| | | <template v-else> |
| | | <view class="line"> |
| | | <view class="label">合同编号</view> |
| | | <view class="value">{{param.contractNum}}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">入库类型</view> |
| | | <view class="value">{{param.inType == 0 ? '整托盘' : '件烟'}}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">作业量</view> |
| | | <view class="value">{{param.totalNum}}万支</view> |
| | | </view> |
| | | </template> |
| | | <view class="line"> |
| | | <view class="label">车牌照</view> |
| | | <view class="value">{{param.lineUpNum}}</view> |
| | | <view class="value">前:{{param.carCodeFront}} | 后:{{param.carCodeBack}}</view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="line" v-if="param.status == 1"> |
| | | <view class="label">距离园区</view> |
| | | <view class="value"> |
| | | <view class="">0 公里</view> |
| | | <view class="">{{param.getDistance}}公里</view> |
| | | <view class="btn" @click="getLocation"> |
| | | <image class="icon mr6" src="../../static/driver/position.png"></image> |
| | | 重新定位 |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="line" v-if="param.status == 2"> |
| | | <view class="label">签到时间</view> |
| | | <view class="value">{{param.signDate}}</view> |
| | | </view> |
| | | <view class="warnning"> |
| | | <u-icon name="info-circle" color="#ED4545" class="mr12"></u-icon> |
| | | 如无法获取定位,请用微信扫描园区大屏二维 |
| | |
| | | <view class="label">作业完成</view> |
| | | <view class="value">2022</view> |
| | | </view> --> |
| | | <view class="signIn_wrap" @click="handleSignIn"> |
| | | <view v-if="param.status == 1" class="signIn_wrap" @click="handleSignIn"> |
| | | <image |
| | | :src=" |
| | | param.status == '0' |
| | | param.getDistance < signDistance |
| | | ? require('@/static/driver/btn_qiandao@2x.png') |
| | | : require('@/static/driver/btn_qiandao_fail@2x.png') |
| | | " |
| | | class="img" |
| | | mode="widthFix" |
| | | ></image> |
| | | <view class="handle">签到</view> |
| | | <view class="time">09:10</view> |
| | | <view class="handle">{{ param.getDistance > signDistance ? '无法签到' : '签到' }}</view> |
| | | <view class="time">{{nowTime}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="space"></view> |
| | | <!-- 等待叫号 --> |
| | | <view class="padding_wrap"> |
| | | <view class="btn cancel">取消签到</view> |
| | | <view class="btn check">查看排队情况</view> |
| | | <view v-if="param.status == 2" class="padding_wrap"> |
| | | <view class="btn check" @click="handleQueue">查看排队情况</view> |
| | | </view> |
| | | |
| | | <!-- modal --> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { driverTaskJobDetail } from '@/api' |
| | | import { driverTaskJobDetail, driverSignInTask } from '@/api'; |
| | | import dayjs from 'dayjs'; |
| | | export default { |
| | | data() { |
| | | return { |
| | | param: { |
| | | status: '0' |
| | | }, |
| | | jobId: '', |
| | | lat: '', |
| | | lnt: '', |
| | | nowTime: '', |
| | | signDistance: uni.getStorageSync('driverGuide').signDistance, |
| | | showDetail: false, |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | this.getLocation(option.id) |
| | | this.jobId = option.id |
| | | if(option.status && option.status == '1'){ |
| | | this.getLocation() |
| | | }else{ |
| | | this.getDetail() |
| | | } |
| | | |
| | | // this.getDetail({ |
| | | // jobId: option.id, |
| | | // lat: 31.769137, |
| | | // lnt: 117.232241, |
| | | // }) |
| | | setInterval(() => { |
| | | this.nowTime = dayjs().format('HH:mm:ss') |
| | | }) |
| | | }, |
| | | methods: { |
| | | handleSignIn() { |
| | | const { param } = this |
| | | this.param.status = param.status == '0' ? '1' : '0' |
| | | const { param, signDistance, lat, lnt, jobId } = this |
| | | if(param.getDistance > signDistance) return |
| | | driverSignInTask({ |
| | | jobId, lat, lnt,signType: 0 |
| | | }).then(res => { |
| | | this.showToast('签到成功') |
| | | this.getDetail() |
| | | }) |
| | | }, |
| | | getLocation(jobId) { |
| | | getDetail() { |
| | | const { jobId, lat, lnt } = this |
| | | driverTaskJobDetail({ |
| | | jobId: this.jobId, |
| | | lat, |
| | | lnt |
| | | }).then(ress => { |
| | | this.param = { ...ress.data } |
| | | }) |
| | | }, |
| | | getLocation() { |
| | | const { jobId } = this |
| | | uni.getLocation({ |
| | | type: 'wgs84', |
| | | |
| | | success: function (res) { |
| | | driverTaskJobDetail({ |
| | | jobId, |
| | | lat: res.latitude, |
| | | lnt: res.longitude, |
| | | }).then(ress => { |
| | | this.param = { ...ress.data } |
| | | }) |
| | | console.log(res); |
| | | console.log('当前位置的经度:' + res.longitude) |
| | | console.log('当前位置的纬度:' + res.latitude) |
| | | } |
| | | success: (res) => { |
| | | this.lat = res.latitude |
| | | this.lnt = res.longitude |
| | | this.getDetail() |
| | | }, |
| | | fail:(err) => { |
| | | console.log('err', err); |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | handleQueue() { |
| | | uni.navigateTo({ |
| | | url:'/pages/driver/queueUp?jobId=' + this.jobId |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | padding: 16rpx 30rpx; |
| | | position: relative; |
| | | bottom: 32rpx; |
| | | z-index: 999; |
| | | .line { |
| | | padding: 24rpx 0 28rpx; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | |
| | | } |
| | | .padding_wrap { |
| | | position: fixed; |
| | | z-index: 999; |
| | | padding: 0 30rpx 64rpx; |
| | | bottom: 0; |
| | | left: 0; |
| | |
| | | height: 96rpx; |
| | | line-height: 96rpx; |
| | | text-align: center; |
| | | width: 336rpx; |
| | | width: 100%; |
| | | font-size: 36rpx; |
| | | color: #333333; |
| | | background: #ffffff; |
| | |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | | return |
| | | } |
| | | if (data.code === 5112) { |
| | | uni.clearStorageSync() |
| | | uni.navigateTo({ |
| | | return uni.navigateTo({ |
| | | url: '/pages/login/login' |
| | | }) |
| | | } |
| | |
| | | }
|
| | | </script>
|
| | |
|
| | | <style lang="scss">
|
| | | @import "uview-ui/index.scss";
|
| | | /*每个页面公共css */
|
| | | view {
|
| | | box-sizing: border-box;
|
| | | }
|
| | |
|
| | | image {
|
| | | box-sizing: border-box;
|
| | | margin: 0;
|
| | | display: flex;
|
| | | }
|
| | | input {
|
| | | font-size: 30rpx;
|
| | | }
|
| | | textarea {
|
| | | box-sizing: border-box;
|
| | | // background-color: #f7f7f7;
|
| | | font-size: 30rpx !important;
|
| | | padding: 0;
|
| | | border-radius: 8rpx;
|
| | | color: #333333 !important;
|
| | | }
|
| | | .u-textarea {
|
| | | padding: 0 !important;
|
| | | color: #333333 !important;
|
| | | }
|
| | |
|
| | | .df_ac {
|
| | | display: flex;
|
| | | align-items: center;
|
| | | }
|
| | |
|
| | | .main_app {
|
| | | padding: 0 30rpx 30rpx;
|
| | | font-size: 28rpx;
|
| | | color: #333333;
|
| | | }
|
| | | .primaryColor{
|
| | | color: $uni-color-primary;
|
| | | }
|
| | | .placeholder9 {
|
| | | color: #999999;
|
| | | font-size: 28rpx;
|
| | | }
|
| | | .fs24 {
|
| | | font-size: 24rpx;
|
| | | }
|
| | | .mr24 {
|
| | | margin-right: 24rpx;
|
| | | }
|
| | |
|
| | | .mr12 {
|
| | | margin-right: 12rpx;
|
| | | }
|
| | | .ml12 {
|
| | | margin-left: 12rpx;
|
| | | }
|
| | |
|
| | | .mr6 {
|
| | | margin-right: 6rpx;
|
| | | <style lang="scss"> |
| | | /*每个页面公共css */ |
| | | @import "uview-ui/index.scss"; |
| | | |
| | | .flex-cb { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .container { |
| | | height: 100%; |
| | | width: 100%; |
| | | max-width: 800rpx; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .doumee-container .ivu-tabs-nav { |
| | | width: 100%; |
| | | } |
| | | |
| | | .doumee-container .ivu-tabs-nav .ivu-tabs-tab { |
| | | width: calc(100% / 3); |
| | | } |
| | | |
| | | .doumee-container .ivu-tabs-nav .ivu-tabs-tab { |
| | | margin-right: 0; |
| | | text-align: center; |
| | | } |
| | | |
| | | .cell { |
| | | background-color: #fff; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | min-height: 100rpx; |
| | | padding: 24rpx 30rpx; |
| | | box-sizing: border-box; |
| | | border-bottom: 1rpx solid #eee; |
| | | font-size: 15rpx; |
| | | position: relative; |
| | | } |
| | | |
| | | .cell .title { |
| | | flex-shrink: 0; |
| | | color: #222; |
| | | line-height: 20rpx; |
| | | height: 20rpx; |
| | | width: 28%; |
| | | margin-right: 5%; |
| | | } |
| | | |
| | | .cell .content { |
| | | flex: 1; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .cell .content .input { |
| | | width: 100%; |
| | | height: 100%; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | text-align: right; |
| | | } |
| | | |
| | | .cell.is-link::after { |
| | | content: ""; |
| | | display: block; |
| | | width: 8rpx; |
| | | height: 8rpx; |
| | | transform: rotate(-45deg); |
| | | border-right: 1rpx solid #999999; |
| | | border-bottom: 1rpx solid #999999; |
| | | margin-left: 5rpx; |
| | | } |
| | | |
| | | .card { |
| | | background-color: #fff; |
| | | padding: 16rpx; |
| | | position: relative; |
| | | } |
| | | |
| | | .card::after { |
| | | content: ""; |
| | | display: block; |
| | | position: absolute; |
| | | width: calc(100% - 32rpx); |
| | | height: 0; |
| | | bottom: 0; |
| | | left: 16rpx; |
| | | border-bottom: 1rpx solid #f7f7f7; |
| | | } |
| | | |
| | | .card .title { |
| | | color: #777777; |
| | | margin-bottom: 12rpx; |
| | | } |
| | | |
| | | .card .content { |
| | | color: #222; |
| | | } |
| | | |
| | | .placeholder9 { |
| | | color: #999999 !important; |
| | | font-size: 28rpx; |
| | | } |
| | | .red{ |
| | | color: red; |
| | | } |
| | | |
| | | //设置圆角 |
| | | checkbox .uni-checkbox-input { |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | checkbox .uni-checkbox-input.uni-checkbox-input-checked { |
| | | color: #fff !important; |
| | | border: 1px solid #4d99a8 !important; |
| | | background-color: #4d99a8 !important; |
| | | } |
| | | |
| | | checkbox .uni-checkbox-input.uni-checkbox-input-checked:before { |
| | | /* color: #4d99a8 !important; */ |
| | | /* border: 1px solid #4d99a8 !important; */ |
| | | /* font-size: 58rpx; */ |
| | | /* border-radius: 50%; */ |
| | | } |
| | | |
| | | // |
| | | |
| | | view { |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | image { |
| | | box-sizing: border-box; |
| | | margin: 0; |
| | | display: flex; |
| | | } |
| | | input { |
| | | font-size: 30rpx; |
| | | } |
| | | textarea { |
| | | box-sizing: border-box; |
| | | // background-color: #f7f7f7; |
| | | font-size: 30rpx !important; |
| | | padding: 0; |
| | | border-radius: 8rpx; |
| | | color: #333333 !important; |
| | | } |
| | | .u-textarea { |
| | | padding: 0 !important; |
| | | color: #333333 !important; |
| | | } |
| | | |
| | | .df_ac { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .main_app { |
| | | padding: 0 30rpx 30rpx; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | .popupShow { |
| | | overflow: hidden; |
| | | position: fixed; |
| | | width: 100%; |
| | | } |
| | | .placeholder6 { |
| | | color: #666666; |
| | | font-size: 28rpx; |
| | | } |
| | | .primaryColor { |
| | | color: $uni-color-primary; |
| | | } |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | margin-right: 20rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | background-color: $uni-color-primary; |
| | | color: #fff; |
| | | font-size: 30rpx; |
| | | } |
| | | .placeholder9 { |
| | | color: #999999; |
| | | font-size: 28rpx; |
| | | } |
| | | .fs24 { |
| | | font-size: 24rpx; |
| | | } |
| | | .mr24 { |
| | | margin-right: 24rpx; |
| | | } |
| | | .mt24 { |
| | | margin-top: 24rpx; |
| | | } |
| | | |
| | | .mr12 { |
| | | margin-right: 12rpx; |
| | | } |
| | | .ml12 { |
| | | margin-left: 12rpx; |
| | | } |
| | | .ml6 { |
| | | margin-left: 6rpx; |
| | | } |
| | | .mt6 { |
| | | margin-top: 6rpx; |
| | | } |
| | | .mr6 { |
| | | margin-right: 6rpx; |
| | | }
|
| | | </style>
|
| | |
| | | data |
| | | }) |
| | | } |
| | | export const getUserInfo = () => { |
| | | return http({ |
| | | url: 'getUserInfo', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | export const loginCaptcha = () => { |
| | | return http({ |
| | | url: 'captcha', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | // 发送短信验证码 |
| | | export const sendSms = (data) => { |
| | | return http({ |
| | |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 登录 |
| | | export const loginPost = (data) => { |
| | | return http({ |
| | | url: 'loginH5', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 获取月台组信息 |
| | | export const getPlatformGroupList = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/pdaPlatform/getPlatformGroupList', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 获取月台 任务信息 |
| | | export const getPlatformWorkData = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/pdaPlatform/getPlatformWorkData', |
| | | method: 'get', |
| | | data |
| | | }) |
| | | } |
| | | // 车辆排队情况 |
| | | export const platformLineUpPage = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/pdaPlatform/platformLineUpPage', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 月台叫号 |
| | | export const platformCallNumber = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/pdaPlatform/platformCallNumber', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 异常挂起 |
| | | export const platformErr = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/pdaPlatform/platformErr', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 转移月台 |
| | | export const platformMove = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/pdaPlatform/platformMove', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 月台过号 |
| | | export const platformOverNumber = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/pdaPlatform/platformOverNumber', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 完成作业 |
| | | export const finishWork = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/pdaPlatform/finishWork', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 手动开始作业 |
| | | export const beginWork = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/pdaPlatform/beginWork', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 更新月台配置信息 |
| | | export const updUserPlatformConfig = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/pdaPlatform/updUserPlatformConfig', |
| | | method: 'get', |
| | | data |
| | | }) |
| | | } |
| | | // 修改禁启用状态 |
| | | export const updPlatformStatus = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/pdaPlatform/updPlatformStatus', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | |
| | | Vue.use(uView) |
| | | Vue.config.productionTip = false |
| | | Vue.prototype.$store = store |
| | | Vue.prototype.$jump = (url) => {uni.navigateTo({url})} |
| | | Vue.prototype.$goBack = () => { uni.navigateBack() } |
| | | Vue.prototype.showToast = (str) => { |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: str, |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }) |
| | | },100) |
| | | } |
| | | |
| | | App.mpType = 'app' |
| | | const app = new Vue({ |
| | |
| | | "versionName" : "1.0.0", |
| | | "versionCode" : "100", |
| | | "transformPx" : false, |
| | | "h5" : { |
| | | "router" : { |
| | | "mode" : "hash", |
| | | "base" : "./" |
| | | }, |
| | | // "base" : "/h5/" |
| | | "devServer" : { |
| | | "port" : 8090, |
| | | "historyApiFallback" : true, |
| | | "disableHostCheck" : true, |
| | | "proxy" : { |
| | | "/admin_interface" : { |
| | | // 这个字段名需与你配置的basePrefixUrl一致,系统识别到带有/dev-api请求的地址时,会在前面拼接上代理服务器地址 |
| | | // "target" : "http://192.168.0.173/admin_interface", // 代理服务器域名或IP地址 |
| | | "target" : "http://192.168.0.136:10010", // 代理服务器域名或IP地址 |
| | | "changeOrigin" : true, // 允许跨域 |
| | | "pathRewrite" : { |
| | | "^/admin_interface" : "" // 重写地址,如果实际接口中是不带/dev-api,需要将这个前缀置空,因为这个前缀只是为了识别用,识别完之后就没用了 |
| | | } |
| | | } |
| | | }, |
| | | "https" : false |
| | | } |
| | | }, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | | "usingComponents" : true, |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="main_content"> |
| | | <view class="title" |
| | | >安泰物流装货平台<u-icon |
| | | <view class="title" @click="showPlatformgroup = true" |
| | | >{{ activePlatformGroup.name }}<u-icon |
| | | name="arrow-down" |
| | | size="20" |
| | | class="ml12" |
| | |
| | | <view class="platform_list"> |
| | | <view |
| | | class="item" |
| | | :class="{ active: index === 0 }" |
| | | v-for="(i, index) in 8" |
| | | :key="i" |
| | | >1号月台</view |
| | | :class="{ active: item.id === activePlatformId }" |
| | | v-for="(item, index) in activePlatformGroup.platformList" |
| | | :key="index" |
| | | @click="platformClick(item.id)" |
| | | >{{ item.name }}</view |
| | | > |
| | | </view> |
| | | <view class="status_wrap"> |
| | | <view class="status" |
| | | >作业:<text>{{ 0 }}</text></view |
| | | >作业:<text>{{ platformTaskInfo.workNum }}</text></view |
| | | > |
| | | <view class="status" |
| | | >已叫:<text>{{ 0 }}</text></view |
| | | >已叫:<text>{{ platformTaskInfo.callNum }}</text></view |
| | | > |
| | | <view class="status" |
| | | >等待:<text>{{ 0 }}</text></view |
| | | >等待:<text>{{ platformTaskInfo.waitNum }}</text></view |
| | | > |
| | | <view class="status" |
| | | >异常:<text>{{ 0 }}</text></view |
| | | >异常:<text>{{ platformTaskInfo.exceptionNum }}</text></view |
| | | > |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <!-- --> |
| | | <u-picker :show="showPlatformgroup" keyName="name" :columns="[platformGroupList]" @cancel="showPlatformgroup = false" @confirm="platConfirm"></u-picker> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getPlatformGroupList, getPlatformWorkData } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | showPlatformCall: false, // 月台叫号 |
| | | showDetail: false, |
| | | showTransform: false // 转移 |
| | | showTransform: false, // 转移 |
| | | showPlatformgroup: false, |
| | | |
| | | platformGroupList: [], |
| | | activePlatformGroup: {}, |
| | | platformTaskInfo: {}, |
| | | activePlatformId: '', |
| | | } |
| | | }, |
| | | onLoad() { |
| | | |
| | | this.getPlatformGroup() |
| | | }, |
| | | methods: { |
| | | getPlatformGroup() { |
| | | getPlatformGroupList({ |
| | | queryData: 1, |
| | | queryType: 0 |
| | | }).then(res => { |
| | | this.platformGroupList = res.data || [] |
| | | if(this.platformGroupList.length > 0){ |
| | | this.activePlatformGroup = this.platformGroupList[0] |
| | | if(this.activePlatformGroup.platformList && this.activePlatformGroup.platformList.length > 0){ |
| | | this.activePlatformId = this.activePlatformGroup.platformList[0].id |
| | | this.getPlatformTask() |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | getPlatformTask() { |
| | | getPlatformWorkData({platformId: this.activePlatformId}).then(res => { |
| | | this.platformTaskInfo = res.data |
| | | }) |
| | | }, |
| | | platConfirm(e) { |
| | | const index = e.indexs[0] |
| | | this.activePlatformGroup = this.platformGroupList[index] |
| | | if(this.activePlatformGroup.platformList && this.activePlatformGroup.platformList.length > 0){ |
| | | this.activePlatformId = this.activePlatformGroup.platformList[0].id |
| | | this.getPlatformTask() |
| | | } |
| | | this.showPlatformgroup =false |
| | | }, |
| | | platformClick(id) { |
| | | this.activePlatformId = id |
| | | this.getPlatformTask() |
| | | }, |
| | | handleDetail() { |
| | | this.showDetail = true |
| | | }, |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="title"> |
| | | <view class="icon"></view> |
| | | <view class="name">安泰物流卸货月台</view> |
| | | </view> |
| | | <div class="data_list"> |
| | | <div class="line"> |
| | | <div class="name">1号月台</div> |
| | | <u-switch v-model="list"></u-switch> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="name">1号月台</div> |
| | | <u-switch v-model="list"></u-switch> |
| | | </div> |
| | | </div> |
| | | <template v-for="item in platformGroupList"> |
| | | <view class="title"> |
| | | <view class="icon"></view> |
| | | <view class="name">{{item.name}}</view> |
| | | </view> |
| | | <view class="data_list"> |
| | | <view class="line" v-for="(platform, i) in item.platformList" :key="platform.id"> |
| | | <view class="name">{{platform.name}}</view> |
| | | <u-switch v-model="platform.status" activeColor="#279BAA" inactiveColor="#cccccc" :inactiveValue="0" :activeValue="1" @change="e => changeStatus(platform)" /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getPlatformGroupList, updPlatformStatus } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | list: [] |
| | | platformGroupList: [] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | |
| | | this.getPlatformGroup() |
| | | }, |
| | | methods: { |
| | | |
| | | changeStatus(item) { |
| | | console.log(item); |
| | | updPlatformStatus({ |
| | | id: item.id, |
| | | status: item.status |
| | | }) |
| | | }, |
| | | getPlatformGroup() { |
| | | getPlatformGroupList({ |
| | | queryData: 1, |
| | | queryType: 0 |
| | | }).then(res => { |
| | | this.platformGroupList = res.data || [] |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <image class="login_bg" src="@/static/login_bg@2x.png" /> |
| | | <image class="login_logo" src="@/static/logo@2x.png" mode="widthFix" /> |
| | | <view class="login_title" style="marginTop: 40rpx;">安泰物流智慧园区</view> |
| | | <view class="login_title" style="marginBottom: 80rpx;">物流车管理系统</view> |
| | | <view class="login_title" style="marginBottom: 60rpx;">数字化月台调度平台</view> |
| | | <view class="login_list"> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> |
| | |
| | | data() { |
| | | return { |
| | | form: { |
| | | account: '', |
| | | password: '', |
| | | username: '13996529050', |
| | | password: '123456', |
| | | }, |
| | | isShowProtocol: false, |
| | | ProtocolFlag: false, |
| | |
| | | }, |
| | | |
| | | onLoad() { |
| | | // this.initCaptcha() |
| | | this.initCaptcha() |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | changeFalg() { |
| | | this.ProtocolFlag = !this.ProtocolFlag |
| | | }, |
| | | onLogin() { |
| | | const { form, ProtocolFlag } = this |
| | | if (!form.username) return uni.showToast({ |
| | | title: '账号不能为空', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.password) return uni.showToast({ |
| | | title: '密码不能为空', |
| | | icon: 'none' |
| | | }) |
| | | loginPost({ |
| | | ...form, |
| | | code: 1, |
| | | uuid: this.captcha.uuid, |
| | | openId: this.$store.state.openId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.setToken(res.data) |
| | | getUserInfo().then(ress => { |
| | | this.setUserInfo(ress.data) |
| | | uni.redirectTo({ |
| | | url: "/pages/index/index" |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getContent() { |
| | | getSystemDictData({ |
| | | dictCode: 'SYSTEM', |
| | |
| | | this.captcha = res.data |
| | | }) |
| | | }, |
| | | |
| | | onLogin() { |
| | | const { form, ProtocolFlag } = this |
| | | if (!ProtocolFlag) return uni.showToast({ |
| | | title: '请先阅读并同意用户协议', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.username) return uni.showToast({ |
| | | title: '账号不能为空', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.password) return uni.showToast({ |
| | | title: '密码不能为空', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.code) return uni.showToast({ |
| | | title: '验证码不能为空', |
| | | icon: 'none' |
| | | }) |
| | | loginPost({ |
| | | ...form, |
| | | uuid: this.captcha.uuid, |
| | | openId: this.$store.state.openId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.setToken(res.data) |
| | | getUserInfo().then(ress => { |
| | | this.setUserInfo(ress.data) |
| | | uni.redirectTo({ |
| | | url: "/pages/staff/index" |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <style lang="scss" scoped> |
| | | .login { |
| | | width: 100%; |
| | | height: 100vh; |
| | | display: flex; |
| | | padding-top: 160rpx; |
| | | padding-top: 100rpx; |
| | | box-sizing: border-box; |
| | | align-items: center; |
| | | flex-direction: column; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { platformLineUpPage, getPlatformGroupList } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | showDetail: false |
| | | showDetail: false, |
| | | capacity: 10, |
| | | page: 1, |
| | | platformGroupId: '', |
| | | platformGroupList: [] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | |
| | | this.getPlatformGroup() |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | handleDetail() { |
| | | this.showDetail = true |
| | | }, |
| | | getPlatformGroup() { |
| | | getPlatformGroupList().then(res => { |
| | | |
| | | }) |
| | | }, |
| | | initData(){ |
| | | const { page, capacity } = this |
| | | platformLineUpPage({ |
| | | capacity, page, model: {} |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="title"> |
| | | <view class="icon"></view> |
| | | <view class="name">安泰物流卸货月台</view> |
| | | </view> |
| | | <div class="data_list"> |
| | | <div |
| | | class="item" |
| | | :class="{ active: i == 1 }" |
| | | v-for="(item, i) in 7" |
| | | :key="i" |
| | | > |
| | | {{ i }}号月台 |
| | | </div> |
| | | </div> |
| | | <template v-for="item in platformGroupList"> |
| | | <view class="title"> |
| | | <view class="icon"></view> |
| | | <view class="name">{{item.name}}</view> |
| | | </view> |
| | | <view class="data_list"> |
| | | <view |
| | | class="item" |
| | | :class="{ active: platform.showConfig }" |
| | | v-for="(platform, i) in item.platformList" |
| | | :key="platform.id" |
| | | @click="platformClick(platform.id)" |
| | | > |
| | | {{platform.name}} |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <view class="btns"> |
| | | <div class="btn" @click="$goBack">取消</div> |
| | | <div class="btn active" @click="updUserPlatform">确定</div> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getPlatformGroupList, updUserPlatformConfig } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | platformGroupList: [] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | |
| | | this.getPlatformGroup() |
| | | }, |
| | | methods: { |
| | | |
| | | updUserPlatform(){ |
| | | const { platformGroupList } = this |
| | | let ids = [] |
| | | platformGroupList.forEach(item => { |
| | | item.platformList.forEach(platform => { |
| | | if(platform.showConfig){ |
| | | ids.push(platform.id) |
| | | } |
| | | }) |
| | | }) |
| | | updUserPlatformConfig({ids}).then(res => { |
| | | this.showToast('更新成功') |
| | | this.$goBack() |
| | | }) |
| | | }, |
| | | platformClick(id) { |
| | | const { platformGroupList } = this |
| | | platformGroupList.forEach(item => { |
| | | item.platformList.forEach(platform => { |
| | | if(platform.id === id){ |
| | | platform.showConfig = !platform.showConfig |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | getPlatformGroup() { |
| | | getPlatformGroupList({ |
| | | queryData: 1, |
| | | queryType: 1 |
| | | }).then(res => { |
| | | this.platformGroupList = res.data || [] |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | margin-bottom: 20rpx; |
| | | padding: 30rpx; |
| | | background-color: #fff; |
| | | &:nth-last-child(1){ |
| | | margin-bottom: 120rpx; |
| | | } |
| | | .item { |
| | | width: 210rpx; |
| | | height: 80rpx; |
| | |
| | | } |
| | | } |
| | | } |
| | | .btns{ |
| | | position: fixed; |
| | | left: 0; |
| | | bottom: 0; |
| | | width: 750rpx; |
| | | height: 120rpx; |
| | | background: #FFFFFF; |
| | | box-shadow: 0rpx -4rpx 12rpx 0rpx rgba(0,0,0,0.1); |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 0 30rpx; |
| | | .btn{ |
| | | width: 336rpx; |
| | | height: 88rpx; |
| | | background: #FFFFFF; |
| | | border-radius: 44rpx; |
| | | border: 1rpx solid #999999; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 32rpx; |
| | | color: #333333; |
| | | } |
| | | .active{ |
| | | background: $uni-color-primary; |
| | | color: #fff; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | | return |
| | | } |
| | | if (data.code === 5112) { |
| | | uni.navigateTo({ |
| | | return uni.navigateTo({ |
| | | url: '/pages/login/login' |
| | | }) |
| | | } |