myrecord.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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">跟进记录:{{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">日常维护:</view>
  14. <view class="u-order-desc">{{item.record_remark}}</view>
  15. <view class="u-order-img" v-if="item.recordImgArr && item.recordImgArr.length > 0">
  16. <image v-for="(url, urlIndex) in item.recordImgArr" :key={urlIndex} class="img" :src="url" mode="aspectFill" @click="previewImgHandle(url, item.recordImgArr)"></image>
  17. </view>
  18. <view class="u-order-time">{{ item.create_at}}</view>
  19. </view>
  20. </template>
  21. </u-time-line-item>
  22. </u-time-line>
  23. </view>
  24. <u-button class="f-btn bwin-btn-80 u-m-b-10" type="primary" @click="addHandle">添加跟进记录</u-button>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return {
  31. curId: '',
  32. custTips: '',
  33. detail: {
  34. }, // 客户详情
  35. stepsLogList: [] // 进展
  36. };
  37. },
  38. onLoad(params) {
  39. this.curId = params.id
  40. this.custTips = params.str
  41. },
  42. onShow() {
  43. this.getData()
  44. },
  45. methods: {
  46. getData () {
  47. uni.api.cust.apiprivaterecordlist({customer_id:this.curId, page_size: 100}).then(res =>{
  48. let stepsLogList = res.list || []
  49. stepsLogList.map(item => {
  50. item.recordImgArr = item.record_img.split(',')
  51. })
  52. this.stepsLogList = [...stepsLogList]
  53. })
  54. },
  55. previewImgHandle (current, urls){
  56. uni.previewImage({
  57. current,
  58. urls
  59. })
  60. },
  61. addHandle () {
  62. uni.navigateTo({
  63. url: `/pages/cust/myrecordedit?id=${this.curId}`
  64. })
  65. },
  66. }
  67. };
  68. </script>
  69. <style lang="scss">
  70. .buystep-info {
  71. width: 100%;
  72. padding: 32rpx 0rpx;
  73. background-color: #fff;
  74. margin-bottom: 20rpx;
  75. border-radius: 10rpx;
  76. .name {
  77. font-weight: bold;
  78. margin-bottom: 20rpx;
  79. }
  80. .u-order-title {
  81. color: $u-main-color;
  82. font-size: $u-p2;
  83. }
  84. .u-order-desc {
  85. // color: $u-content-color;
  86. color: #777;
  87. font-size: $u-p2;
  88. margin-bottom: 6rpx;
  89. padding-top: 10rpx;
  90. }
  91. .u-order-img {
  92. padding: 10rpx;
  93. .img {
  94. width: 160rpx;
  95. height: 160rpx;
  96. margin-bottom: 10rpx;
  97. margin-right: 20rpx;
  98. }
  99. }
  100. .u-order-time {
  101. color: rgb(200, 200, 200);
  102. font-size: $u-p2;
  103. }
  104. }
  105. .scoped-box {
  106. padding-bottom: 100rpx;
  107. .f-btn {
  108. position: fixed;
  109. bottom: 0;
  110. left: 20rpx;
  111. right: 20rpx;
  112. }
  113. }
  114. </style>