personal.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <view>
  3. <block v-if="detail.userid">
  4. <view style="height: 10px;" />
  5. <user :list="[detail]" />
  6. </block>
  7. <view class="head">
  8. <view class="label">
  9. 基本信息
  10. </view>
  11. <view class="content">
  12. 仅显示已填信息<text style="padding: 0 2.5px;" /> <u-switch activeColor="#C40C24" v-model="unShowAll" />
  13. </view>
  14. </view>
  15. <block v-for="item in showList" :key="item.key">
  16. <view class="item" hover-class="navigator-hover" v-if="!unShowAll || detail[item.key] || item.value">
  17. <view class="content">
  18. <view class="label">
  19. {{ item.label }}:
  20. </view>
  21. <view class="value">
  22. {{ detail[item.key] || item.value || '--' }}
  23. </view>
  24. </view>
  25. </view>
  26. </block>
  27. <view style="height: 70px;" />
  28. <view class="footer">
  29. <navigator class="insert" v-if="detail.iswechatbind == 0"
  30. :url="'/team/userCenter/wechatbind?id=' + detail.userid + '&name=' + detail.name">
  31. 绑定微信
  32. </navigator>
  33. <navigator class="invite" style="flex: 1;" url="/team/team/InviteUser">
  34. 编辑
  35. </navigator>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. import user from "./modules/userList"
  41. export default {
  42. components: { user },
  43. data() {
  44. return {
  45. sys_enterprise_hrid: 0,
  46. detail: {
  47. userid: 0
  48. },
  49. unShowAll: false,
  50. showList: []
  51. }
  52. },
  53. onLoad(options) {
  54. console.log("options", options)
  55. this.sys_enterprise_hrid = options.id;
  56. uni.setNavigationBarTitle({
  57. title: '人员信息'
  58. });
  59. this.getDetail()
  60. },
  61. methods: {
  62. getDetail() {
  63. this.$Http.basic({
  64. "id": "20240411085402",
  65. "content": {
  66. "sys_enterprise_hrid": this.sys_enterprise_hrid
  67. }
  68. }).then(res => {
  69. console.log("门店人员信息", res)
  70. if (this.cutoff(res.msg)) return;
  71. this.detail = res.data;
  72. this.showList = [{
  73. label: "姓名",
  74. key: "name"
  75. }, {
  76. label: "手机号",
  77. key: "phonenumber"
  78. }, {
  79. label: "性别",
  80. key: "sex"
  81. }, {
  82. label: "生日",
  83. key: "birthday"
  84. }, {
  85. label: "邮箱",
  86. key: "email"
  87. }, {
  88. label: "店内职位",
  89. key: "position"
  90. }, {
  91. label: "角色",
  92. key: "rolenames"
  93. }, {
  94. label: "人员类型",
  95. value: res.isleader ? '主账号' : '子账号'
  96. }, {
  97. label: "所属门店",
  98. key: "storenames"
  99. }]
  100. })
  101. }
  102. },
  103. }
  104. </script>
  105. <style lang="scss" scoped>
  106. .head {
  107. display: flex;
  108. align-items: center;
  109. justify-content: space-between;
  110. width: 100vw;
  111. height: 45px;
  112. background: #F7F7F7;
  113. padding: 0 10px;
  114. box-sizing: border-box;
  115. .label {
  116. font-family: PingFang SC, PingFang SC;
  117. font-weight: bold;
  118. font-size: 15px;
  119. color: #333333;
  120. line-height: 22px;
  121. }
  122. .content {
  123. display: flex;
  124. align-items: center;
  125. font-family: PingFang SC, PingFang SC;
  126. font-size: 14px;
  127. color: #999999;
  128. }
  129. }
  130. .item {
  131. width: 100vw;
  132. background: #fff;
  133. padding-left: 10px;
  134. box-sizing: border-box;
  135. .content {
  136. display: flex;
  137. width: 100%;
  138. padding: 15px 0;
  139. padding-right: 10px;
  140. box-sizing: border-box;
  141. border-bottom: 0.5px solid #F2F2F2;
  142. .label {
  143. width: 100px;
  144. margin-right: 10px;
  145. line-height: 20px;
  146. font-family: Source Han Sans SC, Source Han Sans SC;
  147. font-size: 14px;
  148. color: #666666;
  149. }
  150. .value {
  151. line-height: 20px;
  152. font-family: Source Han Sans SC, Source Han Sans SC;
  153. font-size: 14px;
  154. color: #333333;
  155. }
  156. }
  157. .content:last-child {
  158. border-bottom: 0;
  159. }
  160. }
  161. .footer {
  162. position: fixed;
  163. bottom: 0;
  164. display: flex;
  165. justify-content: space-between;
  166. width: 100vw;
  167. height: 65px;
  168. background: #FFFFFF;
  169. box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
  170. padding: 5px 10px;
  171. box-sizing: border-box;
  172. .insert {
  173. display: flex;
  174. align-items: center;
  175. justify-content: center;
  176. width: 168px;
  177. height: 45px;
  178. background: #FFFFFF;
  179. border-radius: 5px;
  180. border: 1px solid #999999;
  181. font-family: PingFang SC, PingFang SC;
  182. font-size: 16px;
  183. color: #666666;
  184. box-sizing: border-box;
  185. margin-right: 10px;
  186. }
  187. .invite {
  188. display: flex;
  189. align-items: center;
  190. justify-content: center;
  191. width: 177px;
  192. height: 45px;
  193. background: #C30D23;
  194. border-radius: 5px;
  195. font-family: PingFang SC, PingFang SC;
  196. font-weight: 500;
  197. font-size: 16px;
  198. color: #FFFFFF;
  199. }
  200. }
  201. </style>