index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. export default {
  26. data(){
  27. return {
  28. list:[]
  29. }
  30. },
  31. onLoad() {
  32. this.getList();
  33. },
  34. onPullDownRefresh() {
  35. this.getList();
  36. },
  37. methods:{
  38. getList(){
  39. this.$api.get('/wms/warehouse/page').then(res=>{
  40. if(res.data.code===0) this.list = res.data.data.list;
  41. else this.$showModal(res.data.msg)
  42. });
  43. }
  44. }
  45. }
  46. </script>
  47. <style scoped lang="less">
  48. .page{
  49. width: 100%;
  50. padding: 0 24rpx 20rpx;
  51. box-sizing: border-box;
  52. background: #F5F8FA;
  53. .list{
  54. width: 100%;
  55. .item{
  56. width: 100%;
  57. padding: 40rpx 24rpx;
  58. box-sizing: border-box;
  59. background: #FFFFFF;
  60. border-radius: 16rpx;
  61. margin-top: 20rpx;
  62. .name{
  63. font-family: PingFang-SC, PingFang-SC;
  64. font-weight: bold;
  65. font-size: 36rpx;
  66. color: #1D2129;
  67. line-height: 36rpx;
  68. text-align: left;
  69. overflow: hidden;
  70. text-overflow: ellipsis;
  71. white-space: nowrap;
  72. }
  73. .info{
  74. width: 100%;
  75. margin-top: 32rpx;
  76. display: flex;
  77. .left{
  78. width: 160rpx;
  79. font-family: PingFangSC, PingFang SC;
  80. font-weight: 400;
  81. font-size: 28rpx;
  82. color: #86909C;
  83. line-height: 28rpx;
  84. text-align: left;
  85. }
  86. .right{
  87. width: calc(100% - 160rpx);
  88. font-family: PingFangSC, PingFang SC;
  89. font-weight: 400;
  90. font-size: 28rpx;
  91. color: #333333;
  92. line-height: 28rpx;
  93. text-align: left;
  94. overflow: hidden;
  95. text-overflow: ellipsis;
  96. white-space: nowrap;
  97. }
  98. }
  99. }
  100. }
  101. }
  102. </style>