trestleList.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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="goHome"
  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="card-list-flexbox">
  23. <view class="card">
  24. <div class="card-panel" style="background-color: #55aa7f;" @click="handleNavigateTo('箱号合栈')">
  25. <text class="font-icons">&#xe64c;</text>
  26. <text>栈板组合</text>
  27. </div>
  28. </view>
  29. <view class="card">
  30. <div class="card-panel" style="background-color: #00a0e9;" @click="handleNavigateTo('箱号出栈')">
  31. <text class="font-icons">&#xe7d1;</text>
  32. <text>栈板拆分</text>
  33. </div>
  34. </view>
  35. </view>
  36. </template>
  37. </gui-page>
  38. </template>
  39. <script>
  40. import {
  41. ref,
  42. defineComponent,
  43. computed
  44. } from 'vue'
  45. export default defineComponent({
  46. setup() {
  47. const stateToText = ref('')
  48. const stateComputed = computed(() => {
  49. return (state) => {
  50. switch (state) {
  51. case 0:
  52. stateToText.value = '未使用'
  53. break
  54. case 1:
  55. stateToText.value = '已使用'
  56. break
  57. }
  58. return stateToText.value
  59. }
  60. })
  61. const cardList = ref([])
  62. // const getTrestleList = function() {
  63. // uni.$reqGet('getWmsTrestlePage')
  64. // .then(({
  65. // data,
  66. // msg
  67. // }) => {
  68. // cardList.value = data?.list ?? []
  69. // })
  70. // }
  71. const goHome = function() {
  72. uni.$goHome()
  73. }
  74. const handleNavigateTo = function(name, params) {
  75. switch (name) {
  76. case '栈板详情':
  77. uni.navigateTo({
  78. url: `/pages/workbranch/warehouse/trestle/trestleDetails?id=${params.id}`
  79. })
  80. break
  81. case '箱号合栈':
  82. uni.navigateTo({
  83. url: '/pages/workbranch/warehouse/trestle/boxNumberStacking'
  84. })
  85. break
  86. case '箱号出栈':
  87. uni.navigateTo({
  88. url: '/pages/workbranch/warehouse/trestle/boxNumberOutStacking'
  89. })
  90. break
  91. }
  92. }
  93. // getTrestleList()
  94. return {
  95. goHome,
  96. cardList,
  97. stateComputed,
  98. handleNavigateTo
  99. }
  100. }
  101. })
  102. </script>
  103. <style lang="scss" scoped>
  104. .gui-header-leader-btns {
  105. color: black;
  106. font-size: 24px !important;
  107. margin-left: 24rpx;
  108. }
  109. .list-content {
  110. margin-top: 75px;
  111. background-color: #edeeee;
  112. }
  113. // .card-list-flexbox {
  114. // display: flex;
  115. // flex-direction: row;
  116. // align-items: center;
  117. // flex-wrap: wrap;
  118. // margin: 0 2px 4px 2px;
  119. // .card-list-item,
  120. // .card-list-item-operation {
  121. // width: 750rpx;
  122. // height: 40px;
  123. // margin-bottom: 3rpx;
  124. // display: flex;
  125. // flex-direction: row;
  126. // align-items: center;
  127. // justify-content: space-between;
  128. // background-color: #fff;
  129. // uni-text {
  130. // font-size: 14px;
  131. // height: 50rpx;
  132. // text-align: left;
  133. // padding: 0 12px;
  134. // display: flex;
  135. // flex-direction: row;
  136. // align-items: center;
  137. // }
  138. // .text-1 {
  139. // flex: 1;
  140. // height: 40px;
  141. // justify-content: flex-start;
  142. // }
  143. // .text-2 {
  144. // flex: 3;
  145. // height: 40px;
  146. // justify-content: flex-end;
  147. // margin-right: 4px;
  148. // padding: 2px 6px;
  149. // }
  150. // }
  151. // .card-list-item-operation {
  152. // justify-content: flex-end;
  153. // }
  154. // .card-list-item:nth-of-type(1) {
  155. // .text-1 {
  156. // font-weight: bold;
  157. // color: black !important;
  158. // }
  159. // .text-1::before {
  160. // content: "";
  161. // width: 4px;
  162. // height: 20px;
  163. // border-radius: 4px;
  164. // margin-right: 4px;
  165. // background-color: skyblue;
  166. // }
  167. // }
  168. // }
  169. // .tag-limegreen,
  170. // .tag-skyblue {
  171. // margin: 0 4px;
  172. // border-radius: 5px;
  173. // }
  174. // .tag-limegreen {
  175. // border: 1px solid limegreen;
  176. // color: limegreen;
  177. // }
  178. // .tag-skyblue {
  179. // border: 1px solid skyblue;
  180. // color: skyblue;
  181. // }
  182. .card-list-flexbox {
  183. margin-top: 100px;
  184. display: grid;
  185. grid-template-columns: 1fr 1fr 1fr;
  186. .card {
  187. display: flex;
  188. justify-content: center;
  189. align-items: center;
  190. .card-panel {
  191. width: 85px;
  192. height: 85px;
  193. display: flex;
  194. flex-direction: column;
  195. justify-content: center;
  196. align-items: center;
  197. border-radius: 8px;
  198. box-shadow: 1px 1px 2px 3px #e9e9e9;
  199. text:nth-of-type(2) {
  200. margin-top: 4px;
  201. font-size: 12px;
  202. font-weight: bold;
  203. color: white;
  204. }
  205. }
  206. }
  207. }
  208. .font-icons {
  209. font-size: 36px;
  210. color: white;
  211. }
  212. </style>