confirmPayment.vue 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <view class="conent">
  3. <view class="assignrbitrators">
  4. <uni-forms ref="form" :modelValue="formData" :rules="rules">
  5. <uni-forms-item label="案件编号:" name="caseNum" label-width="80px">
  6. <uni-easyinput v-model="formData.caseNum" type="text" :disabled='true' placeholder="请输入案件编号" />
  7. </uni-forms-item>
  8. <!-- <uni-forms-item label="案件标的:" name="caseSubjectAmount" label-width="80px">
  9. <uni-easyinput v-model="formData.caseSubjectAmount" type="text" :disabled='true' placeholder="请输入案件标的" />
  10. </uni-forms-item> -->
  11. <uni-forms-item label="缴费金额:" name="feePayable" label-width="80px">
  12. <uni-easyinput v-model="formData.feePayable" type="text" :disabled='true' placeholder="请输入缴费金额" />
  13. </uni-forms-item>
  14. <uni-forms-item label="申请人缴费:" name="feePayable" label-width="90px" v-if="annexTypeS">
  15. <view v-for="item in formData.caseAttachList">
  16. <uni-link v-if="item.annexType==4" :href="item.annexPath" color="#007BFF"
  17. :text="item.annexName"></uni-link>
  18. </view>
  19. </uni-forms-item>
  20. <uni-forms-item label="被申请人缴费:" name="feePayable" label-width="100px" v-if="annexTypeB">
  21. <view v-for="item in formData.resCaseAttachList">
  22. <uni-link v-if="item.annexType==9" :href="item.annexPath" color="#007BFF"
  23. :text="item.annexName"></uni-link>
  24. </view>
  25. </uni-forms-item>
  26. <uni-forms-item label="是否缴费通过" label-width="120px" name="yesOrNo">
  27. <uni-data-checkbox class='checkbox' :localdata="yesOrNoObject" v-model="yesOrNo"
  28. @change='clearValidate'></uni-data-checkbox>
  29. </uni-forms-item>
  30. <uni-forms-item label="驳回原因:" name="reason" label-width="120px" required v-if="refusedisabled"
  31. :rules="[{required: true,errorMessage: '驳回原因不能为空'}]"
  32. >
  33. <uni-easyinput v-model="formData.reason" type="textarea" placeholder="请输入驳回原因" />
  34. </uni-forms-item>
  35. </uni-forms>
  36. <view class="determine" style="text-align: center;">
  37. <button class="mini-btn"
  38. type="primary" size="mini"
  39. @tap="confirmPayment">确认</button>
  40. <button style="margin-left:30rpx;" class="mini-btn"
  41. type="default" size="mini"
  42. @tap="cencalBut">取消</button>
  43. </view>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. import {
  49. selectPaymentDetail,
  50. confirmPaid,
  51. resConfirmPaid
  52. } from '../../../api/handlecase/index.js'
  53. export default {
  54. data() {
  55. return {
  56. yesOrNo: 1,
  57. formData: {
  58. reason: ""
  59. },
  60. rules: {},
  61. paymentConfirm: {},
  62. annexTypeS: false,
  63. annexTypeB: false,
  64. yesOrNoObject: [{
  65. text: '同意',
  66. value: 1
  67. }, {
  68. text: '拒绝',
  69. value: 0
  70. }],
  71. refusedisabled: false
  72. }
  73. },
  74. methods:{
  75. confirmPayment(){
  76. this.$refs.form.validate().then(res=>{
  77. if(this.paymentConfirm.caseFlowId==3){
  78. this.confirmPaymentApplicant()
  79. }else if(this.paymentConfirm.caseFlowId==45){
  80. this.confirmPaymentRespondent()
  81. }
  82. console.log(this.paymentConfirm.caseFlowId)
  83. }).catch(err =>{
  84. })
  85. },
  86. // 申请人确认缴费
  87. confirmPaymentApplicant() {
  88. let vals = {
  89. caseId: this.paymentConfirm.id,
  90. batchNumber: "",
  91. caseFlowId: this.paymentConfirm.caseFlowId,
  92. yesOrNo: this.yesOrNo,
  93. reason: this.formData.reason
  94. }
  95. confirmPaid(vals).then(res => {
  96. uni.showToast({
  97. title: '申请人缴费确认成功',
  98. icon: 'none',
  99. duration: 1000
  100. })
  101. uni.navigateTo({
  102. url:'/pages/handlecase/index'
  103. })
  104. })
  105. },
  106. // 被申请人缴费确认
  107. confirmPaymentRespondent() {
  108. let vals = {
  109. caseId: this.paymentConfirm.id,
  110. batchNumber: "",
  111. caseFlowId: this.paymentConfirm.caseFlowId,
  112. yesOrNo: this.yesOrNo,
  113. reason: this.formData.reason
  114. }
  115. resConfirmPaid(vals).then(res => {
  116. uni.showToast({
  117. title: '被申请人缴费确认成功',
  118. icon: 'none',
  119. duration: 1000
  120. })
  121. uni.navigateTo({
  122. url:'/pages/handlecase/index'
  123. })
  124. })
  125. },
  126. // 缴费详情
  127. paymentDetails(val) {
  128. selectPaymentDetail(val).then(res => {
  129. this.formData = res.data;
  130. this.formData.caseAttachList.forEach(res => {
  131. if (res.annexType == 4) {
  132. this.annexTypeS = true
  133. }
  134. })
  135. this.formData.resCaseAttachList.forEach(res => {
  136. if (res.annexType == 9) {
  137. this.annexTypeB = true
  138. }
  139. })
  140. })
  141. },
  142. clearValidate(val) {
  143. this.yesOrNo = val.detail.value
  144. if (val.detail.value == 0) {
  145. this.refusedisabled = true
  146. } else {
  147. this.refusedisabled = false
  148. }
  149. }
  150. },
  151. onLoad(data) {
  152. this.paymentConfirm = data
  153. this.paymentDetails({
  154. id: data.id
  155. })
  156. }
  157. }
  158. </script>
  159. <style lang="scss">
  160. page {
  161. background-color: #ffffff;
  162. }
  163. .assignrbitrators {
  164. margin: 30rpx;
  165. }
  166. </style>