deliveryDetails.vue 9.6 KB

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