home.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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 style="width: 68%;margin-left: 2%;
  11. text-align: left;line-height: 80rpx;font-weight: bold;font-size: 32rpx;">
  12. {{deptName}}
  13. <!-- <view >{{form.tenantName}}</view>
  14. <view >{{deptName}}</view> -->
  15. </view>
  16. </view>
  17. <view class="quick">
  18. <!-- <view class="census">
  19. <view>营业收入:1232131元</view>
  20. <view>付款金额:31231231元</view>
  21. </view> -->
  22. <view class="ability">
  23. <u-grid :border="false">
  24. <u-grid-item @click="pageJump('salesSlip')">
  25. <image style="width: 80rpx;height: 80rpx;" src="../../static/images/view/home/sale.png">
  26. </image>
  27. <text class="grid_text">销售开单</text>
  28. </u-grid-item>
  29. <u-grid-item @click="pageJump('stock')">
  30. <image style="width: 80rpx;height: 80rpx;" src="../../static/images/view/home/stock.png">
  31. </image>
  32. <text class="grid_text">库存查询</text>
  33. </u-grid-item>
  34. <!-- <u-grid-item @click="pageJump('operatingReceipts')">
  35. <image style="width: 80rpx;height: 80rpx;" src="../../static/images/view/home/collect.png">
  36. </image>
  37. <text class="grid_text">经营收款</text>
  38. </u-grid-item> -->
  39. <u-grid-item @click="pageJump('customer')">
  40. <image style="width: 80rpx;height: 80rpx;" src="../../static/images/view/home/collect.png">
  41. </image>
  42. <text class="grid_text">客户信息</text>
  43. </u-grid-item>
  44. </u-grid>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="swiper">
  49. <u-swiper :list="list" radius="36rpx" keyName="image" height="90" :autoplay="false" circular></u-swiper>
  50. </view>
  51. <view class="quick_desktop">
  52. <u-cell-group :border="false">
  53. <u-cell icon="integral-fill" :border="false" title="工作桌面">
  54. <view slot="icon" style="width: 10rpx;height: 35rpx;background-color: #fd5003;"></view>
  55. <view slot="right-icon">
  56. <u-icon name="grid" size="28"></u-icon>
  57. </view>
  58. </u-cell>
  59. </u-cell-group>
  60. <u-grid :border="false" col="4">
  61. <u-grid-item v-for="(item,index) in dataList" :key="index" @click="pageJump(item.value)"
  62. style="margin: 20rpx 0;">
  63. <image style="width: 60rpx;height: 60rpx;" :src="item.url" mode=""></image>
  64. <text class="grid_text">{{item.text}}</text>
  65. </u-grid-item>
  66. </u-grid>
  67. </view>
  68. <u-toast ref="uToast" />
  69. <!-- 更新组件 force 是否强制更新 tabbar:页面是否有原生tabbar组件-->
  70. <app-update ref="app_update" :force="false" :tabbar="true"></app-update>
  71. </view>
  72. </template>
  73. <script>
  74. import appUpdate from "@/components/yzhua006-update/app-update.vue"
  75. import {
  76. revenueExpenditure,deptlazyList
  77. } from "@/api/home/index.js"
  78. export default {
  79. components: {
  80. appUpdate
  81. },
  82. data() {
  83. return {
  84. deptName:'',
  85. list: [{
  86. image: "../../static/images/view/home/swiper.png"
  87. }],
  88. form: {},
  89. dataList: [
  90. // {
  91. // url: "../../static/images/view/home/desktop/customer.png",
  92. // text: "客户信息",
  93. // value: "customer"
  94. // },
  95. // {
  96. // url: "../../static/images/view/home/desktop/visit.png",
  97. // text: "拜访记录",
  98. // value: "visit"
  99. // },
  100. {
  101. url: "../../static/images/view/home/desktop/order.png",
  102. text: "销售列表",
  103. value: "salesOrderList"
  104. },
  105. {
  106. url: "../../static/images/view/home/desktop/shebeda.png",
  107. text: "出库任务",
  108. value: "OutboundTask"
  109. },
  110. {
  111. url: "../../static/images/view/home/desktop/delivery.png",
  112. text: "仓库出库",
  113. value: "warehouseDelivery"
  114. },
  115. {
  116. url: "../../static/images/view/home/desktop/product.png",
  117. text: "待审客户",
  118. value: "customerSubmit"
  119. },
  120. // {
  121. // url: "../../static/images/view/home/desktop/product.png",
  122. // text: "上架轮胎",
  123. // value: "product"
  124. // },
  125. // ,{
  126. // url: "../../static/images/view/home/desktop/achievements.png",
  127. // text: "绩效考核"
  128. // }
  129. // , {
  130. // url: "../../static/images/view/home/desktop/order.png",
  131. // text: "销售订单",
  132. // value: "toBeCollectedlist"
  133. // },
  134. // , {
  135. // url: "../../static/images/view/home/desktop/delivery.png",
  136. // text: "送货管理"
  137. // }
  138. // , {
  139. // url: "../../static/images/view/home/desktop/collection.png",
  140. // text: "收款管理",
  141. // value: "collectionManagement"
  142. // }
  143. // , {
  144. // url: "../../static/images/view/home/desktop/returnGoods.png",
  145. // text: "退货管理"
  146. // }, {
  147. // url: "../../static/images/view/home/desktop/shoppingMall.png",
  148. // text: "商城信息"
  149. // }
  150. // , {
  151. // url: "../../static/images/view/home/desktop/goOnline.png",
  152. // text: "产品上架",
  153. // value: "productLaunch",
  154. // }, {
  155. // url: "../../static/images/view/home/desktop/purchase.png",
  156. // text: "采购管理",
  157. // value: "purchase"
  158. // }, {
  159. // url: "../../static/images/view/home/desktop/shebewx.png",
  160. // text: "维修报单",
  161. // value: "RepairReportList"
  162. // }, {
  163. // url: "../../static/images/view/home/desktop/shebeda.png",
  164. // text: "设备档案",
  165. // value: "EquipmentArchives"
  166. // }
  167. // , {
  168. // url: "../../static/images/view/home/desktop/cost.png",
  169. // text: "费用管理"
  170. // }
  171. ],
  172. }
  173. },
  174. mounted() {
  175. this.$refs.app_update.update();
  176. },
  177. onShow() {
  178. // dept_id
  179. revenueExpenditure({
  180. tenantId: uni.getStorageSync('userInfo').tenant_id
  181. }).then(res => {
  182. this.form = res.data
  183. uni.setStorageSync('information', res.data);
  184. })
  185. // 获取机构数据
  186. deptlazyList().then(res=>{
  187. let deptId = uni.getStorageSync('userInfo').dept_id
  188. for (let item of res.data) {
  189. if (deptId == item.id) {
  190. this.deptName = item.deptName
  191. }
  192. }
  193. })
  194. },
  195. methods: {
  196. pageJump(value) {
  197. switch (value) {
  198. case 'warehouseDelivery':
  199. this.$u.route('/pages/views/warehouseDelivery/salesOrderList');
  200. break;
  201. case "salesSlip":
  202. uni.$u.route('/pages/views/salesSlip/index');
  203. break;
  204. case "stock":
  205. uni.$u.route('/pages/views/stock/index');
  206. break;
  207. case "product":
  208. uni.$u.route('/pages/views/product/index');
  209. break;
  210. case "customer":
  211. uni.$u.route('/pages/views/customer/index');
  212. break;
  213. case "purchase":
  214. uni.$u.route('/pages/views/purchase/index');
  215. break;
  216. case "toBeCollectedlist":
  217. uni.$u.route('/pages/views/salesSlip/toBeCollectedlist');
  218. break;
  219. case "operatingReceipts":
  220. uni.$u.route('/pages/views/salesSlip/toBeCollectedlistBatch');
  221. break;
  222. case "collectionManagement":
  223. this.$refs.uToast.warning("该功能开发中")
  224. // uni.$u.route('/pages/views/salesSlip/collectionManagement');
  225. break;
  226. case 'visit':
  227. this.$u.route('/pages/views/visit/visit');
  228. break
  229. case 'productLaunch':
  230. this.$u.route('/pages/views/productLaunch/index');
  231. // this.$u.route('/pages/views/bluetooth/index');
  232. break
  233. case 'EquipmentArchives':
  234. this.$u.route('/pages/device/EquipmentArchives/EquipmentArchives');
  235. break
  236. case 'RepairReportList':
  237. this.$u.route('/pages/device/RepairReportList/RepairReportList');
  238. break
  239. case 'OutboundTask':
  240. this.$u.route('/pages/OutboundTask/OutboundTask');
  241. break
  242. case 'salesOrderList':
  243. this.$u.route('/pages/views/salesSlip/salesOrderList');
  244. break
  245. case "customerSubmit":
  246. uni.$u.route('/pages/views/customerSubmit/index');
  247. break;
  248. default:
  249. this.$refs.uToast.success("该功能暂未开发~")
  250. }
  251. }
  252. }
  253. }
  254. </script>
  255. <style lang="scss" scoped>
  256. .quick_desktop {
  257. width: 96%;
  258. padding-bottom: 20rpx;
  259. background-color: #fff;
  260. margin: 0 auto;
  261. margin-top: 20rpx;
  262. border-radius: 20rpx;
  263. }
  264. .swiper {
  265. width: 96%;
  266. margin: 0 auto;
  267. margin-top: 20rpx;
  268. background-color: #fff;
  269. border-radius: 100rpx;
  270. box-shadow: 0px 14rpx 38rpx 4rpx rgba(52, 52, 52, 0.03);
  271. }
  272. .status_bar {
  273. width: 100%;
  274. background: url("../../static/images/view/home/head_bg.png") no-repeat;
  275. background-size: 100% 100%;
  276. padding-top: var(--status-bar-height);
  277. }
  278. .quick {
  279. margin-top: 60rpx;
  280. box-shadow: 0px 14rpx 38rpx 4rpx rgba(52, 52, 52, 0.03);
  281. .census {
  282. width: 96%;
  283. margin: 0 auto;
  284. color: #fff;
  285. display: flex;
  286. justify-content: space-around;
  287. font-size: 32rpx;
  288. // view:nth-child(1){
  289. // width: 50%;
  290. // }
  291. // view:nth-child(2){
  292. // width: 50%;
  293. // }
  294. }
  295. .ability {
  296. background-color: #fff;
  297. width: 96%;
  298. padding: 40rpx 0;
  299. margin: 0 auto;
  300. border-radius: 20rpx;
  301. }
  302. }
  303. .grid_text {
  304. font-size: 28rpx;
  305. color: #333333;
  306. // font-weight: bold;
  307. padding-top: 5rpx;
  308. }
  309. </style>