index.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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/stock.png",
  42. "selectedIconPath": "static/"+theme+"/tabbar/stock-active.png",
  43. })
  44. uni.setTabBarItem({
  45. "index": 1,
  46. "iconPath": "static/"+theme+"/tabbar/home.png",
  47. "selectedIconPath": "static/"+theme+"/tabbar/home-active.png",
  48. })
  49. uni.setTabBarItem({
  50. "index": 2,
  51. "iconPath": "static/"+theme+"/tabbar/user.png",
  52. "selectedIconPath": "static/"+theme+"/tabbar/user-active.png",
  53. })
  54. uni.setTabBarStyle({
  55. color: this.$config("topBarTitleColors"),
  56. selectedColor: this.$config("primaryColor"),
  57. borderStyle: 'white',
  58. complete: function(res){
  59. console.log(res)
  60. }
  61. })
  62. // 数组货架导航按钮
  63. this.storageRacksNavList = [
  64. {
  65. id: 'scanVin',
  66. icon: `/static/${this.theme}/navIcon/home_icon_confirm@3x.png`,
  67. name: '待确认',
  68. url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_CONFIRM',
  69. target: 'page',
  70. count: 0,
  71. auth: true
  72. },
  73. {
  74. id: 'scanGoods',
  75. icon: `/static/${this.theme}/navIcon/home_icon_out@3x.png`,
  76. name: '待出库',
  77. url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_OUT_STOCK',
  78. target: 'page',
  79. count: 0,
  80. auth: true
  81. },
  82. {
  83. id: 'bhrk',
  84. icon: `/static/${this.theme}/navIcon/home_icon_warehousing@3x.png`,
  85. name: '待签收',
  86. url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_CHECK',
  87. target: 'page',
  88. count: 0,
  89. auth: true
  90. },
  91. {
  92. id: 'jsgl',
  93. icon: `/static/${this.theme}/navIcon/home_icon_entire@3x.png`,
  94. name: '全部',
  95. url: '/pages/replenishmentManage/replenishmentList?billState=ALL',
  96. target: 'page',
  97. count: 0,
  98. auth: true
  99. }
  100. ]
  101. },
  102. onShow() {
  103. this.queryByTypeSum()
  104. },
  105. methods:{
  106. toPage(url){
  107. uni.navigateTo({
  108. url:url
  109. })
  110. },
  111. // 查询补货单每个状态的数据条数
  112. queryByTypeSum () {
  113. shelfReplenishStateCount({}).then(res => {
  114. if (res.data && res.status == 200) {
  115. this.storageRacksNavList[0].count = res.data.WAIT_CONFIRM || 0
  116. this.storageRacksNavList[1].count = res.data.WAIT_OUT_STOCK || 0
  117. this.storageRacksNavList[2].count = res.data.WAIT_CHECK || 0
  118. }
  119. })
  120. },
  121. }
  122. }
  123. </script>
  124. <style lang="scss">
  125. .homePage-container {
  126. width: 100%;
  127. padding: 30rpx;
  128. .graid-box{
  129. display: flex;
  130. align-items: center;
  131. .graid-box-1{
  132. background-color: #ffffff;
  133. border-radius: 30upx;
  134. box-shadow: 3upx 2upx 6upx #eee;
  135. padding: 30rpx;
  136. width: 50%;
  137. font-size: 28rpx;
  138. color: #424D5E;
  139. .title{
  140. font-size: 45rpx;
  141. color: #191919;
  142. font-weight: bold;
  143. }
  144. }
  145. > div{
  146. &:first-child{
  147. margin-right: 15rpx;
  148. }
  149. &:last-child{
  150. margin-left: 15rpx;
  151. }
  152. }
  153. }
  154. .panel-box {
  155. background-color: #ffffff;
  156. border-radius: 30upx;
  157. padding: 10upx 20upx;
  158. box-shadow: 3upx 2upx 6upx #eee;
  159. margin-bottom: 30upx;
  160. .panel-title {
  161. display: flex;
  162. align-items: center;
  163. padding: 20upx 12upx;
  164. .texts {
  165. font-size: 32upx;
  166. flex-grow: 1;
  167. }
  168. .btns {
  169. font-size: 28upx;
  170. color: #999;
  171. display: flex;
  172. align-items: center;
  173. }
  174. }
  175. .panel-body {
  176. padding: 0 10upx;
  177. .nodata {
  178. text-align: center;
  179. font-size: 24upx;
  180. width: 100%;
  181. color: #999999;
  182. padding: 30upx 0;
  183. }
  184. }
  185. }
  186. }
  187. </style>