myrecord.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view class="page scoped-box">
  3. <view class="buystep-info u-p-32 box-shadow u-skeleton-fillet">
  4. <view class="name" @click="dial()">跟进记录:{{custTips || ''}}</view>
  5. <u-empty v-if="stepsLogList.length == 0" mode="list" text="暂无流水记录"></u-empty>
  6. <u-time-line>
  7. <u-time-line-item v-for="(item, index) in stepsLogList" :key="index">
  8. <template v-slot:node>
  9. <view class="u-node"><u-icon name="checkmark-circle" size="28" color="#2080f0"></u-icon></view>
  10. </template>
  11. <template v-slot:content>
  12. <view>
  13. <view class="u-order-title" v-if="item.estate_name">{{item.action}}了<navigator :url="`/pages/estate/dtl?id=${item.estate_id}`" class="c">【{{item.estate_name}}】</navigator></view>
  14. <view class="u-order-title" v-else>日常维护:<view v-if="item.action" class="c2">{{item.action}}</view></view>
  15. <view class="u-order-desc">{{item.record_remark}}</view>
  16. <view class="u-order-img" v-if="item.recordImgArr && item.recordImgArr.length > 0">
  17. <image v-for="(url, urlIndex) in item.recordImgArr" :key="urlIndex" class="img" :src="url" mode="aspectFill" @click="previewImgHandle(url, item.recordImgArr)"></image>
  18. </view>
  19. <view class="u-order-time">{{ item.create_at}}</view>
  20. </view>
  21. </template>
  22. </u-time-line-item>
  23. </u-time-line>
  24. </view>
  25. <u-button class="f-btn bwin-btn-80 u-m-b-10" type="primary" @click="addHandle">添加跟进记录</u-button>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. curId: '',
  33. custTips: '',
  34. detail: {
  35. }, // 客户详情
  36. stepsLogList: [] // 进展
  37. };
  38. },
  39. onLoad(params) {
  40. this.curId = params.id
  41. this.custTips = params.str
  42. },
  43. onShow() {
  44. this.getData()
  45. },
  46. methods: {
  47. dial() {
  48. uni.makePhoneCall({
  49. phoneNumber: this.custTips.split("-")[1]
  50. });
  51. },
  52. getData () {
  53. uni.api.cust.apiprivaterecordlist({customer_id:this.curId, page_size: 100}).then(res =>{
  54. let stepsLogList = res.list || []
  55. stepsLogList.map(item => {
  56. item.recordImgArr = item.record_img ? item.record_img.split(',') : []
  57. })
  58. this.stepsLogList = [...stepsLogList]
  59. })
  60. },
  61. previewImgHandle (current, urls){
  62. uni.previewImage({
  63. current,
  64. urls
  65. })
  66. },
  67. addHandle () {
  68. uni.navigateTo({
  69. url: `/pages/cust/myrecordedit?id=${this.curId}`
  70. })
  71. },
  72. }
  73. };
  74. </script>
  75. <style lang="scss">
  76. .buystep-info {
  77. width: 100%;
  78. padding: 32rpx 0rpx;
  79. background-color: #fff;
  80. margin-bottom: 20rpx;
  81. border-radius: 10rpx;
  82. .name {
  83. font-weight: bold;
  84. margin-bottom: 20rpx;
  85. }
  86. .u-order-title {
  87. color: $u-main-color;
  88. font-size: $u-p2;
  89. .c {
  90. display: inline-block;
  91. color: #2979ff;
  92. font-weight: bold;
  93. }
  94. .c2 {
  95. display: inline-block;
  96. color: #5a7fbd;
  97. font-weight: bold;
  98. }
  99. }
  100. .u-order-desc {
  101. // color: $u-content-color;
  102. color: #777;
  103. font-size: $u-p2;
  104. margin-bottom: 6rpx;
  105. padding-top: 10rpx;
  106. }
  107. .u-order-img {
  108. padding: 10rpx;
  109. .img {
  110. width: 160rpx;
  111. height: 160rpx;
  112. margin-bottom: 10rpx;
  113. margin-right: 20rpx;
  114. }
  115. }
  116. .u-order-time {
  117. color: rgb(200, 200, 200);
  118. font-size: $u-p2;
  119. }
  120. }
  121. .scoped-box {
  122. padding-bottom: 100rpx;
  123. .f-btn {
  124. position: fixed;
  125. bottom: 0;
  126. left: 20rpx;
  127. right: 20rpx;
  128. }
  129. }
  130. </style>