warehouse_warrant.vue 14 KB

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