teamMember1.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. <template>
  2. <view class="page">
  3. <view class="personalInfo dis a-start">
  4. <text class="createTime">{{createTime}}注册</text>
  5. <image src="../../../static/image/team/zg.png" mode="" class="zg"></image>
  6. <image src="../../../static/image/my/avatar2.png" mode="" class="avatar"></image>
  7. <view class="dis f-c " style="position: relative;">
  8. <view class="name dis a-c">
  9. <text>{{info.username}}</text>
  10. <image
  11. :src="info.teamlevel?`../../../static/image/team/proxy${info.teamlevel}.png`:'../../../static/image/team/proxy4.png'"
  12. mode=""></image>
  13. </view>
  14. <text class="memberId">会员号 {{info.id}} </text>
  15. <view class="phone dis a-c" @click="callPhone(phone)">
  16. <text>手机号 {{phone}}</text>
  17. <image src="../../../static/image/car-insure/phone.png" mode=""></image>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="performanceStats">
  22. <image src="../../../static/image/team/tjicon.png" mode=""></image>
  23. <view class="title">
  24. <text style="position: relative;">业绩统计</text>
  25. <view class="tag"></view>
  26. </view>
  27. <view class="data dis a-c j-start f-wrap mt-2">
  28. <view class="dis f-c a-c">
  29. <text>{{info.bjpolicynum}}</text>
  30. <text>报价次数</text>
  31. </view>
  32. <view class="dis f-c a-c">
  33. <text>{{info.policynum}}</text>
  34. <text>核保笔数</text>
  35. </view>
  36. <view class="dis f-c a-c">
  37. <text>{{info.ordernum}}</text>
  38. <text>出单笔数</text>
  39. </view>
  40. <view class="dis f-c a-c">
  41. <text>{{info.sumpremium}}</text>
  42. <text>签单保费</text>
  43. </view>
  44. <view class="dis f-c a-c">
  45. <text>{{info.averagePremium?info.averagePremium:0}}</text>
  46. <text>平均保费</text>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="performanceSummary">
  51. <view class="title">
  52. <text style="position: relative;">业绩明细</text>
  53. <view class="tag"></view>
  54. </view>
  55. <view class="dataOver">
  56. <view class="item mb-2" v-for="(item,index) in list" :key="index">
  57. <view class="title dis a-c j-c">
  58. <image :src="item.logo" mode=""></image>
  59. <text>{{item.companyName}}</text>
  60. </view>
  61. <view class="data dis a-c j-s f-wrap ">
  62. <view class="dis f-c a-c">
  63. <text>{{item.bjpolicynum}}</text>
  64. <text>报价次数</text>
  65. </view>
  66. <view class="dis f-c a-c">
  67. <text>{{item.policynum}}</text>
  68. <text>核保笔数</text>
  69. </view>
  70. <view class="dis f-c a-c">
  71. <text>{{item.ordernum}}</text>
  72. <text>出单笔数</text>
  73. </view>
  74. <view class="dis f-c a-c">
  75. <text>{{item.sumpremium}}</text>
  76. <text>签单保费</text>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </template>
  84. <script>
  85. import {
  86. mapState
  87. } from "vuex";
  88. export default {
  89. data() {
  90. return {
  91. info: {},
  92. phone: "",
  93. createTime: "",
  94. referrersId: "",
  95. referrersName: "",
  96. list: [],
  97. dateRange: [new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-01', new Date()
  98. .getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate()
  99. ],
  100. }
  101. },
  102. computed: {
  103. ...mapState(['userInfo']),
  104. getHeight() {
  105. let height = uni.getSystemInfoSync().windowHeight - uni.upx2px(770);
  106. return `height: ${height}px;`;
  107. }
  108. },
  109. // 监听导航栏的按钮
  110. onNavigationBarButtonTap(e) {
  111. if (e.index == 0) {
  112. this.navigate({
  113. url: '/pages/index/index'
  114. }, "switchTab", true);
  115. }
  116. },
  117. onLoad() {
  118. const eventChannel = this.getOpenerEventChannel()
  119. // 监听acceptData事件,获取上一页面通过eventChannel传送到当前页面的数据
  120. eventChannel.on('acceptData', async (data) => {
  121. console.log(data);
  122. this.info = data.item;
  123. this.dateRange = [...data.date]
  124. this.getCompanyList()
  125. let res = await this.$http.get('/app/customer/' + this.info.id);
  126. if (res.code == '200') {
  127. this.phone = res.data.phone;
  128. this.createTime = res.data.createTime;
  129. this.referrersName = res.data.referrersName;
  130. this.referrersId = res.data.referrersId;
  131. }
  132. })
  133. },
  134. methods: {
  135. btn_click() {
  136. uni.navigateTo({
  137. url: '/pages/chat/chat'
  138. })
  139. },
  140. callPhone(tel) {
  141. uni.makePhoneCall({
  142. phoneNumber: tel,
  143. success: () => {
  144. console.log("成功拨打电话")
  145. }
  146. })
  147. },
  148. async getCompanyList() {
  149. let params = {
  150. id: this.info.id,
  151. "enddate": this.dateRange[1],
  152. "startdate": this.dateRange[0]
  153. }
  154. let res = await this.$http.post('/esm/user/queryUserCountForUser', params);
  155. if (res.code == '200') {
  156. console.log(res)
  157. // this.phone = res.data.phone;
  158. this.list = res.data;
  159. }
  160. }
  161. // toTeam() {
  162. // this.navigate({
  163. // url: '/pages/tools/team/team?id=' + this.staffInfo.sysUser.id + '&name=' + this.staffInfo
  164. // .sysUser.name
  165. // }, "navigateTo", true)
  166. // }
  167. }
  168. }
  169. </script>
  170. <style lang="scss" scoped>
  171. .page {
  172. height: calc(100vh - 44px);
  173. background: #F8FAFE;
  174. padding: 10px 12px;
  175. }
  176. .personalInfo {
  177. height: 120px;
  178. background: linear-gradient(270deg, #2967FF 0%, #2967FF 100%);
  179. border-radius: 4px;
  180. padding: 24px;
  181. position: relative;
  182. .createTime {
  183. position: absolute;
  184. right: 8px;
  185. top: 5px;
  186. color: rgba(255, 255, 255, 0.55);
  187. font-size: 12px;
  188. }
  189. .zg {
  190. width: 108px;
  191. height: 98px;
  192. position: absolute;
  193. right: 28px;
  194. bottom: 0;
  195. }
  196. .avatar {
  197. width: 50px;
  198. height: 50px;
  199. margin-right: 20px;
  200. }
  201. .name {
  202. >text {
  203. font-size: 17px;
  204. color: #FFFFFF;
  205. font-weight: bold;
  206. }
  207. image {
  208. width: 133rpx;
  209. height: 46rpx;
  210. margin-left: 6px;
  211. }
  212. }
  213. .memberId,
  214. .phone {
  215. font-size: 13px;
  216. color: rgba(255, 255, 255, 0.85);
  217. image {
  218. width: 14px;
  219. height: 14px;
  220. margin-left: 6px;
  221. }
  222. }
  223. }
  224. .performanceStats {
  225. margin: 16px 0;
  226. background: linear-gradient(180deg, #DFE9FF 0%, #F1F5FE 100%);
  227. box-shadow: 0px 2px 5px 0px #DAE3F4;
  228. border-radius: 4px;
  229. border: 1px solid #FFFFFF;
  230. padding: 8px 10px;
  231. position: relative;
  232. >image {
  233. width: 136rpx;
  234. height: 120rpx;
  235. position: absolute;
  236. right: 10px;
  237. top: -13px;
  238. }
  239. .data {
  240. padding: 6px 8px;
  241. background: rgba(255, 255, 255, 0.8);
  242. >view {
  243. width: 25%;
  244. text:nth-child(1) {
  245. font-size: 15px;
  246. color: #333333;
  247. font-weight: bold;
  248. }
  249. text:nth-child(2) {
  250. font-size: 13px;
  251. color: #666666;
  252. }
  253. }
  254. }
  255. }
  256. .performanceSummary {
  257. background: #F1F5FE;
  258. box-shadow: 0px 2px 5px 0px #DAE3F4;
  259. border-radius: 4px;
  260. border: 1px solid #FFFFFF;
  261. padding: 8px 10px;
  262. .dataOver {
  263. padding: 10px 0;
  264. max-height: calc(100vh - 420px);
  265. overflow-y: auto;
  266. .item {
  267. background: rgba(255, 255, 255, 0.8);
  268. border-radius: 2px;
  269. padding: 8px;
  270. .title {
  271. padding: 6px;
  272. border-bottom: 1px solid #EEEEEE;
  273. font-weight: bold;
  274. font-size: 13px;
  275. color: #333;
  276. image {
  277. width: 23px;
  278. height: 23px;
  279. margin-right: 6px;
  280. }
  281. }
  282. .data {
  283. padding: 4px;
  284. >view {
  285. width: 25%;
  286. text:nth-child(1) {
  287. font-size: 13px;
  288. color: #333333;
  289. font-weight: bold;
  290. }
  291. text:nth-child(2) {
  292. font-size: 12px;
  293. color: #666666;
  294. }
  295. }
  296. }
  297. }
  298. }
  299. }
  300. .performanceStats .title,
  301. .performanceSummary .title {
  302. position: relative;
  303. .tag {
  304. position: absolute;
  305. left: 0;
  306. bottom: 3px;
  307. width: 110rpx;
  308. height: 8rpx;
  309. background: linear-gradient(90deg, #3D74FE 0%, rgba(152, 184, 255, 0.2) 100%);
  310. border-radius: 2px;
  311. }
  312. }
  313. </style>