management.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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 class="strip"></view>
  14. <h3>{{item.brand}}</h3>
  15. <view :class="
  16. item.status==='已拒绝'? 'state1':
  17. item.status==='审核通过'? 'state2':'state'"
  18. >
  19. <view>{{item.status}}</view>
  20. <view class="triangle"></view>
  21. </view>
  22. </view>
  23. <view class="information_E">
  24. <u-form-item>
  25. <u-icon name="manager-o" custom-prefix="van-icon" />
  26. <u-input v-model="item.agentName" :disabled="true"/>
  27. </u-form-item>
  28. <u-form-item>
  29. <u-icon name="orders-o" custom-prefix="van-icon" />
  30. <u-input v-model="item.signCount" :disabled="true"/>
  31. </u-form-item>
  32. <u-form-item label="原因:" v-if="item.cause != null"><u-input v-model="item.cause" :disabled="true"/></u-form-item>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import {
  42. request
  43. } from '../../common/request/request'
  44. require("promise.prototype.finally").shim()
  45. export default {
  46. data() {
  47. return {
  48. judge: true,
  49. supplier_s: [] //经销商信息
  50. }
  51. },
  52. created() {
  53. uni.showLoading({
  54. title: '加载中...'
  55. });
  56. console.log("加载中")
  57. setTimeout(function() {
  58. uni.hideLoading();
  59. }, 1000);
  60. this.supplier()
  61. },
  62. methods: {
  63. supplier() {
  64. uni.getNetworkType({
  65. success: function(res) {
  66. let none = res.networkType
  67. console.log(res.networkType);
  68. if (none == 'none') {
  69. uni.showToast({
  70. icon: 'none',
  71. title: '无网络,请连接网络后再试~',
  72. position: "bottom"
  73. })
  74. }
  75. }
  76. });
  77. request({
  78. url: '/app/appAgent/getBrandAgent',
  79. method: 'get',
  80. params: {
  81. storeId: this.$store.state.storeInfo.storeId,
  82. // userId: this.$store.state.storeInfo.userId
  83. }
  84. }).then(res => {
  85. console.log(res)
  86. if (res.data.code == 0) {
  87. this.supplier_s = res.data.data.data
  88. this.judge = false
  89. } else if (res.data.code == 500) {
  90. uni.showToast({
  91. icon: 'none',
  92. title: '出错了,请稍后再试',
  93. position: "bottom"
  94. })
  95. }
  96. }).catch(err => {
  97. console.log(err)
  98. uni.showToast({
  99. icon: 'none',
  100. title: '出错了,请稍后再试',
  101. position: "bottom"
  102. })
  103. }).finally(() => {
  104. // Loading.close()
  105. })
  106. }
  107. }
  108. }
  109. </script>
  110. <style lang="scss" scoped>
  111. .behind {
  112. width: 750rpx;
  113. height: 462rpx;
  114. background: url(../../static/sailun/behind.png) no-repeat;
  115. background-size: 100% 100%;
  116. background-repeat: no-repeat;
  117. margin-top: -150rpx;
  118. padding-top: 100px;
  119. }
  120. .below {
  121. margin-top: -270rpx;
  122. }
  123. .nothing {
  124. width: 96%;
  125. height: 800rpx;
  126. background-color: #FFFFFF;
  127. margin: 0 auto;
  128. margin-top: 20rpx;
  129. border-radius: 20rpx;
  130. box-shadow: 0 0 24rpx 0 rgba(101, 176, 249, 0.41);
  131. }
  132. .state {
  133. width: 200rpx;
  134. height: 60rpx;
  135. background-color: #F6CF19;
  136. float: right;
  137. margin-top: -60rpx;
  138. margin-right: -47rpx;
  139. border-top-left-radius: 60rpx;
  140. border-bottom-left-radius: 60rpx;
  141. text-align: center;
  142. line-height:60rpx;
  143. color: #FFFFFF;
  144. .triangle {
  145. width: 0px;
  146. height: 0px;
  147. margin-top: 0rpx;
  148. margin-right: 0rpx;
  149. border: 10rpx solid;
  150. transform: rotate(270deg);
  151. float: right;
  152. border-color: #B89804 #B89804 transparent transparent;
  153. }
  154. }
  155. .state1{
  156. width: 200rpx;
  157. height: 60rpx;
  158. background-color: #FC1E1E;
  159. float: right;
  160. margin-top: -60rpx;
  161. margin-right: -47rpx;
  162. border-top-left-radius: 60rpx;
  163. border-bottom-left-radius: 60rpx;
  164. text-align: center;
  165. line-height:60rpx;
  166. color: #FFFFFF;
  167. .triangle {
  168. width: 0px;
  169. height: 0px;
  170. margin-top: 0rpx;
  171. margin-right: 0rpx;
  172. border: 10rpx solid;
  173. transform: rotate(270deg);
  174. float: right;
  175. border-color: #960000 #960000 transparent transparent;
  176. }
  177. }
  178. .state2{
  179. width: 200rpx;
  180. height: 60rpx;
  181. background-color: #0094FE;
  182. float: right;
  183. margin-top: -60rpx;
  184. margin-right: -47rpx;
  185. border-top-left-radius: 60rpx;
  186. border-bottom-left-radius: 60rpx;
  187. text-align: center;
  188. line-height:60rpx;
  189. color: #FFFFFF;
  190. .triangle {
  191. width: 0px;
  192. height: 0px;
  193. margin-top: 0rpx;
  194. margin-right: 0rpx;
  195. border: 10rpx solid;
  196. transform: rotate(270deg);
  197. float: right;
  198. border-color: #0F519C #0F519C transparent transparent;
  199. }
  200. }
  201. .content {
  202. width: 667rpx;
  203. height: auto;
  204. background: #FFFFFF;
  205. box-shadow: 0px 10rpx 30rpx 0px rgba(223, 223, 223, 0.51);
  206. border-radius: 18px;
  207. margin: 0 auto;
  208. padding-top: 30rpx;
  209. margin-top: 20rpx;
  210. padding-bottom: 40rpx;
  211. .content_s {
  212. width: 92%;
  213. // height: 330rpx;
  214. height: auto;
  215. margin: 0 auto;
  216. margin-top: 10rpx;
  217. .information {
  218. margin-top: 10rpx;
  219. }
  220. .information_E {
  221. // display: flex;
  222. width: 100%;
  223. flex-flow: wrap;
  224. justify-content: space-around;
  225. align-items: center;
  226. }
  227. .title {
  228. border-bottom: 1rpx solid #EBEBEB;
  229. padding-bottom: 15rpx;
  230. }
  231. .strip {
  232. width: 4px;
  233. height: 20px;
  234. background: #0292FD;
  235. float: left;
  236. margin-right: 10rpx;
  237. margin-top: 5rpx;
  238. }
  239. }
  240. }
  241. </style>