<template>
|
<view>
|
<view class="bangfang-btns">
|
<view class="btn" v-for="(item,index) in bangfangList" :key="index">
|
<u-button type="primary" @click="handleBangfangClick(item)">{{item.name}}</u-button>
|
</view>
|
</view>
|
<tab-bar :current="1"></tab-bar>
|
</view>
|
|
</template>
|
|
<script>
|
import { BaseUrl } from '@/api/request.js'
|
export default {
|
name: "zhijian-bangfang",
|
data() {
|
return {
|
bangfangList:[]
|
}
|
},
|
onShow() {
|
this.getPoundRoomByList()
|
},
|
methods: {
|
getPoundRoomByList() {
|
this.$reqGet('getPoundRoomsByZJY').then(res => {
|
console.log(res,'磅房列表====')
|
if(res.data) {
|
this.bangfangList = res.data
|
}
|
})
|
},
|
handleBangfangClick(item) {
|
console.log(item,'点击磅房-----')
|
uni.request({
|
url: `${BaseUrl}/wrzs/jccoalweighhouse/getTmTaskCoalNoCar/${item.id}`,
|
method: 'GET',
|
header: {
|
'content-type': 'application/x-www-form-urlencoded',
|
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'),
|
},
|
success: (res) => {
|
console.log(res,'res.datra----------')
|
|
}
|
})
|
// this.$reqGet('getTmTaskCoalNoCar',{houseId:item.id}).then(res => {
|
// console.log(res,'选择磅房====')
|
// if(res.code == 0) {
|
// uni.navigateTo({
|
// url: `/pages/driver-page/driver-index/bill-of-lading-details/nocarNoWeighingDevice/nocarNoWeighingDevice?houseId=${houseId}`
|
// })
|
// }else {
|
// this.$u.toast(res.msg);
|
// }
|
// })
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
::v-deep{
|
.u-button--normal{
|
font-size: 28rpx!important;
|
padding: 0 24rpx!important;
|
}
|
.u-button{
|
height: 74rpx!important;
|
}
|
}
|
page{
|
width: 100%;
|
height: 100%;
|
}
|
.bangfang-btns{
|
width: 100%;
|
height: 100%;
|
display: flex;
|
flex-wrap: wrap;
|
.btn{
|
width: 210rpx;
|
height: 100%;
|
margin: 10rpx 20rpx;
|
align-content: flex-start;
|
padding-top: 20rpx;
|
box-sizing: border-box;
|
}
|
|
}
|
</style>
|