acquisition_settlement_details.vue 5.9 KB

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