| @ -0,0 +1,67 @@ | |||||
| <!-- 选择部门 --> | |||||
| <template> | |||||
| <div> | |||||
| <el-input v-model="selected.name" :placeholder="$t('form.placeholderSelect')" readonly @click.native="showSelectTemplate" /> | |||||
| <SelectTemplateDialog ref="selectTemplateDialog" @callback="handleChange" /> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import SelectTemplateDialog from './SelectTemplateDialog.vue' | |||||
| export default { | |||||
| name: "SelectTemplate", | |||||
| components: {SelectTemplateDialog}, | |||||
| props: { | |||||
| value: { | |||||
| type: [Number, String , Array], | |||||
| default: '' | |||||
| }, | |||||
| name: { | |||||
| type: String, | |||||
| default: '' | |||||
| }, | |||||
| readOnly: { | |||||
| type: Boolean, | |||||
| default: false | |||||
| }, | |||||
| }, | |||||
| watch: { | |||||
| value: { | |||||
| immediate: true, | |||||
| handler(v) { | |||||
| this.selected.id = v ?((v+'').indexOf('u_')>-1? v:('u_'+v)):'' | |||||
| } | |||||
| }, | |||||
| name: { | |||||
| immediate: true, | |||||
| handler(v) { | |||||
| this.selected.name=v || '' | |||||
| } | |||||
| }, | |||||
| }, | |||||
| data() { | |||||
| return { | |||||
| selected:{ | |||||
| id:'', | |||||
| name:'' | |||||
| }, | |||||
| }; | |||||
| }, | |||||
| mounted() { | |||||
| }, | |||||
| methods: { | |||||
| showSelectTemplate(){ | |||||
| if(!this.readOnly){ | |||||
| this.$refs.selectTemplateDialog.show() | |||||
| } | |||||
| }, | |||||
| handleChange(obj) { | |||||
| this.selected.name=obj.name | |||||
| this.selected.id=obj.id | |||||
| this.$emit('change', obj) | |||||
| this.$emit('input', obj.id) | |||||
| }, | |||||
| } | |||||
| }; | |||||
| </script> | |||||
| @ -0,0 +1,119 @@ | |||||
| <template> | |||||
| <div class="select-template"> | |||||
| <el-dialog :title="$t('page.system.template.selectTemplate')" :visible.sync="open" width="80%" append-to-body :close-on-click-modal="false" | |||||
| style="padding: 20px 20px;"> | |||||
| <div class="dialog-container"> | |||||
| <el-form :model="searchForm" ref="searchForm" :inline="true"> | |||||
| <el-form-item :label="$t('page.system.template.sn') + ':'" prop="sn"> | |||||
| <el-input v-model="searchForm.sn" :placeholder="$t('form.placeholderInput')" clearable style="width: 150px" | |||||
| @keyup.enter.native="search" /> | |||||
| </el-form-item> | |||||
| <el-form-item :label="$t('page.system.template.name') + ':'" prop="name"> | |||||
| <el-input v-model="searchForm.name" :placeholder="$t('form.placeholderInput')" clearable | |||||
| style="width: 150px" @keyup.enter.native="search" /> | |||||
| </el-form-item> | |||||
| <el-form-item :label="$t('page.system.template.department') + ':'" prop="deptId"> | |||||
| <select-dept style="width:200px" v-model="searchForm.deptId" @change="search" /> | |||||
| </el-form-item> | |||||
| <el-form-item :label="$t('page.system.template.status') + ':'" prop="status"> | |||||
| <el-select v-model="searchForm.status" :placeholder="$t('form.placeholderSelect')" clearable | |||||
| style="width: 100px" @change="search"> | |||||
| <el-option key="0" :label="$t('page.system.template.statusEnable')" :value="10" /> | |||||
| <el-option key="1" :label="$t('page.system.template.statusDisable')" :value="1" /> | |||||
| </el-select> | |||||
| </el-form-item> | |||||
| <el-form-item> | |||||
| <el-button type="primary" icon="el-icon-search" @click="search">{{ $t('form.search') }}</el-button> | |||||
| <el-button icon="el-icon-refresh" @click="reset">{{ $t('form.reset') }}</el-button> | |||||
| </el-form-item> | |||||
| </el-form> | |||||
| <el-table v-loading="loading" :data="list"> | |||||
| <el-table-column :label="$t('page.system.template.sn')" align="center" prop="sn" /> | |||||
| <el-table-column :label="$t('page.system.template.name')" align="center" prop="name" /> | |||||
| <el-table-column :label="$t('page.system.template.department')" align="center" prop="deptName" /> | |||||
| <el-table-column :label="$t('page.system.template.status')" prop="status" width="150"> | |||||
| <template slot-scope="scope"> | |||||
| <span v-if="scope.row.status === 10">{{ $t('page.system.template.statusEnable') }}</span> | |||||
| <span v-if="scope.row.status === 1">{{ $t('page.system.template.statusDisable') }}</span> | |||||
| </template> | |||||
| </el-table-column> | |||||
| <el-table-column :label="$t('form.operate')" fixed="right" align="center" width="150"> | |||||
| <template slot-scope="scope"> | |||||
| <el-button type="primary" v-if="scope.row.status === 10" @click="handleSelect(scope.row)">{{ $t('page.system.template.select') }}</el-button> | |||||
| </template> | |||||
| </el-table-column> | |||||
| </el-table> | |||||
| <pagination v-show="total > 0" :total="total" :page.sync="searchForm.pageNum" | |||||
| :limit.sync="searchForm.pageSize" @pagination="getList" /> | |||||
| </div> | |||||
| </el-dialog> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { public_templateList } from "@/api/business/public/public"; | |||||
| import SelectDept from "@/views/business/comps/select/SelectDept"; | |||||
| export default { | |||||
| name: "SelectTemplateDialog", | |||||
| components: {SelectDept}, | |||||
| props: { | |||||
| }, | |||||
| watch: { | |||||
| }, | |||||
| data() { | |||||
| return { | |||||
| loading: false, | |||||
| open: false, | |||||
| total: 0, | |||||
| list: [], | |||||
| searchForm: { | |||||
| pageNum: 1, | |||||
| pageSize: 10, | |||||
| sn: '', | |||||
| name: '', | |||||
| deptId: null, | |||||
| status: '', | |||||
| } | |||||
| }; | |||||
| }, | |||||
| mounted() { | |||||
| }, | |||||
| methods: { | |||||
| show() { | |||||
| this.search() | |||||
| }, | |||||
| search() { | |||||
| this.searchForm.pageNum = 1; | |||||
| this.open = true | |||||
| this.getList(); | |||||
| }, | |||||
| reset() { | |||||
| this.searchForm = { | |||||
| pageNum: 1, | |||||
| pageSize: 10, | |||||
| sn: '', | |||||
| name: '', | |||||
| deptId: null, | |||||
| status: '', | |||||
| } | |||||
| this.search() | |||||
| }, | |||||
| getList() { | |||||
| public_templateList(this.searchForm).then(response => { | |||||
| this.list = response.rows; | |||||
| this.total = response.total; | |||||
| this.loading = false | |||||
| }) | |||||
| }, | |||||
| handleSelect(row) { | |||||
| this.$emit('callback', row); | |||||
| this.open = false | |||||
| } | |||||
| } | |||||
| }; | |||||
| </script> | |||||
| <style rel="stylesheet/scss" lang="scss"> | |||||
| .select-template {} | |||||
| </style> | |||||
| @ -0,0 +1,236 @@ | |||||
| G<template> | |||||
| <div> | |||||
| <div class="edit-container"> | |||||
| <div class="edit-top"> | |||||
| <div class="left-top"> | |||||
| <img src="@/assets/images/back.png" @click="cancel()" /> | |||||
| <div class="left-title"></div> | |||||
| </div> | |||||
| <div class="center-top"> | |||||
| {{ form.bdmc }} | |||||
| </div> | |||||
| <div class="right-top"> | |||||
| <el-button @click="cancel()">{{ $t('form.cancel') }}</el-button> | |||||
| <el-button type="danger" @click="showReject">拒绝</el-button> | |||||
| <el-button type="primary" @click="showApprove">通过</el-button> | |||||
| </div> | |||||
| </div> | |||||
| <div class="edit-content "> | |||||
| 表单详情todo | |||||
| </div> | |||||
| </div> | |||||
| <!-- 通过 --> | |||||
| <el-dialog title="审核通过" :visible.sync="openApprove" width="500px" append-to-body :close-on-click-modal="false"> | |||||
| <el-form ref="formApprove" :model="formApprove" :rules="rulesApprove" label-width="120px"> | |||||
| <el-row> | |||||
| <el-col :span="24"> | |||||
| <el-form-item :label="$t('form.qmyy')" prop="qmyy"> | |||||
| <el-input type="text" :value="formApprove.qmyy" maxlength="50" disabled | |||||
| :placeholder="$t('form.placeholderInput')" /> | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| </el-row> | |||||
| <el-row> | |||||
| <el-col :span="24"> | |||||
| <el-form-item :label="$t('form.remark')" prop="remark"> | |||||
| <el-input type="textarea" v-model="formApprove.remark" :rows="2" maxlength="500" | |||||
| :placeholder="$t('form.placeholderInput')"> | |||||
| </el-input> | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| </el-row> | |||||
| <el-row> | |||||
| <el-col :span="24"> | |||||
| <el-form-item :label="$t('form.signer')"> | |||||
| <el-input type="text" v-model="nickName" maxlength="50" disabled | |||||
| :placeholder="$t('form.placeholderInput')" /> | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| </el-row> | |||||
| <el-row> | |||||
| <el-col :span="24"> | |||||
| <el-form-item :label="$t('form.password')" prop="qmrmm"> | |||||
| <el-input type="password" v-model="formApprove.qmrmm" maxlength="20" | |||||
| :placeholder="$t('form.placeholderInput')" /> | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| </el-row> | |||||
| </el-form> | |||||
| <div slot="footer" class="dialog-footer"> | |||||
| <el-button type="primary" @click="approve">{{ $t('form.confirm') }}</el-button> | |||||
| <el-button @click="openApprove = false">{{ $t('form.cancel') }}</el-button> | |||||
| </div> | |||||
| </el-dialog> | |||||
| <!-- 拒绝 --> | |||||
| <el-dialog title="审核拒绝" :visible.sync="openReject" width="500px" append-to-body :close-on-click-modal="false"> | |||||
| <el-form ref="formReject" :model="formReject" :rules="rulesReject" label-width="120px"> | |||||
| <el-row> | |||||
| <el-col :span="24"> | |||||
| <el-form-item :label="$t('form.qmyy')" prop="qmyy"> | |||||
| <el-input type="text" :value="formReject.qmyy" maxlength="50" disabled | |||||
| :placeholder="$t('form.placeholderInput')" /> | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| </el-row> | |||||
| <el-row> | |||||
| <el-col :span="24"> | |||||
| <el-form-item :label="$t('form.remark')" prop="remark"> | |||||
| <el-input type="textarea" v-model="formReject.remark" :rows="2" maxlength="500" | |||||
| :placeholder="$t('form.placeholderInput')"> | |||||
| </el-input> | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| </el-row> | |||||
| <el-row> | |||||
| <el-col :span="24"> | |||||
| <el-form-item :label="$t('form.signer')"> | |||||
| <el-input type="text" v-model="nickName" maxlength="50" disabled | |||||
| :placeholder="$t('form.placeholderInput')" /> | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| </el-row> | |||||
| <el-row> | |||||
| <el-col :span="24"> | |||||
| <el-form-item :label="$t('form.password')" prop="qmrmm"> | |||||
| <el-input type="password" v-model="formReject.qmrmm" maxlength="20" | |||||
| :placeholder="$t('form.placeholderInput')" /> | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| </el-row> | |||||
| </el-form> | |||||
| <div slot="footer" class="dialog-footer"> | |||||
| <el-button type="primary" @click="reject">{{ $t('form.confirm') }}</el-button> | |||||
| <el-button @click="openReject = false">{{ $t('form.cancel') }}</el-button> | |||||
| </div> | |||||
| </el-dialog> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { studyFormPre_tg, studyFormPre_jj, studyFormPre_info } from "@/api/business/study/studyFormPre" | |||||
| import { mapGetters } from 'vuex' | |||||
| export default { | |||||
| name: "Sh", | |||||
| components: {}, | |||||
| data() { | |||||
| return { | |||||
| showIndex: 1, | |||||
| form: {}, | |||||
| rules: { | |||||
| bdmc: [{ | |||||
| required: true, | |||||
| message: ' ', | |||||
| trigger: 'blur' | |||||
| }], | |||||
| templateId: [{ | |||||
| required: true, | |||||
| message: ' ', | |||||
| trigger: 'blur' | |||||
| }] | |||||
| }, | |||||
| openApprove: false, | |||||
| formApprove: { | |||||
| id: null, | |||||
| qmyy: '审核通过', | |||||
| remark: '', | |||||
| qmrmm: '', | |||||
| }, | |||||
| rulesApprove: { | |||||
| qmrmm: [{ | |||||
| required: true, | |||||
| message: ' ', | |||||
| trigger: 'blur' | |||||
| }] | |||||
| }, | |||||
| openReject: false, | |||||
| formReject: { | |||||
| id: null, | |||||
| qmyy: '审核拒绝', | |||||
| remark: '', | |||||
| qmrmm: '', | |||||
| }, | |||||
| rulesReject: { | |||||
| qmrmm: [{ | |||||
| required: true, | |||||
| message: ' ', | |||||
| trigger: 'blur' | |||||
| }], | |||||
| remark: [{ | |||||
| required: true, | |||||
| message: ' ', | |||||
| trigger: 'blur' | |||||
| }] | |||||
| } | |||||
| } | |||||
| }, | |||||
| computed: { | |||||
| ...mapGetters([ | |||||
| 'nickName' | |||||
| ]), | |||||
| }, | |||||
| created() { | |||||
| }, | |||||
| methods: { | |||||
| cancel() { | |||||
| this.$emit('close') | |||||
| }, | |||||
| reset() { | |||||
| this.form = { | |||||
| id: null, | |||||
| studyId: null, | |||||
| bdbh: null, | |||||
| bdmc: null, | |||||
| bdsm: null, | |||||
| templateId: null, | |||||
| templateMc: null, | |||||
| bdnr: null | |||||
| } | |||||
| this.resetForm("form") | |||||
| }, | |||||
| edit(row) { | |||||
| this.reset() | |||||
| this.$modal.loading() | |||||
| studyFormPre_info({ id: row.id }).then(response => { | |||||
| this.form = response.data | |||||
| this.open = true | |||||
| this.$modal.closeLoading() | |||||
| }) | |||||
| }, | |||||
| showApprove() { | |||||
| this.formApprove.id = this.form.id | |||||
| this.openApprove = true | |||||
| }, | |||||
| approve() { | |||||
| this.$refs["formApprove"].validate(valid => { | |||||
| if (valid) { | |||||
| this.$modal.loading() | |||||
| studyFormPre_tg(this.formApprove).then(response => { | |||||
| this.openApprove = false | |||||
| this.$modal.closeLoading() | |||||
| this.$emit('close') | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| showReject() { | |||||
| this.formReject.id = this.form.id | |||||
| this.openReject = true | |||||
| }, | |||||
| reject() { | |||||
| this.$refs["formReject"].validate(valid => { | |||||
| if (valid) { | |||||
| this.$modal.loading() | |||||
| studyFormPre_jj(this.formReject).then(response => { | |||||
| this.openReject = false | |||||
| this.$modal.closeLoading() | |||||
| this.$emit('close') | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| } | |||||
| </script> | |||||
| @ -0,0 +1,97 @@ | |||||
| G<template> | |||||
| <div> | |||||
| <div class="edit-container"> | |||||
| <div class="edit-top"> | |||||
| <div class="left-top"> | |||||
| <img src="@/assets/images/back.png" @click="cancel()" /> | |||||
| <div class="left-title"></div> | |||||
| </div> | |||||
| <div class="center-top"> | |||||
| {{ form.bdmc }} | |||||
| </div> | |||||
| <div class="right-top"> | |||||
| <el-button @click="cancel()">{{ $t('form.cancel') }}</el-button> | |||||
| <el-button type="primary" @click="save">填报</el-button> | |||||
| </div> | |||||
| </div> | |||||
| <div class="edit-content "> | |||||
| 表单详情todo | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { studyFormPre_tb, studyFormPre_info } from "@/api/business/study/studyFormPre" | |||||
| import { mapGetters } from 'vuex' | |||||
| export default { | |||||
| name: "Xq", | |||||
| components: {}, | |||||
| data() { | |||||
| return { | |||||
| open: false, | |||||
| showIndex: 1, | |||||
| form: {}, | |||||
| rules: { | |||||
| bdmc: [{ | |||||
| required: true, | |||||
| message: ' ', | |||||
| trigger: 'blur' | |||||
| }], | |||||
| templateId: [{ | |||||
| required: true, | |||||
| message: ' ', | |||||
| trigger: 'blur' | |||||
| }] | |||||
| } | |||||
| } | |||||
| }, | |||||
| computed: { | |||||
| ...mapGetters([ | |||||
| 'nickName' | |||||
| ]), | |||||
| }, | |||||
| created() { | |||||
| }, | |||||
| methods: { | |||||
| cancel() { | |||||
| this.$emit('close') | |||||
| }, | |||||
| reset() { | |||||
| this.form = { | |||||
| id: null, | |||||
| studyId: null, | |||||
| bdbh: null, | |||||
| bdmc: null, | |||||
| bdsm: null, | |||||
| templateId: null, | |||||
| templateMc: null, | |||||
| bdnr: null | |||||
| } | |||||
| this.resetForm("form") | |||||
| }, | |||||
| edit(row) { | |||||
| this.reset() | |||||
| this.$modal.loading() | |||||
| studyFormPre_info({ id: row.id }).then(response => { | |||||
| this.form = response.data | |||||
| this.open = true | |||||
| this.$modal.closeLoading() | |||||
| }) | |||||
| }, | |||||
| save() { | |||||
| this.$refs["form"].validate(valid => { | |||||
| if (valid) { | |||||
| this.$modal.loading() | |||||
| studyFormPre_tb(this.form).then(response => { | |||||
| this.$emit('close') | |||||
| this.$modal.closeLoading() | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| } | |||||
| </script> | |||||