warehouse_warrant.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  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. var that = this
  279. that.show = false
  280. if (this.title == '驳回原因(驳回)') {
  281. // this.rejectSubmit()
  282. if (!that.auditMind) {
  283. this.$api.msg('驳回原因不能为空!')
  284. } else {
  285. uni.showModal({
  286. content: "确定驳回付款申请?",
  287. showCancel: true,
  288. confirmText: '确定',
  289. success: function(res) {
  290. if (res.confirm) {
  291. uni.showLoading({
  292. title: "审核中...",
  293. mask: true
  294. })
  295. var count = 0
  296. for (let num = 0; num < that.List.length; num++) {
  297. that.$api.doRequest('post', '/workflow/api/handle', {
  298. taskId: that.List[num].taskId,
  299. approved: false,
  300. auditMind: that.auditMind ? that.auditMind : "",
  301. needReapply: true
  302. }).then(res => {
  303. count++
  304. if (count == that.List.length) {
  305. uni.hideLoading()
  306. that.$api.msg('审核成功!')
  307. setTimeout(function() {
  308. uni.navigateBack();
  309. }, 2000);
  310. }
  311. })
  312. }
  313. }
  314. }
  315. })
  316. }
  317. } else {
  318. var that = this
  319. this.show = false
  320. uni.showModal({
  321. content: "确定通过付款申请?",
  322. showCancel: true,
  323. confirmText: '确定',
  324. success: function(res) {
  325. if (res.confirm) {
  326. uni.showLoading({
  327. title: "审核中...",
  328. mask: true
  329. })
  330. for (let num = 0; num < that.List.length; num++) {
  331. var tmp = 0
  332. that.$api.doRequest('post', '/workflow/api/handle', {
  333. taskId: that.List[num].taskId,
  334. approved: true,
  335. auditMind: that.auditMind ? that.auditMind : "",
  336. needReapply: false
  337. }).then(res => {
  338. tmp++
  339. if (tmp == that.List.length) {
  340. uni.hideLoading()
  341. that.$api.msg('审核成功!')
  342. setTimeout(function() {
  343. uni.navigateBack();
  344. }, 2000);
  345. }
  346. })
  347. }
  348. }
  349. }
  350. })
  351. }
  352. },
  353. // audit(list, index, status, status2, reason) {
  354. // uni.showLoading({
  355. // title: "审核中"
  356. // })
  357. // if (this.List.length > 0) {
  358. // if (status == true && list.status == "已驳回") {
  359. // this.$api.doRequest('get', '/paymentManagement/api/openAuditFlow', {
  360. // compId: "2710b21efc1e4393930c5dc800010dc4",
  361. // id: list.id
  362. // }).then(res => {
  363. // if (res.data.code == 200) {
  364. // this.audit(this.List[index + 1], index + 1, status, status2, reason)
  365. // }
  366. // })
  367. // } else {
  368. // for (var i = 0; i < this.List.length; i++) {
  369. // this.$api.doRequest('post', '/workflow/api/handle', {
  370. // taskId: this.List[i].taskId,
  371. // approved: status,
  372. // auditMind: this.auditMind ? this.auditMind : "",
  373. // needReapply: status2 ? true : false
  374. // }).then(res => {
  375. // if (res.data.code == 200) {
  376. // uni.hideLoading()
  377. // // this.audit(this.List[index + 1], index + 1, status, status2, reason)
  378. // this.$api.msg('通过成功')
  379. // }else{
  380. // uni.hideLoading()
  381. // this.$api.msg('审核失败')
  382. // }
  383. // })
  384. // }
  385. // }
  386. // } else {
  387. // if (status == true) {
  388. // this.$api.msg('通过成功')
  389. // } else if (status == false) {
  390. // this.$api.msg('驳回成功')
  391. // }
  392. // let that = this
  393. // setTimeout(function() {
  394. // if (that.everyCheck) {
  395. // helper.setAudit(that.list)
  396. // } else {
  397. // uni.navigateBack()
  398. // }
  399. // uni.hideLoading()
  400. // }, 1000);
  401. // }
  402. // },
  403. }
  404. }
  405. </script>
  406. <style scoped lang="scss">
  407. .warp {
  408. margin: 10rpx;
  409. padding: 20rpx 20rpx 240rpx 20rpx;
  410. }
  411. .content1 {
  412. font-size: 28rpx;
  413. color: #333333;
  414. margin-top: 30rpx;
  415. padding: 20rpx;
  416. // .content-item {
  417. border-radius: 20rpx;
  418. background: white;
  419. // padding: 40rpx 20rpx;
  420. // margin-bottom: 30rpx;
  421. // }
  422. // .title {
  423. // font-size: 32rpx;
  424. // font-weight: 600;
  425. // color: #333333;
  426. // margin: 30rpx 0;
  427. // }
  428. // .goodsInfoCss {
  429. // font-size: 28rpx;
  430. // font-weight: 600;
  431. // color: #878C9C;
  432. // margin: 26rpx 10rpx;
  433. // }
  434. // .priceCss {
  435. // font-size: 40rpx;
  436. // margin: 26rpx 10rpx;
  437. // color: #22C572;
  438. // font-weight: 600;
  439. // }
  440. .row {
  441. display: flex;
  442. justify-content: space-between;
  443. border-bottom: 1px solid #EEEEEE;
  444. padding: 20rpx 0;
  445. .right,
  446. input {
  447. font-size: 28rpx;
  448. // color: #333333;
  449. }
  450. }
  451. .img_css {
  452. width: 50rpx;
  453. height: 50rpx;
  454. }
  455. .file {
  456. display: flex;
  457. align-items: center;
  458. margin: 30rpx 0 0 20rpx;
  459. .text_css {
  460. font-size: 30rpx;
  461. margin-left: 20rpx;
  462. }
  463. }
  464. }
  465. .title {
  466. font-size: 34rpx;
  467. font-weight: 700;
  468. // margin-bottom: 20rpx;
  469. height: 70rpx;
  470. border-bottom: 2rpx solid #EEEEEE;
  471. }
  472. .titlerow {
  473. font-size: 34rpx;
  474. font-weight: 700;
  475. // margin-bottom: 20rpx;
  476. // height: 70rpx;
  477. // border-bottom: 2rpx solid #EEEEEE;
  478. }
  479. .content2 {
  480. background: white;
  481. margin: 20rpx 0;
  482. border-radius: 20rpx;
  483. padding: 20rpx;
  484. .row {
  485. display: flex;
  486. justify-content: space-between;
  487. .left {
  488. display: flex;
  489. align-items: center;
  490. .item2 {
  491. margin-left: 20rpx;
  492. .name {
  493. font-size: 32rpx;
  494. font-weight: 800;
  495. }
  496. .status {
  497. color: #6CC48C;
  498. }
  499. }
  500. }
  501. .right {
  502. color: #B0B1B5;
  503. margin-top: 10px;
  504. }
  505. }
  506. .row-line {
  507. width: 1px;
  508. height: 30px;
  509. background: #F2F2F2;
  510. margin: 10rpx 50rpx;
  511. }
  512. .audit {
  513. margin-top: 20rpx;
  514. }
  515. }
  516. .bottom-btn {
  517. width: 100%;
  518. position: fixed;
  519. bottom: 0;
  520. display: flex;
  521. z-index: 2;
  522. left: 0;
  523. background-color: #f8f8f8;
  524. flex-direction: column;
  525. .btn1,
  526. .btn2 {
  527. width: 100%;
  528. margin-bottom: 26rpx;
  529. border-radius: 90rpx;
  530. }
  531. .btn1 {
  532. background: white;
  533. color: #00C265;
  534. }
  535. }
  536. .row1 {
  537. border-bottom: 0 !important;
  538. }
  539. .topInfo {
  540. height: 210rpx;
  541. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  542. padding: 30rpx;
  543. .topInfo-item {
  544. height: 150rpx;
  545. background-color: #FFFFFF;
  546. border-radius: 20rpx;
  547. padding: 40rpx;
  548. .logo {
  549. width: 40rpx;
  550. height: 40rpx;
  551. margin-top: 8rpx;
  552. }
  553. .infoText {
  554. font-size: 36rpx;
  555. font-weight: 600;
  556. margin-left: 20rpx;
  557. }
  558. .infoData {
  559. color: #878C9C;
  560. font-size: 26rpx;
  561. margin-top: 10rpx;
  562. }
  563. }
  564. }
  565. .shade {
  566. position: fixed;
  567. top: 0;
  568. left: 0;
  569. height: 100%;
  570. width: 100%;
  571. background: rgba(0, 0, 0, 0.4);
  572. z-index: 3;
  573. .wrap {
  574. position: absolute;
  575. left: 0;
  576. top: 0;
  577. right: 0;
  578. bottom: 0;
  579. margin: auto;
  580. background: #fff;
  581. width: calc(100% - 198rpx);
  582. height: 700rpx;
  583. border-radius: 20rpx;
  584. .alert-top {
  585. padding: 33rpx;
  586. display: flex;
  587. justify-content: center;
  588. align-items: center;
  589. position: relative;
  590. }
  591. .title {
  592. font-size: 32rpx;
  593. font-weight: 600;
  594. color: #333333;
  595. }
  596. .close {
  597. position: absolute;
  598. right: 33rpx;
  599. }
  600. }
  601. }
  602. .cancel,
  603. .confirm {
  604. position: absolute;
  605. display: inline-block;
  606. width: 50%;
  607. text-align: center;
  608. bottom: 0;
  609. padding: 10px;
  610. border-top: 1px solid #eee;
  611. font-size: 34rpx;
  612. }
  613. .cancel {
  614. left: 0;
  615. border-right: 1px solid #eee;
  616. color: #AFB3BF;
  617. }
  618. .confirm {
  619. right: 0;
  620. color: #22C572;
  621. }
  622. .u-textarea-style {
  623. margin: 20rpx;
  624. background: #F9F9FA;
  625. border-radius: 10px;
  626. border: 1px solid #EEEEEE;
  627. padding: 10rpx 20rpx;
  628. position: relative;
  629. .right-bottom {
  630. position: absolute;
  631. right: 20rpx;
  632. bottom: 20rpx;
  633. color: #AFB3BF;
  634. }
  635. }
  636. /deep/.u-input__textarea {
  637. height: 300rpx !important;
  638. }
  639. .mx-content {
  640. background: #F9F9FA;
  641. padding: 30rpx;
  642. box-sizing: border-box;
  643. margin-top: 20rpx;
  644. border-radius: 20rpx;
  645. .name {
  646. font-size: 32rpx;
  647. font-weight: 700;
  648. border-bottom: 1px solid #EEEEEE;
  649. padding-bottom: 8rpx;
  650. }
  651. .mx-row1,
  652. .mx-row2 {
  653. display: flex;
  654. justify-content: space-between;
  655. margin-top: 20rpx;
  656. }
  657. .mx-item {
  658. // width: 33%;
  659. // text-align: center;
  660. }
  661. }
  662. </style>