detail.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template>
  2. <view class="page u-skeleton">
  3. <!-- 客户信息 -->
  4. <view class="customer-info u-skeleton-fillet box-shadow">
  5. <view class="left">
  6. <view class="customer">
  7. <view class="relname u-skeleton-rect">
  8. {{ detail.name }}
  9. <u-icon
  10. class="u-m-l-10"
  11. :name="detail.sex == 'male' ? 'man' : 'woman'"
  12. size="24"
  13. :color="detail.sex == 'male' ? '#2080f0' : '#f85f69'"
  14. ></u-icon>
  15. </view>
  16. <view class="mobile u-skeleton-rect">{{ detail.phone }}</view>
  17. </view>
  18. </view>
  19. <view class="right"><u-icon name="phone" size="32" @click="dial(detail.phone)"></u-icon></view>
  20. </view>
  21. <!-- 项目信息 -->
  22. <view class="property-info u-skeleton-fillet box-shadow">
  23. <view class="name u-skeleton-rect">{{ detail.estate_name }}</view>
  24. <u-line margin="10rpx"></u-line>
  25. <!-- <view class="saler u-skeleton-rect" v-if="detail.salerInfo !== undefined">
  26. 当前置业顾问:{{ detail.salerInfo.name }}-{{ detail.salerInfo.job }}({{ detail.salerInfo.mobile }})
  27. </view> -->
  28. <view v-if="detail.current_step <= 2" class="date u-skeleton-rect">
  29. 保护期截止:保护期未生效 }}
  30. </view>
  31. <view v-else class="date u-skeleton-rect">保护期:已认筹客户无法被其他经纪人二次报备</view>
  32. </view>
  33. <!-- 当前进度 -->
  34. <view class="buystep-info box-shadow u-skeleton-fillet"><u-steps :list="buystepList" :current="detail.current_step" active-color="#2080f0"></u-steps></view>
  35. <!-- 当前进度 -->
  36. <view class="buystep-info u-p-32 box-shadow u-skeleton-fillet">
  37. <view class="name">进度流水</view>
  38. <u-empty v-if="stepsLogList.length == 0" mode="list" text="暂无流水记录"></u-empty>
  39. <u-time-line>
  40. <u-time-line-item v-for="(item, index) in stepsLogList" :key="index">
  41. <template v-slot:node>
  42. <view class="u-node"><u-icon name="checkmark-circle" size="28" color="#2080f0"></u-icon></view>
  43. </template>
  44. <!-- 此处没有自定义左边的内容,会默认显示一个点 -->
  45. <template v-slot:content>
  46. <view>
  47. <view class="u-order-title">{{ item.type == 'step' ? '新的进展:' : item.type == 'verify' ? '报备审核:' : '争议判客:' }}</view>
  48. <view class="u-order-desc">{{ item.verify_remark !== null ? item.verify_remark : '' }}</view>
  49. <view class="u-order-time">{{ item._add_time | date('yyyy-mm-dd hh:MM:ss') }}</view>
  50. </view>
  51. </template>
  52. </u-time-line-item>
  53. </u-time-line>
  54. </view>
  55. <!--引用组件-->
  56. <u-skeleton :loading="skeletonLoading" :animation="true" bgColor="#FFF"></u-skeleton>
  57. </view>
  58. </template>
  59. <script>
  60. var that;
  61. export default {
  62. data() {
  63. return {
  64. skeletonLoading: true,
  65. detail: {
  66. }, // 客户详情
  67. currentStep: 0,
  68. buystepList: [
  69. {
  70. name: '审核'
  71. },
  72. {
  73. name: '报备成功'
  74. },
  75. {
  76. name: '到访'
  77. },
  78. {
  79. name: '认筹'
  80. },
  81. {
  82. name: '转签'
  83. },
  84. {
  85. name: '结佣'
  86. }
  87. ],
  88. stepsLogList: [] // 进展
  89. };
  90. },
  91. onLoad(params) {
  92. uni.api.estate.apireportdetail({id:params.id}).then(res =>{
  93. this.detail = res || {}
  94. this.skeletonLoading = false
  95. })
  96. // if (!xxxxx.vuex.get('$app.systemConfig.use_skeleton')) {
  97. // that.skeletonLoading = false;
  98. // }
  99. // if (params.id !== undefined) {
  100. // vk.callFunction({
  101. // url: 'client/agent/kh/getRecommendLogInfo',
  102. // title: '请求中...',
  103. // data: {
  104. // _id: params.id,
  105. // agent_id: vk.vuex.get('$user.agentInfo._id')
  106. // }
  107. // }).then(res => {
  108. // that.detail = res.info;
  109. // // detail.current_step = res.info.status;
  110. // that.stepsLogList = res.info.stepsLogList;
  111. // that.skeletonLoading = false;
  112. // });
  113. // } else {
  114. // vk.toast('缺少必要参数');
  115. // setTimeout(() => {
  116. // vk.navigateBack();
  117. // }, 1500);
  118. // }
  119. },
  120. methods: {
  121. dial(tel) {
  122. uni.makePhoneCall({
  123. phoneNumber: tel
  124. });
  125. }
  126. }
  127. };
  128. </script>
  129. <style lang="scss">
  130. .customer-info {
  131. width: 100%;
  132. padding: 32rpx;
  133. background-color: #fff;
  134. display: flex;
  135. align-items: center;
  136. justify-content: space-between;
  137. margin-bottom: 20rpx;
  138. border-radius: 10rpx;
  139. .left {
  140. display: flex;
  141. align-items: center;
  142. .customer {
  143. font-size: $u-p2;
  144. .relname {
  145. font-size: $u-p;
  146. font-weight: bold;
  147. margin-bottom: 10rpx;
  148. }
  149. }
  150. }
  151. }
  152. .property-info {
  153. width: 100%;
  154. padding: 32rpx;
  155. background-color: #fff;
  156. display: flex;
  157. flex-direction: column;
  158. align-items: flex-start;
  159. margin-bottom: 20rpx;
  160. font-size: $u-p2;
  161. border-radius: 10rpx;
  162. .name {
  163. font-size: $u-p;
  164. font-weight: bold;
  165. }
  166. .saler {
  167. margin-bottom: 20rpx;
  168. }
  169. }
  170. .buystep-info {
  171. width: 100%;
  172. padding: 32rpx 0rpx;
  173. background-color: #fff;
  174. margin-bottom: 20rpx;
  175. border-radius: 10rpx;
  176. .name {
  177. font-weight: bold;
  178. margin-bottom: 20rpx;
  179. }
  180. }
  181. .u-order-title {
  182. color: $u-main-color;
  183. font-size: $u-p2;
  184. }
  185. .u-order-desc {
  186. color: $u-content-color;
  187. font-size: $u-p2;
  188. margin-bottom: 6rpx;
  189. }
  190. .u-order-time {
  191. color: rgb(200, 200, 200);
  192. font-size: $u-p2;
  193. }
  194. </style>