| | |
| | | } |
| | | |
| | | } |
| | | ,{ |
| | | "path" : "faYunstatisticsDetails/faYunstatisticsDetails", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | } |
| | | ] |
| | | }, { |
| | | "root": "pages/driver-page/appointment", |
| | |
| | | <view class="label-title">余量</view> |
| | | <view class="label-value">{{ item.allowance || 0 }}</view> |
| | | </view> |
| | | <view class="more-button"><u-button type="success" text="更多" @click="showMore(index)"></u-button></view> |
| | | <view class="more-button"><u-button type="success" text="详情" @click="showMore(index)"></u-button></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="content-statistics"> |
| | | <view class="content-text">发运统计</view> |
| | | <view class="content-text">共{{ totalLength }}车</view> |
| | | <view class="content-text">共{{ totalTon }}吨</view> |
| | | <view class="content-text">共{{ totalTon.toFixed(2) }}吨</view> |
| | | </view> |
| | | </view> |
| | | <view class="collapse-main"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="filter-body" v-if="roleType == 2"> |
| | | <view class="condition-name">车牌号:</view> |
| | | <view class="filter-name"> |
| | | <view class="filter-button" v-for="(item, index) in carNoList" :key="index" @click="filterCondition(6, index, item.condition)"> |
| | | <u-button shape="circle" :text="item.condition" :type="item.active ? 'success' : ''" size="small"></u-button> |
| | | </view> |
| | | <view class="toggle-button"> |
| | | <u-button |
| | | shape="circle" |
| | | :text="carNoShow < carNoTotal ? '查看更多' : '收起'" |
| | | type="primary" |
| | | size="small" |
| | | @click="toggle(6)" |
| | | v-if="carNoTotal > 3" |
| | | ></u-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="filter-body"> |
| | | <view class="condition-name">日期:</view> |
| | | <view class="filter-name"> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="card-main" v-for="(value, i) in item.taskCoalList" :key="i"> |
| | | <view class="arrow-right"><u-icon name="arrow-right" size="50"></u-icon></view> |
| | | <view class="arrow-right" @click="faYunDetail(value.id)"><u-icon name="arrow-right" size="50"></u-icon></view> |
| | | <view class="main-body"> |
| | | <view class="coal-name">煤种:{{ value.coalName || '' }}</view> |
| | | <view class="clean">执行量:{{ value.clean || 0 }}</view> |
| | | <view class="clean">执行量:{{ value.clean.toFixed(2) || 0 }}</view> |
| | | <view class="out-time">出场时间:{{ value.outTime || '' }}</view> |
| | | <view class="car-number">车牌号:{{ value.carNo || '' }}</view> |
| | | <view class="filedName">矿场:{{ value.filedName || '' }}</view> |
| | |
| | | forwarderList: [], |
| | | fleetList: [], |
| | | filedList: [], |
| | | carNoList: [], |
| | | isactive: false, |
| | | info: { |
| | | lunar: false, |
| | |
| | | forwarderShow: 3, |
| | | fleetShow: 3, |
| | | filedShow: 3, |
| | | carNoShow: 3, |
| | | coalToggeleState: false, |
| | | typeToggeleState: false, |
| | | customerToggeleState: false, |
| | | forwarderToggeleState: false, |
| | | fleetToggeleState: false, |
| | | filedToggeleState: false |
| | | filedToggeleState: false, |
| | | carNoToggeleState: false, |
| | | // 点击右箭头详情弹窗 |
| | | faYunDetailobj: {}, |
| | | modalShow: false, |
| | | coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤场', '出煤仓'] |
| | | }; |
| | | }, |
| | | onShow() { |
| | |
| | | active: false |
| | | }; |
| | | }); |
| | | this.carNoList = res.data |
| | | .filter(v => v.conditionType == 6) |
| | | .map(item => { |
| | | return { |
| | | ...item, |
| | | active: false |
| | | }; |
| | | }); |
| | | }); |
| | | }, |
| | | // 获取数据 |
| | |
| | | case 5: |
| | | this.filedList[i].active = !this.filedList[i].active; |
| | | break; |
| | | case 6: |
| | | this.carNoList[i].active = !this.carNoList[i].active; |
| | | break; |
| | | } |
| | | |
| | | const validateFn = key => (v, arr) => { |
| | |
| | | customerName: this.customerList.filter(v => v.active == true).map(item => item.condition), |
| | | xsUser2Name: this.forwarderList.filter(v => v.active == true).map(item => item.condition), |
| | | fleetName: this.fleetList.filter(v => v.active == true).map(item => item.condition), |
| | | filedName: this.filedList.filter(v => v.active == true).map(item => item.condition) |
| | | filedName: this.filedList.filter(v => v.active == true).map(item => item.condition), |
| | | carNo: this.carNoList.filter(v => v.active == true).map(item => item.condition) |
| | | }; |
| | | |
| | | const mapping = { |
| | |
| | | customerName: validateFn('customerName'), |
| | | xsUser2Name: validateFn('xsUser2Name'), |
| | | fleetName: validateFn('fleetName'), |
| | | filedName: validateFn('filedName') |
| | | filedName: validateFn('filedName'), |
| | | carNo: validateFn('carNo') |
| | | }; |
| | | this.filterList = this.taskList.map(val => { |
| | | return { |
| | |
| | | this.filedToggeleState = false; |
| | | } |
| | | break; |
| | | case 6: |
| | | if (!this.carNoToggeleState) { |
| | | this.carNoShow = this.carNoTotal; |
| | | this.carNoToggeleState = true; |
| | | } else { |
| | | this.carNoShow = 3; |
| | | this.carNoToggeleState = false; |
| | | } |
| | | break; |
| | | } |
| | | }, |
| | | // 跳转发运详情 |
| | | faYunDetail(takeCoalId) { |
| | | uni.navigateTo({ |
| | | url: `/pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails?id=${takeCoalId}` |
| | | }); |
| | | }, |
| | | confirm() { |
| | | this.modalShow = false; |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | filedTotal() { |
| | | return this.filedList.length; |
| | | }, |
| | | carNoTotal() { |
| | | return this.carNoList.length; |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .content-text { |
| | | width: vww(80); |
| | | width: 33.3%; |
| | | height: vww(30); |
| | | font-size: vww(20); |
| | | color: #393a3c; |
| | |
| | | } |
| | | } |
| | | .toggle-button { |
| | | margin-top: vww(12); |
| | | margin: vww(12) auto; |
| | | position: relative; |
| | | left: -10%; |
| | | transform: translateX(-50%); |
| | | } |
| | | } |
| | | } |
| | |
| | | sceneId: '', |
| | | gateCameraId: '', |
| | | equipmentCode: '', |
| | | weigh: 0 |
| | | weigh: 0, |
| | | sceneInOut: '' |
| | | }, |
| | | // 原发信息 |
| | | primarySkin: null, |
| | |
| | | this.weighData.sceneId = res.data.id; |
| | | this.weighData.gateCameraId = res.data.lastEquipmentId; |
| | | this.weighData.equipmentCode = res.data.lastEquipmentCode; |
| | | this.weighData.sceneInOut = res.data.sceneInOut; |
| | | this.weighHouseCode = res.data.code; |
| | | uni.navigateTo({ |
| | | url: `/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice?takeCoalId=${this.orderPlanId}&sceneId=${ |
| | | res.data.id |
| | | }&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}&primarySkin=${ |
| | | this.primarySkin |
| | | }&primaryHair=${this.primaryHair}&primaryClean=${this.primaryClean}` |
| | | }&primaryHair=${this.primaryHair}&psrimaryClean=${this.primaryClean}&sceneInOut=${res.data.sceneInOut}` |
| | | }); |
| | | } else { |
| | | this.$u.toast('未在磅房,请前往磅房后再试!!'); |
| | |
| | | this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => { |
| | | console.log('获取提煤单详情', res); |
| | | if (res.code == 0) { |
| | | this.coalData = res.data[0]; |
| | | this.coalData = res.data; |
| | | } else { |
| | | this.$u.toast('加载失败'); |
| | | } |
| | |
| | | let socket = null; |
| | | import { webSocketUrl } from '@/api/request.js'; |
| | | import { mapState, mapMutations } from 'vuex'; |
| | | import toast from '../../../../../uni_modules/uview-ui/libs/config/props/toast'; |
| | | export default { |
| | | onLoad(params) { |
| | | this.takeCoalId = params.takeCoalId; |
| | | this.weighData.sceneId = params.sceneId; |
| | | this.weighData.gateCameraId = params.gateCameraId; |
| | | this.weighData.equipmentCode = params.gateCameraCode; |
| | | this.weighData.sceneInOut = params.sceneInOut; |
| | | this.weighHouseCode = params.weighHouseCode; |
| | | this.primarySkin = params.primarySkin; |
| | | this.primaryHair = params.primaryHair; |
| | |
| | | gateCameraId: '', |
| | | equipmentCode: '', |
| | | weigh: 0, |
| | | tmCode: '' |
| | | tmCode: '', |
| | | sceneInOut: '' |
| | | }, |
| | | takeCoalId: null, |
| | | weighHouseCode: '', |
| | |
| | | } |
| | | }, |
| | | // 监听重量变化 |
| | | globalweigh(v) { |
| | | this.weighData.weigh = this.realTimeWeigh = v; |
| | | globalweigh: { |
| | | handler(v) { |
| | | this.weighData.weigh = this.realTimeWeigh = v; |
| | | console.log(this.realTimeWeigh, '真实重量改变了'); |
| | | }, |
| | | immediate: true, |
| | | deep: true |
| | | } |
| | | }, |
| | | onShow() { |
New file |
| | |
| | | <template> |
| | | <view> |
| | | <combined-title title="发运详情"></combined-title> |
| | | <view class="compDetails"> |
| | | <uni-table border stripe emptyText="暂无更多数据"> |
| | | <uni-tr> |
| | | <uni-th align="left">提煤单编号</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.code || '' }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">提煤单状态</uni-th> |
| | | <uni-td align="left">{{ coalStatus[faYunDetailobj.status] }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">车牌号</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.carNo || '' }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">入场时间</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.inTime || '' }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">出场时间</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.outTime || '' }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">皮重</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.skin || 0 }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">毛重</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.hair || 0 }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">净重</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.clean || 0 }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">订单编号</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.orderCode || '' }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">订单剩余量</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.allowance || 0 }}</uni-td> |
| | | </uni-tr> |
| | | </uni-table> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | id: '', |
| | | faYunDetailobj: {}, |
| | | coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤场', '出煤仓'] |
| | | }; |
| | | }, |
| | | methods: {}, |
| | | onLoad(params) { |
| | | this.id = params.id; |
| | | }, |
| | | onShow() { |
| | | this.$reqGet('getTakeCoal', { takeCoalId: this.id }).then(res => { |
| | | if (res.code == 0) { |
| | | this.faYunDetailobj = res.data; |
| | | } else { |
| | | this.$u.toast('获取数据失败'); |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .uni-table { |
| | | .uni-table-tr { |
| | | padding: 0; |
| | | border: vww(1) solid #c6c6c6; |
| | | .uni-table-th { |
| | | font-size: vww(14); |
| | | height: vww(30); |
| | | line-height: vww(30); |
| | | padding: vww(5) vww(10); |
| | | color: #111111; |
| | | font-weight: 500; |
| | | background: #e2e2e2; |
| | | } |
| | | .uni-table-td { |
| | | font-size: vww(14); |
| | | font-weight: 400; |
| | | height: vww(30); |
| | | line-height: vww(30); |
| | | padding: vww(5) vww(10); |
| | | color: #111111; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <driver-index v-if="roleType == 3" ref="driverIndexRef" :indexdriverBillOfLoadingData="indexdriverBillOfLoadingData"></driver-index> |
| | | <tab-bar :current="0"></tab-bar> |
| | | <!-- 推送消息弹窗 --> |
| | | <u-modal :show="messagePushShow" :title="messageList.title" :content="messageList.content" @confirm="messageconfirm"></u-modal> |
| | | <u-modal :show="messagePushShow" :title="messageList.title" @confirm="messageconfirm"> |
| | | <view class="slot-content"><rich-text :nodes="messageList.content"></rich-text></view> |
| | | </u-modal> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | } |
| | | this.userAuthorization(); |
| | | }, |
| | | onHide() { |
| | | console.log('页面隐藏'); |
| | | if (!this.isconnect) { |
| | | this.initWebsocket(); |
| | | } |
| | | }, |
| | | onUnload() { |
| | | console.log('页面卸载'); |
| | | socket.close(); |
| | | clearInterval(this.intervalId); |
| | | }, |
| | | methods: { |
| | | ...mapMutations(['pushMessage', 'changeWeigh', 'changeinfraredStatus']), |
| | | messagePage() { |
| | |
| | | }); |
| | | socket.onOpen(() => { |
| | | console.log('onOpen'); |
| | | this.intervalId = setInterval(() => { |
| | | socket.send({ |
| | | data: JSON.stringify({ type: 'ping' }), |
| | | success(e) { |
| | | console.log(e, '发送心跳成功'); |
| | | } |
| | | }); |
| | | }, 30000); |
| | | }); |
| | | |
| | | // 获取服务器传来的数据,做相应处理 |
| | | socket.onMessage(res => { |
| | | console.log('socketWeigh', res); |
| | | console.log('message', res); |
| | | if (res.data.startsWith('weigh')) { |
| | | let nowWeighObj = JSON.parse(res.data.slice(7)); |
| | | if (this.globalweighHouseCode && nowWeighObj.eqCode == this.globalweighHouseCode) { |
| | |
| | | this.changeWeigh(nowWeighObj.weigh); |
| | | } |
| | | } |
| | | } else { |
| | | } else if (res.data.startsWith('msg')) { |
| | | this.messageList = JSON.parse(res.data.slice(5)); |
| | | this.messagePushShow = true; |
| | | } else { |
| | | console.log('websocket还在活着'); |
| | | } |
| | | }); |
| | | socket.onClose(() => { |
| | | console.log('webSocketClose'); |
| | | socket.onClose(e => { |
| | | console.log('webSocketClose', e); |
| | | this.$u.toast('连接已断开,请重新进入该页面,重试!!'); |
| | | this.isconnect = false; |
| | | }); |
| | | socket.onError(err => { |
| | |
| | | // 改变重量 |
| | | changeWeigh(state, payload) { |
| | | state.globalweigh = payload |
| | | console.log(state.globalweigh, '重量改变了') |
| | | console.log(state.globalweigh, '全局重量改变了') |
| | | }, |
| | | // 消息推送 |
| | | pushMessage(state, payload) { |