warehouse_warrant.vue 17 KB

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