details.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <template>
  2. <view class="content-box">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="领料" background-color="#F7F9FA"
  4. color="#404446" @clickLeft="back"></uni-nav-bar>
  5. <view class="list_box">
  6. <u-list @scrolltolower="scrolltolower">
  7. <view v-for="(item,index) in idsList" :key="index" class="card_box">
  8. <view class="title_box rx-bc">
  9. <view class="left rx-sc">
  10. <view class="round">{{index + 1}}</view>
  11. <view class="code">工单编号:{{item.code}}</view>
  12. </view>
  13. <view class="right_box rx-ec">
  14. <view class="btn">添加物料</view>
  15. </view>
  16. </view>
  17. <view class="material rx-ss">
  18. <view class="left rx-ss" @click="item.checked = ! item.checked">
  19. <view class="zdy_check rx-cc" :class="{ check_active : item.checked }">
  20. <u-icon size="28" v-if='item.checked' name='checkbox-mark'></u-icon>
  21. </view>
  22. </view>
  23. <view class="content_table">
  24. <view class="item">
  25. <view class="lable rx-cc">物料编码</view>
  26. <view class="content">
  27. 624644626624644626624644626</view>
  28. </view>
  29. <view class="item">
  30. <view class="lable rx-cc">名称</view>
  31. <view class="content">物料名称物料名称物料</view>
  32. </view>
  33. <view class="item rx-sc">
  34. <view class="rx ww55 ">
  35. <view class="lable rx-cc">牌号</view>
  36. <view class="content ">YL10Y</view>
  37. </view>
  38. <view class="rx ww45" >
  39. <view class="lable rx-cc ww80" >数量</view>
  40. <view class="content content_num">
  41. <input class="uni-input" type="digit"></input>
  42. <view class="unit">kg</view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="item">
  47. <view class="lable rx-cc">领料仓库</view>
  48. <view class="content">
  49. <zxz-uni-data-select :localdata="localdata" v-model="value"
  50. dataValue='id' format='{name}' :clear='false'></zxz-uni-data-select>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </u-list>
  57. </view>
  58. <view class="bottom-wrapper">
  59. <view class="btn_box" @click="save">确认</view>
  60. </view>
  61. </view>
  62. </template>
  63. <script>
  64. export default {
  65. data() {
  66. return {
  67. idsList: [{
  68. checked: false,
  69. code: 55
  70. }],
  71. value: 2,
  72. localdata: [
  73. {
  74. id: 1,
  75. name: '测试'
  76. },
  77. {
  78. id: 2,
  79. name: '测试2'
  80. }
  81. ],
  82. }
  83. },
  84. onLoad(options) {
  85. // let queryArray = decodeURIComponent(options.arr);
  86. // this.idsList = JSON.parse(queryArray);
  87. console.log(this.idsList)
  88. },
  89. methods: {
  90. scrolltolower() {},
  91. save() {
  92. console.log(this.idsList)
  93. },
  94. groupChange(n) {
  95. console.log('groupChange', n);
  96. },
  97. handleUserChange(e) {
  98. console.log(e)
  99. }
  100. },
  101. }
  102. </script>
  103. <style lang="scss" scoped>
  104. .content-box {
  105. height: 100vh;
  106. overflow: hidden;
  107. display: flex;
  108. flex-direction: column;
  109. }
  110. .list_box {
  111. flex: 1;
  112. overflow: hidden;
  113. padding: 4rpx 0;
  114. .u-list {
  115. height: 100% !important;
  116. }
  117. .card_box {
  118. padding: 16rpx 24rpx;
  119. }
  120. .title_box {
  121. .round {
  122. width: 32rpx;
  123. height: 32rpx;
  124. line-height: 32rpx;
  125. border-radius: 50%;
  126. background: $theme-color;
  127. color: #fff;
  128. text-align: center;
  129. font-size: 20rpx;
  130. }
  131. .code {
  132. margin-left: 16rpx;
  133. font-family: PingFang SC;
  134. font-size: 28rpx;
  135. font-style: normal;
  136. font-weight: 400;
  137. color: $theme-color;
  138. }
  139. }
  140. .right_box {
  141. .btn {
  142. height: 40rpx;
  143. line-height: 40rpx;
  144. padding: 4rpx 8rpx;
  145. background: #157A2C;
  146. font-size: 24rpx;
  147. font-style: normal;
  148. font-weight: 400;
  149. color: #fff;
  150. border-radius: 4rpx;
  151. }
  152. }
  153. .material {
  154. margin-top: 10rpx;
  155. .left {
  156. width: 40rpx;
  157. }
  158. .zdy_check {
  159. width: 30rpx;
  160. height: 30rpx;
  161. border: 2rpx solid #c8c9cc;
  162. border-radius: 4rpx;
  163. }
  164. .check_active {
  165. background: $theme-color;
  166. border: 2rpx solid $theme-color;
  167. /deep/ .u-icon__icon {
  168. color: #fff !important;
  169. }
  170. }
  171. .content_table {
  172. width: 652rpx;
  173. border: 2rpx solid $border-color;
  174. .item {
  175. display: flex;
  176. border-bottom: 2rpx solid $border-color;
  177. .lable {
  178. width: 132rpx;
  179. text-align: center;
  180. background-color: #F7F9FA;
  181. font-size: 26rpx;
  182. border-right: 2rpx solid $border-color;
  183. flex-shrink: 0;
  184. }
  185. .ww80 {
  186. width: 80rpx;
  187. }
  188. .content {
  189. width: 518rpx;
  190. min-height: 64rpx;
  191. font-size: 28rpx;
  192. line-height: 28rpx;
  193. font-style: normal;
  194. font-weight: 400;
  195. padding: 18rpx 8rpx;
  196. box-sizing: border-box;
  197. word-wrap: break-word;
  198. flex-grow: 1 !important;
  199. }
  200. .content_num{
  201. display: flex;
  202. align-items: center;
  203. padding:0 4rpx;
  204. /deep/ .uni-input-input{
  205. border: 2rpx solid #F0F8F2;
  206. background:#F0F8F2;
  207. color: $theme-color;
  208. }
  209. .unit{
  210. padding: 0 4rpx;
  211. font-size: 24rpx;
  212. color: #404446;
  213. }
  214. }
  215. &:last-child {
  216. border-bottom: none;
  217. }
  218. }
  219. .ww55 {
  220. width: 55%;
  221. }
  222. .ww45 {
  223. width: 45%;
  224. }
  225. }
  226. }
  227. }
  228. .bottom-wrapper {
  229. .btn_box {
  230. width: 750rpx;
  231. height: 88rpx;
  232. line-height: 88rpx;
  233. background: $theme-color;
  234. text-align: center;
  235. font-size: 36rpx;
  236. font-style: normal;
  237. font-weight: 400;
  238. color: #fff;
  239. }
  240. }
  241. </style>