acquisition_settlement_approval.vue 6.1 KB

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