deliveryDetails.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. <template>
  2. <view >
  3. <u-navbar title="出库单详情"></u-navbar>
  4. <!-- 出库单状态 -->
  5. <view class="container">
  6. <view class="head">
  7. <view class="photo">
  8. <u-avatar size="84" :src="outUser.headImg"></u-avatar>
  9. </view>
  10. <view class="name">
  11. {{outUser.name}}
  12. </view>
  13. <view class="submit">
  14. 提交了<text>出库申请</text>
  15. </view>
  16. <view class="state">
  17. {{recordStatus(info.status)}}
  18. </view>
  19. </view>
  20. <!-- 出库单详情 -->
  21. <view class="details">
  22. <view class="item">
  23. <view class="name">
  24. 所属项目
  25. </view>
  26. <view class="value">
  27. {{info.projectName}}
  28. </view>
  29. </view>
  30. <view class="item">
  31. <view class="name">
  32. 需求时间
  33. </view>
  34. <view class="value">
  35. {{info.startTime?info.startTime:'无'}}
  36. </view>
  37. </view>
  38. <view class="item">
  39. <view class="name">
  40. 使用周期至
  41. </view>
  42. <view class="value">
  43. {{info.endTime}}
  44. </view>
  45. </view>
  46. <view class="item">
  47. <view class="name">
  48. 申请时间
  49. </view>
  50. <view class="value">
  51. {{info.createTime}}
  52. </view>
  53. </view>
  54. </view>
  55. <!-- 出库设备清单 -->
  56. <view class="list">
  57. <view class="list-head">
  58. <view class="title">
  59. 出库设备清单
  60. </view>
  61. <view class="amount" @click="gotoOut()">
  62. 全部 <text>{{recordsTotal}}</text> 件设备
  63. <u-icon name="arrow-right"></u-icon>
  64. </view>
  65. </view>
  66. <!-- 清单信息 -->
  67. <view class="list-infos" v-for="(item,i) in outRecordDeviceList" :key="i" >
  68. <view class="infos-head">
  69. <view class="name">
  70. {{item.deviceName}}
  71. </view>
  72. <view class="state">
  73. {{recordItemStatus(item.status)}}:
  74. <text v-if="item.realDeviceList&&item.realDeviceList.length">
  75. {{item.realDeviceList.length}}
  76. </text>
  77. <text v-else >{{item.needCount}}</text>
  78. </view>
  79. </view>
  80. <view class="infos">
  81. <view class="infos-1">
  82. <view class="infos-item">
  83. <view class="item-name">
  84. 厂家:
  85. </view>
  86. <view class="item-value">
  87. {{item.deviceInfo.manufactor}}
  88. </view>
  89. </view>
  90. <view class="infos-item">
  91. <view class="item-name">
  92. 单位:
  93. </view>
  94. <view class="item-value">
  95. {{item.deviceInfo.unit}}
  96. </view>
  97. </view>
  98. </view>
  99. <view class="infos-2">
  100. <view class="infos-item">
  101. <view class="item-name">
  102. 规格:
  103. </view>
  104. <view class="item-value">
  105. {{item.deviceInfo.specifications}}
  106. </view>
  107. </view>
  108. <view class="infos-item">
  109. <view class="item-name">
  110. 型号:
  111. </view>
  112. <view class="item-value">
  113. {{item.deviceInfo.model}}
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. <!-- 备注 -->
  119. <view class="remark" v-if="false">
  120. <view class="name">
  121. 备注:
  122. </view>
  123. <view class="value">
  124. 22
  125. </view>
  126. </view>
  127. </view>
  128. <u-divider @click="gotoOut()" border-color="#CFD2D5">仅显示部分数据</u-divider>
  129. </view>
  130. <approve-list ref="approveList"
  131. :outRecordDetailObj="outRecordDetailObj"
  132. :approveList="approveList"></approve-list>
  133. </view>
  134. <!-- 确认出库 -->
  135. <view class="bottom" v-if="info.status=='1'" >
  136. <u-button type="primary" @click="gotoOut()" >前往出库</u-button>
  137. </view>
  138. </view>
  139. </template>
  140. <script>
  141. import * as API from '@/apis/pagejs/storeManagement.js'
  142. import approveList from "@/components/ApproveList.vue"
  143. import {
  144. recordStatus,recordItemStatus
  145. } from '@/apis/status.js'
  146. export default {
  147. components: {
  148. approveList
  149. },
  150. data() {
  151. return {
  152. id:"",
  153. info:{
  154. projectName:"",
  155. startTime:"",
  156. endTime:"",
  157. createTime:"",
  158. },
  159. outUser:{
  160. name:"",
  161. headImg:""
  162. },
  163. outRecordDetailObj:{},
  164. outRecordDeviceList:[],
  165. approveList:[],
  166. recordsTotal:0,
  167. }
  168. },
  169. onLoad(op){
  170. this.id=op.id
  171. this.getInfo()
  172. },
  173. methods: {
  174. recordStatus,recordItemStatus,
  175. getList(){
  176. API.outRecordDeviceById({
  177. recordId:this.id,
  178. pageSize:3,
  179. pageIndex:1,
  180. }).then((res) => {
  181. uni.hideLoading();
  182. this.outRecordDeviceList=res.data.data;
  183. this.recordsTotal=res.data.recordsTotal;
  184. }).catch(error => {
  185. uni.showToast({
  186. title: error,
  187. icon: "none"
  188. })
  189. })
  190. },
  191. gotoOut(){
  192. uni.navigateTo({
  193. url:'/pages/storeManagement/equipmentDelivery/deliveriedList?id='+this.id+"&status="+this.info.status,
  194. events: {
  195. refreshData: () => {
  196. this.init()
  197. }
  198. }
  199. })
  200. },
  201. init(){
  202. this.getInfo(true)
  203. },
  204. getInfo(bl){
  205. uni.showLoading({
  206. title: "加载中",
  207. mask: true,
  208. })
  209. API.outRecordDetail({
  210. id:this.id,
  211. }).then((res) => {
  212. this.info=res.data.outRecord;
  213. this.approveList=res.data.approveList;
  214. this.outUser=res.data.outUser;
  215. this.outRecordDetailObj=res.data;
  216. this.getList()
  217. }).catch(error => {
  218. uni.showToast({
  219. title: error,
  220. icon: "none"
  221. })
  222. })
  223. }
  224. }
  225. }
  226. </script>
  227. <style scoped lang="scss">
  228. page {
  229. padding-bottom: 200rpx;
  230. }
  231. // 出库单状态
  232. .head {
  233. background-color: #fff;
  234. padding: 24rpx 32rpx;
  235. display: flex;
  236. align-items: center;
  237. color: #101010;
  238. font-size: 32rpx;
  239. .photo {
  240. width: 84rpx;
  241. height: 84rpx;
  242. border-radius: 100rpx;
  243. .u-avatar{
  244. }
  245. img {
  246. width: 100%;
  247. height: 100%;
  248. overflow: hidden;
  249. }
  250. }
  251. .name {
  252. color: #101010;
  253. font-size: 32rpx;
  254. margin-right: 8rpx;
  255. margin-left: 24rpx;
  256. max-width: 200rpx;
  257. overflow: hidden;
  258. text-overflow: ellipsis;
  259. white-space: nowrap
  260. }
  261. .submit {
  262. text {
  263. color: #3385FF;
  264. }
  265. }
  266. .state {
  267. line-height: 48rpx;
  268. padding: 0 24rpx;
  269. border-radius: 50px;
  270. background-color: rgba(255, 255, 255, 1);
  271. color: rgba(51, 133, 255, 1);
  272. font-size: 12px;
  273. text-align: center;
  274. font-family: Arial;
  275. border: 1px solid rgba(51, 133, 255, 1);
  276. margin-left: auto;
  277. }
  278. }
  279. // 出库单详情
  280. .details {
  281. background-color: #fff;
  282. margin-top: 24rpx;
  283. padding: 0 32rpx;
  284. .item {
  285. display: flex;
  286. justify-content: space-between;
  287. padding: 12rpx 0;
  288. border-bottom: 1px solid rgba(244, 244, 244, 1);
  289. .name {
  290. color: rgba(119, 119, 119, 1);
  291. }
  292. .value {
  293. color: #101010;
  294. }
  295. }
  296. }
  297. // 出库单列表
  298. .list {
  299. background-color: #fff;
  300. margin-top: 24rpx;
  301. padding: 22rpx 32rpx;
  302. .prepare-out {
  303. padding: 24rpx;
  304. margin-top: 40rpx;
  305. border-radius: 8px;
  306. background-color: rgba(245, 246, 249, 1);
  307. .head {
  308. display: flex;
  309. justify-content: space-between;
  310. align-items: center;
  311. margin-bottom: 24rpx;
  312. .amount {
  313. display: flex;
  314. color: rgba(0, 81, 255, 1);
  315. font-size: 32rpx;
  316. }
  317. .unfold {
  318. color: rgba(146, 158, 165, 1);
  319. font-size: 24rpx;
  320. position: relative;
  321. .u-icon--right {
  322. margin-left: 8rpx;
  323. }
  324. }
  325. .option {
  326. width: 160rpx;
  327. height: 32rpx;
  328. background-color: #fff;
  329. position: absolute;
  330. top: 30rpx;
  331. right: 0;
  332. }
  333. }
  334. // 编号
  335. .serial-number {
  336. display: flex;
  337. justify-content: space-between;
  338. align-items: center;
  339. margin-top: 16rpx;
  340. color: rgba(51, 51, 51, 1);
  341. font-weight: bold;
  342. .item {
  343. display: flex;
  344. }
  345. }
  346. }
  347. .list-head {
  348. display: flex;
  349. justify-content: space-between;
  350. align-items: center;
  351. .title {
  352. color: #333333;
  353. font-size: 32rpx
  354. }
  355. .amount {
  356. color: #777777;
  357. font-size: 24rpx;
  358. text {
  359. color: #3385FF;
  360. }
  361. /deep/.u-icon--right {
  362. margin-left: 8rpx;
  363. }
  364. }
  365. }
  366. // 清单信息
  367. .list-infos {
  368. border-radius: 8px;
  369. background-color: #F5F6F9;
  370. margin-top: 24rpx;
  371. padding: 24rpx;
  372. .infos-head {
  373. display: flex;
  374. justify-content: space-between;
  375. align-items: center;
  376. margin-bottom: 24rpx;
  377. .name {
  378. color: rgba(51, 51, 51, 1);
  379. font-size: 32rpx;
  380. }
  381. .state {
  382. color: rgba(0, 81, 255, 1);
  383. }
  384. }
  385. .infos {
  386. margin-top: 16rpx;
  387. display: flex;
  388. color: #777777;
  389. font-size: 24rpx;
  390. .infos-1 {
  391. margin-right: 68rpx;
  392. }
  393. .infos-item {
  394. display: flex;
  395. margin-bottom: 8rpx;
  396. }
  397. }
  398. }
  399. }
  400. // 流程
  401. .process {
  402. background-color: #fff;
  403. margin-top: 24rpx;
  404. padding: 24rpx 32rpx;
  405. .title {
  406. color: rgba(51, 51, 51, 1);
  407. font-size: 32rpx;
  408. }
  409. .u-time-axis-item{
  410. //margin-bottom: 76rpx;
  411. }
  412. .u-time-axis {
  413. //padding: 18rpx 40rpx;
  414. }
  415. .u-node {
  416. width: 18rpx;
  417. height: 18rpx;
  418. border-radius: 100rpx !important;
  419. display: flex;
  420. justify-content: center;
  421. align-items: center;
  422. background: #d0d0d0;
  423. }
  424. .u-order{
  425. margin-bottom: 32rpx;
  426. }
  427. .u-order-title {
  428. color: #333333;
  429. font-weight: bold;
  430. font-size: 32rpx;
  431. }
  432. .u-order-desc {
  433. margin-bottom: 16rpx;
  434. display: flex;
  435. justify-content: space-between;
  436. align-items: center;
  437. .level {
  438. color: #333333;
  439. font-size: 32rpx;
  440. font-weight: bold;
  441. }
  442. .date {
  443. color: rgba(119, 119, 119, 1);
  444. }
  445. .state {
  446. color: rgba(255, 121, 0, 1);
  447. }
  448. }
  449. .u-order-time {
  450. width: 90rpx;
  451. color: #777777;
  452. font-size: 28rpx;
  453. margin-top: 16rpx;
  454. display: flex;
  455. flex-direction: column;
  456. align-items: center;
  457. .photo {
  458. width: 56rpx;
  459. height: 56rpx;
  460. border-radius: 100px;
  461. margin-bottom: 4rpx;
  462. img {
  463. width: 100%;
  464. height: 100%;
  465. overflow: hidden;
  466. position: relative;
  467. }
  468. }
  469. .confirm {
  470. position: absolute;
  471. top: 46rpx;
  472. left: 56rpx;
  473. }
  474. .name {
  475. color: rgba(51, 51, 51, 1);
  476. font-size: 24rpx;
  477. }
  478. }
  479. }
  480. // .u-time-axis{
  481. // .u-time-axis-item:last-of-type{
  482. // margin-bottom: 0;
  483. // }
  484. // }
  485. // 确认出库
  486. .bottom{
  487. background-color: #fff;
  488. margin-top: 44rpx;
  489. padding: 16rpx 32rpx;
  490. z-index: 999;
  491. position: fixed;
  492. left: 0;
  493. right: 0;
  494. bottom: 0;
  495. // uni-button{
  496. // border-radius: 8px;
  497. // background: linear-gradient(180deg, rgba(22,119,255,1) 0%,rgba(16,98,213,1) 100%);
  498. // color: rgba(255, 255, 255, 1);
  499. // font-size: 32rpx;
  500. // line-height: 88rpx;
  501. // }
  502. }
  503. </style>