| | |
| | | /* 小程序特有相关 */ |
| | | "mp-weixin" : { |
| | | "appid" : "wx4a62fc1684c429a9", |
| | | "permission": { |
| | | "scope.userFuzzyLocation": { |
| | | "desc": "你的位置信息将用于小程序位置接口的效果展示" |
| | | } |
| | | }, |
| | | "requiredPrivateInfos": [ |
| | | "getFuzzyLocation" |
| | | ], |
| | | "setting" : { |
| | | "urlCheck" : false, |
| | | "es6" : true, |
| | |
| | | "navigationBarTitleText": "矿场签到", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | } |
| | | ], |
| | | "tabBar": { |
| | |
| | | }, |
| | | // 提煤单详情 |
| | | cardBodyClick(name) { |
| | | console.log('提煤单详情', name); |
| | | let code = null; |
| | | this.orderPlanData.forEach(item => { |
| | | if (item.id == name) { |
| | |
| | | }, |
| | | methods: { |
| | | init() { |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }); |
| | | this.getAllHuoDaiByCustomerId(); |
| | | this.getFleet(); |
| | | uni.hideLoading(); |
| | | }, |
| | | // 获取货代列表 |
| | | getAllHuoDaiByCustomerId() { |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }); |
| | | this.$reqGet('getAllHuoDaiByCustomerId').then(res => { |
| | | uni.hideLoading(); |
| | | this.huoDaiData = res.data; |
| | | console.log('货代列表', res); |
| | | }); |
| | | }, |
| | | // 获取车队列表 |
| | | getFleet() { |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }); |
| | | this.$reqGet('getFleet').then(res => { |
| | | uni.hideLoading(); |
| | | this.fleetData = res.data; |
| | | console.log('车队列表', res); |
| | | }); |
| | | }, |
| | | // 添加货代 |
| | |
| | | }, |
| | | // 添加车队 |
| | | addFleet() { |
| | | console.log('添加车队'); |
| | | this.updateGroupShow = true; |
| | | }, |
| | | addNewFleetPopupClose() { |
| | |
| | | yyId: null, |
| | | dayRZ: [], |
| | | coalDetailsData: {}, // 提煤单详情 |
| | | currentPageCoalStatus:0,// 当前页面提煤单状态 |
| | | // 获取所在磅房参数 |
| | | getWeightHouseObj: { |
| | | deptId: '', |
| | |
| | | openId: null, |
| | | openName: '' |
| | | }, |
| | | coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤场', '出煤仓'] // 状态 |
| | | coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤场', '出煤仓'] ,// 状态 |
| | | |
| | | }; |
| | | }, |
| | | onShow() { |
| | |
| | | // 获取客服openId参数赋值 |
| | | this.getServiceOpenid.deptId = this.coalDetailsData.deptId; |
| | | this.getServiceOpenid.filedId = this.coalDetailsData.filedId; |
| | | // 获取提煤单状态 |
| | | this.currentPageCoalStatus = this.coalDetailsData.status |
| | | } |
| | | }); |
| | | }, |
| | |
| | | // 签到 |
| | | arriveClick() { |
| | | uni.navigateTo({ |
| | | url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.orderPlanId}` |
| | | url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.orderPlanId}&coalStatus=${this.currentPageCoalStatus}` |
| | | }); |
| | | }, |
| | | // 入场申请 |
| | |
| | | margin: vww(20); |
| | | margin-bottom: vww(10); |
| | | height: 40%; |
| | | font-size: vww(16); |
| | | font-size: vww(18); |
| | | font-weight: 600; |
| | | view { |
| | | margin-bottom: vww(10); |
| | |
| | | <view class="driver" style="background:url(../../../../../static/image/coalBackgroud/coal-background.png) no-repeat;background-size:100% 100%;"> |
| | | <view class="driver-coalOne">电子提煤单</view> |
| | | <view class="driver-coalTwo"> |
| | | <view class="">{{ coalData.deptName || '暂无所属矿' }}</view> |
| | | <view class="">{{ coalData.coalName || '暂无煤种' }}</view> |
| | | <view class="">{{ coalData.carNo || '暂无车牌' }}</view> |
| | | <view>{{ coalData.code || '暂无订单编号' }}</view> |
| | | <view>{{ coalData.deptName || '暂无所属矿' }}</view> |
| | | <view>{{ coalData.coalName || '暂无煤种' }}</view> |
| | | <view>{{ coalData.carNo || '暂无车牌' }}</view> |
| | | </view> |
| | | <view class="driver-coalThree"> |
| | | <view class="">{{ coalData.customerName || '暂无单位' }}</view> |
| | | <view class="">{{ coalData.yuYueTime || '暂无时间' }}</view> |
| | | <view>{{ coalData.customerName || '暂无单位' }}</view> |
| | | <view>{{ coalData.yuYueTime ? coalData.yuYueTime.slice(0, 10) + ' ' + coalData.yuYueTime.slice(11, 22) : '暂无时间' }}</view> |
| | | </view> |
| | | <view class="driver-coalFour"><image src="@/static/logo.gif" mode=""></image></view> |
| | | </view> |
| | |
| | | view:nth-child(3) { |
| | | margin-top: vww(15); |
| | | } |
| | | view:nth-child(4) { |
| | | margin-top: vww(15); |
| | | } |
| | | } |
| | | &-coalThree { |
| | | margin-top: vww(76); |
| | | margin-top: vww(46); |
| | | font-size: vww(18); |
| | | font-family: Source Han Sans CN, Source Han Sans CN-Bold; |
| | | font-weight: 700; |
| | |
| | | } |
| | | } |
| | | &-coalFour { |
| | | margin: vww(68) 0 0 45.5%; |
| | | margin: vww(58.5) 0 0 45.5%; |
| | | image { |
| | | width: vww(35); |
| | | height: vww(35); |
| | |
| | | <view class="punchTheClock_container"> |
| | | <view class="punchTheClock_btn" @click="arrive"> |
| | | <view> |
| | | <p>签到/打卡</p> |
| | | <p>{{ coalStatus == 2 ? '已签到' : '签到/打卡' }}</p> |
| | | <p>{{ nowTime }}</p> |
| | | </view> |
| | | </view> |
| | |
| | | import { todayDate } from '@/utils/util.js'; |
| | | export default { |
| | | onLoad(params) { |
| | | if (params.orderPlanId) { |
| | | if (params.orderPlanId && params.coalStatus) { |
| | | this.punchTheClockObj.id = params.orderPlanId; |
| | | this.coalStatus = params.coalStatus; |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | nowTime: '', |
| | | coalStatus: 0, |
| | | punchTheClockObj: { |
| | | latitude: null, |
| | | longitude: null, |
| | |
| | | }; |
| | | }, |
| | | onShow() { |
| | | this.todayDate(); |
| | | this.getSetting(); //获取授权 |
| | | this.getFuzzyLocation(); //获取位置 |
| | | this.todayDate(); //当前时间 |
| | | }, |
| | | methods: { |
| | | getSetting() { |
| | | // 获取权限信息 |
| | | wx.getSetting({ |
| | | success(res) { |
| | |
| | | wx.authorize({ |
| | | scope: 'scope.userFuzzyLocation', |
| | | success(res) { |
| | | console.log(res); |
| | | if (res.errMsg == 'authorize:ok') { |
| | | // 获取位置信息 |
| | | this.getFuzzyLocation(); |
| | | } |
| | | uni.showToast({ |
| | | title: '授权成功!' |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | this.getFuzzyLocation(); |
| | | } |
| | | }, |
| | | fail() { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | methods: { |
| | | getFuzzyLocation() { |
| | | let that = this; |
| | | wx.getFuzzyLocation({ |
| | | type: 'wgs84', |
| | | success(res) { |
| | | console.log(res, '获取位置'); |
| | | this.punchTheClockObj.latitude = res.latitude; |
| | | this.punchTheClockObj.longitude = res.longitude; |
| | | console.log(res, '获取位置', that); |
| | | that.punchTheClockObj.latitude = res.latitude; |
| | | that.punchTheClockObj.longitude = res.longitude; |
| | | } |
| | | }); |
| | | }, |
| | |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | p{ |
| | | text-align: center; |
| | | } |
| | | } |
| | | .punchTheClock_text { |
| | | display: flex; |
| | |
| | | }); |
| | | }, |
| | | cardBodyClick(id) { |
| | | let code = null; |
| | | this.orderPlanData.forEach(item => { |
| | | if (item.id == id) { |
| | | code = item.code; |
| | | } |
| | | }); |
| | | uni.navigateTo({ |
| | | url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${id}` |
| | | url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${id}&code=${code}` |
| | | }); |
| | | }, |
| | | // 转发 |
| | |
| | | }); |
| | | this.$nextTick(() => { |
| | | apiLoginWx({ code: uni.getStorageSync('openid') }).then(res => { |
| | | uni.hideLoading(); |
| | | if (res.code != 1) { |
| | | this.$u.toast('恭喜您,登录成功!'); |
| | | // 登陆成功,存储相关信息 |
| | |
| | | this.setUserTabbar(res.data.type); |
| | | uni.setStorageSync('roleType', res.data.type); |
| | | setCustomerId(res.data.customerid); |
| | | uni.hideLoading(); |
| | | //跳转页面 |
| | | this.$nextTick(() => { |
| | | redirectHome(); |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | // username: '12222222222', // 客户 |
| | | username: '13333333332',// 司机 |
| | | username: '12222222222', // 客户 |
| | | // username:'13333333331',//货代 |
| | | // username: '13333333332',// 司机 |
| | | password: '123456', |
| | | remember: true, |
| | | baseUrl: '' |