deliveryDetails.vue 8.4 KB

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