trestleDetails.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <template>
  2. <gui-page :custom-header="true" :header-class="['gui-theme-background-color']">
  3. <template #gHeader>
  4. <view style="height:44px;" class="gui-flex gui-nowrap gui-rows gui-align-items-center">
  5. <!-- 使用组件实现返回按钮及返回首页按钮 -->
  6. <text
  7. style="font-size:44rpx;"
  8. class="gui-header-leader-btns gui-color-white font-icons"
  9. @tap="goBack"
  10. >&#xe6c5;</text>
  11. <!-- 导航文本此处也可以是其他自定义内容 -->
  12. <text
  13. class="gui-h4 gui-blod gui-flex1 gui-text-center gui-ellipsis gui-color-white gui-primary-text"
  14. >栈板详情</text>
  15. <!-- 此处加一个右侧展位元素与左侧同宽,实现标题居中 -->
  16. <!-- 实际宽度请根据自己情况设置 -->
  17. <view style="width:40px;" />
  18. <!-- 如果右侧有其他内容可以利用条件编译和定位来实现-->
  19. </view>
  20. </template>
  21. <template #gBody>
  22. <view class="list-content">
  23. <view v-for="(item, key) in cardList" :key="key" class="card-list-flexbox">
  24. <view class="select-all-list">
  25. <view class="flex-2">
  26. <view class="flex-row">
  27. <view class="card-list-item">
  28. <text class="text-1 gui-color-gray">物料编码</text>
  29. <text class="text-2 gui-color-gray">{{ item.materialNo }}</text>
  30. </view>
  31. <view class="card-list-item">
  32. <text class="text-1 gui-color-gray">物料名称</text>
  33. <text class="text-2 gui-color-gray">{{ item.materialName }}</text>
  34. </view>
  35. <view class="card-list-item">
  36. <text class="text-1 gui-color-gray">物料批次</text>
  37. <text class="text-2 gui-color-gray">{{ item.materialLots }}</text>
  38. </view>
  39. <view class="card-list-item">
  40. <text class="text-1 gui-color-gray">物料类别</text>
  41. <text class="text-2 gui-color-gray">{{ item.materialType }}</text>
  42. </view>
  43. <view class="card-list-item">
  44. <text class="text-1 gui-color-gray">当前箱数</text>
  45. <text class="text-2 gui-color-gray">{{ item.qty }}</text>
  46. </view>
  47. <view class="card-list-item">
  48. <text class="text-1 gui-color-gray">创建时间</text>
  49. <text class="text-2 gui-color-gray">{{ $parseTime(item.createTime) }}</text>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </template>
  57. </gui-page>
  58. </template>
  59. <script>
  60. import {
  61. ref,
  62. defineComponent,
  63. computed
  64. } from 'vue'
  65. // import {
  66. // onReachBottom
  67. // } from '@dcloudio/uni-app'
  68. export default defineComponent({
  69. setup(options) {
  70. const queryParams = ref({
  71. pageSize: 10,
  72. pageNo: 1
  73. })
  74. const wmsPalletId = options?.id ?? ''
  75. const cardList = ref([])
  76. uni.$reqGet('pdaMaterialsPage', {
  77. ...queryParams.value,
  78. wmsPalletId
  79. })
  80. .then(({
  81. data
  82. }) => {
  83. cardList.value = data?.list ?? []
  84. })
  85. const goBack = function() {
  86. uni.$goBack()
  87. }
  88. // // uniapp移动端触底事件
  89. // onReachBottom(() => {
  90. // queryParams.value.pageNo += 1
  91. // uni.$reqGet('getMaterialList', {
  92. // ...queryParams.value,
  93. // id
  94. // })
  95. // .then(({
  96. // data,
  97. // msg
  98. // }) => {
  99. // Array.prototype.push.call(cardList.value, ...data?.list ?? [])
  100. // })
  101. // })
  102. return {
  103. goBack,
  104. cardList,
  105. }
  106. }
  107. })
  108. </script>
  109. <style lang="scss" scoped>
  110. .gui-header-leader-btns {
  111. color: black;
  112. font-size: 24px !important;
  113. margin-left: 24rpx;
  114. }
  115. .list-content {
  116. margin-top: 80px;
  117. }
  118. .card-list-flexbox {
  119. display: flex;
  120. flex-direction: row;
  121. align-items: center;
  122. flex-wrap: wrap;
  123. // height: 500rpx;
  124. // box-shadow: 1px -3px 4px 2px rgba(218, 218, 218, 1.0);
  125. .select-all-list {
  126. display: flex;
  127. flex-direction: row;
  128. align-items: center;
  129. .flex-1 {
  130. width: 60rpx;
  131. display: flex;
  132. justify-content: center;
  133. align-items: center;
  134. }
  135. .flex-2 {
  136. // width: calc(750rpx - 60rpx);
  137. }
  138. }
  139. .flex-row {
  140. display: flex;
  141. flex-wrap: wrap;
  142. .card-list-item {
  143. width: 750rpx;
  144. height: 40px;
  145. border-bottom-width: 2rpx;
  146. border-bottom-style: dotted;
  147. border-bottom-color: #6a6a6a;
  148. display: flex;
  149. flex-direction: row;
  150. align-items: center;
  151. justify-content: space-between;
  152. uni-text {
  153. font-size: 14px;
  154. height: 50rpx;
  155. text-align: left;
  156. padding: 0 12px;
  157. display: flex;
  158. flex-direction: row;
  159. align-items: center;
  160. }
  161. .text-1 {
  162. flex: 2;
  163. height: 40px;
  164. justify-content: center;
  165. border-right-width: 2rpx;
  166. border-right-style: dotted;
  167. border-right-color: #6a6a6a;
  168. }
  169. .text-2 {
  170. flex: 5;
  171. height: 40px;
  172. justify-content: flex-start;
  173. margin-right: 8px;
  174. padding: 2px 12px;
  175. }
  176. }
  177. .card-list-item:nth-of-type(1) {
  178. background-color: rgba(0, 138, 255, .4);
  179. .gui-color-gray {
  180. color: white !important;
  181. }
  182. }
  183. }
  184. }
  185. </style>