warehouse_warrant.vue 15 KB

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