You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

227 lines
4.7 KiB

8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
8 months ago
6 months ago
8 months ago
6 months ago
6 months ago
8 months ago
6 months ago
5 months ago
5 months ago
6 months ago
6 months ago
6 months ago
8 months ago
6 months ago
8 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
5 months ago
6 months ago
8 months ago
  1. <template>
  2. <div class="pda-container">
  3. <div class="header-bar">
  4. <div class="header-left" @click="$router.back()">
  5. <i class="el-icon-arrow-left"></i>
  6. <span>其他出入库</span>
  7. </div>
  8. <div class="header-right" @click="$router.push({ path: '/' })">首页</div>
  9. </div>
  10. <!-- 功能菜单 -->
  11. <div class="menu-grid">
  12. <div
  13. class="menu-item"
  14. v-for="(btn, index) in buttons"
  15. :key="index"
  16. :class="{ disabled: btn.disabled }"
  17. @click="handleButtonClick(btn)"
  18. >
  19. <div class="menu-icon" :class="btn.iconClass">
  20. <van-icon :name="btn.icon" size="24" />
  21. </div>
  22. <div class="menu-text">{{ btn.label }}</div>
  23. </div>
  24. </div>
  25. </div>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return {
  31. buttons: [
  32. {
  33. icon: "add-o",
  34. label: "其它入库",
  35. iconClass: "other-inbound",
  36. to: "other-inbound",
  37. disabled: false,
  38. },
  39. {
  40. icon: "minus",
  41. label: "其它出库",
  42. iconClass: "other-outbound",
  43. to: "other-outbound",
  44. disabled: false,
  45. },
  46. {
  47. icon: "delete-o",
  48. label: "报废",
  49. iconClass: "scrap",
  50. to: "scrap",
  51. disabled: false,
  52. },
  53. {
  54. icon: "records",
  55. label: "Receive from Transit",
  56. iconClass: "qualified",
  57. to: "receiveFromTransit",
  58. disabled: false,
  59. },
  60. {
  61. icon: "exchange",
  62. label: "移库",
  63. iconClass: "inventory-move",
  64. to: "inventory-move",
  65. disabled: false,
  66. },
  67. /* {
  68. icon: "records",
  69. label: "单独CALL料",
  70. iconClass: "qualified",
  71. to: "productionPicking",
  72. disabled: false,
  73. },*/
  74. ],
  75. };
  76. },
  77. methods: {
  78. handleButtonClick(btn) {
  79. if (btn.disabled) {
  80. this.$message.warning("正在开发中,敬请期待...");
  81. } else {
  82. if (btn.to) {
  83. this.$router.push(btn.to);
  84. } else {
  85. this.$message.warning("正在开发中,敬请期待...");
  86. }
  87. }
  88. },
  89. },
  90. };
  91. </script>
  92. <style>
  93. :root {
  94. --columns: 3;
  95. --button-size: calc(100vw / var(--columns) - 20px);
  96. }
  97. /* 头部栏 */
  98. .header-bar {
  99. display: flex;
  100. justify-content: space-between;
  101. align-items: center;
  102. padding: 8px 16px;
  103. background: #17b3a3;
  104. color: white;
  105. height: 40px;
  106. min-height: 40px;
  107. max-height: 40px;
  108. }
  109. .header-left {
  110. display: flex;
  111. align-items: center;
  112. cursor: pointer;
  113. font-size: 16px;
  114. font-weight: 500;
  115. }
  116. .header-left i {
  117. margin-right: 8px;
  118. font-size: 18px;
  119. }
  120. .header-right {
  121. cursor: pointer;
  122. font-size: 16px;
  123. font-weight: 500;
  124. }
  125. .menu-grid {
  126. display: grid;
  127. grid-template-columns: repeat(3, 1fr);
  128. gap: 15px;
  129. padding: 20px;
  130. justify-content: center; /* 水平居中 */
  131. align-content: center; /* 垂直居中 */
  132. width: 100%; /* 确保占满容器宽度 */
  133. }
  134. .menu-item {
  135. background: white;
  136. border-radius: 12px;
  137. padding: 12px 6px;
  138. text-align: center;
  139. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  140. transition: transform 0.2s;
  141. cursor: pointer;
  142. }
  143. .menu-item:active {
  144. transform: scale(0.95);
  145. }
  146. .menu-item.disabled {
  147. opacity: 0.6;
  148. position: relative;
  149. }
  150. .menu-item.disabled::after {
  151. content: "开发中";
  152. position: absolute;
  153. top: 8px;
  154. right: 8px;
  155. background: #ff9500;
  156. color: white;
  157. font-size: 8px;
  158. padding: 2px 4px;
  159. border-radius: 8px;
  160. font-weight: bold;
  161. }
  162. .menu-icon {
  163. width: 38px;
  164. height: 38px;
  165. border-radius: 50%;
  166. display: flex;
  167. align-items: center;
  168. justify-content: center;
  169. margin: 0 auto 6px;
  170. color: white;
  171. }
  172. .menu-icon.purchase {
  173. background: linear-gradient(135deg, #17b3a3 0%, #1dc5ef 100%);
  174. }
  175. .menu-icon.inspection {
  176. background: linear-gradient(135deg, #17b3a3 0%, #1dc5ef 100%);
  177. }
  178. .menu-icon.qualified {
  179. background: linear-gradient(135deg, #17b3a3 0%, #1dc5ef 100%);
  180. }
  181. .menu-icon.other-inbound {
  182. background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
  183. box-shadow: 0 4px 8px rgba(82, 196, 26, 0.3);
  184. }
  185. .menu-icon.other-outbound {
  186. background: linear-gradient(135deg, #fa8c16 0%, #ffa940 100%);
  187. box-shadow: 0 4px 8px rgba(250, 140, 22, 0.3);
  188. }
  189. .menu-icon.scrap {
  190. background: linear-gradient(135deg, #f5222d 0%, #ff4d4f 100%);
  191. box-shadow: 0 4px 8px rgba(245, 34, 45, 0.3);
  192. }
  193. .menu-icon.inventory-move {
  194. background: linear-gradient(135deg, #722ed1 0%, #9254de 100%);
  195. box-shadow: 0 4px 8px rgba(114, 46, 209, 0.3);
  196. }
  197. .menu-text {
  198. font-size: 10px;
  199. color: #333;
  200. font-weight: bold; /* 加粗字体 */
  201. white-space: nowrap; /* 防止文字换行 */
  202. overflow: hidden;
  203. text-overflow: ellipsis;
  204. margin-top: 2px;
  205. }
  206. </style>