warehouse_warrant.vue 17 KB

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