index.vue 4.6 KB

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