home.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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="height: 150rpx;margin-top: -20rpx;">
  15. <u-grid :col="3" :border="false">
  16. <u-grid-item bg-color="#ffffff00" style="background-color: rgba(0,0,0,0);">
  17. <u-icon name="order" color="#fff" size="60"></u-icon>
  18. <view class="grid-text" style="color: #FFFFFF;margin-top: 10px;">我的数据</view>
  19. </u-grid-item>
  20. <u-grid-item @click="myReview" bg-color="#ffffff00" style="background-color: rgba(0,0,0,0);">
  21. <u-badge type="error" :count="totalTwo" style="margin-right: 30rpx;" />
  22. <u-icon name="edit-pen" color="#fff" size="60"></u-icon>
  23. <view class="grid-text" style="color: #FFFFFF;margin-top: 10px;">我的审核</view>
  24. </u-grid-item>
  25. <u-grid-item @click="scanCode" bg-color="#ffffff00" style="background-color: rgba(0,0,0,0);">
  26. <u-icon name="scan" color="#fff" size="60"></u-icon>
  27. <view class="grid-text" style="color: #FFFFFF;margin-top: 10px;">扫一扫</view>
  28. </u-grid-item>
  29. </u-grid>
  30. </view>
  31. <!-- 正文内容 -->
  32. <view class="content">
  33. <u-grid :col="4" :border="false">
  34. <u-grid-item @click="jumpPath(1)">
  35. <u-icon name="arrow-downward" :size="46"></u-icon>
  36. <view class="grid-text">我的入库</view>
  37. </u-grid-item>
  38. <u-grid-item @click="jumpPath(2)">
  39. <u-icon name="arrow-upward" :size="46"></u-icon>
  40. <view class="grid-text">我的出库</view>
  41. </u-grid-item>
  42. <u-grid-item @click="jumpPath(3)">
  43. <u-icon name="hourglass" :size="46"></u-icon>
  44. <view class="grid-text">我的调拨</view>
  45. </u-grid-item>
  46. <u-grid-item @click="jumpPath(4)">
  47. <u-icon name="photo" :size="46"></u-icon>
  48. <view class="grid-text">我的货转</view>
  49. </u-grid-item>
  50. <u-grid-item @click="jumpPath(5)">
  51. <u-icon name="lock" :size="46"></u-icon>
  52. <view class="grid-text">我的库存</view>
  53. </u-grid-item>
  54. <u-grid-item @click="jumpPath(6)">
  55. <u-icon name="lock" :size="46"></u-icon>
  56. <view class="grid-text">海运费计算</view>
  57. </u-grid-item>
  58. <u-grid-item @click="jumpPath(7)">
  59. <u-icon name="camera" :size="46"></u-icon>
  60. <view class="grid-text">巡检</view>
  61. </u-grid-item>
  62. <!-- <u-grid-item @click="jumpPath(8)">
  63. <u-badge type="error" :count="total" />
  64. <u-icon name="checkmark-circle" :size="46"></u-icon>
  65. <view class="grid-text">我的采购</view>
  66. </u-grid-item>
  67. <u-grid-item @click="jumpPath('null')">
  68. <u-icon name="grid" :size="46"></u-icon>
  69. <view class="grid-text">其他</view>
  70. </u-grid-item> -->
  71. </u-grid>
  72. </view>
  73. <view style="width: 96%;margin: 0 auto;">
  74. <u-image width="100%" height="170rpx" src="../../static/activityDiagram.png"></u-image>
  75. </view>
  76. <view style="width: 96%;margin: 10rpx auto;">
  77. <u-image width="100%" height="900rpx" src="../../static/image/advertisingMap.png"></u-image>
  78. </view>
  79. <view style="width: 96%;margin: 0 auto;height: 100rpx;">
  80. <!-- <h1>全新功能正在开发中</h1> -->
  81. </view>
  82. </view>
  83. <!-- 更新组件 force 是否强制更新 tabbar:页面是否有原生tabbar组件-->
  84. <app-update ref="app_update" :force="false" :tabbar="true"></app-update>
  85. </view>
  86. </template>
  87. <script>
  88. import appUpdate from "@/components/yzhua006-update/app-update.vue"
  89. export default {
  90. components: {
  91. appUpdate
  92. },
  93. data() {
  94. return {
  95. background: {
  96. backgroundImage: 'none',
  97. backgroundColor: 'none'
  98. },
  99. actionStyle: {
  100. color: '#fff'
  101. },
  102. deptName: '',
  103. form: {
  104. pageNum: 1,
  105. pageSize: 10,
  106. fBilltype: 'SQ',
  107. fTakeOrders: 0
  108. },
  109. total: '',
  110. totalTwo: ''
  111. }
  112. },
  113. onShow() {
  114. this.$nextTick(function() {
  115. this.testUpgrade()
  116. })
  117. // this.deptName = uni.getStorageSync('deptName')
  118. // if (this.deptName == '外部用户') {
  119. // this.$u.get('/anPin/anPinApp/supplier', this.form).then(res => {
  120. // this.dataList = res.rows
  121. // this.total = res.total
  122. // })
  123. // } else {
  124. // this.$u.get('/anPin/anPinApp/list', this.form).then(res => {
  125. // this.dataList = res.rows
  126. // this.total = res.total
  127. // })
  128. // }
  129. // this.$u.get('/warehouse/paths/selectOrderAuditItems', {
  130. // refno2: 'SQ',
  131. // auditStatus: 'S'
  132. // }).then(res => {
  133. // this.totalTwo = res.data.length
  134. // })
  135. },
  136. methods: {
  137. testUpgrade() {
  138. this.$refs.app_update.update(); //调用子组件 检查更新
  139. },
  140. scanCode() {
  141. uni.scanCode({
  142. success: res => {
  143. console.log(res.result)
  144. }
  145. });
  146. },
  147. jumpPath(res) {
  148. switch (res) {
  149. case 1:
  150. this.$u.route('/pages/home/myorder/index');
  151. break;
  152. case 2:
  153. this.$u.route('/pages/home/delivery/index');
  154. break;
  155. case 6:
  156. this.$u.route('/pages/home/freightCalculation/shipSchedule');
  157. break;
  158. case 7:
  159. this.$u.route('/pages/home/patrolInspection/index');
  160. break;
  161. case 8:
  162. this.$u.route('/pages/home/procurementApplicationApproval/index');
  163. break;
  164. default:
  165. uni.showToast({
  166. icon: 'none',
  167. title: '该功能暂未开发~',
  168. position: "bottom"
  169. })
  170. break;
  171. }
  172. },
  173. myReview() {
  174. this.$u.route('/pages/home/myReview/index');
  175. },
  176. myData() {
  177. uni.showToast({
  178. icon: 'none',
  179. title: '该功能暂未开发~',
  180. position: "bottom"
  181. })
  182. }
  183. }
  184. }
  185. </script>
  186. <style scoped lang="scss">
  187. .content {
  188. width: 96%;
  189. margin: 0 auto;
  190. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  191. background-color: #FFFFFF;
  192. margin-top: 20rpx;
  193. border-radius: 20rpx;
  194. padding: 10rpx;
  195. }
  196. .grid-text {
  197. font-size: 28rpx;
  198. margin-top: 4rpx;
  199. color: $u-type-info;
  200. }
  201. </style>