yangan
2024-07-05 261d3268cdc1723b43f326df0b770398b9770074
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<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>