index.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <template>
  2. <view class="mainBox">
  3. <uni-nav-bar
  4. fixed="true"
  5. statusBar="true"
  6. left-icon="back"
  7. title="领料"
  8. @clickLeft="back"
  9. >
  10. <view class="nav-right" slot="right">
  11. <view class="text-box" @click="addMaterial"> 添加物料 </view>
  12. </view>
  13. </uni-nav-bar>
  14. <card :list="tableList"></card>
  15. <materialDialog ref="materialDialogRef" />
  16. </view>
  17. </template>
  18. <script>
  19. import { get, getJ, post, postJ } from "@/utils/api.js";
  20. import card from "./components/card.vue";
  21. import materialDialog from "@/components/categorySelector/materialDialog.vue";
  22. export default {
  23. components: {
  24. card,
  25. materialDialog,
  26. },
  27. data() {
  28. return {
  29. tableList: [],
  30. };
  31. },
  32. methods: {
  33. addMaterial() {
  34. this.$refs.materialDialogRef.open();
  35. },
  36. },
  37. };
  38. </script>
  39. <style lang="scss" scoped>
  40. .mainBox {
  41. padding-bottom: 120rpx;
  42. }
  43. .search-container {
  44. width: 70vw;
  45. padding: 30rpx 36rpx;
  46. .footer {
  47. position: absolute;
  48. bottom: 0;
  49. left: 0;
  50. width: 100%;
  51. display: flex;
  52. box-shadow: 0 10rpx 30rpx 0 #000;
  53. .btn {
  54. width: 50%;
  55. height: 80rpx;
  56. border-radius: 0 !important;
  57. flex: 1;
  58. display: flex;
  59. justify-content: center;
  60. align-items: center;
  61. &.reset {
  62. color: $j-primary-border-green;
  63. }
  64. &.search {
  65. color: #fff;
  66. background-color: $j-primary-border-green;
  67. }
  68. }
  69. }
  70. .title {
  71. font-weight: bold;
  72. font-size: 30rpx;
  73. margin-bottom: 20rpx;
  74. }
  75. .status-wrapper {
  76. display: flex;
  77. align-items: center;
  78. justify-content: space-between;
  79. view {
  80. background-color: rgba(242, 242, 242, 1);
  81. height: 60rpx;
  82. border-radius: 30rpx;
  83. line-height: 60rpx;
  84. text-align: center;
  85. width: 160rpx;
  86. border: 1rpx solid rgba(242, 242, 242, 1);
  87. &.active {
  88. color: #157a2c;
  89. border-color: rgba(21, 122, 44, 1);
  90. }
  91. }
  92. }
  93. /deep/.uni-date {
  94. .uni-icons {
  95. display: none;
  96. }
  97. .uni-date-x {
  98. padding: 0;
  99. view {
  100. margin: 0 20rpx;
  101. }
  102. }
  103. }
  104. /deep/.uni-date__x-input,
  105. /deep/.uni-easyinput__content-input {
  106. height: 60rpx;
  107. border-radius: 30rpx;
  108. overflow: hidden;
  109. background-color: rgba(242, 242, 242, 1);
  110. }
  111. .version-group {
  112. display: flex;
  113. align-items: center;
  114. justify-content: flex-start;
  115. flex-wrap: wrap;
  116. }
  117. .wrapper-label {
  118. height: 50rpx;
  119. padding: 0 20rpx;
  120. border: 1rpx solid #ccc;
  121. display: flex;
  122. align-items: center;
  123. justify-content: center;
  124. font-size: 24rpx;
  125. margin: 0 20rpx 20rpx 0;
  126. }
  127. .picker-time {
  128. width: 100%;
  129. height: 60rpx;
  130. line-height: 60rpx;
  131. border: 1rpx solid #ccc;
  132. margin-bottom: 20rpx;
  133. text-indent: 10rpx;
  134. border-radius: 4rpx;
  135. }
  136. }
  137. .tab-title {
  138. position: fixed;
  139. z-index: 99;
  140. width: 100%;
  141. display: flex;
  142. justify-content: space-between;
  143. align-items: center;
  144. height: $tab-height;
  145. line-height: $tab-height;
  146. background-color: #ffffff;
  147. border-bottom: 1px solid #f2f2f2;
  148. box-sizing: border-box;
  149. height: 110rpx;
  150. .search-box {
  151. width: 80%;
  152. margin-left: 10rpx;
  153. // height: 34rpx;
  154. }
  155. .search-icon {
  156. display: flex;
  157. align-items: center;
  158. justify-content: space-around;
  159. font-size: 28rpx;
  160. white-space: nowrap;
  161. margin-left: 10rpx;
  162. image {
  163. width: 34rpx;
  164. height: 34rpx;
  165. }
  166. }
  167. .tab-item {
  168. width: 25%;
  169. text-align: center;
  170. font-size: 32rpx;
  171. color: $uni-text-color-grey;
  172. }
  173. .tab-item.active {
  174. color: $j-primary-border-green;
  175. border-bottom: 1px solid $j-primary-border-green;
  176. font-weight: bold;
  177. }
  178. .tab-item.filter {
  179. flex: 1;
  180. padding: 0px 30rpx;
  181. .uni-icons {
  182. display: flex;
  183. padding-top: 5px;
  184. }
  185. }
  186. }
  187. .listBox {
  188. margin-top: 10px;
  189. padding-top: 5px;
  190. padding-bottom: 8px;
  191. .listTit {
  192. display: flex;
  193. align-items: center;
  194. .stuts {
  195. width: 55px;
  196. font-size: 12px;
  197. // border: 1px solid red;
  198. }
  199. .name {
  200. font-size: $uni-font-size-base;
  201. padding-left: 15rpx;
  202. }
  203. .date {
  204. font-size: $uni-font-size-sm;
  205. padding-left: 45rpx;
  206. color: #999;
  207. }
  208. }
  209. .listCont {
  210. display: flex;
  211. align-items: center;
  212. flex-wrap: wrap;
  213. padding-left: 20rpx;
  214. flex-direction: row;
  215. margin-top: 10rpx;
  216. color: #666;
  217. // border: 1px solid red;
  218. .item {
  219. width: 50%;
  220. font-size: $uni-font-size-sm;
  221. overflow: hidden;
  222. white-space: nowrap;
  223. text-overflow: ellipsis;
  224. -o-text-overflow: ellipsis;
  225. }
  226. .item text {
  227. color: #666;
  228. }
  229. .item-left {
  230. font-size: 20px;
  231. font-weight: 600;
  232. color: #999;
  233. position: relative;
  234. left: 90%;
  235. top: -55rpx;
  236. }
  237. }
  238. .item-top {
  239. height: 5rpx;
  240. width: 96%;
  241. margin: 0 auto;
  242. border-bottom: 1px solid #d8d3d3;
  243. }
  244. .listbtn {
  245. margin-top: 20rpx;
  246. display: flex;
  247. justify-content: flex-end;
  248. align-items: center;
  249. .operBox {
  250. display: flex;
  251. align-items: center;
  252. }
  253. }
  254. .listbtn button {
  255. margin-right: 20rpx;
  256. }
  257. }
  258. </style>