index.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <view class="content">
  3. <view class="notice">
  4. <u-notice-bar
  5. type="success"
  6. mode="vertical"
  7. :more-icon="true"
  8. @click="noticeClick"
  9. @getMore="noticeMore"
  10. :list="noticeList">
  11. </u-notice-bar>
  12. </view>
  13. <view class="title">仓库管理</view>
  14. <view class="menu-list u-flex u-flex-wrap u-row-left">
  15. <view class="menu-item" @click="menuClick(item)" v-for="(item,index) in storeMenuList" :key="index">
  16. <u-icon :name="item.name" custom-prefix="custom-icon" size="60" color="#11d183"></u-icon>
  17. <view class="text">{{item.text}}</view>
  18. <u-badge v-if="item.badge" class="badge" :offset="[0,0]" :count="item.badge" type="success"></u-badge>
  19. </view>
  20. </view>
  21. <view class="title">其他</view>
  22. <view class="menu-list u-flex u-flex-wrap u-row-left">
  23. <view class="menu-item" @click="menuClick(item)" v-for="(item,index) in otherMenuList" :key="index">
  24. <u-icon :name="item.name" custom-prefix="custom-icon" size="60" color="#11d183"></u-icon>
  25. <view class="text">{{item.text}}</view>
  26. </view>
  27. </view>
  28. <u-toast ref="uToast" />
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. data() {
  34. return {
  35. noticeList:['寒雨连江夜入吴','平明送客楚山孤'],
  36. storeMenuList:[
  37. {name:'ruku',text:'物资入库',url:'pages/putin/putin'},
  38. {name:'chukuguanli',text:'物资出库',url:'pages/putout/putout'},
  39. {name:'pandian',text:'库存盘点',url:'pages/check/check'},
  40. {name:'fq_kucunchaxun',text:'库存查询',url:'pages/seach/seach'},
  41. {name:'RectangleCopy',text:'退库申请',badge:2,url:'pages/return/return'},
  42. ],
  43. otherMenuList:[
  44. {name:'xiugaimima',text:'修改密码',url:'pages/changepass/changepass'},
  45. ]
  46. }
  47. },
  48. onLoad() {
  49. },
  50. methods: {
  51. noticeClick(e){
  52. console.log('noticeClick',e);
  53. },
  54. noticeMore(){
  55. console.log('noticeMore');
  56. },
  57. menuClick(item){
  58. if(!item.url){
  59. this.$refs.uToast.show({
  60. title: '暂未开放',
  61. type: 'error',
  62. })
  63. };
  64. this.$u.route({
  65. url: item.url
  66. })
  67. }
  68. }
  69. }
  70. </script>
  71. <style lang="scss" scoped>
  72. .title{
  73. font-size: 30rpx;
  74. background-color: var(--bg-color);
  75. padding: 24rpx;
  76. font-weight: bold;
  77. }
  78. .menu-list{
  79. padding: 24rpx;
  80. text-align: center;
  81. .menu-item{
  82. gap: 20rpx;
  83. width: 33.33%;
  84. position: relative;
  85. margin-bottom: 34rpx;
  86. .text{
  87. margin-top: 10rpx;
  88. }
  89. }
  90. }
  91. </style>