teamMember1.vue 7.3 KB

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