deliveryDetails.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  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" :style="{
  17. color:recordStatusColor(info.status),
  18. borderColor:recordStatusColor(info.status)
  19. }">
  20. {{recordStatus(info.status)}}
  21. </view>
  22. </view>
  23. <!-- 出库单详情 -->
  24. <view class="details">
  25. <view class="item">
  26. <view class="name">
  27. 所属项目
  28. </view>
  29. <view class="value">
  30. {{info.projectName}}
  31. </view>
  32. </view>
  33. <view class="item">
  34. <view class="name">
  35. 需求时间
  36. </view>
  37. <view class="value">
  38. {{info.startTime?info.startTime:'无'}}
  39. </view>
  40. </view>
  41. <view class="item">
  42. <view class="name">
  43. 使用周期至
  44. </view>
  45. <view class="value">
  46. {{info.endTime}}
  47. </view>
  48. </view>
  49. <view class="item">
  50. <view class="name">
  51. 申请时间
  52. </view>
  53. <view class="value">
  54. {{info.createTime}}
  55. </view>
  56. </view>
  57. </view>
  58. <!-- 出库设备清单 -->
  59. <view class="list">
  60. <view class="list-head">
  61. <view class="title">
  62. 出库设备清单
  63. </view>
  64. <view class="amount" @click="gotoUrl('pages/projectDepartment/exportApplication/deliveriedList?id='+id)">
  65. 全部 <text>{{recordsTotal}}</text> 件设备
  66. <u-icon name="arrow-right"></u-icon>
  67. </view>
  68. </view>
  69. <!-- 清单信息 -->
  70. <view class="list-infos" v-for="(item,i) in outRecordDeviceList" :key="i" >
  71. <view class="infos-head">
  72. <view class="name">
  73. {{item.deviceName}}
  74. </view>
  75. <view class="state">
  76. 预出库 <text>{{item.needCount}}</text>
  77. </view>
  78. </view>
  79. <view class="infos">
  80. <view class="infos-1">
  81. <view class="infos-item">
  82. <view class="item-name">
  83. 厂家:
  84. </view>
  85. <view class="item-value">
  86. {{item.deviceInfo.manufactor}}
  87. </view>
  88. </view>
  89. <view class="infos-item">
  90. <view class="item-name">
  91. 单位:
  92. </view>
  93. <view class="item-value">
  94. {{item.deviceInfo.unit}}
  95. </view>
  96. </view>
  97. </view>
  98. <view class="infos-2">
  99. <view class="infos-item">
  100. <view class="item-name">
  101. 规格:
  102. </view>
  103. <view class="item-value">
  104. {{item.deviceInfo.specifications}}
  105. </view>
  106. </view>
  107. <view class="infos-item">
  108. <view class="item-name">
  109. 型号:
  110. </view>
  111. <view class="item-value">
  112. {{item.deviceInfo.model}}
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. <approveList ref="approveList"
  120. :outRecordDetailObj="outRecordDetailObj"
  121. :approveList="approveList"></approveList>
  122. </view>
  123. <!-- 确认出库 -->
  124. <view class="bottom" >
  125. <!-- <button>确认出库</button> -->
  126. <u-button v-if="info.status==0" type="revoke" @click="revokeBtn" >撤销</u-button>
  127. <u-button v-if="info.status==1" type="primary" >签字验收</u-button>
  128. </view>
  129. </view>
  130. </template>
  131. <script>
  132. import * as API from '@/apis/pagejs/projectDepartment.js'
  133. import {
  134. recordStatus,recordStatusColor
  135. } from '@/apis/status.js'
  136. import approveList from "@/components/ApproveList.vue"
  137. export default {
  138. components: {
  139. approveList
  140. },
  141. data() {
  142. return {
  143. id:"",
  144. info:{
  145. projectName:"",
  146. startTime:"",
  147. endTime:"",
  148. createTime:"",
  149. },
  150. outUser:{
  151. name:"",
  152. headImg:""
  153. },
  154. outRecordDetailObj:{},
  155. outRecordDeviceList:[],
  156. approveList:[],
  157. recordsTotal:0,
  158. }
  159. },
  160. onLoad(op){
  161. this.id=op.id
  162. this.getInfo()
  163. },
  164. methods: {
  165. recordStatusColor,
  166. recordStatus,
  167. getList(){
  168. API.outRecordDeviceById({
  169. recordId:this.id,
  170. pageSize:5,
  171. pageIndex:1,
  172. }).then((res) => {
  173. uni.hideLoading();
  174. this.outRecordDeviceList=res.data.data;
  175. this.recordsTotal=res.data.recordsTotal;
  176. }).catch(error => {
  177. uni.showToast({
  178. title: error,
  179. icon: "none"
  180. })
  181. })
  182. },
  183. revokeMethod(){
  184. uni.showLoading({
  185. title: "加载中",
  186. mask: true,
  187. })
  188. API.cancelOutRecord({
  189. recordId:this.id,
  190. }).then((res) => {
  191. uni.hideLoading();
  192. this.getInfo(true)
  193. }).catch(error => {
  194. uni.showToast({
  195. title: error,
  196. icon: "none"
  197. })
  198. })
  199. },
  200. revokeBtn(){
  201. var _this=this
  202. uni.showModal({
  203. content:"确认是否撤销?",
  204. title:"提示",
  205. success(res) {
  206. if(res.confirm){
  207. _this.revokeMethod()
  208. }else{
  209. }
  210. }
  211. })
  212. },
  213. getInfo(bl){
  214. uni.showLoading({
  215. title: "加载中",
  216. mask: true,
  217. })
  218. API.outRecordDetail({
  219. id:this.id,
  220. }).then((res) => {
  221. this.outRecordDetailObj=res.data;
  222. this.info=res.data.outRecord;
  223. this.approveList=res.data.approveList;
  224. this.outUser=res.data.outUser;
  225. if(bl){
  226. const eventChannel = this.getOpenerEventChannel();
  227. eventChannel.emit('refreshData');
  228. uni.hideLoading();
  229. }else{
  230. this.getList()
  231. }
  232. }).catch(error => {
  233. uni.showToast({
  234. title: error,
  235. icon: "none"
  236. })
  237. })
  238. }
  239. }
  240. }
  241. </script>
  242. <style scoped lang="scss">
  243. page {
  244. padding-bottom: 200rpx;
  245. }
  246. // 出库单状态
  247. .head {
  248. background-color: #fff;
  249. padding: 24rpx 32rpx;
  250. display: flex;
  251. align-items: center;
  252. color: #101010;
  253. font-size: 32rpx;
  254. .photo {
  255. width: 84rpx;
  256. height: 84rpx;
  257. border-radius: 100rpx;
  258. .u-avatar{
  259. }
  260. img {
  261. width: 100%;
  262. height: 100%;
  263. overflow: hidden;
  264. }
  265. }
  266. .name {
  267. color: #101010;
  268. font-size: 32rpx;
  269. margin-right: 8rpx;
  270. margin-left: 24rpx;
  271. }
  272. .submit {
  273. text {
  274. color: #3385FF;
  275. }
  276. }
  277. .state {
  278. line-height: 48rpx;
  279. padding: 0 24rpx;
  280. border-radius: 50px;
  281. background-color: rgba(255, 255, 255, 1);
  282. color: rgba(51, 133, 255, 1);
  283. font-size: 12px;
  284. text-align: center;
  285. font-family: Arial;
  286. border: 1px solid rgba(51, 133, 255, 1);
  287. margin-left: auto;
  288. }
  289. }
  290. // 出库单详情
  291. .details {
  292. background-color: #fff;
  293. margin-top: 24rpx;
  294. padding: 0 32rpx;
  295. .item {
  296. display: flex;
  297. justify-content: space-between;
  298. padding: 22rpx 0;
  299. border-bottom: 1px solid rgba(244, 244, 244, 1);
  300. .name {
  301. color: rgba(119, 119, 119, 1);
  302. }
  303. .value {
  304. color: #101010;
  305. }
  306. }
  307. }
  308. // 出库单列表
  309. .list {
  310. background-color: #fff;
  311. margin-top: 24rpx;
  312. padding: 22rpx 32rpx;
  313. .list-head {
  314. display: flex;
  315. justify-content: space-between;
  316. align-items: center;
  317. .title {
  318. color: #333333;
  319. font-size: 32rpx
  320. }
  321. .amount {
  322. color: #777777;
  323. font-size: 24rpx;
  324. text {
  325. color: #3385FF;
  326. }
  327. /deep/.u-icon--right {
  328. margin-left: 8rpx;
  329. }
  330. }
  331. }
  332. // 清单信息
  333. .list-infos {
  334. border-radius: 8px;
  335. background-color: #F5F6F9;
  336. margin-top: 24rpx;
  337. padding: 24rpx;
  338. .infos-head {
  339. display: flex;
  340. justify-content: space-between;
  341. align-items: center;
  342. margin-bottom: 24rpx;
  343. .name {
  344. color: rgba(51, 51, 51, 1);
  345. font-size: 32rpx;
  346. }
  347. .state {
  348. color: rgba(0, 81, 255, 1);
  349. }
  350. }
  351. .infos {
  352. margin-top: 16rpx;
  353. display: flex;
  354. color: #777777;
  355. font-size: 24rpx;
  356. .infos-1 {
  357. margin-right: 68rpx;
  358. }
  359. .infos-item {
  360. display: flex;
  361. margin-bottom: 8rpx;
  362. }
  363. }
  364. }
  365. }
  366. // .u-time-axis{
  367. // .u-time-axis-item:last-of-type{
  368. // margin-bottom: 0;
  369. // }
  370. // }
  371. // 确认出库
  372. .bottom{
  373. background-color: #fff;
  374. margin-top: 44rpx;
  375. padding: 16rpx 32rpx;
  376. z-index: 999;
  377. position: fixed;
  378. left: 0;
  379. right: 0;
  380. bottom: 0;
  381. // uni-button{
  382. // border-radius: 8px;
  383. // background: linear-gradient(180deg, rgba(22,119,255,1) 0%,rgba(16,98,213,1) 100%);
  384. // color: rgba(255, 255, 255, 1);
  385. // font-size: 32rpx;
  386. // line-height: 88rpx;
  387. // }
  388. }
  389. </style>