FeeModal.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. <bus-member-card-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :livingOrderId="livingOrderId"></bus-member-card-form>
  12. </j-modal>
  13. </template>
  14. <script>
  15. import BusMemberCardForm from './FeeForm'
  16. export default {
  17. name: 'BusMemberCardModal',
  18. components: {
  19. BusMemberCardForm
  20. },
  21. data () {
  22. return {
  23. title:'',
  24. width:1200,
  25. visible: false,
  26. disableSubmit: false,
  27. livingOrderId:''
  28. }
  29. },
  30. methods: {
  31. add (livingOrderId,roomId) {
  32. this.visible=true
  33. this.$nextTick(()=>{
  34. this.$refs.realForm.add(livingOrderId,roomId);
  35. })
  36. },
  37. edit (record) {
  38. this.visible=true
  39. this.$nextTick(()=>{
  40. this.$refs.realForm.edit(record);
  41. })
  42. },
  43. close () {
  44. this.$emit('close');
  45. this.visible = false;
  46. },
  47. handleOk () {
  48. this.$refs.realForm.submitForm();
  49. },
  50. submitCallback(){
  51. this.$emit('ok');
  52. this.visible = false;
  53. },
  54. handleCancel () {
  55. this.close()
  56. }
  57. }
  58. }
  59. </script>