warehouse_warrant.vue 15 KB

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