deliveryDetails.vue 10 KB

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