acquisition_settlement_approval.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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="list.priceStatus == '已驳回'"
  8. style="height: 40rpx;"></image><!-- 驳回 -->
  9. <image src="../../../static/img/tongguo.png" mode="" v-if="list.priceStatus == '已通过'"
  10. style="height: 40rpx;"></image><!-- 通过 -->
  11. <image src="../../../static/img/daishenhe.png" mode="" v-if="list.priceStatus == '审核中'"
  12. style="height: 40rpx;"></image><!-- 待审核 -->
  13. </view>
  14. <view class="infoText">{{list.priceStatus}}</view>
  15. </view>
  16. <view class="infoData">2020年1月15日 08:45</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">鲅鱼圈一号库</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. <u-toast ref="uToast" />
  39. <view style='padding:10px;' class='flex bottom-btn'>
  40. <u-button @click='rejectSubmit()' type="error" class="btn1" hover-class='none'>驳回</u-button>
  41. <u-button @click='passSubmit()' type="success" class="btn2">通过</u-button>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. import {
  47. mapState
  48. } from 'vuex';
  49. export default {
  50. data() {
  51. return {
  52. id: "",
  53. currentPage: 1,
  54. pageSize: 10,
  55. List: [],
  56. }
  57. },
  58. onLoad(options) {
  59. this.id = options.id
  60. },
  61. onShow(options) {
  62. this.getList()
  63. },
  64. computed: {
  65. ...mapState(['hasLogin', 'userInfo']),
  66. },
  67. methods: {
  68. getList() {
  69. // this.$api.doRequest('get', '/stockPurchaseReceiptReport/getInfo', {
  70. // id:this.id
  71. // }).then(res => {
  72. // if (res.data.code == 200) {
  73. // console.log("hdshfuiehfiuo",res)
  74. // }
  75. // })
  76. this.$api.doRequest('get', '/paymentManagement/selectPaymentManagement', {
  77. currentPage: this.currentPage,
  78. pageSize: this.pageSize,
  79. // warehouseName: this.warehouseName,
  80. managementType: 1
  81. }).then(res => {
  82. if (res.data.code == 200) {
  83. this.List = res.data.data.records
  84. }
  85. })
  86. },
  87. //驳回
  88. rejectSubmit() {
  89. var that = this
  90. if (this.List.length > 0) {
  91. uni.showModal({
  92. content: "确定驳回付款申请?",
  93. showCancel: true,
  94. confirmText: '确定',
  95. success: function(res) {
  96. if (res.confirm) {
  97. that.audit(that.List[0], 0, false, '', '')
  98. }
  99. }
  100. })
  101. }
  102. },
  103. //通過
  104. passSubmit() {
  105. var that = this
  106. uni.showModal({
  107. content: "确定通过付款申请?",
  108. showCancel: true,
  109. confirmText: '确定',
  110. success: function(res) {
  111. if (res.confirm) {
  112. that.audit(that.List[0], 0, true)
  113. }
  114. }
  115. })
  116. },
  117. audit(item, index, status, status2, reason) {
  118. if (this.List.length > 0) {
  119. if (status == true && item.status == "已驳回") {
  120. this.$api.doRequest('get', '/paymentManagement/api/openAuditFlow', {
  121. compId: "2710b21efc1e4393930c5dc800010dc4",
  122. id: item.id
  123. }).then(res => {
  124. if (res.data.code == 200) {
  125. this.audit(this.List[index + 1], index + 1, status, status2, reason)
  126. }
  127. })
  128. } else {
  129. this.$api.doRequest('get', '/workflow/api/handle', {
  130. taskId: item.taskId,
  131. approved: status,
  132. auditMind: reason ? '已驳回' : '34',
  133. needReapply: status2 ? true : false
  134. }).then(res => {
  135. if (res.data.code == 200) {
  136. this.audit(this.List[index + 1], index + 1, status, status2, reason)
  137. }
  138. })
  139. }
  140. } else {
  141. if (status == true) {
  142. that.$api.msg('通过成功')
  143. this.getList()
  144. } else if (status == false) {
  145. that.$api.msg('驳回成功')
  146. this.getList()
  147. }
  148. }
  149. },
  150. }
  151. }
  152. </script>
  153. <style scoped lang="scss">
  154. .warp {
  155. margin: 10rpx;
  156. padding: 20rpx 20rpx 200rpx 20rpx;
  157. }
  158. .content1 {
  159. .content-item {
  160. border-radius: 20rpx;
  161. background: white;
  162. padding: 40rpx 20rpx;
  163. margin-bottom: 30rpx;
  164. }
  165. .title {
  166. font-size: 32rpx;
  167. font-weight: 600;
  168. color: #333333;
  169. margin: 30rpx 0;
  170. }
  171. .goodsInfoCss {
  172. font-size: 28rpx;
  173. font-weight: 600;
  174. color: #878C9C;
  175. margin: 26rpx 10rpx;
  176. }
  177. .priceCss {
  178. font-size: 40rpx;
  179. margin: 26rpx 10rpx;
  180. color: #22C572;
  181. font-weight: 600;
  182. }
  183. .row {
  184. display: flex;
  185. justify-content: space-between;
  186. border-bottom: 1px solid #EEEEEE;
  187. .right,
  188. input {
  189. font-size: 28rpx;
  190. // color: #333333;
  191. }
  192. }
  193. }
  194. .bottom-btn {
  195. width: 100%;
  196. position: fixed;
  197. bottom: 0;
  198. display: flex;
  199. z-index: 2;
  200. left: 0;
  201. background-color: #f8f8f8;
  202. flex-direction: column;
  203. .btn1,
  204. .btn2 {
  205. width: 100%;
  206. margin-bottom: 26rpx;
  207. border-radius: 90rpx;
  208. }
  209. .btn1 {
  210. background: white;
  211. color: #00C265;
  212. }
  213. }
  214. .row1 {
  215. border-bottom: 0 !important;
  216. }
  217. .topInfo {
  218. height: 210rpx;
  219. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  220. padding: 30rpx;
  221. .topInfo-item {
  222. height: 150rpx;
  223. background-color: #FFFFFF;
  224. border-radius: 20rpx;
  225. padding: 40rpx;
  226. .logo {
  227. width: 40rpx;
  228. height: 40rpx;
  229. margin-top: 8rpx;
  230. }
  231. .infoText {
  232. font-size: 36rpx;
  233. font-weight: 600;
  234. margin-left: 20rpx;
  235. }
  236. .infoData {
  237. color: #878C9C;
  238. font-size: 26rpx;
  239. margin-top: 10rpx;
  240. }
  241. }
  242. }
  243. </style>