pages.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/customer-page/customer-index/customer-index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/tabbar-page/index-tabbar/index-tabbar.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
store/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
pages.json
@@ -220,6 +220,15 @@ } } ,{ "path" : "pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan", "style" : { "navigationBarTitleText": "", "enablePullDownRefresh": false } } ], "subPackages": [{ "root": "pages/register", pages/customer-page/customer-index/customer-index.vue
@@ -346,7 +346,7 @@ // 验质 validateClick(index) { uni .navigateTo({ url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?index=${index}` }); .navigateTo({ url: `/pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan?index=${index}` }); }, } }; pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan.vue
New file @@ -0,0 +1,269 @@ <template> <view> <view style="position: relative;top: -120px;"> <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" textSize="30" iconSize="1000" v-if="orderPlanData.length == 0"></u-empty> </view> <view class="collection-form"> <view class="collection-form-item" v-for="(item, index) in orderPlanData" :key="index"> <view class="first-line"> <view class="dispatch-receive"> <view class="dispatch">{{ item.filedName||'' }}</view> </view> <view class="point-number" v-if="roleType == 1"> <text class="residue">{{ item.cars2||'' }}</text> <text>/{{ item.carNum ||''}}</text> </view> </view> <view class="second-line"> <view class="coal-name"> <view class="">{{ item.coalName ||''}}</view> <view class="black-bar"></view> <view class="coal-type" v-if="item.orderType">{{ item.orderType||'' }}</view> </view> </view> <view class="third-line"> <view class="time-icon"> <view style="width: 24rpx;height: 24rpx;li ne-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/carNO.png') no-repeat;background-size: cover"> </view> </view> <view class="car-num">{{ item.carNo||''}}</view> </view> <view class="third-line"> <view class="time-icon"> <view style="width: 24rpx;height: 24rpx;li ne-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover"> </view> </view> <view class="send-date">{{ item.sendDate }}</view> </view> <view class="fourth-line"> <view class="forward" @click.stop="validateClick(item)" v-if='roleType===4'> <view class="button-image">选择</view> </view> </view> </view> </view> </view> </template> <script> export default { data() { return { orderPlanData: [], index: null }; }, computed: { roleType() { return uni.getStorageSync('roleType') } }, onLoad(params) { this.index = params.index ? params.index : '' }, onShow() { this.GetOrderPlan() }, methods: { GetOrderPlan() { uni.showLoading({ title: '加载中...' }); this.$reqGet('GetOrderPlan').then(res => { if (res.data) { this.orderPlanData = res.data[this.index].tmTaskCoals ? res.data[this.index].tmTaskCoals : [] uni.hideLoading(); } else { this.$u.toast('加载失败') uni.hideLoading() } }) }, validateClick(item) { uni.navigateTo({ url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?orderPlanId=${item.id}` }) } }, } </script> <style lang="scss" scoped> .collection-form { width: vww(345); margin: 0 vww(15); position: relative; .collection-form-item { width: 690rpx; height: 320rpx; background: #ffffff; box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15); border-radius: 20rpx; overflow: hidden; @include flex flex-direction: column; position: relative; align-items: flex-start; margin-top: vww(10); .first-line { width: 94%; height: vww(30); margin: vww(10) vww(16) 0 vww(16); display: flex; justify-content: space-between; .dispatch-receive { width: 70%; display: flex; justify-content: space-between; align-items: center; } .point-number { width: 15%; text { font-size: 24rpx; font-weight: 400; color: #c78a64; } .residue { font-size: 40rpx; font-weight: 400; color: #f81414; } } } .second-line { width: 100%; height: vww(30); margin-left: vww(16); display: flex; align-items: center; justify-content: flex-start; .coal-name { flex-grow: 1; height: 30rpx; font-size: 30rpx; font-weight: 300; color: #515151; position: relative; display: flex; align-items: center; .black-bar { width: 2rpx; height: 30rpx; background: #515151; margin-left: vww(12); } .coal-type { margin-left: vww(12); min-width: vww(50); height: 30rpx; line-height: 30rpx; font-size: 30rpx; font-weight: 300; color: #515151; } } } .third-line { width: 80%; height: vww(30); margin-left: vww(15); display: flex; justify-content: flex-start; align-items: center; .send-date { margin-left: vww(14); width: 148rpx; height: 24rpx; line-height: 24rpx; font-size: 28rpx; font-weight: 300; color: #515151; } .car-num { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } } .fourth-line { width: 100%; height: vww(30); @include flex; justify-content: flex-end; position: relative; bottom: vww(10); left: 25%; .receive, .forward { width: vww(123); height: vww(48); @include flex; justify-content: center; color: #ffffff; font-size: 28rpx; position: absolute; .button-image { width: 100%; height: 100%; background: url('https://mx.jzeg.cn:9095/appimg/image/banner/button.png') no-repeat; background-size: cover; font-size: 28rpx; font-weight: 300; color: #ffffff; text-align: center; line-height: vww(45); } } .receive { left: vww(20); } .forward { width: vww(106); left: vww(140); .button-image { width: 100%; height: 100%; background: url('https://mx.jzeg.cn:9095/appimg/image/banner/transpartent.png') no-repeat; background-size: cover; font-size: 28rpx; font-weight: 300; color: #3b56eb; text-align: center; line-height: vww(45); } } } } } </style> pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue
@@ -37,16 +37,16 @@ <view class="label-text"> 折扣率 </view> <view v-if='roleType!==1' class="count">{{ item.discount }}% </view> <view v-else <view v-if='roleType===4' class="count-input"> <u--input placeholder="请输入折扣率" border="bottom" clearable v-model="item.discount" @input='v=>discountInputHandle(v,i,item.clean)'></u--input> </view> <view v-else class="count">{{ item.discount }}% </view> </view> <view class="weigh"> @@ -60,13 +60,13 @@ <u-tag :text="item.level||'请选择'" plain @click="popoverShow(i)" v-if='item.level||roleType===1'></u-tag> v-if='item.level||roleType===4'></u-tag> <u-tag :text="item.productName||'请选择'" plain @click="productNamePopoverShow(i)" v-if='item.level||roleType===1'></u-tag> v-if='item.level||roleType===4'></u-tag> </view> <view v-if='roleType===1'> <view v-if='roleType===4'> <u-picker :show="show" :columns="columns" @cancel='cancel' @@ -82,7 +82,7 @@ </view> </view> <view class="confirm-button" v-if='roleType===1'> v-if='roleType===4'> <u-button type="primary" shape="circle" text="确认" @@ -150,8 +150,8 @@ this.$reqGet('GetOrderPlan').then(res => { if (res.data) { this.coalDetailsData = res.data; this.showWeigh = this.coalDetailsData[this.index].tmTaskCoalItems ? this.coalDetailsData[ this.index].tmTaskCoalItems : [], this.showWeigh = this.coalDetailsData[this.index].tmTaskCoals ? this.coalDetailsData[ this.index].tmTaskCoals : [], uni.hideLoading(); } else { this.$u.toast('加载失败') @@ -187,14 +187,14 @@ }, // 选择质量 popoverShow(i) { if (this.roleType === 1) { if (this.roleType === 4) { this.show = true this.selectIndex = i } }, // 选择产品 productNamePopoverShow(i) { if (this.roleType === 1) { if (this.roleType === 4) { this.actionShow = true this.actionIndex = i } @@ -216,7 +216,7 @@ }, // 折扣率输入 discountInputHandle(value, index, clean) { this.showWeigh[index].discountWeight = (Number(value) * clean) / 100 this.showWeigh[index].discountWeight = ((Number(value) * clean) / 100).toFixed(2) } }, } @@ -236,7 +236,8 @@ .main { width: 100%; height: 100vh; height: 100%; min-height: 400rpx; background-color: #fff; margin: 0 auto; display: flex; @@ -313,8 +314,8 @@ .level { width: 40%; margin-top: 30 rpx; margin-left: 80 rpx; margin-top: 30rpx; margin-left: 80rpx; display: flex; justify-content: space-between; } @@ -322,9 +323,6 @@ } .confirm-button { // position: relative; // bottom: 10rpx; // right: 10rpx; width: 100%; @include flex; justify-content: center; pages/tabbar-page/index-tabbar/index-tabbar.vue
@@ -180,9 +180,6 @@ this.userAuthorization(); this.messageReq(); }, onHide() { console.log('页面隐藏') }, onUnload() { console.log('页面卸载'); this.$store.dispatch('websocketOnClose') @@ -262,63 +259,6 @@ fail() { console.log('获取失败'); } }); }, // 初始化websocket initWebsocket() { let wsUrl = `${webSocketUrl}?access_token=${uni.getStorageSync('token')}`; socket = uni.connectSocket({ url: wsUrl, header: { CLIENT_TOC: 'Y' }, complete: res => { console.log(res, 'socket结果'); if (res.errMsg == 'connectSocket:ok') { this.changeisconnect(true); this.isconnect = true; } } }); 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('message', res); if (res.data.startsWith('weigh')) { let nowWeighObj = JSON.parse(res.data.slice(7)); if (this.globalweighHouseCode && nowWeighObj.eqCode == this.globalweighHouseCode) { if (nowWeighObj.eqInfraredStatus) { this.changeinfraredStatus(true); this.changeWeigh(nowWeighObj.weigh); } else { this.changeinfraredStatus(false); this.changeWeigh(nowWeighObj.weigh); } } } else if (res.data.startsWith('msg')) { this.messageList = JSON.parse(res.data.slice(5)); this.messagePushShow = true; } else {} }); socket.onClose(e => { console.log('webSocketClose', e); this.isconnect = false; this.changeisconnect(false); }); socket.onError(err => { console.log('socket报错', err); this.$u.toast('出现错误,请重新进入该页面,重试!!'); }); }, messageconfirm() { store/index.js
@@ -89,7 +89,7 @@ // 设置底部栏 setUserTabbar(state, roleType) { state.roleType = roleType if (roleType == 1) { if (roleType == 1 || roleType == 4) { state.userTabbar = userRoleTabbar.first uni.setStorageSync('userTabbar', state.userTabbar) } else if (roleType == 2 || roleType == 3) {