home.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <view>
  3. <view style="
  4. background: url(../../static/homeBG.png)no-repeat;
  5. height: 340rpx;
  6. background-size:100%;
  7. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);">
  8. <u-navbar :is-back="false" :is-fixed="false" :border-bottom="false" :background="background">
  9. <view style="width: 96%;margin: 0 auto;">
  10. <u-search placeholder="请输入您要搜索的内容" bg-color="#FFFFFF" :action-style="actionStyle"></u-search>
  11. </view>
  12. </u-navbar>
  13. <!-- 快捷功能 -->
  14. <view style="display: flex;justify-content: space-around;">
  15. <view style="width: 120rpx;text-align: center;" @click="myData">
  16. <u-icon name="order" color="#fff" size="60"></u-icon>
  17. <view style="margin-top: 10rpx;color: #FFFFFF;">我的数据</view>
  18. </view>
  19. <view style="width: 120rpx;text-align: center;" @click="myReview">
  20. <u-icon name="edit-pen" color="#fff" size="60"></u-icon>
  21. <view style="margin-top: 10rpx;color: #FFFFFF;">我的审核</view>
  22. </view>
  23. <view style="width: 120rpx;text-align: center;" @click="scanCode">
  24. <u-icon name="scan" color="#fff" size="60"></u-icon>
  25. <view style="margin-top: 10rpx;color: #FFFFFF;">扫一扫</view>
  26. </view>
  27. </view>
  28. <!-- 正文内容 -->
  29. <view class="content">
  30. <u-grid :col="4" :border="false">
  31. <u-grid-item @click="jumpPath(1)">
  32. <u-icon name="arrow-downward" :size="46"></u-icon>
  33. <view class="grid-text">我的入库</view>
  34. </u-grid-item>
  35. <u-grid-item @click="jumpPath(2)">
  36. <u-icon name="arrow-upward" :size="46"></u-icon>
  37. <view class="grid-text">我的出库</view>
  38. </u-grid-item>
  39. <u-grid-item @click="jumpPath(3)">
  40. <u-icon name="hourglass" :size="46"></u-icon>
  41. <view class="grid-text">我的调拨</view>
  42. </u-grid-item>
  43. <u-grid-item @click="jumpPath(4)">
  44. <u-icon name="photo" :size="46"></u-icon>
  45. <view class="grid-text">我的货转</view>
  46. </u-grid-item>
  47. <u-grid-item @click="jumpPath(5)">
  48. <u-icon name="lock" :size="46"></u-icon>
  49. <view class="grid-text">我的库存</view>
  50. </u-grid-item>
  51. <u-grid-item @click="jumpPath(6)">
  52. <u-icon name="lock" :size="46"></u-icon>
  53. <view class="grid-text">海运费计算</view>
  54. </u-grid-item>
  55. <u-grid-item @click="jumpPath(7)">
  56. <u-icon name="camera" :size="46"></u-icon>
  57. <view class="grid-text">巡检</view>
  58. </u-grid-item>
  59. <u-grid-item @click="jumpPath(8)">
  60. <u-icon name="checkmark-circle" :size="46"></u-icon>
  61. <view class="grid-text">我的采购</view>
  62. </u-grid-item>
  63. <u-grid-item @click="jumpPath('null')">
  64. <u-icon name="grid" :size="46"></u-icon>
  65. <view class="grid-text">其他</view>
  66. </u-grid-item>
  67. </u-grid>
  68. </view>
  69. <view style="width: 96%;margin: 0 auto;">
  70. <u-image width="100%" height="170rpx" src="../../static/activityDiagram.png"></u-image>
  71. </view>
  72. <view style="width: 96%;">
  73. <!-- <h1>全新功能正在开发中</h1> -->
  74. </view>
  75. </view>
  76. <!-- 更新组件 force 是否强制更新 tabbar:页面是否有原生tabbar组件-->
  77. <app-update ref="app_update" :force="false" :tabbar="true"></app-update>
  78. </view>
  79. </template>
  80. <script>
  81. import appUpdate from "@/components/yzhua006-update/app-update.vue"
  82. export default {
  83. components: {
  84. appUpdate
  85. },
  86. data() {
  87. return {
  88. background: {
  89. backgroundImage: 'none',
  90. backgroundColor: 'none'
  91. },
  92. actionStyle: {
  93. color: '#fff'
  94. }
  95. }
  96. },
  97. onShow() {
  98. this.$nextTick(function() {
  99. this.testUpgrade()
  100. })
  101. },
  102. methods: {
  103. testUpgrade() {
  104. this.$refs.app_update.update(); //调用子组件 检查更新
  105. },
  106. scanCode() {
  107. uni.scanCode({
  108. success: res => {
  109. console.log(res.result)
  110. }
  111. });
  112. },
  113. jumpPath(res) {
  114. switch (res) {
  115. case 1:
  116. this.$u.route('/pages/home/myorder/index');
  117. break;
  118. case 2:
  119. this.$u.route('/pages/home/delivery/index');
  120. break;
  121. case 6:
  122. this.$u.route('/pages/home/freightCalculation/shipSchedule');
  123. break;
  124. case 7:
  125. this.$u.route('/pages/home/patrolInspection/index');
  126. break;
  127. case 8:
  128. this.$u.route('/pages/home/procurementApplicationApproval/index');
  129. break;
  130. default:
  131. uni.showToast({
  132. icon: 'none',
  133. title: '该功能暂未开发~',
  134. position: "bottom"
  135. })
  136. break;
  137. }
  138. },
  139. myReview(){
  140. this.$u.route('/pages/home/myReview/index');
  141. },
  142. myData() {
  143. uni.showToast({
  144. icon: 'none',
  145. title: '该功能暂未开发~',
  146. position: "bottom"
  147. })
  148. }
  149. }
  150. }
  151. </script>
  152. <style scoped lang="scss">
  153. .content {
  154. width: 96%;
  155. margin: 0 auto;
  156. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  157. background-color: #FFFFFF;
  158. margin-top: 20rpx;
  159. border-radius: 20rpx;
  160. padding: 10rpx;
  161. }
  162. .grid-text {
  163. font-size: 28rpx;
  164. margin-top: 4rpx;
  165. color: $u-type-info;
  166. }
  167. </style>