acquisition_settlement_approval.vue 4.5 KB

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