index.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  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/index/printAbc')">
  50. <div class="title">打印ABC</div>
  51. </div> -->
  52. </div>
  53. <!-- 货架订单 -->
  54. <!-- <view class="sales-list" v-if="$hasPermissions('M_shelfOrder_mobile')">
  55. <view class="title">
  56. <text class="title-name" @click="$refs.salesList.refash()">
  57. 货架订单
  58. <u-icon name="reload" color="#2979ff" size="28"></u-icon>
  59. </text>
  60. <view class="title-all" @click="toPage('/pages/shelfOrder/shelfOrder')">查看全部<u-icon name="arrow-right" color="rgb(144, 147, 153)" size="28"></u-icon></view>
  61. </view>
  62. </view> -->
  63. </view>
  64. <!-- 销售单列表 -->
  65. <!-- <listComponent ref="salesList" :height="listHeight" v-if="$hasPermissions('M_shelfOrder_mobile')" /> -->
  66. </view>
  67. </template>
  68. <script>
  69. import iconItemsList from '@/components/icon-items-list/icon-items-list.vue';
  70. import listComponent from '@/pages/shelfOrder/listComponent.vue'
  71. import { shelfReplenishStateCount } from '@/api/shelfReplenish'
  72. import { queryStockCheckWaitStateNum } from '@/api/stockCheck'
  73. import { xprhStoreApplyQueryPage } from '@/api/approveStore'
  74. export default {
  75. components: {
  76. iconItemsList,
  77. listComponent
  78. },
  79. data() {
  80. return {
  81. // 数字货架
  82. storageRacksNavList: [],
  83. theme: '',
  84. storeAuthNums: 0,
  85. stockCheckNums: 0,
  86. listHeight: 400
  87. }
  88. },
  89. onReady() {
  90. const query = uni.createSelectorQuery().in(this);
  91. query.select('#tjCons').boundingClientRect(data => {
  92. this.listHeight = Math.floor(data.height-40)
  93. }).exec();
  94. },
  95. onLoad() {
  96. // 设置底部tabbar 样式
  97. const theme = getApp().globalData.theme
  98. this.theme = theme
  99. // 数字货架导航按钮
  100. this.storageRacksNavList = [
  101. {
  102. id: 'scanVin',
  103. icon: `/static/${this.theme}/navIcon/home_icon_confirm@3x.png`,
  104. name: '待确认',
  105. url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_CONFIRM',
  106. target: 'page',
  107. count: 0,
  108. auth: true
  109. },
  110. {
  111. id: 'scanGoods',
  112. icon: `/static/${this.theme}/navIcon/home_icon_out@3x.png`,
  113. name: '待出库',
  114. url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_OUT_STOCK',
  115. target: 'page',
  116. count: 0,
  117. auth: true
  118. },
  119. {
  120. id: 'bhrk',
  121. icon: `/static/${this.theme}/navIcon/home_icon_warehousing@3x.png`,
  122. name: '待签收',
  123. url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_CHECK',
  124. target: 'page',
  125. count: 0,
  126. auth: true
  127. },
  128. {
  129. id: 'jsgl',
  130. icon: `/static/${this.theme}/navIcon/home_icon_entire@3x.png`,
  131. name: '全部',
  132. url: '/pages/replenishmentManage/replenishmentList?billState=ALL',
  133. target: 'page',
  134. count: 0,
  135. auth: true
  136. }
  137. ]
  138. },
  139. onShow() {
  140. this.queryByTypeSum()
  141. this.getStoreNums()
  142. this.getStockCheckNums()
  143. },
  144. methods:{
  145. toPage(url){
  146. uni.navigateTo({ url:url })
  147. },
  148. // 查询补货单每个状态的数据条数
  149. queryByTypeSum () {
  150. shelfReplenishStateCount({}).then(res => {
  151. if (res.data && res.status == 200) {
  152. this.storageRacksNavList[0].count = res.data.WAIT_CONFIRM || 0
  153. this.storageRacksNavList[1].count = res.data.WAIT_OUT_STOCK || 0
  154. this.storageRacksNavList[2].count = res.data.WAIT_CHECK || 0
  155. }
  156. })
  157. },
  158. getStoreNums(){
  159. xprhStoreApplyQueryPage({pageNo:1,pageSize:1,auditStatus:'WAIT'}).then(res => {
  160. this.storeAuthNums = res.data.count || 0
  161. })
  162. },
  163. getStockCheckNums(){
  164. queryStockCheckWaitStateNum().then(res => {
  165. this.stockCheckNums = res.data || 0
  166. })
  167. }
  168. }
  169. }
  170. </script>
  171. <style lang="scss">
  172. .homePage-container {
  173. width: 100%;
  174. padding: 0 30rpx;
  175. .graid-box{
  176. display: flex;
  177. align-items: center;
  178. flex-wrap: wrap;
  179. background-color: #ffffff;
  180. border-radius: 30upx;
  181. padding: 10upx 20upx;
  182. box-shadow: 3upx 2upx 6upx #eee;
  183. margin-bottom: 20upx;
  184. .graid-box-1{
  185. padding: 20rpx 0;
  186. width: 25%;
  187. font-size: 24rpx;
  188. color: #424D5E;
  189. text-align: center;
  190. .title{
  191. font-size: 28rpx;
  192. color: #191919;
  193. font-weight: bold;
  194. }
  195. .icon{
  196. text-align: center;
  197. position: relative;
  198. }
  199. }
  200. }
  201. .panel-box {
  202. background-color: #ffffff;
  203. border-radius: 30upx;
  204. padding: 10upx 20upx;
  205. box-shadow: 3upx 2upx 6upx #eee;
  206. margin-top: 20upx;
  207. margin-bottom: 20upx;
  208. .panel-title {
  209. display: flex;
  210. align-items: center;
  211. padding: 20upx 12upx;
  212. .texts {
  213. font-size: 32upx;
  214. flex-grow: 1;
  215. }
  216. .btns {
  217. font-size: 28upx;
  218. color: #999;
  219. display: flex;
  220. align-items: center;
  221. }
  222. }
  223. .panel-body {
  224. padding: 0 10upx;
  225. .nodata {
  226. text-align: center;
  227. font-size: 24upx;
  228. width: 100%;
  229. color: #999999;
  230. padding: 30upx 0;
  231. }
  232. }
  233. }
  234. .sales-list{
  235. .title{
  236. display: flex;
  237. align-items: center;
  238. justify-content: space-between;
  239. .title-name{
  240. font-size: 32upx;
  241. color: #333;
  242. font-weight: 1000;
  243. }
  244. .title-all{
  245. color: rgb(144, 147, 153);
  246. }
  247. }
  248. }
  249. }
  250. </style>