华西海圻ELN前端工程
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
5.2 KiB

  1. <template>
  2. <div>
  3. <!-- 处置试剂弹窗 -->
  4. <el-dialog :title="$t('page.business.resource.sj.cz')" :visible.sync="open" width="500px" append-to-body
  5. :close-on-click-modal="false">
  6. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  7. <template>
  8. <el-row>
  9. <el-col :span="24">
  10. <el-form-item :label="$t('page.business.resource.sj.mc')" prop="mc">
  11. <el-input type="text" v-model="form.mc" maxlength="50" disabled
  12. :placeholder="$t('form.placeholderInput')" />
  13. </el-form-item>
  14. </el-col>
  15. </el-row>
  16. <el-row>
  17. <el-col :span="24">
  18. <el-form-item :label="$t('page.business.resource.sj.bh')" prop="glyj">
  19. <el-input type="text" v-model="form.bh" maxlength="50" disabled
  20. :placeholder="$t('form.placeholderInput')" />
  21. </el-form-item>
  22. </el-col>
  23. </el-row>
  24. <el-row>
  25. <el-col :span="24">
  26. <el-form-item :label="$t('page.business.resource.sj.sjczfs')" prop="czfs">
  27. <BusinessSelect v-model="form.czfs" dictType="business_czfs"></BusinessSelect>
  28. </el-form-item>
  29. </el-col>
  30. </el-row>
  31. <el-row>
  32. <el-col :span="24">
  33. <el-form-item :label="$t('page.business.resource.sj.czl')" prop="czl">
  34. <el-input type="number" v-model="form.czl" maxlength="50" :placeholder="$t('form.placeholderInput')">
  35. <template slot="append">{{ form.kcdw }}</template>
  36. </el-input>
  37. </el-form-item>
  38. </el-col>
  39. </el-row>
  40. <el-row>
  41. <el-col :span="24">
  42. <el-form-item :label="$t('page.business.resource.sj.yuanyin')" prop="remark">
  43. <el-input type="textarea" :rows="2" v-model="form.remark" maxlength="500"
  44. :placeholder="$t('form.placeholderInput')" />
  45. </el-form-item>
  46. </el-col>
  47. </el-row>
  48. </template>
  49. <el-row>
  50. <el-col :span="24">
  51. <el-form-item :label="$t('form.qmyy')" prop="qmyy">
  52. <el-input type="text" :value="form.qmyy" maxlength="50" disabled
  53. :placeholder="$t('form.placeholderInput')" />
  54. </el-form-item>
  55. </el-col>
  56. </el-row>
  57. <el-row>
  58. <el-col :span="24">
  59. <el-form-item :label="$t('form.signer')">
  60. <el-input type="text" v-model="nickName" maxlength="50" disabled
  61. :placeholder="$t('form.placeholderInput')" />
  62. </el-form-item>
  63. </el-col>
  64. </el-row>
  65. <el-row>
  66. <el-col :span="24">
  67. <el-form-item :label="$t('form.password')" prop="qmrmm">
  68. <el-input type="password" v-model="form.qmrmm" maxlength="20"
  69. :placeholder="$t('form.placeholderInput')" />
  70. </el-form-item>
  71. </el-col>
  72. </el-row>
  73. </el-form>
  74. <div slot="footer" class="dialog-footer">
  75. <el-button type="primary" @click="save">{{ $t('form.confirm') }}</el-button>
  76. <el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
  77. </div>
  78. </el-dialog>
  79. </div>
  80. </template>
  81. <script>
  82. import { sj_cz } from "@/api/business/sj/sj"
  83. import { mapGetters } from 'vuex'
  84. import SelectList from "./SelectList";
  85. import BusinessSelect from '@/views/business/comps/select/BusinessSelect';
  86. export default {
  87. name: "MjyBj",
  88. components: { SelectList, BusinessSelect },
  89. data() {
  90. return {
  91. ids: [],
  92. selectList: [],
  93. open: false,
  94. form: {},
  95. rules: {
  96. czfs: [
  97. { required: true, message: this.$t('page.business.resource.sj.sjczfs') + this.$t('form.notEmpty'), trigger: "change" },
  98. { min: 0, max: 50, message: this.$t('page.business.resource.sj.sjczfs') + this.$t('form.lengthLimit') + '50', trigger: 'blur' }
  99. ],
  100. czl: [
  101. { required: true, message: this.$t('page.business.resource.sj.czl') + this.$t('form.notEmpty'), trigger: "change" },
  102. ],
  103. remark: [
  104. { required: true, message: this.$t('page.business.resource.sj.yuanyin') + this.$t('form.notEmpty'), trigger: "change" },
  105. ],
  106. qmrmm: [
  107. { required: true, message: this.$t('form.signerPsw') + this.$t('form.notEmpty'), trigger: "change" },
  108. ]
  109. }
  110. }
  111. },
  112. computed: {
  113. ...mapGetters([
  114. 'nickName','name'
  115. ]),
  116. },
  117. created() {
  118. },
  119. methods: {
  120. cancel() {
  121. this.open = false
  122. },
  123. reset() {
  124. this.form = {
  125. id: null,
  126. ids: null,
  127. mc: null,
  128. bh: null,
  129. qmyy: '处置',
  130. kcdw: '',
  131. qmrmm: null
  132. }
  133. this.resetForm("form")
  134. },
  135. show(row) {
  136. this.reset()
  137. this.isBatch = false
  138. this.form.ids = []
  139. this.selectList = []
  140. this.form.id = row.id
  141. this.form.mc = row.mc
  142. this.form.bh = row.bh
  143. this.form.kcdw = row.kcdw
  144. this.open = true
  145. },
  146. save() {
  147. this.$refs["form"].validate(valid => {
  148. if (valid) {
  149. sj_cz(this.form).then(response => {
  150. this.open = false
  151. this.$emit('callback')
  152. })
  153. }
  154. })
  155. }
  156. }
  157. }
  158. </script>