Step1.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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="请输入委托单位名称" :disabled="formDisabled"></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="请输入委托单位地址" :disabled="formDisabled"></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="请输入委托联系人" :disabled="formDisabled"></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="请输入委托电话" :disabled="formDisabled" ></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="请输入委托邮箱" :disabled="formDisabled" ></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="请选择报告形式" :disabled="formDisabled"
  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="请选择报告形式" :disabled="formDisabled"
  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="请输入特殊要求" :disabled="formDisabled"></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" :disabled="formDisabled"></j-upload>
  50. </a-form-model-item>
  51. </a-col>
  52. </a-row>
  53. <a-form-item class="buttonAll">
  54. <div class="all">
  55. <a-button type="primary" @click="nextStep" class="next">下一步</a-button>
  56. </div>
  57. </a-form-item>
  58. </a-form-model>
  59. </template>
  60. <script>
  61. import { httpAction, getAction } from '@api/manage'
  62. import { validateDuplicateValue } from '@/utils/util'
  63. export default {
  64. name: 'step1',
  65. props: {
  66. //表单禁用
  67. disabled: {
  68. type: Boolean,
  69. default: false,
  70. required: false
  71. }
  72. },
  73. components: {},
  74. data() {
  75. return {
  76. model: {},
  77. labelCol: {
  78. xs: { span: 24 },
  79. sm: { span: 5 }
  80. },
  81. wrapperCol: {
  82. xs: { span: 24 },
  83. sm: { span: 16 }
  84. },
  85. confirmLoading: false,
  86. validatorRules: {
  87. weituoClient: [
  88. { required: true, message: '请输入委托单位!' }
  89. ],
  90. weituoAddress: [
  91. { required: true, message: '请输入委托单位!' }
  92. ],
  93. weituoLxr: [
  94. { required: true, message: '请输入委托联系人!' }
  95. ],
  96. weituoPhone: [
  97. { required: true, message: '请输入委托电话!' }
  98. ],
  99. weituoEmail: [
  100. { required: true, message: '请输入委托邮箱!' }
  101. ],
  102. bgyz: [
  103. { required: true, message: '请输入报告用章!' }
  104. ],
  105. bgxs: [
  106. { required: true, message: '请输入报告形式!' }
  107. ],
  108. teshuyaoqiu: [
  109. { required: true, message: '请输入特殊要求!' }
  110. ]
  111. }
  112. }
  113. },
  114. created() {
  115. },
  116. computed: {
  117. formDisabled(){
  118. return this.disabled
  119. },
  120. },
  121. methods: {
  122. init() {
  123. const data = JSON.parse(sessionStorage.getItem('data'))
  124. if (data != null) {
  125. this.model = data
  126. }
  127. },
  128. nextStep() {
  129. const data = {
  130. weituoClient: this.model.weituoClient,
  131. weituoAddress: this.model.weituoAddress,
  132. weituoLxr: this.model.weituoLxr,
  133. weituoPhone: this.model.weituoPhone,
  134. weituoEmail: this.model.weituoEmail,
  135. bgyz: this.model.bgyz,
  136. bgxs: this.model.bgxs,
  137. teshuyaoqiu: this.model.teshuyaoqiu,
  138. tiaojianFile: this.model.tiaojianFile
  139. }
  140. sessionStorage.setItem('data', JSON.stringify(data))
  141. this.$emit('nextStep')
  142. // this.$refs.form.validate(valid => {
  143. //
  144. // if(valid){
  145. // }
  146. // })
  147. }
  148. }
  149. }
  150. </script>
  151. <style scoped>
  152. .next{
  153. width: 35%;
  154. margin-left: 20px;
  155. margin-right: 20px;
  156. margin-top: 20px;
  157. }
  158. .buttonAll{
  159. width: 100%;
  160. align-items: center;
  161. justify-content: center;
  162. }
  163. .all{
  164. width: 100%;
  165. display: flex;
  166. align-items: center;
  167. justify-content: center;
  168. }
  169. </style>