partner-business-item.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <template>
  2. <view>
  3. <view class="box">
  4. <view class="top">
  5. <text class="title">业务详情</text>
  6. </view>
  7. </view>
  8. <view class="card-box">
  9. <view class="card" v-for="(businessItem,index) in items" :key="businessItem.id">
  10. <view class="t">
  11. <image class="icon" src="../../static/home-icon-01.png"></image>
  12. <text class="title">{{ businessItem.itemTypeName }}</text>
  13. </view>
  14. <view class="c">
  15. <view class="item car-num-item">
  16. <text class="car-num">{{ businessItem.itemName }}</text>
  17. </view>
  18. </view>
  19. <view class="c">
  20. <view class="item">
  21. <text class="p1">录入时间:</text>
  22. <text class="p2">{{ businessItem.createTime }}</text>
  23. </view>
  24. </view>
  25. <view class="c" v-if="businessItem.cardNo">
  26. <view class="item">
  27. <text class="p1">车辆:</text>
  28. <text class="p2">{{ businessItem.cardNo }}</text>
  29. </view>
  30. </view>
  31. <view class="c">
  32. <view class="item" v-if="businessItem.pickTime">
  33. <text class="p1">接单时间:</text>
  34. <text class="p2">
  35. <text>{{ businessItem.pickTime }}</text>
  36. </text>
  37. </view>
  38. </view>
  39. <view class="c" v-if="businessItem.pick==1">
  40. <view class="item">
  41. <text class="p1">客户确认:</text>
  42. <text class="p2">
  43. <text v-if="businessItem.confirm==1">已确认</text>
  44. <text v-else>未确认</text>
  45. </text>
  46. </view>
  47. </view>
  48. <view class="c" v-if="businessItem.confirm==1">
  49. <view class="item">
  50. <text class="p1">确认时间:</text>
  51. <text class="p2">
  52. <text>{{ businessItem.confirmTime }}</text>
  53. </text>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. <noData v-if="items.length==0"></noData>
  59. <u-loadmore style="margin: 30rpx;" :status="status"/>
  60. </view>
  61. </template>
  62. <script>
  63. export default {
  64. data() {
  65. return {
  66. customerId: '',
  67. form: {},
  68. items: [],
  69. status: 'loadmore',
  70. p: {
  71. pageNo: 1,
  72. pageSize: 3,
  73. dataCount: 0
  74. },
  75. }
  76. },
  77. onShow() {
  78. this.getPartnerBusinessItem();
  79. },
  80. onBackPress() {
  81. this.$common.to('/pages/index/index')
  82. return true;
  83. },
  84. methods: {
  85. getPartnerBusinessItem() {
  86. this.$api.getPartnerBusinessItem(this.p).then(resp => {
  87. this.status = 'loadmore';
  88. this.p.pageNo = resp.pageNo;
  89. this.p.pageSize = resp.pageSize;
  90. this.p.dataCount = resp.dataCount;
  91. this.items = resp.data;
  92. })
  93. },
  94. //上拉加载更多,分页模拟数据
  95. onReachBottom() {
  96. if (parseInt(this.p.dataCount) > parseInt(this.p.pageSize) * parseInt(this.p.pageNo)) {
  97. this.status = 'loading';
  98. this.p.pageSize += 5;
  99. this.getPartnerBusinessItem();
  100. } else {
  101. this.status = 'nomore';
  102. }
  103. }
  104. }
  105. }
  106. </script>
  107. <style lang="scss">
  108. .card-box {
  109. display: flex;
  110. width: 100%;
  111. flex-direction: column;
  112. .card {
  113. background-color: #fff;
  114. border-radius: 20rpx;
  115. margin: 20rpx 20rpx 0 20rpx;
  116. padding: 30rpx;
  117. box-sizing: border-box;
  118. display: flex;
  119. flex-direction: column;
  120. .t {
  121. width: 100%;
  122. display: flex;
  123. align-items: center;
  124. padding-bottom: 30rpx;
  125. border-bottom: 1rpx solid #f5f5f5;
  126. .icon {
  127. width: 40rpx;
  128. height: 40rpx;
  129. }
  130. .title {
  131. font-size: 35rpx;
  132. font-weight: bold;
  133. margin-left: 20rpx;
  134. }
  135. }
  136. .c {
  137. padding: 15rpx 0 30rpx 0;
  138. display: flex;
  139. flex-wrap: wrap;
  140. border-bottom: 1rpx solid #f5f5f5;
  141. .item {
  142. padding: 20rpx 0;
  143. .car-num {
  144. background-color: #edf6ff;
  145. color: #0080ff;
  146. font-size: 38rpx;
  147. padding: 15rpx 0;
  148. text-align: center;
  149. width: 100%;
  150. border-radius: 10rpx;
  151. font-weight: bold;
  152. }
  153. .p1 {
  154. font-size: 28rpx;
  155. color: #999;
  156. }
  157. .p2 {
  158. font-size: 28rpx;
  159. color: #191919;
  160. font-weight: bold;
  161. margin-left: 20rpx;
  162. }
  163. }
  164. .car-num-item {
  165. width: 100%;
  166. display: flex;
  167. align-items: center;
  168. justify-content: center;
  169. }
  170. }
  171. .b {
  172. display: flex;
  173. width: 100%;
  174. align-items: center;
  175. justify-content: space-between;
  176. .btn {
  177. height: 70rpx;
  178. display: flex;
  179. align-items: center;
  180. justify-content: center;
  181. width: calc(100% - 15rpx);
  182. margin: 30rpx 0 0 0;
  183. border-radius: 10rpx;
  184. border-width: 1rpx;
  185. box-sizing: border-box;
  186. }
  187. .b1 {
  188. background-color: #0080ff;
  189. color: #fff;
  190. }
  191. .b2 {
  192. background-color: #f7f7f7;
  193. color: #191919;
  194. }
  195. .b3 {
  196. background-color: #fff;
  197. color: #0080ff;
  198. border: 1rpx solid #0080ff;
  199. }
  200. .b4 {
  201. background-color: #ff0000;
  202. color: #fff;
  203. }
  204. }
  205. }
  206. }
  207. @import '@/common/common.scss'
  208. </style>