PayOrRefundModal.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <j-modal
  3. :title="title"
  4. :width="width"
  5. :visible="visible"
  6. switchFullscreen
  7. @ok="handleOk"
  8. :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
  9. @cancel="handleCancel"
  10. cancelText="关闭"
  11. >
  12. <pay-or-refund
  13. ref="realForm"
  14. @ok="submitCallback"
  15. :disabled="disableSubmit"
  16. :showYinshou="showYinshou"
  17. ></pay-or-refund>
  18. </j-modal>
  19. </template>
  20. <script>
  21. import PayOrRefund from '@views/room/modules/checkIn/PayOrRefund'
  22. export default {
  23. name: 'PayOrRefundModal',
  24. components: {
  25. PayOrRefund,
  26. },
  27. data() {
  28. return {
  29. title: "",
  30. width: 1000,
  31. visible: false,
  32. disableSubmit: false,
  33. showYinshou: true,
  34. //是退款
  35. isRefund:false,
  36. };
  37. },
  38. methods: {
  39. add(record) {
  40. this.visible = true;
  41. this.$nextTick(() => {
  42. this.$refs.realForm.add(record);
  43. });
  44. },
  45. edit(record) {
  46. this.visible = true;
  47. this.$nextTick(() => {
  48. this.$refs.realForm.edit(record);
  49. });
  50. },
  51. close() {
  52. this.$emit("close");
  53. this.visible = false;
  54. },
  55. handleOk() {
  56. this.$refs.realForm.submitForm();
  57. },
  58. submitCallback() {
  59. this.$emit("ok");
  60. this.visible = false;
  61. },
  62. handleCancel() {
  63. this.close();
  64. },
  65. },
  66. };
  67. </script>