home.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  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-show="item.inShow" v-for="(item,index) in dataList" :key="index"
  62. @click="pageJump(item.value)" style="margin: 20rpx 0;">
  63. <u-badge style="z-index: 1000;" v-if='item.badgeShow' numberType="overflow" absolute
  64. :offset="[-5,20]" :value="item.badgeNum"></u-badge>
  65. <image style="width: 60rpx;height: 60rpx;" :src="item.url" mode=""></image>
  66. <text class="grid_text">{{item.text}}</text>
  67. </u-grid-item>
  68. </u-grid>
  69. </view>
  70. <u-toast ref="uToast" />
  71. <!-- 更新组件 force 是否强制更新 tabbar:页面是否有原生tabbar组件-->
  72. <app-update ref="app_update" :force="false" :tabbar="true"></app-update>
  73. </view>
  74. </template>
  75. <script>
  76. import appUpdate from "@/components/yzhua006-update/app-update.vue"
  77. import {
  78. getList,
  79. getParamservice
  80. } from '@/api/views/approve/index.js'
  81. import {
  82. queryList
  83. } from '@/api/views/sale/salesOrderList.js'
  84. import {
  85. shipList
  86. } from '@/api/OutboundTask/index.js'
  87. import {
  88. revenueExpenditure,
  89. deptlazyList
  90. } from "@/api/home/index.js"
  91. import {
  92. listAll
  93. } from '@/api/views/approve/index.js'
  94. export default {
  95. components: {
  96. appUpdate
  97. },
  98. data() {
  99. return {
  100. badgeNum: 0,
  101. deptName: '',
  102. list: [{
  103. image: "../../static/images/view/home/swiper.png"
  104. }],
  105. form: {},
  106. dataList: [
  107. // {
  108. // url: "../../static/images/view/home/desktop/customer.png",
  109. // text: "客户信息",
  110. // value: "customer"
  111. // },
  112. // {
  113. // url: "../../static/images/view/home/desktop/visit.png",
  114. // text: "拜访记录",
  115. // value: "visit"
  116. // },
  117. {
  118. url: "../../static/images/view/home/desktop/order.png",
  119. text: "销售列表",
  120. value: "salesOrderList",
  121. badgeShow: true,
  122. badgeNum: 0,
  123. inShow: true,
  124. },
  125. {
  126. url: "../../static/images/view/home/desktop/shebeda.png",
  127. text: "出库任务",
  128. value: "OutboundTask",
  129. badgeShow: true,
  130. badgeNum: 0,
  131. inShow: true,
  132. },
  133. {
  134. url: "../../static/images/view/home/desktop/delivery.png",
  135. text: "仓库出库",
  136. value: "warehouseDelivery",
  137. badgeShow: true,
  138. badgeNum: 0,
  139. inShow: true,
  140. },
  141. {
  142. url: "../../static/images/view/home/desktop/product.png",
  143. text: "待审客户",
  144. value: "customerSubmit",
  145. inShow: true,
  146. },
  147. {
  148. url: "../../static/images/view/home/desktop/visit.png",
  149. text: "审批数据",
  150. badgeShow: true,
  151. value: "approve",
  152. badgeNum: 0,
  153. inShow: true,
  154. },
  155. {
  156. url: "../../static/images/view/home/desktop/customer.png",
  157. text: "融资采购",
  158. badgeShow: true,
  159. value: "procurement",
  160. badgeNum: 0,
  161. inShow: false,
  162. },
  163. {
  164. url: "../../static/images/view/home/desktop/visit.png",
  165. text: "融资审核",
  166. badgeShow: true,
  167. value: "financingReview",
  168. badgeNum: 0,
  169. inShow: false,
  170. },
  171. {
  172. url: "../../static/images/view/home/desktop/shebeda.png",
  173. text: "出库审核",
  174. badgeShow: true,
  175. value: "outboundTask",
  176. badgeNum: 0,
  177. inShow: false,
  178. },
  179. {
  180. url: "../../static/images/view/home/desktop/shebewx.png",
  181. text: "客户分析",
  182. badgeShow: false,
  183. value: "customerAnalysis",
  184. inShow: true,
  185. },
  186. {
  187. url: "../../static/images/view/home/desktop/green-recycling.png",
  188. text: "绿色回收",
  189. badgeShow: false,
  190. value: "greenRecycling",
  191. inShow: true,
  192. }
  193. // {
  194. // url: "../../static/images/view/home/desktop/product.png",
  195. // text: "上架轮胎",
  196. // value: "product"
  197. // },
  198. // ,{
  199. // url: "../../static/images/view/home/desktop/achievements.png",
  200. // text: "绩效考核"
  201. // }
  202. // , {
  203. // url: "../../static/images/view/home/desktop/order.png",
  204. // text: "销售订单",
  205. // value: "toBeCollectedlist"
  206. // },
  207. // , {
  208. // url: "../../static/images/view/home/desktop/delivery.png",
  209. // text: "送货管理"
  210. // }
  211. // , {
  212. // url: "../../static/images/view/home/desktop/collection.png",
  213. // text: "收款管理",
  214. // value: "collectionManagement"
  215. // }
  216. // , {
  217. // url: "../../static/images/view/home/desktop/returnGoods.png",
  218. // text: "退货管理"
  219. // }, {
  220. // url: "../../static/images/view/home/desktop/shoppingMall.png",
  221. // text: "商城信息"
  222. // }
  223. // , {
  224. // url: "../../static/images/view/home/desktop/goOnline.png",
  225. // text: "产品上架",
  226. // value: "productLaunch",
  227. // }, {
  228. // url: "../../static/images/view/home/desktop/purchase.png",
  229. // text: "采购管理",
  230. // value: "purchase"
  231. // }, {
  232. // url: "../../static/images/view/home/desktop/shebewx.png",
  233. // text: "维修报单",
  234. // value: "RepairReportList"
  235. // }, {
  236. // url: "../../static/images/view/home/desktop/shebeda.png",
  237. // text: "设备档案",
  238. // value: "EquipmentArchives"
  239. // }
  240. // , {
  241. // url: "../../static/images/view/home/desktop/cost.png",
  242. // text: "费用管理"
  243. // }
  244. ],
  245. }
  246. },
  247. mounted() {
  248. this.$refs.app_update.update();
  249. },
  250. onShow() {
  251. console.log(11111)
  252. getParamservice(1, 10, {
  253. paramKey: 'whether.financing'
  254. }).then(res => {
  255. if (res.data.records.find(e => e.paramValue == 1)) {
  256. this.dataList.forEach(e => {
  257. if (e.text == '融资采购') {
  258. e.inShow = true
  259. }
  260. if (e.text == '融资审核') {
  261. e.inShow = true
  262. }
  263. if (e.text == '出库审核') {
  264. e.inShow = true
  265. }
  266. })
  267. }
  268. })
  269. // dept_id
  270. revenueExpenditure({
  271. tenantId: uni.getStorageSync('userInfo').tenant_id
  272. }).then(res => {
  273. this.form = res.data
  274. uni.setStorageSync('information', res.data);
  275. })
  276. // 获取机构数据
  277. deptlazyList().then(res => {
  278. let deptId = uni.getStorageSync('userInfo').dept_id
  279. for (let item of res.data) {
  280. if (deptId == item.id) {
  281. this.deptName = item.deptName
  282. }
  283. }
  284. })
  285. getList({
  286. auditStatus: 'S'
  287. }).then(res => {
  288. this.dataList.forEach(e => {
  289. if (e.text == '审批数据') {
  290. e.badgeNum = res.data.total
  291. }
  292. })
  293. })
  294. queryList({
  295. bsType: 'XS',
  296. status: '待确认',
  297. notComplete: 1,
  298. }).then(res => {
  299. this.dataList.forEach(e => {
  300. if (e.text == '销售列表') {
  301. e.badgeNum = res.data.total
  302. }
  303. })
  304. })
  305. shipList({
  306. bizTypeName: 'FHRW',
  307. statusName: '待处理'
  308. }).then(res => {
  309. this.dataList.forEach(e => {
  310. if (e.text == '出库任务') {
  311. e.badgeNum = res.data.total
  312. }
  313. })
  314. })
  315. shipList({
  316. bizTypeName: 'FHGD',
  317. statusName: '待出库'
  318. }).then(res => {
  319. this.dataList.forEach(e => {
  320. if (e.text == '仓库出库') {
  321. e.badgeNum = res.data.total
  322. }
  323. })
  324. })
  325. },
  326. methods: {
  327. pageJump(value) {
  328. switch (value) {
  329. case 'warehouseDelivery':
  330. this.$u.route('/pages/views/warehouseDelivery/salesOrderList');
  331. break;
  332. case "salesSlip":
  333. uni.$u.route('/pages/views/salesSlip/index');
  334. break;
  335. case "stock":
  336. uni.$u.route('/pages/views/stock/index');
  337. break;
  338. case "product":
  339. uni.$u.route('/pages/views/product/index');
  340. break;
  341. case "customer":
  342. uni.$u.route('/pages/views/customer/index');
  343. break;
  344. case "purchase":
  345. uni.$u.route('/pages/views/purchase/index');
  346. break;
  347. case "toBeCollectedlist":
  348. uni.$u.route('/pages/views/salesSlip/toBeCollectedlist');
  349. break;
  350. case "operatingReceipts":
  351. uni.$u.route('/pages/views/salesSlip/toBeCollectedlistBatch');
  352. break;
  353. case "collectionManagement":
  354. this.$refs.uToast.warning("该功能开发中")
  355. // uni.$u.route('/pages/views/salesSlip/collectionManagement');
  356. break;
  357. case 'visit':
  358. this.$u.route('/pages/views/visit/visit');
  359. break
  360. case 'productLaunch':
  361. this.$u.route('/pages/views/productLaunch/index');
  362. // this.$u.route('/pages/views/bluetooth/index');
  363. break
  364. case 'EquipmentArchives':
  365. this.$u.route('/pages/device/EquipmentArchives/EquipmentArchives');
  366. break
  367. case 'RepairReportList':
  368. this.$u.route('/pages/device/RepairReportList/RepairReportList');
  369. break
  370. case 'OutboundTask':
  371. this.$u.route('/pages/OutboundTask/OutboundTask');
  372. break
  373. case 'salesOrderList':
  374. this.$u.route('/pages/views/salesSlip/salesOrderList');
  375. break
  376. case "customerSubmit":
  377. uni.$u.route('/pages/views/customerSubmit/index');
  378. break;
  379. case "approve":
  380. uni.$u.route('/pages/views/approve/index');
  381. break;
  382. case "procurement":
  383. uni.$u.route('/pages/views/procurement/index');
  384. break;
  385. case "financingReview":
  386. uni.$u.route('/pages/views/financingReview/index');
  387. break;
  388. case "outboundTask":
  389. uni.$u.route('/pages/views/outboundTask/index');
  390. break;
  391. case "customerAnalysis":
  392. uni.$u.route('/pages/views/customerAnalysis/index');
  393. break;
  394. case "greenRecycling":
  395. uni.$u.route('/pages/views/recycling/index');
  396. break;
  397. default:
  398. this.$refs.uToast.success("该功能暂未开发~")
  399. }
  400. }
  401. }
  402. }
  403. </script>
  404. <style lang="scss" scoped>
  405. .quick_desktop {
  406. width: 96%;
  407. padding-bottom: 20rpx;
  408. background-color: #fff;
  409. margin: 0 auto;
  410. margin-top: 20rpx;
  411. border-radius: 20rpx;
  412. }
  413. .swiper {
  414. width: 96%;
  415. margin: 0 auto;
  416. margin-top: 20rpx;
  417. background-color: #fff;
  418. border-radius: 100rpx;
  419. box-shadow: 0px 14rpx 38rpx 4rpx rgba(52, 52, 52, 0.03);
  420. }
  421. .status_bar {
  422. width: 100%;
  423. background: url("../../static/images/view/home/head_bg.png") no-repeat;
  424. background-size: 100% 100%;
  425. padding-top: var(--status-bar-height);
  426. }
  427. .quick {
  428. margin-top: 60rpx;
  429. box-shadow: 0px 14rpx 38rpx 4rpx rgba(52, 52, 52, 0.03);
  430. .census {
  431. width: 96%;
  432. margin: 0 auto;
  433. color: #fff;
  434. display: flex;
  435. justify-content: space-around;
  436. font-size: 32rpx;
  437. // view:nth-child(1){
  438. // width: 50%;
  439. // }
  440. // view:nth-child(2){
  441. // width: 50%;
  442. // }
  443. }
  444. .ability {
  445. background-color: #fff;
  446. width: 96%;
  447. padding: 40rpx 0;
  448. margin: 0 auto;
  449. border-radius: 20rpx;
  450. }
  451. }
  452. .grid_text {
  453. font-size: 28rpx;
  454. color: #333333;
  455. // font-weight: bold;
  456. padding-top: 5rpx;
  457. }
  458. </style>