| | |
| | | orderPlanId: null, |
| | | orderCode: null, |
| | | orderPlanDetail: {}, |
| | | coalStatus: ['未称重', '称重中', '验质中', '称重完成'], |
| | | coalStatus: ['未称重', '称重中', '验质中', '称重完成', '验质完成'], |
| | | yyDailyList: [], |
| | | // 领取数量 |
| | | cars2: '', |
| | |
| | | id: '', |
| | | yyDailyList: {}, |
| | | orderPlanDetail: {}, |
| | | coalStatus: ['未称重', '称重中', '验质中', '称重完成'], |
| | | coalStatus: ['未称重', '称重中', '验质中', '称重完成', '验质完成'], |
| | | index: '', |
| | | onlineurl, |
| | | }; |
| | |
| | | // 点击右箭头详情弹窗 |
| | | faYunDetailobj: {}, |
| | | modalShow: false, |
| | | coalStatus: ['未称重', '称重中', '验质中', '称重完成'], |
| | | coalStatus: ['未称重', '称重中', '验质中', '称重完成', '验质完成'], |
| | | onlineurl, |
| | | }; |
| | | }, |
| | |
| | | openId: null, |
| | | openName: '' |
| | | }, |
| | | coalStatus: ['未称重', '称重中', '验质中', '称重完成'], // 状态 |
| | | coalStatus: ['未称重', '称重中', '验质中', '称重完成', '验质完成'], // 状态 |
| | | weighHouseCode: '', |
| | | // 放空弹窗控制变量 |
| | | evacuationModalShow: false, |
| | |
| | | <view class="punchTheClock"> |
| | | <!-- 打卡按钮 --> |
| | | <view class="punchTheClock_container"> |
| | | <view class="punchTheClock_btn" @click="arrive"> |
| | | <view class="punchTheClock_btn" |
| | | @click="arrive"> |
| | | <view> |
| | | <p>{{ coalStatus == 2 ? '已签到' : '签到/打卡' }}</p> |
| | | <p>{{ coalStatus == 1 ? '已签到' : '签到/打卡' }}</p> |
| | | <p>{{ nowTime }}</p> |
| | | </view> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { todayDate } from '@/utils/util.js'; |
| | | export default { |
| | | onLoad(params) { |
| | | this.punchTheClockObj.tmcoa = params.tmId.toString(); |
| | | this.coalStatus = params.coalStatus; |
| | | }, |
| | | data() { |
| | | return { |
| | | nowTime: '', |
| | | coalStatus: 0, |
| | | punchTheClockObj: { |
| | | tmcoa: null, |
| | | latA: null, |
| | | latB: null |
| | | } |
| | | }; |
| | | }, |
| | | onShow() { |
| | | this.getSetting(); //获取授权 |
| | | this.getFuzzyLocation(); //获取位置 |
| | | this.todayDate(); //当前时间 |
| | | }, |
| | | methods: { |
| | | getSetting() { |
| | | // 获取权限信息 |
| | | wx.getSetting({ |
| | | success(res) { |
| | | if (!res.authSetting['scope.userFuzzyLocation']) { |
| | | wx.authorize({ |
| | | scope: 'scope.userFuzzyLocation', |
| | | success(res) { |
| | | uni.showToast({ |
| | | title: '授权成功!' |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | fail() { |
| | | console.log('获取失败'); |
| | | import { todayDate } from '@/utils/util.js'; |
| | | export default { |
| | | onLoad(params) { |
| | | this.punchTheClockObj.tmcoa = params.tmId.toString(); |
| | | this.coalStatus = params.coalStatus; |
| | | }, |
| | | data() { |
| | | return { |
| | | nowTime: '', |
| | | coalStatus: 0, |
| | | punchTheClockObj: { |
| | | tmcoa: null, |
| | | latA: null, |
| | | latB: null |
| | | } |
| | | }); |
| | | }; |
| | | }, |
| | | getFuzzyLocation() { |
| | | let that = this; |
| | | wx.getFuzzyLocation({ |
| | | type: 'wgs84', |
| | | success(res) { |
| | | console.log(res, '获取位置', that); |
| | | that.punchTheClockObj.latB = res.latitude; |
| | | that.punchTheClockObj.latA = res.longitude; |
| | | } |
| | | }); |
| | | onShow() { |
| | | this.getSetting(); //获取授权 |
| | | this.getFuzzyLocation(); //获取位置 |
| | | this.todayDate(); //当前时间 |
| | | }, |
| | | todayDate() { |
| | | setInterval(() => { |
| | | this.nowTime = todayDate('hms'); |
| | | }, 1000); |
| | | }, |
| | | // 签到 |
| | | arrive() { |
| | | if (this.punchTheClockObj.latA && this.punchTheClockObj.latB) { |
| | | console.log(this.punchTheClockObj); |
| | | this.$reqPost('arrive', this.punchTheClockObj, 'params').then(res => { |
| | | console.log(res, '签到'); |
| | | if (res.code == 0) { |
| | | this.$u.toast('签到成功'); |
| | | setTimeout(() => { |
| | | uni.navigateBack( |
| | | { |
| | | delta: 1 |
| | | }, |
| | | 500 |
| | | ); |
| | | }); |
| | | } else { |
| | | this.$u.toast(res.msg ? res.msg : '签到失败'); |
| | | methods: { |
| | | getSetting() { |
| | | // 获取权限信息 |
| | | wx.getSetting({ |
| | | success(res) { |
| | | if (!res.authSetting['scope.userFuzzyLocation']) { |
| | | wx.authorize({ |
| | | scope: 'scope.userFuzzyLocation', |
| | | success(res) { |
| | | uni.showToast({ |
| | | title: '授权成功!' |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | fail() { |
| | | console.log('获取失败'); |
| | | } |
| | | }); |
| | | } else { |
| | | this.$u.toast('暂获取不到到当前位置'); |
| | | }, |
| | | getFuzzyLocation() { |
| | | let that = this; |
| | | wx.getFuzzyLocation({ |
| | | type: 'wgs84', |
| | | success(res) { |
| | | console.log(res, '获取位置', that); |
| | | that.punchTheClockObj.latB = res.latitude; |
| | | that.punchTheClockObj.latA = res.longitude; |
| | | } |
| | | }); |
| | | }, |
| | | todayDate() { |
| | | setInterval(() => { |
| | | this.nowTime = todayDate('hms'); |
| | | }, 1000); |
| | | }, |
| | | // 签到 |
| | | arrive() { |
| | | if (this.punchTheClockObj.latA && this.punchTheClockObj.latB) { |
| | | console.log(this.punchTheClockObj); |
| | | this.$reqPost('arrive', this.punchTheClockObj, 'params').then(res => { |
| | | console.log(res, '签到'); |
| | | if (res.code == 0) { |
| | | this.$u.toast('签到成功'); |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }, |
| | | 500 |
| | | ); |
| | | }); |
| | | } else { |
| | | this.$u.toast(res.msg ? res.msg : '签到失败'); |
| | | } |
| | | }); |
| | | } else { |
| | | this.$u.toast('暂获取不到到当前位置'); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .punchTheClock { |
| | | height: 100vh; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | .punchTheClock_container { |
| | | .punchTheClock_btn { |
| | | width: vww(240); |
| | | height: vww(240); |
| | | color: #ffffff; |
| | | font-size: vww(20); |
| | | border-radius: 50%; |
| | | background-color: #36d4e5; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | p { |
| | | text-align: center; |
| | | <style lang="scss" |
| | | scoped> |
| | | .punchTheClock { |
| | | height: 100vh; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | .punchTheClock_container { |
| | | .punchTheClock_btn { |
| | | width: vww(240); |
| | | height: vww(240); |
| | | color: #ffffff; |
| | | font-size: vww(20); |
| | | border-radius: 50%; |
| | | background-color: #36d4e5; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | p { |
| | | text-align: center; |
| | | } |
| | | } |
| | | } |
| | | .punchTheClock_text { |
| | | display: flex; |
| | | justify-content: center; |
| | | margin-top: vww(20); |
| | | color: #b8b8b8; |
| | | .text { |
| | | margin-left: vww(5); |
| | | |
| | | .punchTheClock_text { |
| | | display: flex; |
| | | justify-content: center; |
| | | margin-top: vww(20); |
| | | color: #b8b8b8; |
| | | |
| | | .text { |
| | | margin-left: vww(5); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="history-numbers"> |
| | | <combined-title title="历史提煤单"></combined-title> |
| | | <combined-title title="历史验质完成"></combined-title> |
| | | <scroll-view :scroll-top="scrollTop" |
| | | scroll-y="true" |
| | | class="scroll-Y" |
| | |
| | | :key="index" |
| | | @click="faYundetail(item)"> |
| | | <view class="first"> |
| | | <view class="">{{ item.deptName || '' }}</view> |
| | | <view class="">{{ item.filedName || '' }}</view> |
| | | <view class=""><u-icon name="arrow-right" |
| | | color="#999999" |
| | | size="40"></u-icon></view> |
| | |
| | | </view> |
| | | <view class="third"> |
| | | <view class="third-line"> |
| | | <view class="third-line_text">领取数:</view> |
| | | <view class="third-line_num">{{ item.cars2 }}</view> |
| | | </view> |
| | | <view class="third-line"> |
| | | <view class="third-line_text">剩余数:</view> |
| | | <view |
| | | :style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/carNO.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}"> |
| | | </view> |
| | | <view class="third-line_num" |
| | | v-if="roleType == 1">{{ item.carNumSurplus1 }}</view> |
| | | <view class="third-line_num" |
| | | v-else-if="roleType == 2">{{ item.carNumSurplus }}</view> |
| | | </view> |
| | | <view class="third-line"> |
| | | <view class="third-line_text">提煤单个数:</view> |
| | | <view class="third-line_num">{{ item.tmCount }}</view> |
| | | style=" color: #303030;">{{ item.carNo }}</view> |
| | | </view> |
| | | </view> |
| | | <view class="fourth"> |
| | |
| | | uni.navigateTo({ |
| | | url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?orderPlanId=${item.id}` |
| | | }) |
| | | }, |
| | | faYundetail(item) { |
| | | uni.navigateTo({ |
| | | url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?orderPlanId=${item.id}&flag=${true}` |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | |
| | | margin: 0 auto; |
| | | } |
| | | |
| | | .scroll-Y { |
| | | height: 900rpx; |
| | | |
| | | .more_text { |
| | | color: #333; |
| | | font-size: 24rpx; |
| | | text-align: center; |
| | | } |
| | | } |
| | | |
| | | .history-numbers { |
| | | width: 100%; |
| | | position: relative; |
| | |
| | | <view class="label-text"> |
| | | 折扣率 |
| | | </view> |
| | | <view v-if='roleType===4' |
| | | <view v-if='roleType===4&&!flag' |
| | | class="count-input"> |
| | | <u--input placeholder="请输入折扣率" |
| | | border="bottom" |
| | |
| | | v-model="item.discount" |
| | | @input='v=>discountInputHandle(v,i,item.clean)'></u--input> |
| | | </view> |
| | | <view v-else |
| | | <view v-else-if='flag' |
| | | class="count">{{ item.discount }}% |
| | | </view> |
| | | </view> |
| | |
| | | data() { |
| | | return { |
| | | orderPlanId: "", |
| | | index: null, |
| | | coalDetailsData: {}, |
| | | showWeigh: [], |
| | | discountrate: "", |
| | |
| | | actionShow: false, |
| | | actionIndex: null, |
| | | onlineurl, |
| | | havedInput: false, |
| | | flag: false |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | onLoad(params) { |
| | | this.orderPlanId = params.orderPlanId ? params.orderPlanId : '' |
| | | this.index = params.index ? params.index : '' |
| | | this.flag = params.flag ? params.flag : false |
| | | }, |
| | | onShow() { |
| | | this.roleType === 1 ? this.GetOrderPlan() : this.getTakeCoal() |
| | |
| | | res => { |
| | | if (res.code == 0) { |
| | | this.loading = false |
| | | this.$u.toast('操作成功') |
| | | this.$u.toast('操作成功,即将返回上一页') |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | }, 800) |
| | | } else { |
| | | this.loading = false |
| | | this.$u.toast('操作失败') |
| | |
| | | }, |
| | | // 选择质量 |
| | | popoverShow(i) { |
| | | if (this.roleType === 4) { |
| | | if (this.roleType === 4 && !flag) { |
| | | this.show = true |
| | | this.selectIndex = i |
| | | } |
| | | }, |
| | | // 选择产品 |
| | | productNamePopoverShow(i) { |
| | | if (this.roleType === 4) { |
| | | if (this.roleType === 4 && !flag) { |
| | | this.actionShow = true |
| | | this.actionIndex = i |
| | | } |
| | |
| | | } |
| | | |
| | | .main { |
| | | width: 100%; |
| | | width: 96%; |
| | | height: 100%; |
| | | min-height: 400rpx; |
| | | background-color: #fff; |
| | | margin: 0 auto; |
| | | margin: 10rpx auto; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | |
| | | width: 100%; |
| | | @include flex; |
| | | justify-content: center; |
| | | margin-bottom: 40rpx; |
| | | |
| | | /deep/ .u-button { |
| | | width: 180 rpx !important; |
| | |
| | | return { |
| | | id: '', |
| | | faYunDetailobj: {}, |
| | | coalStatus: ['未称重', '称重中', '验质中', '称重完成'] |
| | | coalStatus: ['未称重', '称重中', '验质中', '称重完成', '验质完成'] |
| | | }; |
| | | }, |
| | | methods: {}, |