warehousReg.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <template>
  2. <view class="mainBox">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="登记入库" @clickLeft="back"></uni-nav-bar>
  4. <u-cell-group>
  5. <u-cell title="入库单" value="W2091992838811"></u-cell>
  6. <u-cell title="仓库" value="5001混炼料库"></u-cell>
  7. <u-cell title="送货人" value="李四"></u-cell>
  8. </u-cell-group>
  9. <u-collapse class="cLine" :value="['detail']">
  10. <u-collapse-item title="描述" name="">
  11. <text class="u-collapse-content">涵盖uniapp各个方面,给开发者方向指导和设计理念,让您茅塞顿开,一马平川</text>
  12. </u-collapse-item>
  13. <u-collapse-item title="明细" name="detail">
  14. <view class="listBox" v-for="(item, index) in listData" :key="index" @click="cleanchecked(index)">
  15. <view class="listTit">
  16. <view style="display:inline-block;"><u-tag :text="item.normName" size="mini" shape="circle" :type="item.type"></u-tag></view>
  17. <view class="name">{{item.title}}</view>
  18. <view class="weight">{{item.weight}}KG</view>
  19. <view class="choose">
  20. <uni-icons :type="choose===index?'checkbox-filled':'circle'" size="28" :color="choose===index?'#19be6b':'#eee'"></uni-icons>
  21. </view>
  22. </view>
  23. <view class="listCont">
  24. <view class="item"><text>编码:</text>{{item.codeNum}}</view>
  25. <view class="item"><text>批次号:</text>{{item.batchNum}}</view>
  26. <view class="item"><text>有效期:</text>{{item.datetime}}</view>
  27. <view class="item"><text>牌号:</text>{{item.grade}}</view>
  28. <view class="item"><text>型号:</text>{{item.model}}</view>
  29. <view class="item"><text>包装单位:</text>{{item.unit}}</view>
  30. <view class="item"><text>存放货位:</text>{{item.cargoSpace?item.cargoSpace:'未登记'}}</view>
  31. </view>
  32. </view>
  33. </u-collapse-item>
  34. </u-collapse>
  35. <view class="footBox">
  36. <view class="reg" style="width:100%;" @click="getsure">确 定</view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. export default {
  42. data() {
  43. return {
  44. choose:'',
  45. src:'../../../static/logo.png',
  46. listData:[
  47. {
  48. norm:0,
  49. title:'混炼料391',
  50. weight:'60',
  51. codeNum:'W03912838881',
  52. batchNum:'102882381',
  53. datetime:'2010-08-19',
  54. grade:'E388287',
  55. model:'BΦ3.0*100',
  56. unit:'60KG/桶',
  57. cargoSpace:'',
  58. },
  59. {
  60. norm:0,
  61. title:'混炼料391',
  62. weight:'60',
  63. codeNum:'W03912838881',
  64. batchNum:'102882381',
  65. datetime:'2010-08-19',
  66. grade:'E388287',
  67. model:'BΦ3.0*100',
  68. unit:'60KG/桶',
  69. cargoSpace:'',
  70. },
  71. {
  72. norm:1,
  73. title:'混炼料391',
  74. weight:'60',
  75. codeNum:'W03912838881',
  76. batchNum:'102882381',
  77. datetime:'2010-08-19',
  78. grade:'E388287',
  79. model:'BΦ3.0*100',
  80. unit:'60KG/桶',
  81. cargoSpace:'',
  82. },
  83. {
  84. norm:0,
  85. title:'混炼料391',
  86. weight:'60',
  87. codeNum:'W03912838881',
  88. batchNum:'102882381',
  89. datetime:'2010-08-19',
  90. grade:'E388287',
  91. model:'BΦ3.0*100',
  92. unit:'60KG/桶',
  93. cargoSpace:'',
  94. },
  95. {
  96. norm:1,
  97. title:'混炼料391',
  98. weight:'60',
  99. codeNum:'W03912838881',
  100. batchNum:'102882381',
  101. datetime:'2010-08-19',
  102. grade:'E388287',
  103. model:'BΦ3.0*100',
  104. unit:'60KG/桶',
  105. cargoSpace:'',
  106. },
  107. ]
  108. }
  109. },
  110. onShow(){
  111. //添加属性
  112. let newListData = this.listData;
  113. newListData.forEach(function(res, key) {
  114. if(res.norm == 0){
  115. newListData[key].normName = '按件'
  116. newListData[key].type = 'success'
  117. }else if(res.norm == 1){
  118. newListData[key].normName = '按量'
  119. newListData[key].type = 'primary'
  120. }
  121. })
  122. this.listData = newListData;
  123. },
  124. methods: {
  125. //查看附件
  126. viewImage(){
  127. uni.previewImage({
  128. current:0,
  129. urls: [this.src],
  130. });
  131. },
  132. //选中列表
  133. cleanchecked(e){
  134. this.choose = e;
  135. },
  136. //确定
  137. getsure(){
  138. },
  139. }
  140. }
  141. </script>
  142. <style lang="scss" scoped>
  143. .mainBox{
  144. padding-bottom: 120rpx;
  145. }
  146. .picList{
  147. display: flex;
  148. align-items: center;
  149. justify-items: flex-start;
  150. flex-wrap: wrap;
  151. }
  152. /deep/.picList .u-image{
  153. margin-right:10rpx;
  154. margin-bottom: 10rpx;
  155. }
  156. /deep/.cLine .u-line:nth-child(1){
  157. border-bottom: none !important;
  158. }
  159. .footBox{
  160. position: fixed;
  161. left:0px;
  162. bottom: 0px;
  163. height: 100rpx;
  164. width: 100%;
  165. display: flex;
  166. align-items: center;
  167. justify-content: space-between;
  168. view{
  169. width:50%;
  170. height: 100%;
  171. text-align: center;
  172. color: #fff;
  173. display: flex;
  174. align-items: center;
  175. justify-content: center;
  176. }
  177. .reg{
  178. background: $u-success-dark;
  179. }
  180. .uni-icons{margin-right: 8rpx !important;}
  181. }
  182. .listBox{
  183. padding: 20rpx 0;
  184. border-bottom:1px #f2f2f2 solid;
  185. .listTit{
  186. display: flex;
  187. align-items: center;
  188. .name{
  189. margin-left: 10px;
  190. }
  191. .weight {
  192. font-size: $uni-font-size-base;
  193. margin-left: auto;
  194. margin-right: 60rpx;
  195. position: relative;
  196. }
  197. .weight::after{
  198. position: absolute;
  199. right:-30rpx;
  200. top:50%;
  201. content: '';
  202. background: #eee;
  203. width: 1px;
  204. height: 28rpx;
  205. margin-top: -14rpx;
  206. }
  207. .delete{
  208. color: #999;
  209. }
  210. }
  211. .listCont{
  212. display: flex;
  213. align-items: center;
  214. flex-wrap: wrap;
  215. margin-top: 15px;
  216. .item{
  217. width:50%;
  218. font-size: $uni-font-size-sm;
  219. line-height: 48rpx;
  220. overflow: hidden;
  221. white-space: nowrap;
  222. text-overflow: ellipsis;
  223. -o-text-overflow:ellipsis;
  224. color: #000;
  225. }
  226. .item text{color: #666;}
  227. }
  228. }
  229. .listBox:last-child{
  230. border:none !important;
  231. }
  232. .saveBtn{
  233. width:50%;
  234. margin:40rpx auto;
  235. }
  236. </style>