home.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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 {
  69. revenueExpenditure
  70. } from "@/api/home/index.js"
  71. export default {
  72. components: {
  73. appUpdate
  74. },
  75. data() {
  76. return {
  77. list: [{
  78. image: "../../static/images/view/home/swiper.png"
  79. }],
  80. form: {},
  81. dataList: [{
  82. url: "../../static/images/view/home/desktop/customer.png",
  83. text: "客户信息",
  84. value: "customer"
  85. }, {
  86. url: "../../static/images/view/home/desktop/visit.png",
  87. text: "拜访记录",
  88. value: "visit"
  89. }, {
  90. url: "../../static/images/view/home/desktop/product.png",
  91. text: "产品信息",
  92. value: "product"
  93. }
  94. // ,{
  95. // url: "../../static/images/view/home/desktop/achievements.png",
  96. // text: "绩效考核"
  97. // }
  98. , {
  99. url: "../../static/images/view/home/desktop/order.png",
  100. text: "销售订单",
  101. value: "toBeCollectedlist"
  102. }, {
  103. url: "../../static/images/view/home/desktop/delivery.png",
  104. text: "仓库出库",
  105. value: "warehouseDelivery"
  106. }
  107. // , {
  108. // url: "../../static/images/view/home/desktop/delivery.png",
  109. // text: "送货管理"
  110. // }
  111. , {
  112. url: "../../static/images/view/home/desktop/collection.png",
  113. text: "收款管理",
  114. value: "collectionManagement"
  115. }
  116. // , {
  117. // url: "../../static/images/view/home/desktop/returnGoods.png",
  118. // text: "退货管理"
  119. // }, {
  120. // url: "../../static/images/view/home/desktop/shoppingMall.png",
  121. // text: "商城信息"
  122. // }
  123. , {
  124. url: "../../static/images/view/home/desktop/goOnline.png",
  125. text: "产品上架",
  126. value: "productLaunch",
  127. }, {
  128. url: "../../static/images/view/home/desktop/purchase.png",
  129. text: "采购管理",
  130. value: "purchase"
  131. }
  132. // , {
  133. // url: "../../static/images/view/home/desktop/cost.png",
  134. // text: "费用管理"
  135. // }
  136. ],
  137. }
  138. },
  139. mounted() {
  140. this.$refs.app_update.update();
  141. },
  142. onShow() {
  143. revenueExpenditure({
  144. tenantId: uni.getStorageSync('userInfo').tenant_id
  145. }).then(res => {
  146. this.form = res.data
  147. uni.setStorageSync('information', res.data);
  148. })
  149. },
  150. methods: {
  151. pageJump(value) {
  152. switch (value) {
  153. case 'warehouseDelivery':
  154. this.$u.route('/pages/views/warehouseDelivery/salesOrderList');
  155. break;
  156. case "salesSlip":
  157. uni.$u.route('/pages/views/salesSlip/index');
  158. break;
  159. case "stock":
  160. uni.$u.route('/pages/views/stock/index');
  161. break;
  162. case "product":
  163. uni.$u.route('/pages/views/product/index');
  164. break;
  165. case "customer":
  166. uni.$u.route('/pages/views/customer/index');
  167. break;
  168. case "purchase":
  169. uni.$u.route('/pages/views/purchase/index');
  170. break;
  171. case "toBeCollectedlist":
  172. uni.$u.route('/pages/views/salesSlip/toBeCollectedlist');
  173. break;
  174. case "operatingReceipts":
  175. uni.$u.route('/pages/views/salesSlip/toBeCollectedlistBatch');
  176. break;
  177. case "collectionManagement":
  178. this.$refs.uToast.warning("该功能开发中")
  179. // uni.$u.route('/pages/views/salesSlip/collectionManagement');
  180. break;
  181. case 'visit':
  182. this.$u.route('/pages/views/visit/visit');
  183. break
  184. case 'productLaunch':
  185. this.$u.route('/pages/views/productLaunch/index');
  186. // this.$u.route('/pages/views/bluetooth/index');
  187. break
  188. default:
  189. this.$refs.uToast.success("该功能暂未开发~")
  190. }
  191. }
  192. }
  193. }
  194. </script>
  195. <style lang="scss" scoped>
  196. .quick_desktop {
  197. width: 96%;
  198. padding-bottom: 20rpx;
  199. background-color: #fff;
  200. margin: 0 auto;
  201. margin-top: 20rpx;
  202. border-radius: 20rpx;
  203. }
  204. .swiper {
  205. width: 96%;
  206. margin: 0 auto;
  207. margin-top: 20rpx;
  208. background-color: #fff;
  209. border-radius: 100rpx;
  210. box-shadow: 0px 14rpx 38rpx 4rpx rgba(52, 52, 52, 0.03);
  211. }
  212. .status_bar {
  213. width: 100%;
  214. background: url("../../static/images/view/home/head_bg.png") no-repeat;
  215. background-size: 100% 100%;
  216. padding-top: var(--status-bar-height);
  217. }
  218. .quick {
  219. margin-top: 60rpx;
  220. box-shadow: 0px 14rpx 38rpx 4rpx rgba(52, 52, 52, 0.03);
  221. .census {
  222. width: 96%;
  223. margin: 0 auto;
  224. color: #fff;
  225. display: flex;
  226. justify-content: space-around;
  227. font-size: 32rpx;
  228. // view:nth-child(1){
  229. // width: 50%;
  230. // }
  231. // view:nth-child(2){
  232. // width: 50%;
  233. // }
  234. }
  235. .ability {
  236. background-color: #fff;
  237. width: 96%;
  238. padding: 40rpx 0;
  239. margin: 0 auto;
  240. border-radius: 20rpx;
  241. }
  242. }
  243. .grid_text {
  244. font-size: 28rpx;
  245. color: #333333;
  246. // font-weight: bold;
  247. padding-top: 5rpx;
  248. }
  249. </style>