AfterReson.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <u-popup :show="value" :round="10" mode="bottom" @close="close">
  3. <view class="pop-content">
  4. <view class="text-center ">
  5. <text class="color-3 fw700 fs18">请选择原因</text>
  6. <view class="float-right" @click="close">
  7. <u-icon name="close" color="#8E8E8E" size="30"></u-icon>
  8. </view>
  9. </view>
  10. <view class="fs12 color-9 mb30 mt5">
  11. 订单一旦取消,无法恢复,金额/积分将原路返还
  12. </view>
  13. <view class="list-box">
  14. <u-radio-group iconPlacement="right" activeColor="#F39800" v-model="checkedReason" placement="column">
  15. <u-radio :customStyle="{marginBottom: '20px'}" v-for="(item, index) in reasonList" :key="index"
  16. :label="item" :name="item">
  17. </u-radio>
  18. </u-radio-group>
  19. </view>
  20. <view class="common-btn" @click="submit">提交</view>
  21. </view>
  22. </u-popup>
  23. </template>
  24. <script>
  25. export default {
  26. name: "AfterReson",
  27. props: {
  28. value: {
  29. type: Boolean,
  30. default: true
  31. },
  32. dictId: {
  33. type: [String, Number],
  34. default: 15
  35. }
  36. },
  37. data() {
  38. return {
  39. show: false,
  40. checkedReason: '',
  41. reasonList: [],
  42. };
  43. },
  44. watch: {
  45. value(nv) {
  46. if (nv) {
  47. this.getReasonList()
  48. }
  49. // this.show = this.showFlag
  50. }
  51. },
  52. // mounted() {
  53. // this.getReasonList()
  54. // },
  55. methods: {
  56. close() {
  57. this.$emit('input', false)
  58. },
  59. submit() {
  60. this.$emit('input', false)
  61. this.$emit('confirm', this.checkedReason)
  62. },
  63. getReasonList() {
  64. this.$api.getConfigData({ dict_id: this.dictId }).then(res => {
  65. this.reasonList = res.data
  66. })
  67. }
  68. }
  69. }
  70. </script>
  71. <style lang="scss" scoped>
  72. .pop-content {
  73. padding: 36rpx;
  74. }
  75. </style>