index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='仓库管理'></cus-header>
  4. <template v-if="list.length">
  5. <div class="list">
  6. <div class="item" v-for="item in list" :key="item.id">
  7. <div class="name">{{item.warehouseName}}</div>
  8. <div class="info">
  9. <div class="left">仓库编号</div>
  10. <div class="right">{{item.warehouseCode||''}}</div>
  11. </div>
  12. <div class="info">
  13. <div class="left">创建时间</div>
  14. <div class="right">{{item.createDate||''}}</div>
  15. </div>
  16. </div>
  17. </div>
  18. </template>
  19. <template v-else>
  20. <page-empty :height="'calc(100vh - 20px)'"></page-empty>
  21. </template>
  22. </view>
  23. </template>
  24. <script>
  25. import pageEmpty from '@/components/pageEmpty/index.vue'
  26. export default {
  27. components:{ pageEmpty },
  28. data(){
  29. return {
  30. list:[]
  31. }
  32. },
  33. onLoad() {
  34. this.getList();
  35. },
  36. onPullDownRefresh() {
  37. this.getList();
  38. },
  39. methods:{
  40. getList(){
  41. this.$api.get('/wms/warehouse/page').then(res=>{
  42. if(res.data.code===0) this.list = res.data.data.list;
  43. else this.$showModal(res.data.msg)
  44. });
  45. }
  46. }
  47. }
  48. </script>
  49. <style scoped lang="less">
  50. .page{
  51. width: 100%;
  52. padding: 0 24rpx 20rpx;
  53. box-sizing: border-box;
  54. background: #F5F8FA;
  55. .list{
  56. width: 100%;
  57. .item{
  58. width: 100%;
  59. padding: 40rpx 24rpx;
  60. box-sizing: border-box;
  61. background: #FFFFFF;
  62. border-radius: 16rpx;
  63. margin-top: 20rpx;
  64. .name{
  65. font-family: PingFang-SC, PingFang-SC;
  66. font-weight: bold;
  67. font-size: 36rpx;
  68. color: #1D2129;
  69. line-height: 36rpx;
  70. text-align: left;
  71. overflow: hidden;
  72. text-overflow: ellipsis;
  73. white-space: nowrap;
  74. }
  75. .info{
  76. width: 100%;
  77. margin-top: 32rpx;
  78. display: flex;
  79. .left{
  80. width: 160rpx;
  81. font-family: PingFangSC, PingFang SC;
  82. font-weight: 400;
  83. font-size: 28rpx;
  84. color: #86909C;
  85. line-height: 28rpx;
  86. text-align: left;
  87. }
  88. .right{
  89. width: calc(100% - 160rpx);
  90. font-family: PingFangSC, PingFang SC;
  91. font-weight: 400;
  92. font-size: 28rpx;
  93. color: #333333;
  94. line-height: 28rpx;
  95. text-align: left;
  96. overflow: hidden;
  97. text-overflow: ellipsis;
  98. white-space: nowrap;
  99. }
  100. }
  101. }
  102. }
  103. }
  104. </style>