reimburse-detail.vue 6.14 KB
Newer Older
李晓兵's avatar
李晓兵 committed
1
<template>
2
  <h-view id="reimburseDetail" class="public-style" style="height: 100%">
李晓兵's avatar
李晓兵 committed
3 4
    <h-header :proportion="[5,1,1]" class="bar-custom">
      <div slot="left" class="h-header-btn">
linxin's avatar
linxin committed
5
        <img src="@/assets/userBind/arrow.png" @click="$routeGo()" >
李晓兵's avatar
李晓兵 committed
6 7 8
        <span>还款明细</span>
      </div>
    </h-header>
Jennie Shi's avatar
Jennie Shi committed
9
    <h-content style="position:absolute;z-index:9999;margin-top:55px;">
linxin's avatar
linxin committed
10
      <list-item :item-height="44">
李晓兵's avatar
李晓兵 committed
11 12
        <item>
          <div slot="name">交易流水号</div>
linxin's avatar
linxin committed
13
          <div slot="content">{{ detail.order_number }}</div>
李晓兵's avatar
李晓兵 committed
14 15 16
        </item>
        <item>
          <div slot="name">交易时间</div>
linxin's avatar
linxin committed
17
          <div slot="content">{{ detail.order_date }}</div>
李晓兵's avatar
李晓兵 committed
18
        </item>
linxin's avatar
linxin committed
19
        <!-- <item>
李晓兵's avatar
李晓兵 committed
20
          <div slot="name">收款账号</div>
21
          <div slot="content">{{ detail.received_amount }}</div>
李晓兵's avatar
李晓兵 committed
22 23 24
        </item>
        <item>
          <div slot="name">收款账户名称</div>
25
          <div slot="content">{{ detail.received_amount_name }}</div>
linxin's avatar
linxin committed
26
        </item> -->
李晓兵's avatar
李晓兵 committed
27 28
        <item>
          <div slot="name">商业伙伴</div>
linxin's avatar
linxin committed
29
          <div slot="content">{{ detail.bp_name }}</div>
李晓兵's avatar
李晓兵 committed
30 31 32
        </item>
        <item>
          <div slot="name">商业伙伴类型</div>
linxin's avatar
linxin committed
33
          <div slot="content">{{ detail.bp_type_n }}</div>
李晓兵's avatar
李晓兵 committed
34 35 36
        </item>
        <item>
          <div slot="name">付款账号</div>
37
          <div slot="content">{{ detail.pay_amount }}</div>
李晓兵's avatar
李晓兵 committed
38
        </item>
linxin's avatar
linxin committed
39
        <!-- <item>
李晓兵's avatar
李晓兵 committed
40
          <div slot="name">付款账户名称</div>
41
          <div slot="content">{{ detail.pay_amount_name }}</div>
linxin's avatar
linxin committed
42
        </item> -->
李晓兵's avatar
李晓兵 committed
43
      </list-item>
linxin's avatar
linxin committed
44 45 46 47 48 49 50 51 52 53 54 55
      <scroll ref="scroll" :updateData="[conList]" :pullUp="true" @pullingUp="getConList">
        <div v-for="(list,index) in conList" :key="index" class="contract">
          <div>
            <div class="top">
              <img src="@/assets/reimburseMyself/q.png" >
              <span class="number">合同号</span>
              <span>{{ list.project_number }}</span>
            </div>
            <div class="bottom">
              <list-item>
                <item v-for="(item,index) in list.cf_lists" :key="index">
                  <div slot="name">{{ item.cf_item_name }}</div>
linxin's avatar
linxin committed
56
                  <div slot="content">{{ parseFloat(item.received_amount).toFixed(2) | currency }}</div>
linxin's avatar
linxin committed
57 58 59
                </item>
              </list-item>
            </div>
linxin's avatar
linxin committed
60 61
          </div>
        </div>
linxin's avatar
linxin committed
62
    </scroll></h-content>
李晓兵's avatar
李晓兵 committed
63 64 65 66 67 68
  </h-view>
</template>

<script>
export default {
  data () {
linxin's avatar
linxin committed
69
    return {
linxin's avatar
linxin committed
70
      pagenum: 1,
linxin's avatar
linxin committed
71
      detail: {},
72
      conList: [],
linxin's avatar
linxin committed
73
    }
李晓兵's avatar
李晓兵 committed
74
  },
linxin's avatar
linxin committed
75 76
  beforeRouteEnter (to, from, next) {
    next(vm => {
linxin's avatar
linxin committed
77
      vm.pagenum = 1
linxin's avatar
linxin committed
78
      vm.getDetail()
79
      vm.getConList()
linxin's avatar
linxin committed
80
    })
李晓兵's avatar
李晓兵 committed
81
  },
linxin's avatar
linxin committed
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
  created: function () {},
  mounted: function () {},
  updated: function () {},
  destroyed: function () {},
  methods: {
    getDetail () {
      let vm = this
      let url = process.env.basePath + 'my_repayment_detial_query'
      let param = {
        order_id: vm.$route.params.order_id,
      }
      hlsPopup.showLoading('请稍候')
      vm.$post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          vm.detail = res.info
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
103
    getConList () {
104 105 106
      let vm = this
      let url = process.env.basePath + 'my_con_list_query'
      let param = {
linxin's avatar
linxin committed
107
        order_id: vm.$route.params.order_id,
linxin's avatar
linxin committed
108 109
        pagesize: 10,
        pagenum: vm.pagenum,
110 111 112 113 114
      }
      hlsPopup.showLoading('请稍候')
      vm.$post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
linxin's avatar
linxin committed
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
          let returnData = []
          returnData = res.prj_lists
          if (returnData.length === 0) {
            vm.$refs.scroll.update(true)
          } else if (returnData.length > 0 && returnData.length < 10) {
            vum.forEach(returnData, function (data, index, array) {
              vm.conList.push(array[index])
            })
            vm.pagenum++
            vm.$refs.scroll.update(true)
          } else if (returnData.length === 10) {
            vum.forEach(returnData, function (data, index, array) {
              vm.conList.push(array[index])
            })
            vm.pagenum++
            vm.$refs.scroll.update(false)
          }
132 133 134 135 136
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
李晓兵's avatar
李晓兵 committed
137 138 139
  },
}
</script>
140
<style lang="less" rel="stylesheet">
linxin's avatar
linxin committed
141 142
#reimburseDetail {
  .h-header-btn {
linxin's avatar
linxin committed
143
    img {
linxin's avatar
linxin committed
144 145 146
      width: 16px;
      height: 16px;
      margin-left: 4px;
147
    }
linxin's avatar
linxin committed
148
    span {
linxin's avatar
linxin committed
149
      font-family: PingFangSC-Semibold;
linxin's avatar
linxin committed
150 151 152 153
      margin-left: 16px;
      font-size: 17px;
      letter-spacing: 0.61px;
      line-height: 24px;
154
    }
linxin's avatar
linxin committed
155 156 157 158 159 160 161 162
  }
  .hls-item .contents .add-name .left-icon {
    width: 30px;
  }

  .list-wrap {
    margin: 10px;
  }
163

linxin's avatar
linxin committed
164 165 166
  .add-name {
    .time-font {
      font-family: PingFangSC-Regular;
linxin's avatar
linxin committed
167
      font-size: 14px;
linxin's avatar
linxin committed
168
      color: #656464;
169
    }
linxin's avatar
linxin committed
170
  }
171

linxin's avatar
linxin committed
172 173 174 175 176 177
  .add-content {
    .money-font {
      font-family: Verdana-Bold;
      font-size: 15px;
      color: rgba(56, 63, 69, 0.6);
      font-weight: 600;
178 179
    }

linxin's avatar
linxin committed
180 181
    .time-font {
      font-family: PingFangSC-Regular;
linxin's avatar
linxin committed
182
      font-size: 14px;
linxin's avatar
linxin committed
183
      color: #656464;
linxin's avatar
linxin committed
184 185
    }
  }
linxin's avatar
linxin committed
186 187 188
  .contract {
    width: 359px;
    background-color: #fff;
linxin's avatar
linxin committed
189
    margin: 0 auto;
linxin's avatar
linxin committed
190 191 192 193 194 195 196 197 198 199
    margin-top: 8px;
    .top {
      height: 43px;
      display: flex;
      align-items: center;
      display: flex;
      img {
        width: 30px;
        height: 30px;
        margin-left: 10px;
200
      }
linxin's avatar
linxin committed
201 202 203
      .number {
        margin-left: 10px;
        font-family: PingFangSC-Semibold;
204
        font-size: 14px;
linxin's avatar
linxin committed
205 206 207
        color: #4b4a4b;
        letter-spacing: 0;
        line-height: 18px;
Jennie Shi's avatar
Jennie Shi committed
208
        white-space: nowrap;
209
      }
linxin's avatar
linxin committed
210
      span:last-child {
linxin's avatar
linxin committed
211
        margin-left: 166px;
linxin's avatar
linxin committed
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
        font-family: PingFangSC-Semibold;
        font-size: 14px;
        color: rgba(75, 74, 75, 0.97);
        letter-spacing: 0;
        line-height: 18px;
      }
    }
    .bottom {
      width: 300px;
      margin: 0 auto;
      display: flex;
    }
    .left {
      flex: 1;
    }
    .right {
      flex: 1;
      text-align: right;
230
    }
linxin's avatar
linxin committed
231 232 233 234 235 236 237 238
  }
  .scrollContent {
    padding-bottom: 320px;
  }
  .tab-style {
    width: 100%;
    position: absolute;
  }
linxin's avatar
linxin committed
239
}
李晓兵's avatar
李晓兵 committed
240
</style>