index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <view class="homePage-container">
  3. <!-- 数字货架 -->
  4. <div class="panel-box">
  5. <div class="panel-title"><div class="texts">数字货架</div></div>
  6. <div class="panel-body"><iconItemsList :list="storageRacksNavList"></iconItemsList></div>
  7. </div>
  8. <!-- 调回管理 -->
  9. <div class="graid-box">
  10. <div class="graid-box-1" @click="toPage('/pages/shuntBackManage/shuntBackList')">
  11. <div class="title">调回管理</div>
  12. <div>商品调回记录查询</div>
  13. </div>
  14. <div class="graid-box-1" @click="toPage('/pages/latePlay/chooseBulk')">
  15. <div class="title">补打贴签</div>
  16. <div>遗漏标签快捷处理</div>
  17. </div>
  18. </div>
  19. </view>
  20. </template>
  21. <script>
  22. import iconItemsList from '@/components/icon-items-list/icon-items-list.vue';
  23. import { shelfReplenishStateCount } from '@/api/shelfReplenish'
  24. export default {
  25. components: {
  26. iconItemsList,
  27. },
  28. data() {
  29. return {
  30. // 数字货架
  31. storageRacksNavList: [],
  32. theme: ''
  33. }
  34. },
  35. onLoad() {
  36. // 设置底部tabbar 样式
  37. const theme = getApp().globalData.theme
  38. this.theme = theme
  39. uni.setTabBarItem({
  40. "index": 0,
  41. "iconPath": "static/"+theme+"/tabbar/home.png",
  42. "selectedIconPath": "static/"+theme+"/tabbar/home-active.png",
  43. })
  44. uni.setTabBarItem({
  45. "index": 1,
  46. "iconPath": "static/"+theme+"/tabbar/user.png",
  47. "selectedIconPath": "static/"+theme+"/tabbar/user-active.png",
  48. })
  49. uni.setTabBarStyle({
  50. color: this.$config("topBarTitleColors"),
  51. selectedColor: this.$config("primaryColor"),
  52. borderStyle: 'white',
  53. complete: function(res){
  54. console.log(res)
  55. }
  56. })
  57. // 数组货架导航按钮
  58. this.storageRacksNavList = [
  59. {
  60. id: 'scanVin',
  61. icon: `/static/${this.theme}/navIcon/home_icon_confirm@3x.png`,
  62. name: '待确认',
  63. url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_CONFIRM',
  64. target: 'page',
  65. count: 0,
  66. auth: true
  67. },
  68. {
  69. id: 'scanGoods',
  70. icon: `/static/${this.theme}/navIcon/home_icon_out@3x.png`,
  71. name: '待出库',
  72. url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_OUT_STOCK',
  73. target: 'page',
  74. count: 0,
  75. auth: true
  76. },
  77. {
  78. id: 'bhrk',
  79. icon: `/static/${this.theme}/navIcon/home_icon_warehousing@3x.png`,
  80. name: '待签收',
  81. url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_CHECK',
  82. target: 'page',
  83. count: 0,
  84. auth: true
  85. },
  86. {
  87. id: 'jsgl',
  88. icon: `/static/${this.theme}/navIcon/home_icon_entire@3x.png`,
  89. name: '全部',
  90. url: '/pages/replenishmentManage/replenishmentList?billState=ALL',
  91. target: 'page',
  92. count: 0,
  93. auth: true
  94. }
  95. ];
  96. this.queryByTypeSum()
  97. },
  98. onShow() {
  99. },
  100. methods:{
  101. toPage(url){
  102. uni.navigateTo({
  103. url:url
  104. })
  105. },
  106. // 查询补货单每个状态的数据条数
  107. queryByTypeSum () {
  108. shelfReplenishStateCount({}).then(res => {
  109. if (res.data && res.status == 200) {
  110. this.storageRacksNavList[0].count = res.data.WAIT_CONFIRM || 0
  111. this.storageRacksNavList[1].count = res.data.WAIT_OUT_STOCK || 0
  112. this.storageRacksNavList[2].count = res.data.WAIT_CHECK || 0
  113. }
  114. })
  115. },
  116. }
  117. }
  118. </script>
  119. <style lang="scss">
  120. .homePage-container {
  121. width: 100%;
  122. padding: 30rpx;
  123. .graid-box{
  124. display: flex;
  125. align-items: center;
  126. .graid-box-1{
  127. background-color: #ffffff;
  128. border-radius: 30upx;
  129. box-shadow: 3upx 2upx 6upx #eee;
  130. padding: 30rpx;
  131. width: 50%;
  132. font-size: 28rpx;
  133. color: #424D5E;
  134. .title{
  135. font-size: 45rpx;
  136. color: #191919;
  137. font-weight: bold;
  138. }
  139. }
  140. > div{
  141. &:first-child{
  142. margin-right: 15rpx;
  143. }
  144. &:last-child{
  145. margin-left: 15rpx;
  146. }
  147. }
  148. }
  149. .panel-box {
  150. background-color: #ffffff;
  151. border-radius: 30upx;
  152. padding: 10upx 20upx;
  153. box-shadow: 3upx 2upx 6upx #eee;
  154. margin-bottom: 30upx;
  155. .panel-title {
  156. display: flex;
  157. align-items: center;
  158. padding: 20upx 12upx;
  159. .texts {
  160. font-size: 32upx;
  161. flex-grow: 1;
  162. }
  163. .btns {
  164. font-size: 28upx;
  165. color: #999;
  166. display: flex;
  167. align-items: center;
  168. }
  169. }
  170. .panel-body {
  171. padding: 0 10upx;
  172. .nodata {
  173. text-align: center;
  174. font-size: 24upx;
  175. width: 100%;
  176. color: #999999;
  177. padding: 30upx 0;
  178. }
  179. }
  180. }
  181. }
  182. </style>