partner-business-item.vue 4.4 KB

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