personal.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <view>
  3. <block>
  4. <view style="height: 10px;" />
  5. <user :list="[detail]" />
  6. </block>
  7. <displayCell :showList="showList" :detail="detail" />
  8. <view style="height: 70px;" />
  9. <view class="footer">
  10. <navigator class="insert" v-if="detail.iswechatbind == 0"
  11. :url="'/team/userCenter/wechatbind?id=' + detail.userid + '&name=' + detail.name">
  12. 绑定微信
  13. </navigator>
  14. <view class="invite" style="flex: 1;" @click="toEdit" hover-class="navigator-hover">
  15. 编辑
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import user from "../team/modules/userList.vue"
  22. export default {
  23. components: { user },
  24. data() {
  25. return {
  26. sys_enterprise_hrid: 0,
  27. detail: {
  28. userid: 0
  29. },
  30. showList: []
  31. }
  32. },
  33. onLoad(options) {
  34. console.log("options", options)
  35. this.sys_enterprise_hrid = options.id;
  36. uni.setNavigationBarTitle({
  37. title: '人员信息'
  38. });
  39. this.getDetail()
  40. },
  41. onUnload() {
  42. delete this.$Http.uploadUserDetail;
  43. },
  44. methods: {
  45. getDetail() {
  46. this.$Http.basic({
  47. "id": "20240411085402",
  48. "content": {
  49. "sys_enterprise_hrid": this.sys_enterprise_hrid
  50. }
  51. }).then(res => {
  52. console.log("门店人员信息", res)
  53. if (this.cutoff(res.msg)) return;
  54. this.detail = res.data;
  55. this.showList = [{
  56. label: "姓名",
  57. key: "name"
  58. }, {
  59. label: "手机号",
  60. key: "phonenumber"
  61. }, {
  62. label: "性别",
  63. key: "sex"
  64. }, {
  65. label: "生日",
  66. key: "birthday"
  67. }, {
  68. label: "邮箱",
  69. key: "email"
  70. }, {
  71. label: "店内职位",
  72. key: "position"
  73. }, {
  74. label: "角色",
  75. key: "rolenames"
  76. }, {
  77. label: "人员类型",
  78. value: res.isleader ? '主账号' : '子账号'
  79. }, {
  80. label: "所属门店",
  81. key: "storenames"
  82. }]
  83. })
  84. },
  85. toEdit() {
  86. this.$Http.uploadUserDetail = this.getDetail.bind(this);
  87. uni.navigateTo({
  88. url: '/team/userCenter/insert?title=编辑人员&data=' + JSON.stringify(this.detail)
  89. });
  90. }
  91. },
  92. }
  93. </script>
  94. <style lang="scss" scoped>
  95. .footer {
  96. position: fixed;
  97. bottom: 0;
  98. display: flex;
  99. justify-content: space-between;
  100. width: 100vw;
  101. height: 65px;
  102. background: #FFFFFF;
  103. box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
  104. padding: 5px 10px;
  105. box-sizing: border-box;
  106. .insert {
  107. display: flex;
  108. align-items: center;
  109. justify-content: center;
  110. width: 168px;
  111. height: 45px;
  112. background: #FFFFFF;
  113. border-radius: 5px;
  114. border: 1px solid #999999;
  115. font-family: PingFang SC, PingFang SC;
  116. font-size: 16px;
  117. color: #666666;
  118. box-sizing: border-box;
  119. margin-right: 10px;
  120. }
  121. .invite {
  122. display: flex;
  123. align-items: center;
  124. justify-content: center;
  125. width: 177px;
  126. height: 45px;
  127. background: #C30D23;
  128. border-radius: 5px;
  129. font-family: PingFang SC, PingFang SC;
  130. font-weight: 500;
  131. font-size: 16px;
  132. color: #FFFFFF;
  133. }
  134. }
  135. </style>