home.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <template>
  2. <view>
  3. <view class="status_bar">
  4. <view style="display: flex;justify-content: space-between;color: #fff;">
  5. <view style="width: 27%;height: 80rpx;margin: 0 2% 0 1%;">
  6. <image style="width: 100%;height: 100%;" src="../../static/images/logo/logo_white.png" mode="">
  7. </image>
  8. </view>
  9. <view style="width: 5rpx;background-color: #fff;border-radius: 10rpx;"></view>
  10. <view
  11. style="width: 68%;margin-left: 2%;text-align: left;line-height: 80rpx;font-weight: bold;font-size: 32rpx;">
  12. {{form.tenantName}}
  13. </view>
  14. </view>
  15. <view class="quick">
  16. <!-- <view class="census">
  17. <view>营业收入:1232131元</view>
  18. <view>付款金额:31231231元</view>
  19. </view> -->
  20. <view class="ability">
  21. <u-grid :border="false">
  22. <u-grid-item @click="pageJump('salesSlip')">
  23. <image style="width: 80rpx;height: 80rpx;" src="../../static/images/view/home/sale.png">
  24. </image>
  25. <text class="grid_text">销售开单</text>
  26. </u-grid-item>
  27. <u-grid-item @click="pageJump('stock')">
  28. <image style="width: 80rpx;height: 80rpx;" src="../../static/images/view/home/stock.png">
  29. </image>
  30. <text class="grid_text">库存查询</text>
  31. </u-grid-item>
  32. <u-grid-item @click="pageJump('operatingReceipts')">
  33. <image style="width: 80rpx;height: 80rpx;" src="../../static/images/view/home/collect.png">
  34. </image>
  35. <text class="grid_text">经营收款</text>
  36. </u-grid-item>
  37. </u-grid>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="swiper">
  42. <u-swiper :list="list" radius="36rpx" keyName="image" height="90" :autoplay="false" circular></u-swiper>
  43. </view>
  44. <view class="quick_desktop">
  45. <u-cell-group :border="false">
  46. <u-cell icon="integral-fill" :border="false" title="工作桌面">
  47. <view slot="icon" style="width: 10rpx;height: 35rpx;background-color: #fd5003;"></view>
  48. <view slot="right-icon">
  49. <u-icon name="grid" size="28"></u-icon>
  50. </view>
  51. </u-cell>
  52. </u-cell-group>
  53. <u-grid :border="false" col="4">
  54. <u-grid-item v-for="(item,index) in dataList" :key="index" @click="pageJump(item.value)"
  55. style="margin: 20rpx 0;">
  56. <image style="width: 60rpx;height: 60rpx;" :src="item.url" mode=""></image>
  57. <text class="grid_text">{{item.text}}</text>
  58. </u-grid-item>
  59. </u-grid>
  60. </view>
  61. <u-toast ref="uToast" />
  62. <!-- 更新组件 force 是否强制更新 tabbar:页面是否有原生tabbar组件-->
  63. <app-update ref="app_update" :force="false" :tabbar="true"></app-update>
  64. </view>
  65. </template>
  66. <script>
  67. import appUpdate from "@/components/yzhua006-update/app-update.vue"
  68. import {revenueExpenditure} from "@/api/home/index.js"
  69. export default {
  70. components: {
  71. appUpdate
  72. },
  73. data() {
  74. return {
  75. list: [{
  76. image: "../../static/images/view/home/swiper.png"
  77. }],
  78. form:{},
  79. dataList: [{
  80. url: "../../static/images/view/home/desktop/customer.png",
  81. text: "客户信息",
  82. value: "customer"
  83. }, {
  84. url: "../../static/images/view/home/desktop/visit.png",
  85. text: "拜访记录"
  86. }, {
  87. url: "../../static/images/view/home/desktop/product.png",
  88. text: "产品信息",
  89. value: "product"
  90. }, {
  91. url: "../../static/images/view/home/desktop/achievements.png",
  92. text: "绩效考核"
  93. }, {
  94. url: "../../static/images/view/home/desktop/order.png",
  95. text: "销售订单",
  96. value: "toBeCollectedlist"
  97. }, {
  98. url: "../../static/images/view/home/desktop/delivery.png",
  99. text: "送货管理"
  100. }, {
  101. url: "../../static/images/view/home/desktop/collection.png",
  102. text: "收款管理",
  103. value: "collectionManagement"
  104. }, {
  105. url: "../../static/images/view/home/desktop/returnGoods.png",
  106. text: "退货管理"
  107. }, {
  108. url: "../../static/images/view/home/desktop/shoppingMall.png",
  109. text: "商城信息"
  110. }, {
  111. url: "../../static/images/view/home/desktop/goOnline.png",
  112. text: "产品上架"
  113. }, {
  114. url: "../../static/images/view/home/desktop/purchase.png",
  115. text: "采购管理",
  116. value: "purchase"
  117. }, {
  118. url: "../../static/images/view/home/desktop/cost.png",
  119. text: "费用管理"
  120. }],
  121. }
  122. },
  123. mounted() {
  124. this.$refs.app_update.update();
  125. revenueExpenditure({
  126. tenantId:uni.getStorageSync('userInfo').tenant_id
  127. }).then(res=>{
  128. this.form = res.data
  129. })
  130. },
  131. methods: {
  132. pageJump(value) {
  133. switch (value) {
  134. case "salesSlip":
  135. uni.$u.route('/pages/views/salesSlip/index');
  136. break;
  137. case "stock":
  138. uni.$u.route('/pages/views/stock/index');
  139. break;
  140. case "product":
  141. uni.$u.route('/pages/views/product/index');
  142. break;
  143. case "customer":
  144. uni.$u.route('/pages/views/customer/index');
  145. break;
  146. case "purchase":
  147. uni.$u.route('/pages/views/purchase/index');
  148. break;
  149. case "toBeCollectedlist":
  150. uni.$u.route('/pages/views/salesSlip/toBeCollectedlist');
  151. break;
  152. case "operatingReceipts":
  153. uni.$u.route('/pages/views/salesSlip/toBeCollectedlistBatch');
  154. break;
  155. case "collectionManagement":
  156. uni.$u.route('/pages/views/salesSlip/collectionManagement');
  157. break;
  158. default:
  159. this.$refs.uToast.success("该功能暂未开发~")
  160. }
  161. }
  162. }
  163. }
  164. </script>
  165. <style lang="scss" scoped>
  166. .quick_desktop {
  167. width: 96%;
  168. padding-bottom: 20rpx;
  169. background-color: #fff;
  170. margin: 0 auto;
  171. margin-top: 20rpx;
  172. border-radius: 20rpx;
  173. }
  174. .swiper {
  175. width: 96%;
  176. margin: 0 auto;
  177. margin-top: 20rpx;
  178. background-color: #fff;
  179. border-radius: 100rpx;
  180. box-shadow: 0px 14rpx 38rpx 4rpx rgba(52, 52, 52, 0.03);
  181. }
  182. .status_bar {
  183. width: 100%;
  184. background: url("../../static/images/view/home/head_bg.png") no-repeat;
  185. background-size: 100% 100%;
  186. padding-top: var(--status-bar-height);
  187. }
  188. .quick {
  189. margin-top: 60rpx;
  190. box-shadow: 0px 14rpx 38rpx 4rpx rgba(52, 52, 52, 0.03);
  191. .census {
  192. width: 96%;
  193. margin: 0 auto;
  194. color: #fff;
  195. display: flex;
  196. justify-content: space-around;
  197. font-size: 32rpx;
  198. // view:nth-child(1){
  199. // width: 50%;
  200. // }
  201. // view:nth-child(2){
  202. // width: 50%;
  203. // }
  204. }
  205. .ability {
  206. background-color: #fff;
  207. width: 96%;
  208. padding: 40rpx 0;
  209. margin: 0 auto;
  210. border-radius: 20rpx;
  211. }
  212. }
  213. .grid_text {
  214. font-size: 28rpx;
  215. color: #333333;
  216. // font-weight: bold;
  217. padding-top: 5rpx;
  218. }
  219. </style>