acquisition_settlement_approval.vue 17 KB

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