Browse Source

优化科室编辑等功能

master
李磊 3 years ago
parent
commit
7cc68d65ee
  1. 2
      src/api/template.js
  2. 47
      src/components/drawerDialog/index.vue
  3. 13
      src/views/flow/template.vue
  4. 144
      src/views/user/department.vue

2
src/api/template.js

@ -4,7 +4,7 @@ import qs from 'qs'
export default { export default {
getList: (params) => { getList: (params) => {
return api({ return api({
url: '/template/getTemplateList', url: '/template/all',
method: 'get', method: 'get',
params: params params: params
}) })

47
src/components/drawerDialog/index.vue

@ -198,9 +198,10 @@
> >
<el-option <el-option
v-for="item in parentList" v-for="item in parentList"
:key="item.value" v-show="showJybgTemplate(item)"
:label="item.label" :key="item.id"
:value="item.value" :label="item.tempName"
:value="item.id"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -214,9 +215,10 @@
> >
<el-option <el-option
v-for="item in parentList" v-for="item in parentList"
:key="item.value" v-show="showHgzTemplate(item)"
:label="item.label" :key="item.id"
:value="item.value" :label="item.tempName"
:value="item.id"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -841,15 +843,15 @@ export default {
}, { }, {
value: 'JYBG', value: 'JYBG',
label: '检验报告' label: '检验报告'
}, {
value: 'OTHER',
label: '其他'
}, { }, {
value: 'HZD', value: 'HZD',
label: '回执单' label: '回执单'
}, { }, {
value: 'RWD', value: 'RWD',
label: '任务单' label: '任务单'
}, {
value: 'HGZ',
label: '合格证'
} }
], ],
jylbList: [], jylbList: [],
@ -887,6 +889,33 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
showHgzTemplate(item) {
if (item.tempCategory !== 'HGZ') {
return false
}
if (this.formTemplate.shebeizhongleidaima && this.formTemplate.shebeizhongleidaima !== item.shebeizhongleidaima) {
return false
}
if (this.formTemplate.jianyanleibie && this.formTemplate.jianyanleibie !== item.jianyanleibie) {
return false
}
return true
},
showJybgTemplate(item) {
if (item.tempCategory !== 'JYBG') {
return false
}
if (item.bglx !== 1) {
return false
}
if (this.formTemplate.shebeizhongleidaima && this.formTemplate.shebeizhongleidaima !== item.shebeizhongleidaima) {
return false
}
if (this.formTemplate.jianyanleibie && this.formTemplate.jianyanleibie !== item.jianyanleibie) {
return false
}
return true
},
changeTableMode() { changeTableMode() {
switch (this.form.tableMode) { switch (this.form.tableMode) {
case 0: case 0:

13
src/views/flow/template.vue

@ -290,15 +290,15 @@ export default {
}, { }, {
value: 'JYBG', value: 'JYBG',
label: '检验报告' label: '检验报告'
}, {
value: 'OTHER',
label: '其他'
}, { }, {
value: 'HZD', value: 'HZD',
label: '回执单' label: '回执单'
}, { }, {
value: 'RWD', value: 'RWD',
label: '任务单' label: '任务单'
}, {
value: 'HGZ',
label: '合格证'
} }
], ],
formTemplate: {}, formTemplate: {},
@ -407,11 +407,8 @@ export default {
}, },
getParentList() { getParentList() {
this.api({ this.api({
url: '/template/getTemplateListByBglx', url: '/template/all',
method: 'get', method: 'get'
params: {
bglx: 1
}
}).then((data) => { }).then((data) => {
this.parentList = data this.parentList = data
}) })

144
src/views/user/department.vue

@ -45,50 +45,106 @@
</el-table> </el-table>
<pagination v-show="total>0" :total="total" :page-num.sync="listQuery.pageNum" :page-row.sync="listQuery.pageSize" @pagination="getList" /> <pagination v-show="total>0" :total="total" :page-num.sync="listQuery.pageNum" :page-row.sync="listQuery.pageSize" @pagination="getList" />
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" @close="closeDialog"> <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" @close="closeDialog">
<el-form ref="tempDepartment" :model="tempDepartment" class="small-space" label-width="80px"> <el-form ref="tempDepartment" :model="tempDepartment" label-width="130px">
<el-form-item label="部门名称" required> <el-row :gutter="20">
<el-input v-model="tempDepartment.name" type="text" size="small" style="width:200px" /> <el-col :span="9">
</el-form-item> <el-form-item label="部门名称" required>
<el-form-item label="负责人" size="small" required> <el-input v-model="tempDepartment.name" type="text" />
<el-select v-model="tempDepartment.leader" filterable placeholder="请选择" clearable> </el-form-item>
<el-option v-for="item in leaders" :key="item.id" :label="item.nickname" :value="item.id" /> </el-col>
</el-select> <el-col :span="9">
</el-form-item> <el-form-item label="负责人" size="small" required>
<el-form-item label="检验类别" prop="jianyanleibie"> <el-select v-model="tempDepartment.leader" filterable placeholder="请选择" clearable>
<el-select v-model="tempDepartment.jianyanleibie" multiple placeholder="请选择检验类别"> <el-option v-for="item in leaders" :key="item.id" :label="item.nickname" :value="item.id" />
<el-option value="DJ" label="定期检验" /> </el-select>
<el-option value="JJ" label="监督检验" /> </el-form-item>
<el-option value="ZZ" label="制造监检" /> </el-col>
</el-select> <el-col :span="9">
</el-form-item> <el-form-item label="检验类别" prop="jianyanleibie">
<el-form-item label="设备种类" prop="shebeizhongleidaima"> <el-select v-model="tempDepartment.jianyanleibie" multiple collapse-tags placeholder="请选择检验类别">
<el-select v-model="tempDepartment.shebeizhongleidaima" multiple placeholder="请选择设备种类"> <el-option value="DJ" label="定期检验" />
<el-option <el-option value="JJ" label="监督检验" />
v-for="item in sbzlList" <el-option value="ZZ" label="制造监检" />
:key="item.value" </el-select>
:label="item.label" </el-form-item>
:value="item.value" </el-col>
/> <el-col :span="9">
</el-select> <el-form-item label="设备种类" prop="shebeizhongleidaima">
</el-form-item> <el-select v-model="tempDepartment.shebeizhongleidaima" multiple collapse-tags placeholder="请选择设备种类">
<el-form-item label="所属区划" prop="quhuadaima"> <el-option
<el-select v-model="tempDepartment.quhuadaima" multiple placeholder="请选择所属区划"> v-for="item in sbzlList"
<el-option :key="item.value"
v-for="item in areas" :label="item.label"
:key="item.value" :value="item.value"
:label="item.label" />
:value="item.value" </el-select>
/> </el-form-item>
</el-select> </el-col>
</el-form-item> <el-col :span="9">
<el-form-item label="部门代码(选填)"> <el-form-item label="所属区划" prop="quhuadaima">
<el-input v-model="tempDepartment.code" type="text" size="small" style="width: 200px" /> <el-select v-model="tempDepartment.quhuadaima" multiple collapse-tags placeholder="请选择所属区划">
</el-form-item> <el-option
<el-form-item label="上级科室"> v-for="item in areas"
<el-select v-model="tempDepartment.parentId" filterable clearable> :key="item.value"
<el-option v-for="dept in departments" :key="dept.id" :value="dept.id" :label="dept.name" /> :label="item.label"
</el-select> :value="item.value"
</el-form-item> />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="上级科室">
<el-select v-model="tempDepartment.parentId" filterable clearable>
<el-option v-for="dept in departments" :key="dept.id" :value="dept.id" :label="dept.name" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="联系人">
<el-input v-model="tempDepartment.lianxiren" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="联系人电话">
<el-input v-model="tempDepartment.lianxirenDianhua" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="机构核准证号">
<el-input v-model="tempDepartment.hezhunzhenghao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="地址">
<el-input v-model="tempDepartment.dizhi" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="邮编">
<el-input v-model="tempDepartment.youbian" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="电话">
<el-input v-model="tempDepartment.tel" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="网址">
<el-input v-model="tempDepartment.website" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="邮箱">
<el-input v-model="tempDepartment.email" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="启用">
<el-switch v-model="tempDepartment.state" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="成员"> <el-form-item label="成员">
<template> <template>
<el-transfer v-model="departmentUserList" :props="{key: 'id', label: 'nickname'}" :button-texts="['移除', '添加']" :titles="['未分配员工', '部门成员']" :data="unAllotUserList" /> <el-transfer v-model="departmentUserList" :props="{key: 'id', label: 'nickname'}" :button-texts="['移除', '添加']" :titles="['未分配员工', '部门成员']" :data="unAllotUserList" />

Loading…
Cancel
Save