InsuranceContractForm.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <div>
  3. <zj-form-container ref="formRef" :formData="formData" :formRules="formRules">
  4. <zj-form-module title="基础信息" label-width="110px" :formData="formData" :formItems="formItems" :column="3">
  5. </zj-form-module>
  6. </zj-form-container>
  7. <div v-if="type === 0 || type === 1" style="text-align: right">
  8. <!-- <el-button size="mini" @click="submit">确定</el-button>
  9. <el-button size="mini" @click="reset">重置</el-button> -->
  10. </div>
  11. </div>
  12. </template>
  13. <script>
  14. import { workerApplyDetail } from '@/api/difficultyExpenseApproval.js'
  15. import { dateFormat } from '@/utils/util'
  16. import pagingTransfer from '@/components/paging-transfer.vue'
  17. import { EventBus } from '@/utils/eventBus'
  18. import { required } from '@/components/template/rules_verify.js'
  19. import { getWebsit } from '@/api/customerManagement.js'
  20. export default {
  21. props: {
  22. type: {
  23. type: Number,
  24. default: null
  25. },
  26. item: {
  27. type: Object,
  28. default: null
  29. }
  30. },
  31. data() {
  32. return {
  33. disabled: this.type === 2,
  34. formData: {},
  35. formRules: {}
  36. }
  37. },
  38. computed: {
  39. formItems() {
  40. return []
  41. }
  42. },
  43. created() {
  44. // 获取详情
  45. if (this.type !== 0) {
  46. workerApplyDetail({
  47. id: this.item.id
  48. }).then(res => {
  49. this.formData = { ...res.data }
  50. })
  51. }
  52. },
  53. methods: {
  54. submit() {
  55. this.$refs['formRef'].validate(valid => {
  56. if (valid) {
  57. } else {
  58. console.log('error submit!!')
  59. return false
  60. }
  61. })
  62. },
  63. reset() {
  64. Object.assign(this.$data, this.$options.data())
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang="scss" scoped></style>