selectWarehouse.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view class="warehouse-list">
  3. <view v-for="(kuqItem, index) in kuqList" :key="index" @click="goDetailPage(kuqItem)" class="warehouse-item">
  4. <view class="warehouse-header">
  5. <view class="info-container">
  6. <view class="warehouse-name">
  7. <image src="@/static/icons/warehouse-ico.png" class="icon"></image>
  8. <view class="text-container">
  9. <text class="labeltext">库区名称:</text>
  10. <text>{{ kuqItem.kqmc }}</text>
  11. </view>
  12. </view>
  13. <view class="warehouse-address">
  14. <image src="@/static/icons/location-ico.png" class="icon"></image>
  15. <view class="text-container">
  16. <text class="labeltext">库区地址:</text>
  17. <text>{{ kuqItem.jtdz }}</text>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="warehouse-details">
  23. <view class="detail-row">
  24. <text>联系人: {{ kuqItem.kqfzr }}</text>
  25. <text>联系电话: {{ kuqItem.lxdh }}</text>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script setup>
  32. import { ref, reactive, onMounted } from 'vue';
  33. import { getAllStoreroomList } from "@/api/grainDepositor";
  34. const kuqList = ref([]);
  35. onMounted(async () => {
  36. const getData = await getAllStoreroomList({});
  37. kuqList.value = getData.data.records
  38. })
  39. const goDetailPage = (info) => {
  40. uni.navigateTo({
  41. url: `/pages/warehouse/warehouse?kqId=${info.kqId}&source=all`
  42. });
  43. };
  44. </script>
  45. <style lang="scss" scoped>
  46. .warehouse-list {
  47. padding: 40rpx 20rpx 20rpx;
  48. .warehouse-item {
  49. background: linear-gradient(180deg, #ffffff, #F5F8FF);
  50. border-radius: 10px;
  51. padding: 20px 15px 10px;
  52. margin-bottom: 25rpx;
  53. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  54. .warehouse-header {
  55. display: flex;
  56. justify-content: space-between;
  57. align-items: flex-start; // 对齐到顶部
  58. padding-bottom: 30rpx;
  59. border-bottom: 1px solid #E7E8EA;
  60. font-size: 35rpx;
  61. color: #00122F;
  62. .info-container {
  63. flex-grow: 1;
  64. .warehouse-name,
  65. .warehouse-address {
  66. display: flex;
  67. margin-bottom: 5px;
  68. line-height: 55rpx;
  69. &:last-child {
  70. margin-bottom: 0;
  71. }
  72. .icon {
  73. padding-top: 7rpx;
  74. width: 22px;
  75. height: 22px;
  76. margin-right: 15rpx;
  77. }
  78. .text-container {
  79. flex: 1;
  80. word-break: break-all;
  81. }
  82. }
  83. }
  84. }
  85. .warehouse-details {
  86. padding-top: 30rpx;
  87. font-size: 30rpx;
  88. color: #747476;
  89. .detail-row {
  90. display: flex;
  91. justify-content: space-between;
  92. margin-bottom: 10px;
  93. }
  94. }
  95. }
  96. }
  97. </style>