acquisition_settlement_approval.vue 18 KB

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