deliveriedList.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. <template>
  2. <view>
  3. <u-navbar >
  4. <view class="u-navbar " >
  5. <view class="title" >
  6. 出库设备清单<text>({{recordsTotal}})</text>
  7. </view>
  8. </view>
  9. </u-navbar>
  10. <scroll-view scroll-y="true" style="height: 800rpx;" @scrolltolower="onReachBottom()">
  11. <view class="list" v-for="(item,index) in list" :key="index">
  12. <!-- 清单信息 -->
  13. <view class="list-infos" >
  14. <view class="infos-head">
  15. <view class="name">
  16. {{item.deviceName}}
  17. </view>
  18. <view class="state">
  19. {{recordItemStatus(item.status)}}: <text>{{item.needCount}}</text>
  20. </view>
  21. </view>
  22. <view class="infos">
  23. <view class="infos-1">
  24. <view class="infos-item">
  25. <view class="item-name">
  26. 厂家:
  27. </view>
  28. <view class="item-value">
  29. {{item.deviceInfo.manufactor}}
  30. </view>
  31. </view>
  32. <view class="infos-item">
  33. <view class="item-name">
  34. 单位:
  35. </view>
  36. <view class="item-value">
  37. {{item.deviceInfo.unit}}
  38. </view>
  39. </view>
  40. </view>
  41. <view class="infos-2">
  42. <view class="infos-item">
  43. <view class="item-name">
  44. 规格:
  45. </view>
  46. <view class="item-value">
  47. {{item.deviceInfo.specifications}}
  48. </view>
  49. </view>
  50. <view class="infos-item">
  51. <view class="item-name">
  52. 型号:
  53. </view>
  54. <view class="item-value">
  55. {{item.deviceInfo.model}}
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. <!-- 备注 -->
  62. <view class="remark" v-if="false">
  63. <view class="name">
  64. 备注:
  65. </view>
  66. <view class="value">
  67. 22
  68. </view>
  69. </view>
  70. <view class="prepare-out" v-if="false" >
  71. <view class="head">
  72. <view class="amount">
  73. <view class="title">
  74. 实际领用:
  75. </view>
  76. <view class="value">
  77. 2
  78. </view>
  79. </view>
  80. <view class="unfold">
  81. 展开<u-icon name="arrow-down" @click="changeShow()"></u-icon>
  82. <view class="option" v-if="this.show==true">
  83. </view>
  84. </view>
  85. </view>
  86. <!-- 编号 -->
  87. <view class="serial-number" v-for="item in 2">
  88. <view class="item">
  89. <view class="text">
  90. 设备编号:
  91. </view>
  92. <view class="number">
  93. ND920182001511
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. </scroll-view>
  100. </view>
  101. </template>
  102. <script>
  103. import * as API from '@/apis/pagejs/projectDepartment.js'
  104. import {
  105. recordItemStatus
  106. } from '@/apis/status.js'
  107. export default {
  108. data() {
  109. return {
  110. show: false,
  111. list:[],
  112. id:"",
  113. recordsTotal: 0,
  114. listFrom:{
  115. pageIndex: 1,
  116. pageSize: 20,
  117. }
  118. }
  119. },
  120. onReachBottom() {
  121. if (this.list.length < this.recordsTotal) {
  122. this.myLoadmore();
  123. }
  124. },
  125. onLoad(op){
  126. this.id=op.id
  127. this.getList()
  128. },
  129. onReady(){
  130. },
  131. methods: {
  132. recordItemStatus,
  133. getList(){
  134. uni.showLoading({
  135. title: "加载中",
  136. mask: true,
  137. })
  138. API.outRecordDeviceById({
  139. recordId:this.id,
  140. pageSize:this.listFrom.pageSize,
  141. pageIndex:this.listFrom.pageIndex,
  142. }).then((res) => {
  143. uni.hideLoading();
  144. this.list=res.data.data;
  145. this.recordsTotal=res.data.recordsTotal;
  146. }).catch(error => {
  147. uni.showToast({
  148. title: error,
  149. icon: "none"
  150. })
  151. })
  152. },
  153. myLoadmore(){
  154. this.listFrom.pageIndex += 1;
  155. this.getList();
  156. },
  157. changeShow() {
  158. this.show = !this.show
  159. }
  160. }
  161. }
  162. </script>
  163. <style scoped lang="scss">
  164. page{
  165. padding-bottom: 100px;
  166. }
  167. .u-navbar {
  168. display: flex;
  169. font-size: 36rpx;
  170. align-items: center;
  171. justify-content: center;
  172. flex: 1;
  173. position: absolute;
  174. left: 0;
  175. right: 0;
  176. height: 60rpx;
  177. text-align: center;
  178. flex-shrink: 0;
  179. left: 237rpx;
  180. right: 107rpx;
  181. width: 300rpx;
  182. .title {
  183. line-height: 60rpx;
  184. font-size: 36rpx;
  185. flex: 1;
  186. text {
  187. color: #2A8EFB
  188. }
  189. }
  190. }
  191. .list {
  192. background-color: #fff;
  193. margin: 24rpx;
  194. padding: 22rpx 32rpx;
  195. // 清单信息
  196. .list-infos {
  197. border-radius: 8px;
  198. .infos-head {
  199. display: flex;
  200. justify-content: space-between;
  201. align-items: center;
  202. margin-bottom: 24rpx;
  203. .name {
  204. color: rgba(51, 51, 51, 1);
  205. font-size: 32rpx;
  206. }
  207. .qr-code {
  208. border-radius: 4px;
  209. background: linear-gradient(180deg, rgba(22, 119, 255, 1) 0%, rgba(16, 98, 213, 1) 100%);
  210. color: rgba(255, 255, 255, 1);
  211. font-size: 24rpx;
  212. width: 160rpx;
  213. text-align: center;
  214. line-height: 64rpx;
  215. text {
  216. img {
  217. vertical-align: middle;
  218. }
  219. }
  220. }
  221. }
  222. .infos {
  223. margin-top: 16rpx;
  224. display: flex;
  225. color: #777777;
  226. font-size: 24rpx;
  227. .infos-1 {
  228. margin-right: 68rpx;
  229. }
  230. .infos-item {
  231. display: flex;
  232. margin-bottom: 8rpx;
  233. }
  234. }
  235. .address,.remark {
  236. display: flex;
  237. color: #777777;
  238. font-size: 24rpx;
  239. margin-bottom: 8rpx;
  240. }
  241. }
  242. .prepare-out {
  243. padding: 24rpx;
  244. margin-top: 40rpx;
  245. border-radius: 8px;
  246. background-color: rgba(245, 246, 249, 1);
  247. .head {
  248. display: flex;
  249. justify-content: space-between;
  250. align-items: center;
  251. margin-bottom: 24rpx;
  252. .amount {
  253. display: flex;
  254. color: rgba(0, 81, 255, 1);
  255. font-size: 32rpx;
  256. }
  257. .unfold {
  258. color: rgba(146, 158, 165, 1);
  259. font-size: 24rpx;
  260. position: relative;
  261. .u-icon--right {
  262. margin-left: 8rpx;
  263. }
  264. }
  265. .option {
  266. width: 160rpx;
  267. height: 32rpx;
  268. background-color: #fff;
  269. position: absolute;
  270. top: 30rpx;
  271. right: 0;
  272. }
  273. }
  274. // 编号
  275. .serial-number {
  276. display: flex;
  277. justify-content: space-between;
  278. align-items: center;
  279. margin-top: 16rpx;
  280. color: rgba(51, 51, 51, 1);
  281. font-weight: bold;
  282. .item {
  283. display: flex;
  284. }
  285. }
  286. }
  287. }
  288. </style>