acquisition_settlement_details.vue 18 KB

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