acquisition_settlement_details.vue 6.0 KB

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