companyInfo.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <view class="order-list content">
  3. <view class="list-wrap">
  4. <u-sticky bgColor="#fff" class="sticky-main">
  5. <view class="search-wrap">
  6. <view class="input-wrap">
  7. <view class="input search">
  8. <u-search bgColor='#fff' :showAction='false'
  9. :placeholder="$t('base.common.inputPlaceholder')" @search="bindClientList"
  10. @clear='bindClientList' v-model="keyword">
  11. </u-search>
  12. <view class="sx-btn" @click="bindClientList">{{$t("customer_meter.search")}}</view>
  13. </view>
  14. </view>
  15. </view>
  16. </u-sticky>
  17. <template v-if="clientList.length">
  18. <view class="business-card" v-for="item in clientList" :key="item.id">
  19. <view class="title">
  20. <text class="info">NO {{item.companyCode || ''}}</text>
  21. <view class="info">
  22. <u-tag :text="(item.companyEnableMark==1 ? $t('mine.enable'):$t('mine.disable'))"
  23. shape="circle" :type="(item.companyEnableMark==1?'success':'error')">
  24. </u-tag>
  25. </view>
  26. </view>
  27. <view class="business-card-info">
  28. <view class="info-line">
  29. <text class="info">{{item.companyName || ''}}</text>
  30. <text class="info" v-if="vehicleType=='101'">余额 {{item.balance || '0.00'}}</text>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <template v-else>
  36. <u-empty mode="list" icon="https://cdn.uviewui.com/uview/empty/list.png">
  37. </u-empty>
  38. </template>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. import {
  44. getClientList
  45. } from "../../api/tenant.js";
  46. export default {
  47. data() {
  48. return {
  49. keyword: "",
  50. value: "",
  51. enterpriseCode: "",
  52. clientList: [],
  53. tenantId: '',
  54. vehicleType: '101',
  55. };
  56. },
  57. components: {},
  58. onLoad(options) {
  59. this.tenantId = options.tenantId
  60. this.vehicleType = options.vehicleType;
  61. this.bindClientList();
  62. },
  63. methods: {
  64. bindClientList() {
  65. let data = {
  66. tenantId: this.tenantId,
  67. vehicleType: this.vehicleType,
  68. keywords: this.keyword || '',
  69. }
  70. getClientList(data).then((res) => {
  71. if (res.statusCode == 200) {
  72. this.clientList = res.data.data;
  73. }
  74. });
  75. },
  76. },
  77. };
  78. </script>
  79. <style>
  80. /* #ifndef APP-NVUE */
  81. view {
  82. box-sizing: border-box;
  83. }
  84. page {
  85. background-color: #f5f7fa;
  86. }
  87. /* #endif */
  88. </style>
  89. <style lang="scss" scoped>
  90. @import '../../common/css/public.scss';
  91. .input{
  92. padding: 0;
  93. }
  94. </style>