warehouse_warrant.vue 17 KB

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