center.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <view>
  3. <view class="topBackground" style="overflow:hidden">
  4. <view class="personal" style="background-color: rgba(0, 0, 0, 0);box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);">
  5. <view style="height: 150rpx;">
  6. <view style="float: left;">
  7. <u-avatar :src="src" shape="circle" size="70"
  8. style="box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.4);"></u-avatar>
  9. </view>
  10. <view style="float: left;margin-left: 50rpx;margin-top: 10rpx;">
  11. <u--text color="#fff" :text="userName?userName:''" size="28"></u--text>
  12. <u--text color="#fff" v-if="role" :text="jigoData" size="14"></u--text>
  13. <!-- <u--text color="#fff" v-if="role" :text="'角色:'+role"></u--text> -->
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="tips">
  19. <view style="text-align: center;font-size: 32rpx;color: #525454;">
  20. <view>今日收入</view>
  21. <u-count-to :startVal="0" :endVal="shruData" :decimals="2" color="#fd5003" fontSize="44"></u-count-to>
  22. <text style="color: #fd5003;">元</text>
  23. <u-grid :border="false">
  24. <u-grid-item>
  25. <text style="color: #525454;">推广海报</text>
  26. </u-grid-item>
  27. <u-grid-item>
  28. <text style="color: #525454;">轮毂升级</text>
  29. </u-grid-item>
  30. <u-grid-item>
  31. <text style="color: #525454;">我的足迹</text>
  32. </u-grid-item>
  33. </u-grid>
  34. </view>
  35. </view>
  36. <!-- <view class="head">
  37. <view style="display: flex;justify-content: space-between;width:96%;height:60rpx;line-height: 60rpx;margin: auto auto 30rpx auto;border-bottom: 1rpx solid #EDEDED;">
  38. <view>业务中心</view>
  39. <view><u--text suffixIcon="arrow-right" iconStyle="font-size: 18px" text="查看更多"></u--text></view>
  40. </view>
  41. <u-grid :border="false" col="4">
  42. <u-grid-item>
  43. <u--image :showLoading="true" src="../../static/images/user/PT.png" width="64rpx" height="64rpx" @click="click"></u--image>
  44. <text class="grid-text">采购跟踪</text>
  45. </u-grid-item>
  46. <u-grid-item>
  47. <u--image :showLoading="true" src="../../static/images/user/SO.png" width="64rpx" height="64rpx" @click="click"></u--image>
  48. <text class="grid-text">销售订单</text>
  49. </u-grid-item>
  50. <u-grid-item>
  51. <u--image :showLoading="true" src="../../static/images/user/CC.png" width="64rpx" height="64rpx" @click="click"></u--image>
  52. <text class="grid-text">渠道客户</text>
  53. </u-grid-item>
  54. <u-grid-item>
  55. <u--image :showLoading="true" src="../../static/images/user/VR.png" width="64rpx" height="64rpx" @click="click"></u--image>
  56. <text class="grid-text">拜访记录</text>
  57. </u-grid-item>
  58. </u-grid>
  59. </view> -->
  60. <!-- <view class="head">
  61. <view style="display: flex;justify-content: space-between;width:96%;height:60rpx;line-height: 60rpx;margin: auto auto 30rpx auto;border-bottom: 1rpx solid #EDEDED;">
  62. 办公中心
  63. </view>
  64. <u-grid :border="false" col="4">
  65. <u-grid-item>
  66. <u--image :showLoading="true" src="../../static/images/user/QX.png" width="64rpx" height="64rpx" @click="click"></u--image>
  67. <text class="grid-text">权限设置</text>
  68. </u-grid-item>
  69. <u-grid-item>
  70. <u--image :showLoading="true" src="../../static/images/user/GG.png" width="64rpx" height="64rpx" @click="click"></u--image>
  71. <text class="grid-text">公告管理</text>
  72. </u-grid-item>
  73. <u-grid-item>
  74. <u--image :showLoading="true" src="../../static/images/user/GC.png" width="64rpx" height="64rpx" @click="click"></u--image>
  75. <text class="grid-text">工厂政策</text>
  76. </u-grid-item>
  77. <u-grid-item>
  78. <u--image :showLoading="true" src="../../static/images/user/YG.png" width="64rpx" height="64rpx" @click="click"></u--image>
  79. <text class="grid-text">员工管理</text>
  80. </u-grid-item>
  81. </u-grid>
  82. </view> -->
  83. <view class="head">
  84. <u-cell-group title-bg-color="rgb(243, 244, 246)" :border="false">
  85. <u-cell title="供应商" icon="account" :isLink="true" center @click="pageJump('supplier')"></u-cell>
  86. <u-cell title="设置" icon="setting" :isLink="true" :border="false" center @click="setUp"></u-cell>
  87. </u-cell-group>
  88. </view>
  89. </view>
  90. </template>
  91. <script>
  92. import {bladeUserDetail,orderTodayIncome} from '@/api/OutboundTask/index.js'
  93. export default {
  94. data() {
  95. return {
  96. src: uni.getStorageSync('userInfo').avatar,
  97. revenueTop: 0,
  98. userName: '',
  99. role: uni.getStorageSync('userInfo').role_name,
  100. jigoData:'',
  101. shruData:null, // 今日收入数据
  102. }
  103. },
  104. onLoad() {
  105. uni.getSystemInfo({
  106. success: (e) => {
  107. this.revenueTop = e.statusBarHeight
  108. }
  109. })
  110. },
  111. onShow() {
  112. console.log(uni.getStorageSync('userInfo'),109);
  113. this.src = uni.getStorageSync('userInfo').avatar
  114. this.userName = uni.getStorageSync('userInfo').account
  115. // 获取机构数据
  116. bladeUserDetail(uni.getStorageSync('userInfo').user_id).then(res=>{
  117. console.log(res,118);
  118. this.jigoData = res.data.deptName
  119. })
  120. this.role = uni.getStorageSync('userInfo').role_name
  121. this.orderTodayIncomefun()
  122. },
  123. methods: {
  124. // 获取今日收入数据
  125. orderTodayIncomefun(){
  126. orderTodayIncome().then(res=>{
  127. this.shruData = res.data
  128. })
  129. },
  130. click() {
  131. uni.showToast({
  132. title: '暂无功能',
  133. icon: 'none'
  134. });
  135. },
  136. setUp() {
  137. this.$u.route('/pages/user/setUp');
  138. },
  139. pageJump(value) {
  140. switch (value) {
  141. case "supplier":
  142. uni.$u.route('/pages/views/supplier/index');
  143. break;
  144. }
  145. }
  146. }
  147. }
  148. </script>
  149. <style lang="scss" scoped>
  150. .topBackground {
  151. width: 100%;
  152. height: 300rpx;
  153. background: url("../../static/images/view/home/head_bg.png") no-repeat;
  154. background-size: 100% 100%;
  155. padding-top: var(--status-bar-height);
  156. }
  157. .tips {
  158. width: 96%;
  159. margin: 0 auto;
  160. padding: 20rpx 0;
  161. background-color: #FFFFFF;
  162. margin-top: -100rpx;
  163. border-radius: 30rpx;
  164. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  165. z-index: 999;
  166. }
  167. .personal {
  168. margin: 0 auto;
  169. background-color: #FFFFFF;
  170. margin-top: 20rpx;
  171. border-radius: 40rpx;
  172. padding: 20rpx;
  173. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  174. }
  175. .head {
  176. margin: 0 auto;
  177. background-color: #FFFFFF;
  178. margin-top: 20rpx;
  179. border-radius: 40rpx;
  180. padding: 20rpx 20rpx 20rpx 20rpx;
  181. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  182. }
  183. .grid-text {
  184. font-size: 14px;
  185. color: #909399;
  186. padding: 10rpx 0 20rpx 0rpx;
  187. /* #ifndef APP-PLUS */
  188. box-sizing: border-box;
  189. /* #endif */
  190. }
  191. </style>