management.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <!-- 经销商基本信息 -->
  3. <view class="whole">
  4. <view class="head">
  5. <view class="behind"></view>
  6. <view class="below">
  7. <view class="nothing" v-if="judge==true">
  8. <u-empty mode="page" text="暂无数据"></u-empty>
  9. </view>
  10. <view class="content" v-else v-for="(item, index) in supplier_s" :key="index">
  11. <view class="content_s">
  12. <view class="title">
  13. <view></view>
  14. <h3>{{item.brand}}</h3>
  15. </view>
  16. <view class="information_E">
  17. <u-form-item>
  18. <u-icon name="manager-o" custom-prefix="van-icon"/>
  19. <u-input v-model="item.agentName" />
  20. </u-form-item>
  21. <u-form-item>
  22. <u-icon name="orders-o" custom-prefix="van-icon"/>
  23. <u-input v-model="item.signCount" />
  24. </u-form-item>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import {
  34. request
  35. } from '../../common/request/request'
  36. require("promise.prototype.finally").shim()
  37. export default {
  38. data() {
  39. return {
  40. judge: true,
  41. supplier_s: [] //经销商信息
  42. }
  43. },
  44. created() {
  45. this.supplier()
  46. },
  47. methods: {
  48. supplier() {
  49. uni.getNetworkType({
  50. success: function(res) {
  51. let none = res.networkType
  52. console.log(res.networkType);
  53. if (none == 'none') {
  54. uni.showToast({
  55. icon: 'none',
  56. title: '无网络,请连接网络后再试~',
  57. position: "bottom"
  58. })
  59. }
  60. }
  61. });
  62. request({
  63. url: '/app/appAgent/getBrandAgent',
  64. method: 'get',
  65. params: {
  66. storeId: this.$store.state.storeInfo.storeId,
  67. // userId: this.$store.state.storeInfo.userId
  68. }
  69. }).then(res => {
  70. console.log(res.data.data.data)
  71. if (res.data.code == 0) {
  72. this.supplier_s = res.data.data.data
  73. this.judge = false
  74. }else if(res.data.code == 500){
  75. uni.showToast({
  76. icon: 'none',
  77. title: '出错了,请稍后再试',
  78. position: "bottom"
  79. })
  80. }
  81. }).catch(err => {
  82. console.log(err)
  83. uni.showToast({
  84. icon: 'none',
  85. title: '出错了,请稍后再试',
  86. position: "bottom"
  87. })
  88. }).finally(() => {
  89. // Loading.close()
  90. })
  91. }
  92. }
  93. }
  94. </script>
  95. <style lang="scss" scoped>
  96. .behind {
  97. width: 750rpx;
  98. height: 462rpx;
  99. background: url(../../static/sailun/behind.png) no-repeat;
  100. background-size: 100% 100%;
  101. background-repeat: no-repeat;
  102. margin-top: -150rpx;
  103. padding-top: 100px;
  104. }
  105. .below {
  106. margin-top: -270rpx;
  107. }
  108. .nothing {
  109. width: 96%;
  110. height: 800rpx;
  111. background-color: #FFFFFF;
  112. margin: 0 auto;
  113. margin-top: 20rpx;
  114. border-radius: 20rpx;
  115. box-shadow: 0 0 24rpx 0 rgba(101, 176, 249, 0.41);
  116. }
  117. .content {
  118. width: 667rpx;
  119. height: auto;
  120. background: #FFFFFF;
  121. box-shadow: 0px 10rpx 30rpx 0px rgba(223, 223, 223, 0.51);
  122. border-radius: 18px;
  123. margin: 0 auto;
  124. padding-top: 30rpx;
  125. margin-top: 20rpx;
  126. padding-bottom: 40rpx;
  127. .content_s {
  128. width: 92%;
  129. // height: 330rpx;
  130. height: auto;
  131. margin: 0 auto;
  132. margin-top: 10rpx;
  133. .information {
  134. margin-top: 10rpx;
  135. }
  136. .information_E {
  137. // display: flex;
  138. width: 100%;
  139. flex-flow: wrap;
  140. justify-content: space-around;
  141. align-items: center;
  142. }
  143. .title {
  144. border-bottom: 1rpx solid #EBEBEB;
  145. padding-bottom: 15rpx;
  146. view {
  147. width: 6px;
  148. height: 20px;
  149. background: #0292FD;
  150. float: left;
  151. margin-right: 10rpx;
  152. margin-top: 5rpx;
  153. }
  154. }
  155. }
  156. }
  157. </style>