index.vue 6.9 KB

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