warehouse_warrant.vue 17 KB

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