myrecord.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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.remind_state ? rsObj[item.remind_state] : ''}}){{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. import { arrToObj } from '@/utils'
  30. export default {
  31. data() {
  32. return {
  33. rsObj: {},
  34. curId: '',
  35. custTips: '',
  36. detail: {
  37. }, // 客户详情
  38. stepsLogList: [] // 进展
  39. };
  40. },
  41. onLoad(params) {
  42. this.curId = params.id
  43. this.custTips = params.str
  44. const dictObj = uni.getStorageSync('MD_dict')
  45. this.rsObj = arrToObj(dictObj.remind_state)
  46. },
  47. onShow() {
  48. this.getData()
  49. },
  50. methods: {
  51. dial() {
  52. uni.makePhoneCall({
  53. phoneNumber: this.custTips.split("-")[1]
  54. });
  55. },
  56. getData () {
  57. uni.api.cust.apiprivaterecordlist({customer_id:this.curId, page_size: 100}).then(res =>{
  58. let stepsLogList = res.list || []
  59. stepsLogList.map(item => {
  60. item.recordImgArr = item.record_img ? item.record_img.split(',') : []
  61. })
  62. this.stepsLogList = [...stepsLogList]
  63. })
  64. },
  65. previewImgHandle (current, urls){
  66. uni.previewImage({
  67. current,
  68. urls
  69. })
  70. },
  71. addHandle () {
  72. uni.navigateTo({
  73. url: `/pages/cust/myrecordedit?id=${this.curId}`
  74. })
  75. },
  76. }
  77. };
  78. </script>
  79. <style lang="scss">
  80. .buystep-info {
  81. width: 100%;
  82. padding: 32rpx 0rpx;
  83. background-color: #fff;
  84. margin-bottom: 20rpx;
  85. border-radius: 10rpx;
  86. .name {
  87. font-weight: bold;
  88. margin-bottom: 20rpx;
  89. }
  90. .u-order-title {
  91. color: $u-main-color;
  92. font-size: $u-p2;
  93. .c {
  94. display: inline-block;
  95. color: #2979ff;
  96. font-weight: bold;
  97. }
  98. .c2 {
  99. display: inline-block;
  100. color: #5a7fbd;
  101. font-weight: bold;
  102. }
  103. }
  104. .u-order-desc {
  105. // color: $u-content-color;
  106. color: #777;
  107. font-size: $u-p2;
  108. margin-bottom: 6rpx;
  109. padding-top: 10rpx;
  110. }
  111. .u-order-img {
  112. padding: 10rpx;
  113. .img {
  114. width: 160rpx;
  115. height: 160rpx;
  116. margin-bottom: 10rpx;
  117. margin-right: 20rpx;
  118. }
  119. }
  120. .u-order-time {
  121. color: rgb(200, 200, 200);
  122. font-size: $u-p2;
  123. }
  124. }
  125. .scoped-box {
  126. padding-bottom: 100rpx;
  127. .f-btn {
  128. position: fixed;
  129. bottom: 0;
  130. left: 20rpx;
  131. right: 20rpx;
  132. }
  133. }
  134. </style>