Step1.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  3. <a-row>
  4. <a-col :span="24">
  5. <a-form-model-item label="委托单位名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weituoClient">
  6. <a-input v-model="model.weituoClient" placeholder="请输入委托单位名称"></a-input>
  7. </a-form-model-item>
  8. </a-col>
  9. <a-col :span="24">
  10. <a-form-model-item label="委托单位地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weituoAddress">
  11. <a-input v-model="model.weituoAddress" placeholder="请输入委托单位地址"></a-input>
  12. </a-form-model-item>
  13. </a-col>
  14. <a-col :span="24">
  15. <a-form-model-item label="委托联系人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weituoLxr">
  16. <a-input v-model="model.weituoLxr" placeholder="请输入委托联系人"></a-input>
  17. </a-form-model-item>
  18. </a-col>
  19. <a-col :span="24">
  20. <a-form-model-item label="委托电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weituoPhone">
  21. <a-input v-model="model.weituoPhone" placeholder="请输入委托电话"></a-input>
  22. </a-form-model-item>
  23. </a-col>
  24. <a-col :span="24">
  25. <a-form-model-item label="委托邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weituoEmail">
  26. <a-input v-model="model.weituoEmail" placeholder="请输入委托邮箱"></a-input>
  27. </a-form-model-item>
  28. </a-col>
  29. <a-col :span="24">
  30. <a-form-model-item label="报告用章" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bgyz">
  31. <j-dict-select-tag v-model="model.bgyz" placeholder="请选择报告形式"
  32. dictCode="weituo.bgyz" />
  33. </a-form-model-item>
  34. </a-col>
  35. <a-col :span="24">
  36. <a-form-model-item label="报告形式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bgxs">
  37. <j-dict-select-tag v-model="model.bgxs" placeholder="请选择报告形式"
  38. dictCode="weituo.bgxs" />
  39. </a-form-model-item>
  40. </a-col>
  41. <a-col :span="24">
  42. <a-form-model-item label="特殊要求" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="teshuyaoqiu">
  43. <a-textarea v-model="model.teshuyaoqiu" placeholder="请输入特殊要求"></a-textarea>
  44. </a-form-model-item>
  45. </a-col>
  46. <a-col :span="24">
  47. <a-form-model-item label="试验条件文件地址" :labelCol="labelCol" :wrapperCol="wrapperCol"
  48. prop="tiaojianFile">
  49. <j-upload v-model="model.tiaojianFile"></j-upload>
  50. </a-form-model-item>
  51. </a-col>
  52. </a-row>
  53. <a-form-item :wrapperCol="{span: 19, offset: 5}">
  54. <a-button type="primary" @click="nextStep">下一步</a-button>
  55. </a-form-item>
  56. </a-form-model>
  57. </template>
  58. <script>
  59. import { httpAction, getAction } from '@api/manage'
  60. import { validateDuplicateValue } from '@/utils/util'
  61. export default {
  62. name: 'step1',
  63. components: {},
  64. data() {
  65. return {
  66. model: {},
  67. labelCol: {
  68. xs: { span: 24 },
  69. sm: { span: 5 }
  70. },
  71. wrapperCol: {
  72. xs: { span: 24 },
  73. sm: { span: 16 }
  74. },
  75. confirmLoading: false,
  76. validatorRules: {
  77. weituoClient: [
  78. { required: true, message: '请输入委托单位!' }
  79. ],
  80. weituoAddress: [
  81. { required: true, message: '请输入委托单位!' }
  82. ],
  83. weituoLxr: [
  84. { required: true, message: '请输入委托联系人!' }
  85. ],
  86. weituoPhone: [
  87. { required: true, message: '请输入委托电话!' }
  88. ],
  89. weituoEmail: [
  90. { required: true, message: '请输入委托邮箱!' }
  91. ],
  92. bgyz: [
  93. { required: true, message: '请输入报告用章!' }
  94. ],
  95. bgxs: [
  96. { required: true, message: '请输入报告形式!' }
  97. ],
  98. teshuyaoqiu: [
  99. { required: true, message: '请输入特殊要求!' }
  100. ]
  101. }
  102. }
  103. },
  104. created() {
  105. },
  106. methods: {
  107. init() {
  108. const data = JSON.parse(sessionStorage.getItem('data'))
  109. if (data != null) {
  110. this.model = data
  111. }
  112. },
  113. nextStep() {
  114. const data = {
  115. weituoClient: this.model.weituoClient,
  116. weituoAddress: this.model.weituoAddress,
  117. weituoLxr: this.model.weituoLxr,
  118. weituoPhone: this.model.weituoPhone,
  119. weituoEmail: this.model.weituoEmail,
  120. bgyz: this.model.bgyz,
  121. bgxs: this.model.bgxs,
  122. teshuyaoqiu: this.model.teshuyaoqiu,
  123. tiaojianFile: this.model.tiaojianFile
  124. }
  125. sessionStorage.setItem('data', JSON.stringify(data))
  126. this.$emit('nextStep')
  127. // this.$refs.form.validate(valid => {
  128. //
  129. // if(valid){
  130. // }
  131. // })
  132. }
  133. }
  134. }
  135. </script>