| | |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['project:externalperson:edit']">修改</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" |
| | | v-hasPermi="['project:externalperson:remove']">删除</el-button> |
| | | >删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" /> |
| | | |
| | | <!-- 添加或修改外围单位人员对话框 --> |
| | | <!-- 添加或修改人员/单位账号信息对话框 --> |
| | | <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-row> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="账号编号" prop="userno"> |
| | | <el-input v-model="form.userno" placeholder="请输入账号编号" /> </el-form-item> |
| | | <el-input disabled=true v-model="form.userno" placeholder="请输入账号编号" /> </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | |
| | | <el-input v-model="form.username" placeholder="请输入账号名称" /> </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="启用状态" prop="userstatus"> |
| | | <el-radio-group v-model="form.userstatus" :disabled="ismanager==false"> |
| | | <el-form-item label="启用状态" prop="userstatus" :disabled="ismanager == false"> |
| | | <el-radio-group v-model="form.userstatus"> |
| | | <el-radio v-for="dict in dict.type.sys_0_1" :key="dict.value" :label="parseInt(dict.value)">{{ dict.label |
| | | }}</el-radio> |
| | | </el-radio-group> |
| | |
| | | <el-row v-if="form.usertype != 'org'"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="所在单位" prop="unitname"> |
| | | <el-input v-model="form.unitname" placeholder="请输入单位名称" /> </el-form-item> |
| | | <el-select v-model="form.unitname" placeholder="所在单位" clearable filterable allow-create style="width: 100%"> |
| | | <el-option v-for="(spec, index) in unitList" :key="index" :label="spec.organizationname" |
| | | :value="spec.organizationid"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="单位工号" prop="personnelunitno"> |
| | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="联系电话" prop="telephone"> |
| | | <el-input v-model="form.telephone" placeholder="请输入联系电话" /> </el-form-item> |
| | | <el-form-item label="联系地址" prop="address"> |
| | | <el-input v-model="form.address" placeholder="请输入联系地址" /> </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="联系地址" prop="address"> |
| | | <el-input v-model="form.address" placeholder="请输入联系地址" /> </el-form-item> |
| | | <el-form-item label="联系电话" prop="telephone"> |
| | | <el-input v-model="form.telephone" placeholder="请输入联系电话" /> </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- |
| | |
| | | addExternalperson, |
| | | updateExternalperson, |
| | | exportExternalperson, |
| | | getOnlyCode, |
| | | } from "@/api/project/externalperson"; |
| | | |
| | | import { |
| | | listOrganization, |
| | | getOrganization, |
| | | listReportname, |
| | | listUser |
| | | } from "@/api/project/organization"; |
| | | |
| | | import { getUserProfile } from "@/api/system/user"; |
| | | |
| | | export default { |
| | |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | | loading: true, |
| | | loading: false, |
| | | // 导出遮罩层 |
| | | exportLoading: false, |
| | | // 选中数组 |
| | |
| | | total: 0, |
| | | // 外围单位人员表格数据 |
| | | externalpersonList: [], |
| | | |
| | | //医疗机构列表 |
| | | unitList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | |
| | | username: null, |
| | | usertype: null, |
| | | }, |
| | | |
| | | // 查询最新序号参数 |
| | | seqnoParams: { |
| | | businessType: "externalperson", |
| | | datequery: false, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | // 表单校验 |
| | | rules: {}, |
| | | rules: { |
| | | usertype: [ |
| | | { required: true, message: "请输入账户类型", trigger: "blur" } |
| | | ], |
| | | username: [ |
| | | { required: true, message: "请输入账户名称", trigger: "blur" } |
| | | ], |
| | | idcardno: [ |
| | | { required: true, message: "请输入身份证号码", trigger: "blur" } |
| | | ], |
| | | bankcardno: [ |
| | | { required: true, message: "请输入银行账号", trigger: "blur" } |
| | | ], |
| | | depositbank: [ |
| | | { required: true, message: "请输入开户银行", trigger: "blur" } |
| | | ] |
| | | }, |
| | | //是否是专家费的OPO审批人员 |
| | | ismanager: false, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getUserProfile(); |
| | | this.getList(); |
| | | this.getUnitList(); |
| | | // 默认不打开 |
| | | // this.getList(); |
| | | }, |
| | | methods: { |
| | | //获取当前用户信息 |
| | |
| | | }); |
| | | }, |
| | | |
| | | /** 查询外围单位人员列表 */ |
| | | /** 查询单位、人员账号列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | if (this.queryParams.username === null || this.queryParams.username.replace(/\s/g, '') == "") { |
| | | this.$modal.msgWarning("查找账户时,账户名称不能为空,请输入账户名称!"); |
| | | return; |
| | | } |
| | | |
| | | // this.loading = true; |
| | | listExternalperson(this.queryParams).then((response) => { |
| | | this.externalpersonList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | // this.loading = false; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | console.log("handleQuery", this.queryParams); |
| | | if (this.queryParams.username === null || this.queryParams.username.replace(/\s/g, '') == "") { |
| | | this.$modal.msgWarning("为限制批量查找账户信息,限制账户名称为必输项,请输入账户名称后再搜索!"); |
| | | return; |
| | | } |
| | | |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "添加外围单位人员"; |
| | | this.title = "添加人员/单位账号信息"; |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | |
| | | getExternalperson(id).then((response) => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "人员信息修改"; |
| | | this.title = "人员/单位账号信息修改"; |
| | | }); |
| | | }, |
| | | /** 提交按钮 */ |
| | |
| | | updateExternalperson(this.form).then((response) => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.queryParams.username = this.form.username; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addExternalperson(this.form).then((response) => { |
| | | console.log("addExternalperson", response); |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | getOnlyCode(this.seqnoParams).then((res) => { |
| | | this.form.userno = res.data.currentvalue; |
| | | |
| | | addExternalperson(this.form).then((response) => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.queryParams.username = this.form.username; |
| | | this.getList(); |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal |
| | | .confirm('是否确认删除外围单位人员编号为"' + ids + '"的数据项?') |
| | | .confirm('是否确认删除人员/单位账号信息编号为"' + ids + '"的数据项?') |
| | | .then(function () { |
| | | return delExternalperson(ids); |
| | | }) |
| | |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$modal |
| | | .confirm("是否确认导出所有外围单位人员数据项?") |
| | | .confirm("是否确认导出所有人员/单位账号信息数据项?") |
| | | .then(() => { |
| | | this.exportLoading = true; |
| | | return exportExternalperson(queryParams); |
| | |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | |
| | | //获取医疗机构列表 |
| | | getUnitList() { |
| | | listOrganization(3).then(response => { |
| | | for (let i = 0; i < response.rows.length; i++) { |
| | | this.unitList.push({ |
| | | //organizationid: response.rows[i].organizationid, |
| | | organizationid: response.rows[i].id, |
| | | organizationname: response.rows[i].organizationname |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |