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. 72
      src/views/user/department.vue

2
src/api/template.js

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

47
src/components/drawerDialog/index.vue

@ -198,9 +198,10 @@
>
<el-option
v-for="item in parentList"
:key="item.value"
:label="item.label"
:value="item.value"
v-show="showJybgTemplate(item)"
:key="item.id"
:label="item.tempName"
:value="item.id"
/>
</el-select>
</el-form-item>
@ -214,9 +215,10 @@
>
<el-option
v-for="item in parentList"
:key="item.value"
:label="item.label"
:value="item.value"
v-show="showHgzTemplate(item)"
:key="item.id"
:label="item.tempName"
:value="item.id"
/>
</el-select>
</el-form-item>
@ -841,15 +843,15 @@ export default {
}, {
value: 'JYBG',
label: '检验报告'
}, {
value: 'OTHER',
label: '其他'
}, {
value: 'HZD',
label: '回执单'
}, {
value: 'RWD',
label: '任务单'
}, {
value: 'HGZ',
label: '合格证'
}
],
jylbList: [],
@ -887,6 +889,33 @@ export default {
},
mounted() {},
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() {
switch (this.form.tableMode) {
case 0:

13
src/views/flow/template.vue

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

72
src/views/user/department.vue

@ -45,24 +45,32 @@
</el-table>
<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-form ref="tempDepartment" :model="tempDepartment" class="small-space" label-width="80px">
<el-form ref="tempDepartment" :model="tempDepartment" label-width="130px">
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="部门名称" required>
<el-input v-model="tempDepartment.name" type="text" size="small" style="width:200px" />
<el-input v-model="tempDepartment.name" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="负责人" size="small" required>
<el-select v-model="tempDepartment.leader" filterable placeholder="请选择" clearable>
<el-option v-for="item in leaders" :key="item.id" :label="item.nickname" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="检验类别" prop="jianyanleibie">
<el-select v-model="tempDepartment.jianyanleibie" multiple placeholder="请选择检验类别">
<el-select v-model="tempDepartment.jianyanleibie" multiple collapse-tags placeholder="请选择检验类别">
<el-option value="DJ" label="定期检验" />
<el-option value="JJ" label="监督检验" />
<el-option value="ZZ" label="制造监检" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备种类" prop="shebeizhongleidaima">
<el-select v-model="tempDepartment.shebeizhongleidaima" multiple placeholder="请选择设备种类">
<el-select v-model="tempDepartment.shebeizhongleidaima" multiple collapse-tags placeholder="请选择设备种类">
<el-option
v-for="item in sbzlList"
:key="item.value"
@ -71,8 +79,10 @@
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="所属区划" prop="quhuadaima">
<el-select v-model="tempDepartment.quhuadaima" multiple placeholder="请选择所属区划">
<el-select v-model="tempDepartment.quhuadaima" multiple collapse-tags placeholder="请选择所属区划">
<el-option
v-for="item in areas"
:key="item.value"
@ -81,14 +91,60 @@
/>
</el-select>
</el-form-item>
<el-form-item label="部门代码(选填)">
<el-input v-model="tempDepartment.code" type="text" size="small" style="width: 200px" />
</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="成员">
<template>
<el-transfer v-model="departmentUserList" :props="{key: 'id', label: 'nickname'}" :button-texts="['移除', '添加']" :titles="['未分配员工', '部门成员']" :data="unAllotUserList" />

Loading…
Cancel
Save