list.jsx 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. import React, { Component } from "react";
  2. import Taro from "@tarojs/taro";
  3. import { View, Text, Image, Button } from "@tarojs/components";
  4. import Skeleton from "taro-skeleton";
  5. import { getClockState } from "../../utils/tools";
  6. import ListBottomStart from "../../components/common/listBottomStart";
  7. import RevokeWhite from "../../image/revokeWhite.png";
  8. import "./index.less";
  9. class MyList extends Component {
  10. constructor(props) {
  11. super(props);
  12. }
  13. render() {
  14. return (
  15. <View className="indexPage">
  16. <View className="elist">
  17. {
  18. this.props.list.length === 0 && this.props.listState === "LOADING" &&
  19. this.props.typelist?.map((v) => (
  20. <Skeleton key={v} title row={3} avatarShape="square" loading />
  21. ))
  22. }
  23. {this.props.list.length > 0 && this.props.list?.map((v, k) => (
  24. <View
  25. key={k}
  26. className="eitem"
  27. >
  28. <View className="einfor">
  29. <View className="etitle">
  30. <View className="ename">
  31. {v.nickname}
  32. </View>
  33. <View className="ecode">
  34. <Text onClick={() => {
  35. Taro.setClipboardData({
  36. data: v.orgCode,
  37. success: function (res) {
  38. Taro.showToast({
  39. title: '复制成功',
  40. });
  41. }
  42. })
  43. }}>{v.orgCode}{v.orgCode && " [复制]"}</Text>
  44. </View>
  45. </View>
  46. <View className="etime"
  47. style={{ color: ["red", "green"][v.signBills] }}
  48. >{["未签单", "已签单"][v.signBills]}
  49. {v.signBills == 1 && v.signTime && ("(" + v.signTime + ")")}
  50. </View>
  51. <View className="euserName">
  52. <View className="euNtext">
  53. 营销员:{v.adminName}
  54. </View>
  55. </View>
  56. {
  57. !v.latestFollow &&
  58. <View className="emore"
  59. onClick={e => {
  60. e.stopPropagation()
  61. this.props.getMore(v)
  62. }}>查看更多 ▼</View>
  63. }
  64. {
  65. !!v.latestFollow &&
  66. <View>
  67. <View className="euserName">
  68. <View className="euNtext">
  69. 累计公出次数:{v.count}
  70. </View>
  71. </View>
  72. <View className="euserName">
  73. <View className="euNtext">
  74. 首次面谈时间:{!v.minPublicRelease.id ? "无" : (v.minPublicRelease.releaseStart + "【" + v.minPublicRelease.aname + "】")}
  75. </View>
  76. </View>
  77. <View className="euserName">
  78. <View className="euNtext">
  79. 最新公出时间:{!v.maxPublicRelease.id ? "无" : (v.maxPublicRelease.releaseStart + "【" + v.maxPublicRelease.aname + "】")}
  80. </View>
  81. </View>
  82. <View className="euserName">
  83. <View className="euNtext">
  84. 最新跟进时间:{!v.latestFollow.id ? "无" : (v.latestFollow.followTime + "【" + v.latestFollow.followName + "】")}
  85. </View>
  86. </View>
  87. </View>
  88. }
  89. {
  90. !!v.latestFollow &&
  91. <View className="emore"
  92. onClick={e => {
  93. e.stopPropagation()
  94. this.props.onHide(v)
  95. }}>收起 ▲</View>
  96. }
  97. {
  98. <View
  99. className="ereject"
  100. onClick={e => {
  101. e.stopPropagation();
  102. Taro.navigateTo({
  103. url: "/pages/situation/index?id=" + v.id,
  104. });
  105. }}
  106. >
  107. 公出情况
  108. </View>
  109. }
  110. {
  111. <View
  112. className="eselect"
  113. onClick={e => {
  114. e.stopPropagation();
  115. Taro.navigateTo({
  116. url: "/pages/customerProfile/index?id=" + v.id,
  117. });
  118. }}
  119. >
  120. 客户档案
  121. </View>
  122. }
  123. </View>
  124. </View>
  125. ))}
  126. <ListBottomStart
  127. state={this.props.listState}
  128. reload={() => {
  129. this.props.onRefresh;
  130. }}
  131. />
  132. </View>
  133. </View>
  134. );
  135. }
  136. }
  137. export default MyList;