index.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <template>
  2. <view class="homePage-container">
  3. <!-- 数字货架 -->
  4. <div class="panel-box" v-if="$hasPermissions('M_ERManage_mobile')">
  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')" v-if="$hasPermissions('M_BackToManage_mobile')">
  11. <div class="icon">
  12. <u-icon name="huowu-tuihui" custom-prefix="iscm-icon" size="70"></u-icon>
  13. </div>
  14. <div class="title">调回管理</div>
  15. </div>
  16. <div class="graid-box-1" @click="toPage('/pages/latePlay/chooseBulk')" v-if="$hasPermissions('M_printLabel_mobile')">
  17. <div class="icon">
  18. <u-icon name="dayin" custom-prefix="iscm-icon" size="65"></u-icon>
  19. </div>
  20. <div class="title">补打贴签</div>
  21. </div>
  22. <div class="graid-box-1" @click="toPage('/pages/shelfSetting/shelfList')" v-if="$hasPermissions('M_shelfSetting_mobile')">
  23. <div class="icon">
  24. <u-icon name="ison_shelf" custom-prefix="iscm-icon" size="65"></u-icon>
  25. </div>
  26. <div class="title">货架设置</div>
  27. </div>
  28. <div class="graid-box-1" @click="toPage('/pages/approveStore/list')" v-if="$hasPermissions('M_auditStore_mobile')">
  29. <div class="icon">
  30. <u-icon name="mendianzhuanxiangshenhe" custom-prefix="iscm-icon" size="70"></u-icon>
  31. <u-badge type="error" size="mini" :offset="[-5,20]" :count="storeAuthNums"></u-badge>
  32. </div>
  33. <div class="title">门店审核</div>
  34. </div>
  35. <div class="graid-box-1" @click="toPage('/pages/stockCheck/shelfList')" v-if="$hasPermissions('M_stockCheck_mobile')">
  36. <div class="icon">
  37. <u-icon name="icon_warehousing" custom-prefix="iscm-icon" size="65"></u-icon>
  38. <u-badge type="error" size="mini" :offset="[-5,20]" :count="stockCheckNums"></u-badge>
  39. </div>
  40. <div class="title">库存盘点</div>
  41. </div>
  42. <div class="graid-box-1" @click="toPage('/pages/stockCheck/shelfList')" v-if="$hasPermissions('M_shelfOrder_mobile')">
  43. <div class="icon">
  44. <u-icon name="icon_order" custom-prefix="iscm-icon" size="65"></u-icon>
  45. <u-badge type="error" size="mini" :offset="[-5,20]" :count="stockCheckNums"></u-badge>
  46. </div>
  47. <div class="title">货架订单</div>
  48. </div>
  49. <!-- <div class="graid-box-1" @click="toPage('/pages/index/printAbc')">
  50. <div class="title">打印ABC</div>
  51. </div> -->
  52. </div>
  53. </view>
  54. </template>
  55. <script>
  56. import iconItemsList from '@/components/icon-items-list/icon-items-list.vue';
  57. import { shelfReplenishStateCount } from '@/api/shelfReplenish'
  58. import { queryStockCheckWaitStateNum } from '@/api/stockCheck'
  59. import { xprhStoreApplyQueryPage } from '@/api/approveStore'
  60. export default {
  61. components: {
  62. iconItemsList,
  63. },
  64. data() {
  65. return {
  66. // 数字货架
  67. storageRacksNavList: [],
  68. theme: '',
  69. storeAuthNums: 0,
  70. stockCheckNums: 0
  71. }
  72. },
  73. onLoad() {
  74. // 设置底部tabbar 样式
  75. const theme = getApp().globalData.theme
  76. this.theme = theme
  77. // 数字货架导航按钮
  78. this.storageRacksNavList = [
  79. {
  80. id: 'scanVin',
  81. icon: `/static/${this.theme}/navIcon/home_icon_confirm@3x.png`,
  82. name: '待确认',
  83. url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_CONFIRM',
  84. target: 'page',
  85. count: 0,
  86. auth: true
  87. },
  88. {
  89. id: 'scanGoods',
  90. icon: `/static/${this.theme}/navIcon/home_icon_out@3x.png`,
  91. name: '待出库',
  92. url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_OUT_STOCK',
  93. target: 'page',
  94. count: 0,
  95. auth: true
  96. },
  97. {
  98. id: 'bhrk',
  99. icon: `/static/${this.theme}/navIcon/home_icon_warehousing@3x.png`,
  100. name: '待签收',
  101. url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_CHECK',
  102. target: 'page',
  103. count: 0,
  104. auth: true
  105. },
  106. {
  107. id: 'jsgl',
  108. icon: `/static/${this.theme}/navIcon/home_icon_entire@3x.png`,
  109. name: '全部',
  110. url: '/pages/replenishmentManage/replenishmentList?billState=ALL',
  111. target: 'page',
  112. count: 0,
  113. auth: true
  114. }
  115. ]
  116. },
  117. onShow() {
  118. this.queryByTypeSum()
  119. this.getStoreNums()
  120. this.getStockCheckNums()
  121. },
  122. methods:{
  123. toPage(url){
  124. uni.navigateTo({ url:url })
  125. },
  126. // 查询补货单每个状态的数据条数
  127. queryByTypeSum () {
  128. shelfReplenishStateCount({}).then(res => {
  129. if (res.data && res.status == 200) {
  130. this.storageRacksNavList[0].count = res.data.WAIT_CONFIRM || 0
  131. this.storageRacksNavList[1].count = res.data.WAIT_OUT_STOCK || 0
  132. this.storageRacksNavList[2].count = res.data.WAIT_CHECK || 0
  133. }
  134. })
  135. },
  136. getStoreNums(){
  137. xprhStoreApplyQueryPage({pageNo:1,pageSize:1,auditStatus:'WAIT'}).then(res => {
  138. this.storeAuthNums = res.data.count || 0
  139. })
  140. },
  141. getStockCheckNums(){
  142. queryStockCheckWaitStateNum().then(res => {
  143. this.stockCheckNums = res.data || 0
  144. })
  145. }
  146. }
  147. }
  148. </script>
  149. <style lang="scss">
  150. .homePage-container {
  151. width: 100%;
  152. padding: 30rpx;
  153. .graid-box{
  154. display: flex;
  155. align-items: center;
  156. flex-wrap: wrap;
  157. background-color: #ffffff;
  158. border-radius: 30upx;
  159. padding: 10upx 20upx;
  160. box-shadow: 3upx 2upx 6upx #eee;
  161. .graid-box-1{
  162. padding: 30rpx 0;
  163. width: 25%;
  164. font-size: 24rpx;
  165. color: #424D5E;
  166. text-align: center;
  167. .title{
  168. font-size: 28rpx;
  169. color: #191919;
  170. font-weight: bold;
  171. }
  172. .icon{
  173. text-align: center;
  174. position: relative;
  175. }
  176. }
  177. }
  178. .panel-box {
  179. background-color: #ffffff;
  180. border-radius: 30upx;
  181. padding: 10upx 20upx;
  182. box-shadow: 3upx 2upx 6upx #eee;
  183. margin-bottom: 30upx;
  184. .panel-title {
  185. display: flex;
  186. align-items: center;
  187. padding: 20upx 12upx;
  188. .texts {
  189. font-size: 32upx;
  190. flex-grow: 1;
  191. }
  192. .btns {
  193. font-size: 28upx;
  194. color: #999;
  195. display: flex;
  196. align-items: center;
  197. }
  198. }
  199. .panel-body {
  200. padding: 0 10upx;
  201. .nodata {
  202. text-align: center;
  203. font-size: 24upx;
  204. width: 100%;
  205. color: #999999;
  206. padding: 30upx 0;
  207. }
  208. }
  209. }
  210. }
  211. </style>