acquisition_settlement_approval.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <template>
  2. <view class="warp">
  3. <view class='content1'>
  4. <view class='row'>
  5. <view class="left">仓库</view>
  6. <view class="right">鲅鱼圈一号库</view>
  7. </view>
  8. <view v-for="(item,index) in List">
  9. <view class='row row1'>
  10. <view class="left">{{item.paymentNo}}</view>
  11. <view class="right">{{item.carNo}}</view>
  12. </view>
  13. <view class='row'>
  14. <view class="left">{{item.goodsName}}({{item.netWeight}} - {{item.tidalGrainPrice}})</view>
  15. <view class="right">{{item.amountIngPayable}}</view>
  16. </view>
  17. </view>
  18. </view>
  19. <u-toast ref="uToast" />
  20. <view class="bottom-btn">
  21. <u-button type="primary" class="submit" hover-class="none" @click="rejectSubmit()">驳回</u-button>
  22. <u-button type="primary" class="submit" hover-class="none" @click="passSubmit()">通过</u-button>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import {
  28. mapState
  29. } from 'vuex';
  30. export default {
  31. data() {
  32. return {
  33. id: "",
  34. currentPage: 1,
  35. pageSize: 10,
  36. List: [],
  37. }
  38. },
  39. onLoad(options) {
  40. this.id = options.id
  41. },
  42. onShow(options) {
  43. this.getList()
  44. },
  45. computed: {
  46. ...mapState(['hasLogin', 'userInfo']),
  47. },
  48. methods: {
  49. getList() {
  50. // this.$api.doRequest('get', '/stockPurchaseReceiptReport/getInfo', {
  51. // id:this.id
  52. // }).then(res => {
  53. // if (res.data.code == 200) {
  54. // console.log("hdshfuiehfiuo",res)
  55. // }
  56. // })
  57. this.$api.doRequest('get', '/paymentManagement/selectPaymentManagement', {
  58. currentPage: this.currentPage,
  59. pageSize: this.pageSize,
  60. // warehouseName: this.warehouseName,
  61. managementType: 1
  62. }).then(res => {
  63. if (res.data.code == 200) {
  64. this.List = res.data.data.records
  65. }
  66. })
  67. },
  68. //駁回
  69. rejectSubmit() {
  70. if(this.List.length > 0){
  71. uni.showModal({
  72. content: "确定驳回付款申请?",
  73. success(res) {
  74. // this.$api.doRequest('get', '/paymentManagement/api/openAuditFlow', {
  75. // compId: "2710b21efc1e4393930c5dc800010dc4",
  76. // id: item.id
  77. // }).then(res => {
  78. // if (res.data.code == 200) {
  79. // this.List = res.data.data.records
  80. // }
  81. // })
  82. this.audit(this.List[0], 0, false, '', '')
  83. }
  84. })
  85. }
  86. },
  87. //通過
  88. passSubmit() {
  89. if(this.List.length > 0){
  90. uni.showModal({
  91. content: "确定通过付款申请?",
  92. success(res) {
  93. this.audit(this.List[0], 0, true)
  94. }
  95. })
  96. }
  97. },
  98. audit(item, index, status, status2, reason) {
  99. if (this.List.length > 0) {
  100. if (status == true && item.status == "已驳回") {
  101. this.$api.doRequest('get', '/paymentManagement/api/openAuditFlow', {
  102. compId: "2710b21efc1e4393930c5dc800010dc4",
  103. id: item.id
  104. }).then(res => {
  105. if (res.data.code == 200) {
  106. this.audit(this.List[index + 1], index + 1, status, status2, reason)
  107. }
  108. })
  109. } else {
  110. this.$api.doRequest('get', '/workflow/api/handle', {
  111. taskId: item.taskId,
  112. approved: status,
  113. auditMind: reason != undefined ? '已驳回' : '34',
  114. needReapply: status2 != undefined ? true : false
  115. }).then(res => {
  116. if (res.data.code == 200) {
  117. this.audit(this.List[index + 1], index + 1, status, status2, reason)
  118. }
  119. })
  120. }
  121. } else {
  122. if (status == true) {
  123. this.$message.success('通过成功')
  124. this.getList()
  125. } else if (status == false) {
  126. this.$message.success('驳回成功')
  127. this.getList()
  128. }
  129. }
  130. },
  131. }
  132. }
  133. </script>
  134. <style scoped lang="scss">
  135. .warp {
  136. margin: 10rpx;
  137. padding: 20rpx 20rpx 140rpx 20rpx;
  138. }
  139. .content1,
  140. .content2 {
  141. border-radius: 20rpx;
  142. background: white;
  143. padding: 20rpx;
  144. .title {
  145. font-size: 28rpx;
  146. font-weight: 600;
  147. color: #333333;
  148. text-align: center;
  149. }
  150. .row {
  151. display: flex;
  152. justify-content: space-between;
  153. border-bottom: 1px solid #EEEEEE;
  154. padding: 21rpx 0;
  155. .right,
  156. input {
  157. font-size: 28rpx;
  158. color: #333333;
  159. }
  160. }
  161. }
  162. .content2 {
  163. margin-top: 20rpx;
  164. }
  165. .bottom-btn {
  166. width: 92%;
  167. position: fixed;
  168. bottom: 40rpx;
  169. display: flex;
  170. z-index: 2;
  171. }
  172. .submit {
  173. width: 40%;
  174. background: #22C572;
  175. border-radius: 10rpx;
  176. }
  177. .row1 {
  178. border-bottom: 0 !important;
  179. }
  180. </style>