ReturnFromDetails.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <view class="detail-view">
  3. <u-form label-width="150" :model="form" ref="uForm">
  4. <view class="form-model-view">
  5. <u-form-item label="退款单位">
  6. <view class="form-value">{{ detail_data.unitName }}</view>
  7. </u-form-item>
  8. <u-form-item label="业务类型">
  9. <view class="form-value">{{ detail_data.financeType }}</view>
  10. </u-form-item>
  11. <u-form-item label="所属店铺">
  12. <view class="form-value">{{ detail_data.shopName }}</view>
  13. </u-form-item>
  14. <u-form-item label="制单人">
  15. <view class="form-value">{{ detail_data.currentAccountName }}</view>
  16. </u-form-item>
  17. <u-form-item label="单据日期">
  18. <view class="form-value">{{ $u.timeFormat(detail_data.createTime, 'yyyy-mm-dd') }}</view>
  19. </u-form-item>
  20. <u-form-item label="单据状态">
  21. <view class="form-value">
  22. <text class="success-status" v-if="detail_data.auditStatus === 2">已审核</text>
  23. <text class="warning-status" v-else>待审核</text>
  24. </view>
  25. </u-form-item>
  26. </view>
  27. <view class="detail-ul">
  28. <view class="detail-li" v-for="(item,index) in detail_data.accountList" :key="index">
  29. <view class="other-ul">
  30. <view class="other-li">结算账户:{{ item.accountName || '--' }}</view>
  31. <!-- <view class="other-li">退款方式:{{ item.accountName||'--' }}</view> -->
  32. <view class="other-li">
  33. 实际退款金额:
  34. <text class="money">{{ $utils.formattedNumber(item.money) }}</text>
  35. </view>
  36. </view>
  37. <view class="remark">备注:{{ item.remark || '无' }}</view>
  38. </view>
  39. </view>
  40. </u-form>
  41. <view class="detail-bottom" v-if="detail_data.auditStatus !== 2 && $accessCheck($Access.RefundFormupdateRefundStatus)">
  42. <view class="handel-btn" @click="openModel('确定要审核通过该退款单吗?', '审核')">审核</view>
  43. </view>
  44. <u-modal v-model="model_show" :show-cancel-button="true" :content="model_content" @confirm="modelConfirm" @cancel="modelCancel"></u-modal>
  45. </view>
  46. </template>
  47. <script>
  48. export default {
  49. data() {
  50. return {
  51. model_tag: '',
  52. model_show: false,
  53. model_content: '',
  54. createTime: '',
  55. id: '',
  56. detail_data: []
  57. };
  58. },
  59. onLoad(options) {
  60. this.id = options.id;
  61. this.createTime = options.createTime;
  62. },
  63. onShow() {
  64. this.getRefundInfo();
  65. },
  66. onPullDownRefresh() {
  67. this.getRefundInfo();
  68. },
  69. methods: {
  70. getRefundInfo() {
  71. this.$u.api
  72. .getRefundInfo({
  73. id: this.id,
  74. createTime: this.createTime
  75. })
  76. .then(res => {
  77. this.detail_data = res.data;
  78. });
  79. },
  80. // 打开提示框
  81. openModel(content, tag) {
  82. this.model_content = content;
  83. this.model_show = true;
  84. this.model_tag = tag;
  85. },
  86. modelConfirm() {
  87. switch (this.model_tag) {
  88. case '审核':
  89. this.updateRefundStatus();
  90. break;
  91. }
  92. },
  93. updateRefundStatus() {
  94. this.$u.api
  95. .updateRefundStatus({
  96. id: this.id,
  97. createTime: this.detail_data.createTime
  98. })
  99. .then(res => {
  100. this.$u.toast('操作成功');
  101. this.getRefundInfo();
  102. });
  103. }
  104. }
  105. };
  106. </script>
  107. <style lang="scss">
  108. .detail-ul {
  109. .detail-li {
  110. width: 710rpx;
  111. margin: 20rpx auto;
  112. background-color: #ffffff;
  113. border-radius: 20rpx;
  114. padding: 20rpx 24rpx;
  115. .title {
  116. font-weight: bold;
  117. }
  118. .other-ul {
  119. // display: flex;
  120. padding-top: 20rpx;
  121. .other-li {
  122. // flex: 3;
  123. font-size: 24rpx;
  124. line-height: 40rpx;
  125. // text-align: center;
  126. .money {
  127. font-size: 28rpx;
  128. font-weight: bold;
  129. color: $uni-color-error;
  130. }
  131. &:first-child {
  132. text-align: left;
  133. }
  134. &:last-child {
  135. // text-align: right;
  136. }
  137. }
  138. }
  139. .remark {
  140. border-top: 1px solid #eeeeee;
  141. padding-top: 20rpx;
  142. margin-top: 20rpx;
  143. }
  144. }
  145. }
  146. </style>