华西海圻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.

162 lines
5.5 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. <div class="sbzdtcma"> <input type="text"></div>
  69. <el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent v-model="form.qmrmm" maxlength="20" autocomplete="off" auto-complete="new-password" show-password
  70. :placeholder="$t('form.placeholderInput')" />
  71. </el-form-item>
  72. </el-col>
  73. </el-row>
  74. </el-form>
  75. <div slot="footer" class="dialog-footer">
  76. <el-button type="primary" @click="save">{{ $t('form.confirm') }}</el-button>
  77. <el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
  78. </div>
  79. </el-dialog>
  80. </div>
  81. </template>
  82. <script>
  83. import { sj_cz } from "@/api/business/sj/sj"
  84. import { mapGetters } from 'vuex'
  85. import SelectList from "./SelectList";
  86. import BusinessSelect from '@/views/business/comps/select/BusinessSelect';
  87. export default {
  88. name: "SjCz",
  89. components: { SelectList, BusinessSelect },
  90. data() {
  91. return {
  92. ids: [],
  93. selectList: [],
  94. open: false,
  95. form: {},
  96. rules: {
  97. czfs: [
  98. { required: true, message: this.$t('page.business.resource.sj.sjczfs') + this.$t('form.notEmpty'), trigger: "change" },
  99. { min: 0, max: 50, message: this.$t('page.business.resource.sj.sjczfs') + this.$t('form.lengthLimit') + '50', trigger: 'blur' }
  100. ],
  101. czl: [
  102. { required: true, message: this.$t('page.business.resource.sj.czl') + this.$t('form.notEmpty'), trigger: "change" },
  103. ],
  104. remark: [
  105. { required: true, message: this.$t('page.business.resource.sj.yuanyin') + this.$t('form.notEmpty'), trigger: "change" },
  106. ],
  107. qmrmm: [
  108. { required: true, message: this.$t('form.signerPsw') + this.$t('form.notEmpty'), trigger: "change" },
  109. ]
  110. }
  111. }
  112. },
  113. computed: {
  114. ...mapGetters([
  115. 'nickName','name'
  116. ]),
  117. },
  118. created() {
  119. },
  120. methods: {
  121. cancel() {
  122. this.open = false
  123. },
  124. reset() {
  125. this.form = {
  126. id: null,
  127. ids: null,
  128. mc: null,
  129. bh: null,
  130. qmyy: this.$t('page.business.resource.sj.cz'),
  131. kcdw: '',
  132. qmrmm: null
  133. }
  134. this.resetForm("form")
  135. },
  136. show(row) {
  137. this.reset()
  138. this.isBatch = false
  139. this.form.ids = []
  140. this.selectList = []
  141. this.form.id = row.id
  142. this.form.mc = row.mc
  143. this.form.bh = row.bh
  144. this.form.kcdw = row.kcdw
  145. this.open = true
  146. },
  147. save() {
  148. this.$refs["form"].validate(valid => {
  149. if (valid) {
  150. sj_cz(this.form).then(response => {
  151. this.open = false
  152. this.$modal.msgSuccess(this.$t('form.operationSuccess'))
  153. this.$emit('callback')
  154. })
  155. }
  156. })
  157. }
  158. }
  159. }
  160. </script>