warehouse_warrant_detail.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667
  1. <template>
  2. <view class="warp">
  3. <view class="topInfo">
  4. <view class="topInfo-item">
  5. <view class="flex info">
  6. <view class="logo">
  7. <image src="../../../static/img/reject.png" mode="" v-if="status == '已驳回'"
  8. style="height: 40rpx;"></image><!-- 驳回 -->
  9. <image src="../../../static/img/tongguo.png" mode="" v-if="status == '已通过'"
  10. style="height: 40rpx;"></image><!-- 通过 -->
  11. <!-- v-if="status == '审核中' || status == '待决策人审核'" -->
  12. <image src="../../../static/img/daishenhe.png" mode="" style="height: 40rpx;"></image>
  13. <!-- 待审核 -->
  14. </view>
  15. <!-- {{auditList.length > 0 ?auditList[auditList.length - 1].operatorMajorRoleName:""}} -->
  16. <view class="infoText">待决策人审核</view>
  17. </view>
  18. <view class="infoData">{{updateDate}}</view>
  19. </view>
  20. </view>
  21. <view class="content1">
  22. <!-- <view class="title">
  23. 销售外勤 张三
  24. </view> -->
  25. <view class="row">
  26. <view class="left">合计重量(吨)</view>
  27. <view class="right">{{auditInfo.inWarehouseWeightTotal}}</view>
  28. </view>
  29. <view class="row">
  30. <view class="left">合计金额(元)</view>
  31. <view class="right">{{auditInfo.requestFundsTotal}}</view>
  32. </view>
  33. <view class="row">
  34. <view class="left">仓库名称</view>
  35. <view class="right">{{auditInfo.warehouseName}}</view>
  36. </view>
  37. <view class="row">
  38. <view class="left">入库日期</view>
  39. <view class="right">{{auditInfo.issuingTime}}</view>
  40. </view>
  41. <view class="row" style="border-bottom:0">
  42. <view class="left">车数</view>
  43. <view class="right">{{auditInfo.count}}</view>
  44. </view>
  45. </view>
  46. <view class="content1" v-if="url && url != 'ng'">
  47. <view class="title ">
  48. 附件
  49. </view>
  50. <view class="file" @click="openXls">
  51. <image src="../../../static/img/excle.png" mode="" class="img_css"></image>
  52. <text class="text_css">明细.xls</text>
  53. </view>
  54. </view>
  55. <view class="content2">
  56. <view class="title row">
  57. 流程
  58. </view>
  59. <view v-for="(item,index) in auditList" :key='index' class="audit">
  60. <view class="row">
  61. <view class="left">
  62. <view class="item1">
  63. <image :src="src" style="width: 100rpx;height: 100rpx;border-radius: 500%;"></image>
  64. </view>
  65. <view class="item2">
  66. <view class="name">{{item.operatorName ? item.operatorName:item.operatorMajorRoleName}}
  67. </view>
  68. <view class="status">{{item.approved ? "已审核":"待决策人审核"}}</view>
  69. </view>
  70. </view>
  71. <view class="right">
  72. {{item.updateDate}}
  73. </view>
  74. </view>
  75. <view class="row-line" v-if="index!= auditList.length - 1"></view>
  76. </view>
  77. </view>
  78. <view v-if='show' class="shade">
  79. <view class="wrap">
  80. <view class="alert-top">
  81. <view class="title">
  82. {{title}}
  83. </view>
  84. <u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
  85. </view>
  86. <view class="u-textarea-style">
  87. <view class="right-bottom">
  88. {{auditMind.length}}/100个字
  89. </view>
  90. <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
  91. maxlength="100" />
  92. </view>
  93. <view @click='close()' class="cancel">取消</view>
  94. <view @click='passSubmit()' class="confirm">确定</view>
  95. </view>
  96. </view>
  97. <u-toast ref="uToast" />
  98. </view>
  99. </template>
  100. <script>
  101. import helper from '@/common/helper.js';
  102. import {
  103. mapState
  104. } from 'vuex';
  105. export default {
  106. data() {
  107. return {
  108. src: '../../../static/img/myimg/LiangShang@2x.png',
  109. isSHowBtn: true,
  110. height: 200,
  111. autoHeight: true,
  112. border: false,
  113. title: '',
  114. show: false,
  115. auditMind: '',
  116. id: "",
  117. currentPage: 1,
  118. pageSize: 100,
  119. List: [],
  120. status: "",
  121. updateDate: "",
  122. warehouseName: "",
  123. everyCheck: '',
  124. auditInfo: {},
  125. id: "",
  126. auditList: [],
  127. url: "11",
  128. }
  129. },
  130. onBackPress(e) {
  131. if (this.everyCheck) {
  132. uni.navigateTo({
  133. url: "/pages/task/my_task"
  134. })
  135. return true;
  136. }
  137. },
  138. onLoad(options) {
  139. this.id = options.id
  140. this.vesselId = options.vesselId
  141. this.everyCheck = uni.getStorageSync("everyTask")
  142. this.isSHowBtn = options.isShowbtn
  143. },
  144. onShow(options) {
  145. this.getList()
  146. },
  147. computed: {
  148. ...mapState(['hasLogin', 'userInfo']),
  149. },
  150. methods: {
  151. openXls() {
  152. if (this.url && this.url != "ng") {
  153. uni.downloadFile({
  154. url: this.url,
  155. success: function(res) {
  156. var filePath = res.tempFilePath;
  157. uni.openDocument({
  158. filePath: filePath,
  159. showMenu: true,
  160. success: function(res) {
  161. console.log('打开文档成功');
  162. }
  163. });
  164. }
  165. });
  166. }
  167. },
  168. getList() {
  169. uni.showLoading({
  170. title: "加载中...",
  171. mask: true
  172. })
  173. // this.$api.doRequest('get', '/warehousingOrder/selectInfo', {
  174. // currentPage: 1,
  175. // pageSize: 100,
  176. // searchType: '2', //searchType:1待审核
  177. // // warehouseName: this.vesselId,
  178. // managementType: 1
  179. // }).then(res1 => {
  180. // uni.hideLoading()
  181. // if (res1.data.code == 200) {
  182. // this.List = res1.data.data.records
  183. // }
  184. // })
  185. // this.$api.doRequest('get', '/paymentManagement/getInfo', {
  186. // id: this.id
  187. // }).then(res => {
  188. // if (res.data.code == 200) {
  189. // uni.showLoading({
  190. // title: "加载中...",
  191. // mask: true
  192. // })
  193. // }
  194. // })
  195. this.$api.doRequest('post', '/warehousingOrder/exportPhone', {
  196. batchId:this.id,searchType: 1,
  197. }).then(res1 => {
  198. if (res1.data.code == 200) {
  199. this.url = res1.data.data
  200. }
  201. })
  202. this.$api.doRequest('post', '/warehousingOrder/exportPhoneData', {searchType: 1,batchId:this.id}).then(res1 => {
  203. if (res1.data.code == 200) {
  204. this.auditInfo = res1.data.data
  205. this.auditInfo.amountIngPayableTotal1 = helper.convertCurrency(this.auditInfo
  206. .amountIngPayableTotal)
  207. uni.hideLoading()
  208. }
  209. })
  210. // this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  211. // businessCode: 'PAYMENT-MANAGEMENT-APPROVE',
  212. // tmpCompId: uni.getStorageSync('pcUserInfo').compId
  213. // }).then(res1 => {
  214. // this.updateDate = res1.data.data[0].updateDate
  215. // this.$api.doRequest('get', '/commonUser/getHis', {
  216. // workflowId: res1.data.data[0].id,
  217. // businessKey: this.id
  218. // }).then(response => {
  219. // // uni.hideLoading()
  220. // this.auditList = response.data.data
  221. // })
  222. // })
  223. },
  224. close() {
  225. this.show = false
  226. },
  227. pass() {
  228. this.show = true
  229. this.title = '审核意见(通过)'
  230. },
  231. reject() {
  232. this.show = true
  233. this.title = '驳回原因(驳回)'
  234. },
  235. //驳回
  236. // rejectSubmit() {
  237. // if (!this.auditMind) {
  238. // this.$api.msg('驳回原因不能为空!')
  239. // } else {
  240. // var that = this
  241. // that.show = false
  242. // if (this.List.length > 0) {
  243. // uni.showModal({
  244. // content: "确定驳回付款申请?",
  245. // showCancel: true,
  246. // confirmText: '确定',
  247. // success: function(res) {
  248. // if (res.confirm) {
  249. // that.audit(that.List[0], 0, false, '', '')
  250. // }
  251. // }
  252. // })
  253. // }
  254. // }
  255. // },
  256. //审核确定
  257. passSubmit() {
  258. var that = this
  259. that.show = false
  260. if (this.title == '驳回原因(驳回)') {
  261. // this.rejectSubmit()
  262. if (!that.auditMind) {
  263. this.$api.msg('驳回原因不能为空!')
  264. } else {
  265. uni.showModal({
  266. content: "确定驳回付款申请?",
  267. showCancel: true,
  268. confirmText: '确定',
  269. success: function(res) {
  270. if (res.confirm) {
  271. uni.showLoading({
  272. title: "审核中...",
  273. mask: true
  274. })
  275. var count = 0
  276. // for (let num = 0; num < that.List.length; num++) {
  277. that.$api.doRequest('post', '/workflow/api/handle', {
  278. taskId: that.auditInfo.taskId,
  279. approved: false,
  280. auditMind: that.auditMind ? that.auditMind : "",
  281. needReapply: true
  282. }).then(res => {
  283. // count++
  284. // if (count == that.List.length) {
  285. uni.hideLoading()
  286. that.$api.msg('审核成功!')
  287. setTimeout(function() {
  288. uni.navigateBack();
  289. }, 2000);
  290. // }
  291. })
  292. // }
  293. }
  294. }
  295. })
  296. }
  297. } else {
  298. var that = this
  299. this.show = false
  300. uni.showModal({
  301. content: "确定通过付款申请?",
  302. showCancel: true,
  303. confirmText: '确定',
  304. success: function(res) {
  305. if (res.confirm) {
  306. uni.showLoading({
  307. title: "审核中...",
  308. mask: true
  309. })
  310. // for (let num = 0; num < that.List.length; num++) {
  311. // var tmp = 0
  312. that.$api.doRequest('post', '/workflow/api/handle', {
  313. taskId: that.auditInfo.taskId,
  314. approved: true,
  315. auditMind: that.auditMind ? that.auditMind : "",
  316. needReapply: false
  317. }).then(res => {
  318. // tmp++
  319. // if (tmp == that.List.length) {
  320. uni.hideLoading()
  321. that.$api.msg('审核成功!')
  322. setTimeout(function() {
  323. uni.navigateBack();
  324. }, 2000);
  325. // }
  326. })
  327. // }
  328. }
  329. }
  330. })
  331. }
  332. },
  333. // audit(list, index, status, status2, reason) {
  334. // uni.showLoading({
  335. // title: "审核中"
  336. // })
  337. // if (this.List.length > 0) {
  338. // if (status == true && list.status == "已驳回") {
  339. // this.$api.doRequest('get', '/paymentManagement/api/openAuditFlow', {
  340. // compId: "2710b21efc1e4393930c5dc800010dc4",
  341. // id: list.id
  342. // }).then(res => {
  343. // if (res.data.code == 200) {
  344. // this.audit(this.List[index + 1], index + 1, status, status2, reason)
  345. // }
  346. // })
  347. // } else {
  348. // for (var i = 0; i < this.List.length; i++) {
  349. // this.$api.doRequest('post', '/workflow/api/handle', {
  350. // taskId: this.List[i].taskId,
  351. // approved: status,
  352. // auditMind: this.auditMind ? this.auditMind : "",
  353. // needReapply: status2 ? true : false
  354. // }).then(res => {
  355. // if (res.data.code == 200) {
  356. // uni.hideLoading()
  357. // // this.audit(this.List[index + 1], index + 1, status, status2, reason)
  358. // this.$api.msg('通过成功')
  359. // }else{
  360. // uni.hideLoading()
  361. // this.$api.msg('审核失败')
  362. // }
  363. // })
  364. // }
  365. // }
  366. // } else {
  367. // if (status == true) {
  368. // this.$api.msg('通过成功')
  369. // } else if (status == false) {
  370. // this.$api.msg('驳回成功')
  371. // }
  372. // let that = this
  373. // setTimeout(function() {
  374. // if (that.everyCheck) {
  375. // helper.setAudit(that.list)
  376. // } else {
  377. // uni.navigateBack()
  378. // }
  379. // uni.hideLoading()
  380. // }, 1000);
  381. // }
  382. // },
  383. }
  384. }
  385. </script>
  386. <style scoped lang="scss">
  387. .warp {
  388. margin: 10rpx;
  389. padding: 20rpx 20rpx 240rpx 20rpx;
  390. }
  391. .content1 {
  392. font-size: 28rpx;
  393. color: #333333;
  394. margin-top: 30rpx;
  395. padding: 20rpx;
  396. // .content-item {
  397. border-radius: 20rpx;
  398. background: white;
  399. // padding: 40rpx 20rpx;
  400. // margin-bottom: 30rpx;
  401. // }
  402. // .title {
  403. // font-size: 32rpx;
  404. // font-weight: 600;
  405. // color: #333333;
  406. // margin: 30rpx 0;
  407. // }
  408. // .goodsInfoCss {
  409. // font-size: 28rpx;
  410. // font-weight: 600;
  411. // color: #878C9C;
  412. // margin: 26rpx 10rpx;
  413. // }
  414. // .priceCss {
  415. // font-size: 40rpx;
  416. // margin: 26rpx 10rpx;
  417. // color: #22C572;
  418. // font-weight: 600;
  419. // }
  420. .row {
  421. display: flex;
  422. justify-content: space-between;
  423. border-bottom: 1px solid #EEEEEE;
  424. padding: 20rpx 0;
  425. .right,
  426. input {
  427. font-size: 28rpx;
  428. // color: #333333;
  429. }
  430. }
  431. .img_css {
  432. width: 50rpx;
  433. height: 50rpx;
  434. }
  435. .file {
  436. display: flex;
  437. align-items: center;
  438. margin: 30rpx 0 0 20rpx;
  439. .text_css {
  440. font-size: 30rpx;
  441. margin-left: 20rpx;
  442. }
  443. }
  444. }
  445. .title {
  446. font-size: 34rpx;
  447. font-weight: 700;
  448. // margin-bottom: 20rpx;
  449. height: 70rpx;
  450. border-bottom: 2rpx solid #EEEEEE;
  451. }
  452. .titlerow {
  453. font-size: 34rpx;
  454. font-weight: 700;
  455. // margin-bottom: 20rpx;
  456. // height: 70rpx;
  457. // border-bottom: 2rpx solid #EEEEEE;
  458. }
  459. .content2 {
  460. background: white;
  461. margin: 20rpx 0;
  462. border-radius: 20rpx;
  463. padding: 20rpx;
  464. .row {
  465. display: flex;
  466. justify-content: space-between;
  467. .left {
  468. display: flex;
  469. align-items: center;
  470. .item2 {
  471. margin-left: 20rpx;
  472. .name {
  473. font-size: 32rpx;
  474. font-weight: 800;
  475. }
  476. .status {
  477. color: #6CC48C;
  478. }
  479. }
  480. }
  481. .right {
  482. color: #B0B1B5;
  483. margin-top: 10px;
  484. }
  485. }
  486. .row-line {
  487. width: 1px;
  488. height: 30px;
  489. background: #F2F2F2;
  490. margin: 10rpx 50rpx;
  491. }
  492. .audit {
  493. margin-top: 20rpx;
  494. }
  495. }
  496. .bottom-btn {
  497. width: 100%;
  498. position: fixed;
  499. bottom: 0;
  500. display: flex;
  501. z-index: 2;
  502. left: 0;
  503. background-color: #f8f8f8;
  504. flex-direction: column;
  505. .btn1,
  506. .btn2 {
  507. width: 100%;
  508. margin-bottom: 26rpx;
  509. border-radius: 90rpx;
  510. }
  511. .btn1 {
  512. background: white;
  513. color: #00C265;
  514. }
  515. }
  516. .row1 {
  517. border-bottom: 0 !important;
  518. }
  519. .topInfo {
  520. height: 210rpx;
  521. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  522. padding: 30rpx;
  523. .topInfo-item {
  524. height: 150rpx;
  525. background-color: #FFFFFF;
  526. border-radius: 20rpx;
  527. padding: 40rpx;
  528. .logo {
  529. width: 40rpx;
  530. height: 40rpx;
  531. margin-top: 8rpx;
  532. }
  533. .infoText {
  534. font-size: 36rpx;
  535. font-weight: 600;
  536. margin-left: 20rpx;
  537. }
  538. .infoData {
  539. color: #878C9C;
  540. font-size: 26rpx;
  541. margin-top: 10rpx;
  542. }
  543. }
  544. }
  545. .shade {
  546. position: fixed;
  547. top: 0;
  548. left: 0;
  549. height: 100%;
  550. width: 100%;
  551. background: rgba(0, 0, 0, 0.4);
  552. z-index: 3;
  553. .wrap {
  554. position: absolute;
  555. left: 0;
  556. top: 0;
  557. right: 0;
  558. bottom: 0;
  559. margin: auto;
  560. background: #fff;
  561. width: calc(100% - 198rpx);
  562. height: 700rpx;
  563. border-radius: 20rpx;
  564. .alert-top {
  565. padding: 33rpx;
  566. display: flex;
  567. justify-content: center;
  568. align-items: center;
  569. position: relative;
  570. }
  571. .title {
  572. font-size: 32rpx;
  573. font-weight: 600;
  574. color: #333333;
  575. }
  576. .close {
  577. position: absolute;
  578. right: 33rpx;
  579. }
  580. }
  581. }
  582. .cancel,
  583. .confirm {
  584. position: absolute;
  585. display: inline-block;
  586. width: 50%;
  587. text-align: center;
  588. bottom: 0;
  589. padding: 10px;
  590. border-top: 1px solid #eee;
  591. font-size: 34rpx;
  592. }
  593. .cancel {
  594. left: 0;
  595. border-right: 1px solid #eee;
  596. color: #AFB3BF;
  597. }
  598. .confirm {
  599. right: 0;
  600. color: #22C572;
  601. }
  602. .u-textarea-style {
  603. margin: 20rpx;
  604. background: #F9F9FA;
  605. border-radius: 10px;
  606. border: 1px solid #EEEEEE;
  607. padding: 10rpx 20rpx;
  608. position: relative;
  609. .right-bottom {
  610. position: absolute;
  611. right: 20rpx;
  612. bottom: 20rpx;
  613. color: #AFB3BF;
  614. }
  615. }
  616. /deep/.u-input__textarea {
  617. height: 300rpx !important;
  618. }
  619. </style>