index.vue 7.6 KB

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