acquisition_settlement_approval.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  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. <image src="../../../static/img/daishenhe.png" mode=""
  12. v-if="status == '审核中' || status == '待决策人审核'" style="height: 40rpx;"></image><!-- 待审核 -->
  13. </view>
  14. <view class="infoText">{{status}}</view>
  15. </view>
  16. <view class="infoData">{{updateDate}}</view>
  17. </view>
  18. </view>
  19. <!-- <view class='content1'>
  20. <view class='row content-item'>
  21. <view class="left" style="color: #878C9C ;">仓库</view>
  22. <view class="right">{{warehouseName}}</view>
  23. </view>
  24. <view class="content-item">
  25. <view v-for="(item,index) in List">
  26. <view class='row row1'>
  27. <view class="left title">{{item.paymentNo}}</view>
  28. <view class="right title">{{item.carNo}}</view>
  29. </view>
  30. <view class='row'>
  31. <view class="left goodsInfoCss">{{item.goodsName}}({{item.netWeight}}kg -
  32. ¥{{item.tidalGrainPrice}})</view>
  33. <view class="right priceCss">¥{{item.amountIngPayable}}</view>
  34. </view>
  35. </view>
  36. </view>
  37. </view> -->
  38. <view class="content1">
  39. <view class="title">
  40. 销售外勤 张三
  41. </view>
  42. <view class="row">
  43. <view class="left">请款金额(元)</view>
  44. <view class="left">1000</view>
  45. </view>
  46. <view class="row">
  47. <view class="left">大写</view>
  48. <view class="left">1000</view>
  49. </view>
  50. <view class="row">
  51. <view class="left">车(数)</view>
  52. <view class="left">20</view>
  53. </view>
  54. <view class="row">
  55. <view class="left">合计重量(吨)</view>
  56. <view class="left">20</view>
  57. </view>
  58. <view class="row">
  59. <view class="left">平均单价(元吨)</view>
  60. <view class="left">20</view>
  61. </view>
  62. <view class="row">
  63. <view class="left">平均单价指标</view>
  64. </view>
  65. <view class="row">
  66. <view class="left">容重(%)</view>
  67. <view class="left">20</view>
  68. </view>
  69. <view class="row">
  70. <view class="left">水分(%)</view>
  71. <view class="left">20</view>
  72. </view>
  73. <view class="row">
  74. <view class="left">杂质(%)</view>
  75. <view class="left">20</view>
  76. </view>
  77. <view class="row">
  78. <view class="left">热损伤(%)</view>
  79. <view class="left">20</view>
  80. </view>
  81. <view class="row">
  82. <view class="left">霉变粒(%)</view>
  83. <view class="left">20</view>
  84. </view>
  85. <view class="row" style="border-bottom:0">
  86. <view class="left">不完善粒(%)</view>
  87. <view class="left">20</view>
  88. </view>
  89. <!-- <view class="row row-bottom">
  90. <view class="left">水分(%)</view>
  91. <input type="digit" v-model='detailData.warehouseInOutDetail.waterContent' class="right-bottom"
  92. placeholder="输入水分占比"></input>
  93. </view>
  94. <view class="row row-bottom">
  95. <view class="left">容重(克/升)</view>
  96. <input type="digit" v-model='detailData.warehouseInOutDetail.bulkDensity' class="right-bottom"
  97. placeholder="输入容重"></input>
  98. </view>
  99. <view class="row row-bottom">
  100. <view class="left">热损伤(%)</view>
  101. <input type="digit" v-model='detailData.warehouseInOutDetail.jiaorenli' class="right-bottom"
  102. placeholder="输入热损伤占比"></input>
  103. </view>
  104. <view class="row row-bottom">
  105. <view class="left">杂质(%)</view>
  106. <input type="digit" v-model='detailData.warehouseInOutDetail.impurity' class="right-bottom"
  107. placeholder="输入杂质占比"></input>
  108. </view>
  109. <view class="row row-bottom">
  110. <view class="left">霉变粒(%)</view>
  111. <input type="digit" v-model='detailData.warehouseInOutDetail.mildewGrain' class="right-bottom"
  112. placeholder="输入霉变粒占比"></input>
  113. </view>
  114. <view class="row row-bottom">
  115. <view class="left">不完善粒(%)</view>
  116. <input type="digit" v-model='detailData.warehouseInOutDetail.imperfectGrain' class="right-bottom"
  117. placeholder="输入不完善粒占比"></input>
  118. </view> -->
  119. </view>
  120. <view class="content2">
  121. <view v-for="(item,index) in 4" :key='index'>
  122. <view class="row">
  123. <view class="left">
  124. <view class="item1">
  125. <image :src="src" style="width: 100rpx;height: 100rpx;border-radius: 500%;"></image>
  126. </view>
  127. <view class="item2">
  128. <view class="name">张三</view>
  129. <view class="status">发起审批</view>
  130. </view>
  131. </view>
  132. <view class="right">
  133. 02-18 10:20
  134. </view>
  135. </view>
  136. <view class="row-line" v-if="index!=3"></view>
  137. </view>
  138. </view>
  139. <view v-if='show' class="shade">
  140. <view class="wrap">
  141. <view class="alert-top">
  142. <view class="title">
  143. {{title}}
  144. </view>
  145. <u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
  146. </view>
  147. <view class="u-textarea-style">
  148. <view class="right-bottom">
  149. {{auditMind.length}}/100个字
  150. </view>
  151. <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
  152. maxlength="100" />
  153. </view>
  154. <view @click='close()' class="cancel">取消</view>
  155. <view @click='passSubmit()' class="confirm">确定</view>
  156. </view>
  157. </view>
  158. <u-toast ref="uToast" />
  159. <view style='padding:10px;' class='flex bottom-btn'>
  160. <u-button @click='reject' type="error" class="btn1" hover-class='none'>驳回</u-button>
  161. <u-button @click='pass' type="success" class="btn2">通过</u-button>
  162. </view>
  163. </view>
  164. </template>
  165. <script>
  166. import helper from '@/common/helper.js';
  167. import {
  168. mapState
  169. } from 'vuex';
  170. export default {
  171. data() {
  172. return {
  173. src:'https://www.uviewui.com/index/banner_1920x1080.png',
  174. isSHowBtn: true,
  175. height: 200,
  176. autoHeight: true,
  177. border: false,
  178. title: '',
  179. show: false,
  180. auditMind: '',
  181. id: "",
  182. currentPage: 1,
  183. pageSize: 100,
  184. List: [],
  185. status: "",
  186. updateDate: "",
  187. warehouseName: "",
  188. everyCheck: ''
  189. }
  190. },
  191. onBackPress(e) {
  192. if (this.everyCheck) {
  193. uni.navigateTo({
  194. url: "/pages/task/my_task"
  195. })
  196. return true;
  197. }
  198. },
  199. onLoad(options) {
  200. this.vesselId = options.vesselId
  201. this.everyCheck = uni.getStorageSync("everyTask")
  202. this.isSHowBtn = options.isShowbtn
  203. },
  204. onShow(options) {
  205. this.getList()
  206. },
  207. computed: {
  208. ...mapState(['hasLogin', 'userInfo']),
  209. },
  210. methods: {
  211. getList() {
  212. // /workflow/query/workflowDefinitions
  213. // /workflow/query/workflowInfo
  214. this.$api.doRequest('post', '/paymentManagement/exportPhone', {
  215. warehouseName: this.vesselId,
  216. }).then(res1 => {
  217. if (res1.data.code == 200) {
  218. // this.List = res1.data.data.records
  219. }
  220. })
  221. },
  222. close() {
  223. this.show = false
  224. },
  225. pass() {
  226. this.show = true
  227. this.title = '审核意见(通过)'
  228. },
  229. reject() {
  230. this.show = true
  231. this.title = '驳回原因(驳回)'
  232. },
  233. //驳回
  234. rejectSubmit() {
  235. if (!this.auditMind) {
  236. this.$api.msg('驳回原因不能为空!')
  237. } else {
  238. var that = this
  239. that.show = false
  240. if (this.List.length > 0) {
  241. uni.showModal({
  242. content: "确定驳回付款申请?",
  243. showCancel: true,
  244. confirmText: '确定',
  245. success: function(res) {
  246. if (res.confirm) {
  247. that.audit(that.List[0], 0, false, '', '')
  248. }
  249. }
  250. })
  251. }
  252. }
  253. },
  254. //通過
  255. passSubmit() {
  256. var that = this
  257. if (this.title == '驳回原因(驳回)') {
  258. this.rejectSubmit()
  259. } else {
  260. var that = this
  261. this.show = false
  262. uni.showModal({
  263. content: "确定通过付款申请?",
  264. showCancel: true,
  265. confirmText: '确定',
  266. success: function(res) {
  267. if (res.confirm) {
  268. that.audit(that.List, 0, true)
  269. }
  270. }
  271. })
  272. }
  273. },
  274. audit(list, index, status, status2, reason) {
  275. uni.showLoading({
  276. title: "审核中"
  277. })
  278. if (this.List.length > 0) {
  279. if (status == true && item.status == "已驳回") {
  280. this.$api.doRequest('get', '/paymentManagement/api/openAuditFlow', {
  281. compId: "2710b21efc1e4393930c5dc800010dc4",
  282. id: item.id
  283. }).then(res => {
  284. if (res.data.code == 200) {
  285. this.audit(this.List[index + 1], index + 1, status, status2, reason)
  286. }
  287. })
  288. } else {
  289. for (var i = 0; i < this.List.length; i++) {
  290. this.$api.doRequest('post', '/workflow/api/handle', {
  291. taskId: this.List[i].taskId,
  292. approved: status,
  293. auditMind: this.auditMind ? this.auditMind : "",
  294. needReapply: status2 ? true : false
  295. }).then(res => {
  296. if (res.data.code == 200) {
  297. // this.audit(this.List[index + 1], index + 1, status, status2, reason)
  298. this.$api.msg('通过成功')
  299. }
  300. })
  301. }
  302. }
  303. } else {
  304. if (status == true) {
  305. this.$api.msg('通过成功')
  306. } else if (status == false) {
  307. this.$api.msg('驳回成功')
  308. }
  309. let that = this
  310. setTimeout(function() {
  311. if (that.everyCheck) {
  312. helper.setAudit(that.list)
  313. } else {
  314. uni.navigateBack()
  315. }
  316. uni.hideLoading()
  317. }, 1000);
  318. }
  319. },
  320. }
  321. }
  322. </script>
  323. <style scoped lang="scss">
  324. .warp {
  325. margin: 10rpx;
  326. padding: 20rpx 20rpx 240rpx 20rpx;
  327. }
  328. .content1 {
  329. font-size: 28rpx;
  330. color: #333333;
  331. margin-top: 30rpx;
  332. padding: 20rpx;
  333. // .content-item {
  334. border-radius: 20rpx;
  335. background: white;
  336. // padding: 40rpx 20rpx;
  337. // margin-bottom: 30rpx;
  338. // }
  339. // .title {
  340. // font-size: 32rpx;
  341. // font-weight: 600;
  342. // color: #333333;
  343. // margin: 30rpx 0;
  344. // }
  345. // .goodsInfoCss {
  346. // font-size: 28rpx;
  347. // font-weight: 600;
  348. // color: #878C9C;
  349. // margin: 26rpx 10rpx;
  350. // }
  351. // .priceCss {
  352. // font-size: 40rpx;
  353. // margin: 26rpx 10rpx;
  354. // color: #22C572;
  355. // font-weight: 600;
  356. // }
  357. .row {
  358. display: flex;
  359. justify-content: space-between;
  360. border-bottom: 1px solid #EEEEEE;
  361. padding:20rpx 0;
  362. .right,
  363. input {
  364. font-size: 28rpx;
  365. // color: #333333;
  366. }
  367. }
  368. }
  369. .content2{
  370. background: white;
  371. margin: 20rpx 0;
  372. border-radius: 20rpx;
  373. padding: 20rpx;
  374. .row{
  375. display: flex;
  376. justify-content: space-between;
  377. .left{
  378. display: flex;
  379. align-items: center;
  380. .item2{
  381. margin-left: 20rpx;
  382. .name{
  383. font-size: 32rpx;
  384. font-weight: 800;
  385. }
  386. .status{
  387. color: #6CC48C;
  388. }
  389. }
  390. }
  391. .right{
  392. color: #B0B1B5;
  393. }
  394. }
  395. .row-line{
  396. width: 1px;
  397. height: 30px;
  398. background: #F2F2F2;
  399. margin: 10rpx 50rpx;
  400. }
  401. }
  402. .bottom-btn {
  403. width: 100%;
  404. position: fixed;
  405. bottom: 0;
  406. display: flex;
  407. z-index: 2;
  408. left: 0;
  409. background-color: #f8f8f8;
  410. flex-direction: column;
  411. .btn1,
  412. .btn2 {
  413. width: 100%;
  414. margin-bottom: 26rpx;
  415. border-radius: 90rpx;
  416. }
  417. .btn1 {
  418. background: white;
  419. color: #00C265;
  420. }
  421. }
  422. .row1 {
  423. border-bottom: 0 !important;
  424. }
  425. .topInfo {
  426. height: 210rpx;
  427. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  428. padding: 30rpx;
  429. .topInfo-item {
  430. height: 150rpx;
  431. background-color: #FFFFFF;
  432. border-radius: 20rpx;
  433. padding: 40rpx;
  434. .logo {
  435. width: 40rpx;
  436. height: 40rpx;
  437. margin-top: 8rpx;
  438. }
  439. .infoText {
  440. font-size: 36rpx;
  441. font-weight: 600;
  442. margin-left: 20rpx;
  443. }
  444. .infoData {
  445. color: #878C9C;
  446. font-size: 26rpx;
  447. margin-top: 10rpx;
  448. }
  449. }
  450. }
  451. .shade {
  452. position: fixed;
  453. top: 0;
  454. left: 0;
  455. height: 100%;
  456. width: 100%;
  457. background: rgba(0, 0, 0, 0.4);
  458. z-index: 3;
  459. .wrap {
  460. position: absolute;
  461. left: 0;
  462. top: 0;
  463. right: 0;
  464. bottom: 0;
  465. margin: auto;
  466. background: #fff;
  467. width: calc(100% - 198rpx);
  468. height: 700rpx;
  469. border-radius: 20rpx;
  470. .alert-top {
  471. padding: 33rpx;
  472. display: flex;
  473. justify-content: center;
  474. align-items: center;
  475. position: relative;
  476. }
  477. .title {
  478. font-size: 32rpx;
  479. font-weight: 600;
  480. color: #333333;
  481. }
  482. .close {
  483. position: absolute;
  484. right: 33rpx;
  485. }
  486. }
  487. }
  488. .cancel,
  489. .confirm {
  490. position: absolute;
  491. display: inline-block;
  492. width: 50%;
  493. text-align: center;
  494. bottom: 0;
  495. padding: 10px;
  496. border-top: 1px solid #eee;
  497. font-size: 34rpx;
  498. }
  499. .cancel {
  500. left: 0;
  501. border-right: 1px solid #eee;
  502. color: #AFB3BF;
  503. }
  504. .confirm {
  505. right: 0;
  506. color: #22C572;
  507. }
  508. .u-textarea-style {
  509. margin: 20rpx;
  510. background: #F9F9FA;
  511. border-radius: 10px;
  512. border: 1px solid #EEEEEE;
  513. padding: 10rpx 20rpx;
  514. position: relative;
  515. .right-bottom {
  516. position: absolute;
  517. right: 20rpx;
  518. bottom: 20rpx;
  519. color: #AFB3BF;
  520. }
  521. }
  522. /deep/.u-input__textarea {
  523. height: 300rpx !important;
  524. }
  525. </style>