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.
1852 lines
70 KiB
1852 lines
70 KiB
<template>
|
|
<div>
|
|
<!--组件主体-->
|
|
<div style="display: flex">
|
|
<div :style="'width:' + (window.pageWidth - 110 - 20) + 'px;'">
|
|
<!--查询条件-->
|
|
<div style="position: absolute;top:28px;left:140px;display: flex;">
|
|
<div v-show="checkPagePriv(pagePriv.privs, '查找')">
|
|
<PatientRegisterEditQuery />
|
|
</div>
|
|
<div style="display: flex;margin-left: 5px;">
|
|
<div v-show="checkPagePriv(pagePriv.privs, '读身份证')">
|
|
<el-button @click="peopleIcCard" class="commonbutton">读身份证</el-button>
|
|
</div>
|
|
<div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '拍照')">
|
|
<el-button type="primary" class="commonbutton" @click="photoGrah" icon="el-icon-camera">拍照</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<el-form ref="form" :model="form" label-width="80px" :rules="rules" size="medium">
|
|
<el-row>
|
|
<el-col :span="5">
|
|
<el-form-item label="单位名称" prop="customerOrgId">
|
|
<el-cascader v-model="form.customerOrgId" :options="patientRegister.customerOrgTreeAll"
|
|
:style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" filterable
|
|
popper-class="example" :show-all-levels="false"
|
|
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }"
|
|
:disabled="(form.completeFlag == '3' || isDoctor != '1') ? true : false" size="small">
|
|
</el-cascader>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="5">
|
|
<el-form-item label="条码号" prop="patientRegisterNo">
|
|
<el-input v-model="form.patientRegisterNo" disabled size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="5">
|
|
<el-form-item label="档案号" prop="patientNo">
|
|
<el-input v-model="form.patientNo" disabled size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="体检次数" prop="medicalTimes">
|
|
<el-input v-model="form.medicalTimes" disabled size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="性别" prop="sexId" label-width="50px">
|
|
<el-select v-model="form.sexId" placeholder="请选择" size="small" filterable
|
|
:style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'">
|
|
<el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="5">
|
|
<el-form-item label="姓名" prop="patientName">
|
|
<el-input id="patientName" v-model="form.patientName" @change="Query(form.patientName)" size="small"
|
|
autocomplete="off"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="5">
|
|
<el-form-item label="身份证号" prop="idNo">
|
|
<el-input v-model="form.idNo" @change="changeIdNo" size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="5">
|
|
<el-form-item label="出生日期" prop="birthDate">
|
|
<!--
|
|
<input type="date" v-model="form.birthDate" size="small"
|
|
:style="'border-radius: 4px;border: 1px solid #DCDFE6;height: 32px;line-height: 32px;padding-left: 2px;width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'"/>
|
|
-->
|
|
<el-date-picker v-model="form.birthDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
|
placeholder="出生日期" :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'"
|
|
@change="changeBirthDate" prefix-icon="" size="small" />
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="年龄" prop="age">
|
|
<el-input v-model="form.age" size="small" @change="changeAge"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="婚姻" prop="maritalStatusId" label-width="50px">
|
|
<el-select v-model="form.maritalStatusId" placeholder="请选择" size="small" filterable
|
|
:style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'">
|
|
<el-option v-for="item in dict.maritalStatus" :key="item.id" :label="item.displayName"
|
|
:value="item.id">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3" />
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="5">
|
|
<el-form-item label="手机号" prop="mobileTelephone">
|
|
<el-input v-model="form.mobileTelephone" size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="5">
|
|
<el-form-item label="电话" prop="telephone">
|
|
<el-input v-model="form.telephone" size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="5">
|
|
<el-form-item label="邮箱" prop="email">
|
|
<el-input v-model="form.email" size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="邮编" prop="postalCode">
|
|
<el-input v-model="form.postalCode" size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="籍贯" prop="birthPlaceId" label-width="50px">
|
|
<el-select v-model="form.birthPlaceId" placeholder="请选择" filterable clearable
|
|
:style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'" size="small">
|
|
<el-option v-for="item in dict.birthPlace" :key="item.id" :label="item.displayName"
|
|
:value="item.id" />
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3" />
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="10">
|
|
<el-form-item label="地址" prop="address">
|
|
<el-input v-model="form.address" size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="5">
|
|
<el-form-item label="人员类别" prop="personnelTypeId">
|
|
<el-select v-model="form.personnelTypeId" placeholder="请选择" filterable clearable
|
|
:style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small">
|
|
<el-option v-for="item in dict.personnelType" :key="item.id" :label="item.displayName"
|
|
:value="item.id" />
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="性激素期" prop="sexHormoneTermId">
|
|
<el-select v-model="form.sexHormoneTermId" placeholder="请选择" filterable clearable size="small"
|
|
:disabled="isComplete">
|
|
<el-option v-for="item in dict.sexHormoneTerm" :key="item.id" :label="item.displayName"
|
|
:value="item.id">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="民族" prop="nationId" label-width="50px">
|
|
<el-select v-model="form.nationId" placeholder="请选择" filterable clearable
|
|
:style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'" size="small">
|
|
<el-option v-for="item in dict.nation" :key="item.id" :label="item.displayName" :value="item.id" />
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3" />
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="5">
|
|
<el-form-item label="体检类别" prop="medicalTypeId">
|
|
<el-select v-model="form.medicalTypeId" placeholder="请选择" filterable clearable
|
|
:style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small">
|
|
<el-option v-for="item in dict.medicalType" :key="item.id" :label="item.displayName"
|
|
:value="item.id" />
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="5">
|
|
<el-form-item label="工卡号" prop="jobCardNo">
|
|
<el-input v-model="form.jobCardNo" size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="5">
|
|
<el-form-item label="体检卡号" prop="medicalCardNo">
|
|
<el-input v-model="form.medicalCardNo" size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="职务" prop="jobPost">
|
|
<el-input v-model="form.jobPost" size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="职称" prop="jobTitle" label-width="50px">
|
|
<el-input v-model="form.jobTitle" size="small"
|
|
:style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'" />
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="介绍人" prop="salesman">
|
|
<el-input v-model="form.salesman" size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="5">
|
|
<el-form-item label="体检中心" prop="medicalCenterId">
|
|
<el-select v-model="form.medicalCenterId" placeholder="请选择" filterable :disabled="peisid ? true : false"
|
|
size="small" :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'">
|
|
<el-option v-for="item in dict.organization" :key="item.id" :label="item.displayName"
|
|
:value="item.id">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="5">
|
|
<el-form-item label="单位体检次数" prop="isVip" label-width="110px">
|
|
<el-select :class="form.customerOrgId == dict.personOrgId ? '' : 'enterToTab'"
|
|
v-model="form.customerOrgRegisterId" placeholder="次数" size="small"
|
|
:disabled="form.customerOrgId == dict.personOrgId"
|
|
:style="'width:' + Math.floor((window.pageWidth - 654) / 4.8) + 'px;'" @change="changeMedicalTimes"
|
|
value-key="id">
|
|
<el-option v-for="item in customerOrgRegisterList" :key="item.id" :label="item.medicalTimes"
|
|
:value="item.id" />
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="电话随访" prop="isPhoneFollow">
|
|
<!--
|
|
<el-radio v-model="form.isPhoneFollow" label="Y">是</el-radio>
|
|
<el-radio v-model="form.isPhoneFollow" label="N">否</el-radio>
|
|
-->
|
|
<el-checkbox v-model="form.isPhoneFollowBox" @change="changeBox('isPhoneFollow')" />
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="2">
|
|
<el-form-item label="VIP" prop="isVip" label-width="50px">
|
|
<!--
|
|
<el-radio v-model="form.isVip" label="Y">是</el-radio>
|
|
<el-radio v-model="form.isVip" label="N">否</el-radio>
|
|
-->
|
|
<el-checkbox v-model="form.isVipBox" @change="changeBox('isVip')" />
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="隐藏姓名" prop="isNameHide">
|
|
<!--
|
|
<el-radio v-model="form.isNameHide" label="Y">是</el-radio>
|
|
<el-radio v-model="form.isNameHide" label="N">否</el-radio>
|
|
-->
|
|
<el-checkbox v-model="form.isNameHideBox" @change="changeBox('isNameHide')" />
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="锁住" prop="isLock" label-width="50px">
|
|
<!--
|
|
<el-radio v-model="form.isLock" label="Y">是</el-radio>
|
|
<el-radio v-model="form.isLock" label="N">否</el-radio>
|
|
-->
|
|
<el-checkbox v-model="form.isLockBox" @change="changeBox('isLock')" />
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="体检开始" prop="isMedicalStart">
|
|
<el-select v-model="form.isMedicalStart" placeholder="请选择" disabled size="small">
|
|
<el-option label="是" value="Y" />
|
|
<el-option label="否" value="N" />
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="5">
|
|
<el-form-item label="分组" prop="customerOrgGroupId">
|
|
<el-select v-model="form.customerOrgGroupId" placeholder="请选择" filterable clearable
|
|
@change="changeCustomerOrgGroupId" :disabled="displayGroup"
|
|
:style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small">
|
|
<el-option v-for="item in patientRegister.customerOrgGroup" :key="item.id" :label="item.displayName"
|
|
:value="item.id" />
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="5">
|
|
<el-form-item label="套餐" prop="medicalPackageId">
|
|
<el-select v-model="form.medicalPackageId" placeholder="请选择" filterable clearable
|
|
@change="changeMedicalPackageId" :disabled="displayPackage"
|
|
:style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small">
|
|
<el-option v-for="item in dict.medicalPackage" :key="item.id" :label="item.displayName"
|
|
:value="item.id" />
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="11">
|
|
<el-form-item label="备注" prop="remark">
|
|
<el-input v-model="form.remark" type="textarea" :rows="1" placeholder="请输入备注" size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item label="状态" prop="completeFlag" label-width="50px">
|
|
<el-select v-model="form.completeFlag" placeholder="请选择"
|
|
:disabled="(form.completeFlag == '2' || form.completeFlag == '3') ? true : false" size="small">
|
|
<div v-if="form.completeFlag == '2' || form.completeFlag == '3'">
|
|
<el-option v-for="item in dict.completeFlag" :key="item.id" :label="item.displayName"
|
|
:value="item.id">
|
|
</el-option>
|
|
</div>
|
|
<div v-else>
|
|
<el-option label="预登记" value="0" />
|
|
<el-option label="正式登记" value="1" />
|
|
</div>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="6">
|
|
<el-form-item label="创建人员">
|
|
<el-input v-model="form.creatorName" disabled size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="创建时间">
|
|
<el-input :value="form.creationTime
|
|
? moment(form.creationTime).format('yyyy-MM-DD')
|
|
: ''
|
|
" disabled size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="修改人员">
|
|
<el-input v-model="form.lastModifierName" disabled size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="修改时间">
|
|
<el-input :value="form.lastModificationTime
|
|
? moment(form.lastModificationTime).format('yyyy-MM-DD')
|
|
: ''
|
|
" disabled size="small"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<el-image
|
|
:style="'position: absolute;top:70px;right:' + (100 + Math.floor((window.pageWidth - 680) / 24)) + 'px; width: 130px; height: 140px;'"
|
|
:src="peoplePhoto">
|
|
<div slot="placeholder" class="image-slot">
|
|
加载中<span class="dot">...</span>
|
|
</div>
|
|
</el-image>
|
|
</div>
|
|
<!--人员登记组合项目明细 register_check_asbitem-->
|
|
<div>
|
|
<PatientRegisterItem :prForm="form" :prAsbOpraOpts="prAsbOpraOpts" :triggerHeadSave="triggerHeadSave"
|
|
:refreshFormId="refreshFormId" />
|
|
</div>
|
|
</div>
|
|
<div style="margin-left: 10px;">
|
|
|
|
<div v-show="checkPagePriv(pagePriv.privs, '新增')">
|
|
<el-button type="primary" class="commonbutton" @click="btnAdd">新增</el-button>
|
|
</div>
|
|
<div v-show="checkPagePriv(pagePriv.privs, '复制新增')" class="btn">
|
|
<el-button type="primary" class="commonbutton" @click="rdCopy">复制新增</el-button>
|
|
</div>
|
|
<div v-show="checkPagePriv(pagePriv.privs, '保存')" class="btn">
|
|
<el-button type="success" class="commonbutton" @click="btnSubmit('form', true)">保存</el-button>
|
|
</div>
|
|
<div v-show="checkPagePriv(pagePriv.privs, '检验单申请')" class="btn">
|
|
<el-button type="primary" class="commonbutton" @click="lisRequest">检验单申请</el-button>
|
|
</div>
|
|
<div v-show="checkPagePriv(pagePriv.privs, '条码打印')" class="btn">
|
|
<el-button type="primary" class="commonbutton" @click="lisPrint('0002', false)">条码打印</el-button>
|
|
</div>
|
|
<div v-show="checkPagePriv(pagePriv.privs, '条码补打')" class="btn">
|
|
<el-button type="danger" class="commonbutton" @click="reLisRequest">条码补打</el-button>
|
|
</div>
|
|
<div v-show="checkPagePriv(pagePriv.privs, '指引单打印')" class="btn">
|
|
<el-button type="primary" class="commonbutton" @click="guidePrint('0001', false)">指引单打印</el-button>
|
|
</div>
|
|
<!--
|
|
<div v-show="checkPagePriv(pagePriv.privs, '指引单预览')" class="btn">
|
|
<el-button type="primary" class="commonbutton" @click="guidePrint('0001', true)">指引单预览</el-button>
|
|
</div>
|
|
-->
|
|
<div v-show="checkPagePriv(pagePriv.privs, '手动合并项目')" class="btn">
|
|
<el-button type="danger" class="commonbutton" @click="reMergeAsbitem">手动合并项目</el-button>
|
|
</div>
|
|
|
|
<div v-show="checkPagePriv(pagePriv.privs, '全个人支付')" style="margin-top: 30px;">
|
|
<el-button type="primary" class="commonbutton" @click="prAsbOpraOpts.payTypeFlag = '0'">全个人支付</el-button>
|
|
</div>
|
|
<div v-show="checkPagePriv(pagePriv.privs, '全单位支付')" class="btn">
|
|
<el-button type="primary" class="commonbutton" @click="prAsbOpraOpts.payTypeFlag = '1'">全单位支付</el-button>
|
|
</div>
|
|
<div v-show="checkPagePriv(pagePriv.privs, '全免费')" class="btn">
|
|
<el-button type="primary" class="commonbutton" @click="prAsbOpraOpts.payTypeFlag = '2'">全免费</el-button>
|
|
</div>
|
|
<div v-show="checkPagePriv(pagePriv.privs, '收费')" class="btn">
|
|
<el-button type="success" class="commonbutton" @click="toCharge(form.patientRegisterNo)">收费</el-button>
|
|
</div>
|
|
<!--
|
|
<div class="btn">
|
|
<el-button type="success" class="commonbutton" @click="btnTest">test</el-button>
|
|
</div>
|
|
-->
|
|
</div>
|
|
</div>
|
|
|
|
<!--组件弹窗-->
|
|
<div>
|
|
<!-- 人员档案列表 -->
|
|
<el-dialog title="人员档案列表" :visible.sync="dialogVisible" width="800px" :show-close="false"
|
|
:close-on-click-modal="false" :append-to-body="true">
|
|
<el-table :data="patientList" border width="800" height="480" row-key="id" size="small"
|
|
class="el-table__body-wrapper tbody" highlight-current-row @row-click="rowick" @row-dblclick="patientDblclick"
|
|
ref="patientList">
|
|
<el-table-column type="index" width="30" />
|
|
<el-table-column prop="patientNo" label="档案号" />
|
|
<el-table-column prop="lastTime" label="末次体检" width="100">
|
|
<template slot-scope="scope">
|
|
<div v-if="scope.row.lastTime">
|
|
{{ moment(scope.row.lastTime).format("yyyy-MM-DD") }}
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="medicalTimes" label="体检次数" />
|
|
<el-table-column prop="displayName" label="姓名" />
|
|
<el-table-column prop="sexId" label="性别">
|
|
<template slot-scope="scope">
|
|
<div>
|
|
{{ dddw(dict.sex, "id", scope.row.sexId, "displayName") }}
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="maritalStatusId" label="婚姻">
|
|
<template slot-scope="scope">
|
|
<div>
|
|
{{ dddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="birthDate" label="出生日期" width="100">
|
|
<template slot-scope="scope">
|
|
<div v-if="scope.row.birthDate">
|
|
{{ moment(scope.row.birthDate).format("yyyy-MM-DD") }}
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="nationId" label="民族">
|
|
<template slot-scope="scope">
|
|
<div>
|
|
{{ dddw(dict.nation, "id", scope.row.nationId, "displayName") }}
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="idNo" label="身份证号" />
|
|
<el-table-column prop="telephone" label="电话" />
|
|
<el-table-column prop="mobileTelephone" label="手机号" />
|
|
</el-table>
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button class="commonbutton" @click="dialogVisible = false" style="width:90px;">取消</el-button>
|
|
<el-button class="commonbutton" type="primary" @click="choosePatient" style="width:90px;">确定</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
|
|
<!-- 拍照(openCamera) 网页模式,已废弃
|
|
<el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="600"
|
|
:close-on-click-modal="false" :append-to-body="true">
|
|
<Camera :id="form.id" />
|
|
</el-dialog>
|
|
-->
|
|
<!-- 检验条码补打 -->
|
|
<el-dialog title="检验条码补打" :visible.sync="patientRegister.lisRequestVisble" width="600px" height="400"
|
|
:show-close="false" :close-on-click-modal="false" :append-to-body="true">
|
|
<LisRequest :id="form.id" :brushTimes="brushTimes" />
|
|
</el-dialog>
|
|
|
|
<!-- 手动合并项目 -->
|
|
<el-dialog title="手动合并项目" :visible.sync="patientRegister.mergeAsbitemVisble" width="600px" height="400"
|
|
:show-close="false" :close-on-click-modal="false" :append-to-body="true">
|
|
<MergeAsbitem :id="form.id" :medicalCenterId="form.medicalCenterId" :brushTimes="brushTimes" />
|
|
</el-dialog>
|
|
|
|
<!-- 收费 -->
|
|
<el-dialog title="" :visible.sync="dialogWin.charge" :close-on-click-modal="false" :append-to-body="true" fullscreen
|
|
@close="closeDialogCharge">
|
|
<div style="margin-top: -30px;">
|
|
<Charge :patientRegisterNo="chargePatientRegisterNo" />
|
|
</div>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import moment from "moment";
|
|
import { mapState, mapActions } from "vuex";
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api";
|
|
|
|
import {
|
|
getPagePriv, checkPagePriv, objCopy, setNull, dddw, checkIDCode, parseID,
|
|
birthdayToAge, ageToBirthday, deepCopy, arrayFilter, arrayReduce, parsIcCardtoLocal,
|
|
photoParse, savePeoplePhoto, arrayExistObj
|
|
} from "../../utlis/proFunc";
|
|
import Camera from "./Camera.vue";
|
|
import PatientRegisterItem from "./PatientRegisterItem.vue";
|
|
import LisRequest from "./LisRequest.vue";
|
|
import MergeAsbitem from "./MergeAsbitem.vue";
|
|
import Charge from "../../views/charge/charge.vue";
|
|
import PatientRegisterEditQuery from "../../components/patientRegister/PatientRegisterEditQuery.vue";
|
|
import proApi from "../../utlis/proApi";
|
|
|
|
export default {
|
|
components: {
|
|
Camera,
|
|
LisRequest,
|
|
MergeAsbitem,
|
|
PatientRegisterItem,
|
|
Charge,
|
|
PatientRegisterEditQuery
|
|
},
|
|
// isDoctor: '0:标准人员登记/1:医生诊台登记(可修改单位)'
|
|
props: ['isDoctor', 'patientRegisterId', 'editTimes', 'refreshRegister', 'refFuncSetData'],
|
|
data() {
|
|
return {
|
|
|
|
pagePriv: {
|
|
routeUrlorPageName: 'PatientRegisterEdit', //当前页面归属路由或归属页面权限名称
|
|
privs: [] // 页面权限
|
|
},
|
|
|
|
brushTimes: 0,
|
|
|
|
peisid: null,
|
|
peoplePhoto: '',
|
|
preCustomerOrgId:'', // 上一个人的体检单位,只是在本组件点新增时才用到
|
|
form: {
|
|
registerManType: 'customer', //登记人员类型,客服:customer 医生:doctor 支持在医生诊台处理登记人员
|
|
id: "", //id
|
|
photo: '', //照片
|
|
patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
|
|
patientNo: "", //档案号
|
|
customerOrgId: ["00000000-0000-0000-0000-000000000001"], //单位编号 默认个人
|
|
customerOrgRegisterId: "00000000-0000-0000-0000-000000000001", //默认单位体检次数
|
|
customerOrgGroupId: null, //分组
|
|
medicalPackageId: null, //套餐
|
|
patientName: "", //姓名
|
|
birthDate: null, //日期型
|
|
sexId: "U", //性别 默认未知U
|
|
age: null, //年龄
|
|
jobCardNo: "", //工卡号
|
|
medicalCardNo: "", //体检卡号
|
|
maritalStatusId: "9", //婚姻状况 默认未知
|
|
medicalTypeId: null, //体检类别
|
|
personnelTypeId: null, //人员类别
|
|
jobPost: "", //职务
|
|
jobTitle: "", //职称
|
|
salesman: "", //介绍人
|
|
sexHormoneTermId: null, //性激素期限
|
|
isNameHide: "N", //隐藏姓名
|
|
isPhoneFollow: "N", //电话随访
|
|
isVip: "N", //vip客户
|
|
remark: "", //
|
|
isLock: "N", //是否锁住
|
|
completeFlag: "1", //完成标志 0:预登记,1:正式登记(未检),2:部份已检,3:已总检 【创建编辑时不操作】
|
|
isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】
|
|
patientRegisterNo: "", //条码号 【创建编辑时不操作】
|
|
medicalTimes: 1, //条码号 【创建编辑时不操作】
|
|
medicalCenterId: null, //体检中心
|
|
address: "", //地址
|
|
email: "", //email
|
|
idNo: "", //身份证号
|
|
telephone: "", //电话
|
|
mobileTelephone: "", //手机号
|
|
nationId: null, //民族编号
|
|
birthPlaceId: null, //籍惯(出生地)
|
|
postalCode: "", //邮编
|
|
creatorId: null,
|
|
creationTime: "",
|
|
lastModificationTime: "",
|
|
lastModifierId: null,
|
|
isVipBox: false, //vip客户
|
|
isNameHideBox: false, //隐藏姓名
|
|
isPhoneFollowBox: false, //电话随访
|
|
isLockBox: false, //是否锁住
|
|
isMaxMedicalTimes: 'N',
|
|
medicalStartDate: null
|
|
}, //单位 记录 目前新增与更新是一致
|
|
formInit: {}, //表单初始化
|
|
customerOrgRegisterList: [], //单位体检次数列表
|
|
defaultNull: [
|
|
"customerOrgId",
|
|
"customerOrgGroupId",
|
|
"medicalPackageId",
|
|
"birthDate",
|
|
"age",
|
|
"maritalStatusId",
|
|
"medicalTypeId",
|
|
"personnelTypeId",
|
|
"sexHormoneTermId",
|
|
"medicalCenterId",
|
|
"nationId",
|
|
"birthPlaceId",
|
|
], //一般uuid字段为空时,需设置为null值
|
|
|
|
rules: {
|
|
customerOrgId: [
|
|
{ required: true, message: "请填写单位", trigger: "blur" },
|
|
],
|
|
patientName: [
|
|
{ required: true, message: "请填写姓名", trigger: "blur" },
|
|
],
|
|
medicalCenterId: [
|
|
{ required: true, message: "请填写体检中心", trigger: "blur" },
|
|
],
|
|
},
|
|
|
|
dialogVisible: false,
|
|
patientList: [], //人员列表(用于判断人员多次体检)
|
|
patientChoosed: {}, //查重选中的人员
|
|
|
|
|
|
registerVisible: false,
|
|
patientRegisters: [],
|
|
registerChoosed: {},
|
|
|
|
dialogCamera: false, //拍照组件
|
|
|
|
chargePatientRegisterNo: '', //对哪个条码客户收费
|
|
|
|
//人员登记,组合项目明细操作相关参数
|
|
prAsbOpraOpts: {
|
|
formId: '', //form.id为空时,明细保存取此formId
|
|
copyNew: 0, //触发复制新增
|
|
payTypeFlag: '', //触发调整支付方式
|
|
prAsbSave: 0, //触发组合项目明细保存
|
|
prAsbQuery: 0,//触发组合项目明细查询,比如收费后,刷新收费状态
|
|
prAsbGroup: 0, //触发分组更换
|
|
prAsbPackage: 0, //触发套餐更换
|
|
},
|
|
};
|
|
},
|
|
|
|
created() {
|
|
//获取用户当前页面的权限
|
|
let userPriv = window.sessionStorage.getItem('userPriv')
|
|
if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
|
|
|
|
this.formInit = deepCopy(this.form)
|
|
// 初始化字典数据
|
|
this.dictInit()
|
|
},
|
|
|
|
//挂载完成
|
|
mounted() {
|
|
// 表单中 回车 代替 tab
|
|
this.enterToTab();
|
|
},
|
|
|
|
computed: {
|
|
...mapState(["window", "dialogWin", "dataTransOpts", "dict", "patientRegister", "customerOrg", "projPriv"]),
|
|
|
|
//是否总检(已总检则不允许修改套餐与分组)
|
|
isComplete() {
|
|
return this.form.completeFlag == '3' ? true : false;
|
|
},
|
|
|
|
// 套餐 disabled 如完成体检亦不允许编辑
|
|
displayPackage() {
|
|
let isPersonOrgId = true
|
|
if (!this.isComplete) {
|
|
if (!this.form.customerOrgId) return false
|
|
if (typeof this.form.customerOrgId == 'string') {
|
|
if (this.form.customerOrgId == this.dict.personOrgId) isPersonOrgId = false
|
|
} else {
|
|
if (this.form.customerOrgId[this.form.customerOrgId.length - 1] == this.dict.personOrgId) isPersonOrgId = false
|
|
}
|
|
}
|
|
return isPersonOrgId
|
|
},
|
|
|
|
// 分组 disabled 如完成体检亦不允许编辑
|
|
displayGroup() {
|
|
let isPersonOrgId = true
|
|
if (!this.isComplete) {
|
|
if (!this.form.customerOrgId) return isPersonOrgId
|
|
if (typeof this.form.customerOrgId == 'string') {
|
|
if (this.form.customerOrgId != this.dict.personOrgId) isPersonOrgId = false
|
|
} else {
|
|
if (this.form.customerOrgId[this.form.customerOrgId.length - 1] != this.dict.personOrgId) isPersonOrgId = false
|
|
}
|
|
}
|
|
return isPersonOrgId
|
|
},
|
|
},
|
|
methods: {
|
|
...mapActions(['getPatientRegisterAbs']),
|
|
dddw, moment, checkPagePriv,
|
|
|
|
btnTest() {
|
|
console.log('form', this.form)
|
|
},
|
|
//数据初始化
|
|
dictInit() {
|
|
//性别(仅档案用)
|
|
getapi("/api/app/sex").then((res) => {
|
|
if (res.code == 1) {
|
|
this.dict.sex = res.data;
|
|
}
|
|
});
|
|
|
|
//适用性别
|
|
getapi("/api/app/for-sex").then((res) => {
|
|
if (res.code == 1) {
|
|
this.dict.forSex = res.data;
|
|
}
|
|
});
|
|
|
|
//体检中心
|
|
getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
|
|
(res) => {
|
|
if (res.code == 1) {
|
|
this.dict.organization = res.data;
|
|
}
|
|
}
|
|
);
|
|
|
|
//体检单位
|
|
getapi("/api/app/customer-org/in-filter").then((res) => {
|
|
if (res.code == 1) {
|
|
this.dict.customerOrg = res.data.items;
|
|
}
|
|
});
|
|
|
|
//体检类别
|
|
getapi("/api/app/medical-type/in-filter").then((res) => {
|
|
if (res.code == 1) {
|
|
this.dict.medicalType = res.data.items;
|
|
}
|
|
});
|
|
|
|
//人员类别
|
|
getapi("/api/app/personnel-type/in-filter").then((res) => {
|
|
if (res.code == 1) {
|
|
this.dict.personnelType = res.data.items;
|
|
}
|
|
});
|
|
|
|
//婚姻状况
|
|
getapi("/api/app/marital-statuses").then((res) => {
|
|
if (res.code == 1) {
|
|
this.dict.maritalStatus = res.data.items;
|
|
}
|
|
});
|
|
|
|
//性激素期
|
|
getapi("/api/app/sex-hormone-term/in-filter").then((res) => {
|
|
if (res.code == 1) {
|
|
this.dict.sexHormoneTerm = res.data.items;
|
|
}
|
|
});
|
|
|
|
//民族
|
|
getapi("/api/app/nation/in-filter").then((res) => {
|
|
if (res.code != -1) {
|
|
this.dict.nation = res.data;
|
|
}
|
|
});
|
|
|
|
//籍惯 ,出生地
|
|
getapi("/api/app/birth-place/in-filter").then((res) => {
|
|
if (res.code == 1) {
|
|
this.dict.birthPlace = res.data.items;
|
|
}
|
|
});
|
|
|
|
//套餐
|
|
postapi("/api/app/medicalpackage/GetBasicList", {}).then((res) => {
|
|
if (res.code == 1) {
|
|
this.dict.medicalPackage = res.data;
|
|
}
|
|
});
|
|
|
|
//支付方式
|
|
getapi("/api/app/pay-mode").then((res) => {
|
|
if (res.code == 1) {
|
|
this.dict.payMode = res.data;
|
|
}
|
|
});
|
|
|
|
//项目类别 树结构
|
|
// getapi("/api/app/item-type/by-code-all").then((res) => {
|
|
// if (res.code != -1) {
|
|
// this.dict.itemTypeTree = res.data;
|
|
// tcdate(this.dict.itemTypeTree);
|
|
// }
|
|
// });
|
|
|
|
// postapi("/api/app/asbitem/GetBasicList",{isFilterActive:'Y'}).then((res) => {
|
|
// if (res.code != -1) {
|
|
// this.dict.asbItemAll = res.data;
|
|
// }
|
|
// });
|
|
|
|
// console.log("dict", this.dict);
|
|
},
|
|
|
|
|
|
// 获取登记信息 初始form表单数据
|
|
async initFormData(patientRegisterId) {
|
|
this.peisid = window.sessionStorage.getItem('peisid');
|
|
this.preCustomerOrgId = this.preCustomerOrgId || this.patientRegister.query.customerOrgId
|
|
if (!patientRegisterId) { //添加
|
|
objCopy(this.formInit, this.form);
|
|
this.form.medicalCenterId = this.peisid; //体检中收
|
|
this.form.customerOrgId = this.preCustomerOrgId || this.dict.personOrgId //体检单位
|
|
this.form.customerOrgParentId = await this.getParentCustomerOrgId(this.form.customerOrgId) //体检父单位
|
|
|
|
} else {
|
|
// let res = await getapi(`/api/app/patient-register/${patientRegisterId}`)
|
|
let res = await postapi(`/api/app/patientregister/getinfoorpatient?PatientRegisterId=${patientRegisterId}`)
|
|
// this.form = res.data 这种方式,会造成 checkbox 值变化不响应,故取消
|
|
objCopy(res.data, this.form)
|
|
}
|
|
this.initBox();
|
|
this.getPeoplePhoto(this.form.photo)
|
|
this.dataTransOpts.refresh.register_check_asbitem.D++ //触发所选组合项目刷新
|
|
|
|
// 单位/个人 的分组与套餐处理
|
|
this.changeCustomerOrgId(this.form.customerOrgId)
|
|
|
|
},
|
|
|
|
//选择单位
|
|
async changeCustomerOrgId(v) {
|
|
// console.log('changeCustomerOrgId',v)
|
|
let customerOrgId = ""
|
|
if (Array.isArray(v) && v.length > 0) {
|
|
customerOrgId = v[v.length - 1]
|
|
} else {
|
|
customerOrgId = v
|
|
}
|
|
this.preCustomerOrgId = customerOrgId
|
|
let customerOrgParentId = await this.getParentCustomerOrgId(customerOrgId)
|
|
|
|
if (customerOrgParentId) {
|
|
if (customerOrgParentId == this.dict.personOrgId){
|
|
this.form.customerOrgRegisterId = "00000000-0000-0000-0000-000000000001"
|
|
}else{
|
|
// 获取体检次数
|
|
this.getCustomerOrgRegisterList(customerOrgParentId)
|
|
}
|
|
|
|
// 父单位被更改时,需要触发 修改 分组/套餐
|
|
if (this.form.customerOrgParentId != customerOrgParentId) {
|
|
this.form.customerOrgGroupId = null
|
|
this.form.medicalPackageId = null
|
|
// 清除套餐分组标识
|
|
this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
|
|
e.isBelongGroupPackage = 'N'
|
|
});
|
|
|
|
if (customerOrgParentId == this.dict.personOrgId) {
|
|
|
|
this.patientRegister.customerOrgGroup = []
|
|
} else {
|
|
this.form.customerOrgRegisterId = null
|
|
}
|
|
|
|
if (this.form.customerOrgParentId == this.dict.personOrgId) {
|
|
this.changeMedicalPackageId()
|
|
} else {
|
|
this.changeCustomerOrgGroupId()
|
|
}
|
|
this.form.customerOrgParentId = customerOrgParentId
|
|
}
|
|
}
|
|
},
|
|
|
|
// 获取顶级单位ID
|
|
async getParentCustomerOrgId(customerOrgId) {
|
|
let customerOrgParentId = null
|
|
if (!customerOrgId) return customerOrgParentId
|
|
if (typeof customerOrgId == 'string') {
|
|
try {
|
|
let res = await getapi(`/api/app/customer-org/parent/${customerOrgId}`)
|
|
if (res.code != -1) customerOrgParentId = res.data
|
|
} catch (error) {
|
|
console.log('获取顶级单位ID出错:', error)
|
|
}
|
|
} else if (customerOrgId.length > 0) {
|
|
customerOrgParentId = customerOrgId[0]
|
|
}
|
|
return customerOrgParentId
|
|
},
|
|
|
|
//获取单位体检次数
|
|
getCustomerOrgRegisterList(customerOrgParentId) {
|
|
//获取单位体检次数信息
|
|
getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${customerOrgParentId}`)
|
|
.then(res => {
|
|
if (res.code != - 1) {
|
|
console.log('获取单位体检次数', this.form.customerOrgRegisterId, res.data)
|
|
if (this.form.customerOrgRegisterId) {
|
|
let lfind = arrayExistObj(res.data, "id", this.form.customerOrgRegisterId)
|
|
if (lfind == -1) this.form.customerOrgRegisterId = ''
|
|
}
|
|
if (!this.form.customerOrgRegisterId) {
|
|
this.customerOrgRegisterList = arrayFilter(res.data, 'isComplete', 'N') //不显示已完成的体检次数
|
|
if (this.customerOrgRegisterList.length > 0) {
|
|
this.form.customerOrgRegisterId = this.customerOrgRegisterList[this.customerOrgRegisterList.length - 1].id
|
|
}
|
|
}
|
|
if (this.form.customerOrgRegisterId) return getapi(`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${this.form.customerOrgRegisterId}`) //获取单位分组
|
|
}
|
|
}).then(res => {
|
|
if (res && res.code != -1) {
|
|
this.patientRegister.customerOrgGroup = res.data.items;
|
|
}
|
|
})
|
|
},
|
|
|
|
//读取身份证信息
|
|
peopleIcCard() {
|
|
if (!this.$peisAPI) {
|
|
this.$message.info("此功能,需要在壳客户端才可运行!")
|
|
return
|
|
}
|
|
this.$peisAPI.peopleIcCard().then(res => {
|
|
console.log('peopleIcCard', res)
|
|
let lres = JSON.parse(res)
|
|
if (lres.code >= 0) {
|
|
let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation)
|
|
this.form.patientName = idNos.Name
|
|
this.form.birthDate = idNos.birthDate
|
|
this.form.sexId = idNos.sexId
|
|
this.form.age = idNos.age
|
|
this.form.nationId = idNos.nationId
|
|
this.form.idNo = idNos.IDCode
|
|
this.form.address = idNos.Address
|
|
this.peoplePhoto = 'data:image/bmp;base64,' + idNos.Photo
|
|
this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
|
|
|
|
this.changeIdNo() // 触发身份证查询档案号
|
|
}
|
|
})
|
|
},
|
|
|
|
//获取单位体检次数列表,并默认赋最后一次体检次数
|
|
// async getCustomerOrgRegisterList() {
|
|
// this.customerOrgRegisterList = []
|
|
// if (this.form.customerOrgId == this.dict.personOrgId) {
|
|
// this.form.customerOrgRegisterId = null
|
|
// return
|
|
// }
|
|
// try {
|
|
// let res = await getapi(`/api/app/customer-org/parent/${this.form.customerOrgId}`);
|
|
// let res1 = await getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res.data}`);
|
|
// this.customerOrgRegisterList = arrayFilter(res1.data, 'isComplete', 'N')
|
|
|
|
// //要把已完成体检的次数去掉 (查询时不能触发保存)
|
|
// // if (this.customerOrgRegisterList.length > 0) {
|
|
// // this.form.customerOrgRegisterId = this.customerOrgRegisterList[this.customerOrgRegisterList.length - 1].id
|
|
// // //this.changeCustomerOrgGroupId()
|
|
// // this.changeMedicalTimes()
|
|
// // }
|
|
|
|
// } catch (error) {
|
|
// console.log(error)
|
|
// }
|
|
// },
|
|
|
|
//修改单位体检次数
|
|
changeMedicalTimes() {
|
|
|
|
this.form.customerOrgGroupId = null
|
|
this.changeCustomerOrgGroupId()
|
|
|
|
//获取体检次数下的分组
|
|
this.getCustomerOrgGroup(this.form.customerOrgRegisterId)
|
|
},
|
|
|
|
//移除旧分组或套餐的组合项目
|
|
removeGroupPackageAsb() {
|
|
let body = { registerAsbitemIds: [] }
|
|
let registerAsbitemIds = []
|
|
let chargeComplete = ''
|
|
|
|
//体检基本信息未保存时,删除所有所选项目
|
|
if (!this.form.id) {
|
|
this.patientRegister.patientRegisterAbs = [];
|
|
return body;
|
|
}
|
|
|
|
//删除已选 分组或套餐的组合项目 ,如已收费或 已检时,将 groupPackageId 置为null
|
|
for (let i = 0; i < this.patientRegister.patientRegisterAbs.length; i++) {
|
|
if (!this.patientRegister.patientRegisterAbs[i].id) {
|
|
this.patientRegister.patientRegisterAbs.splice(i, 1)
|
|
i--
|
|
continue
|
|
}
|
|
if (this.patientRegister.patientRegisterAbs[i].isCharge == 'Y' || this.patientRegister.patientRegisterAbs[i].checkCompleteFlag != '0') {
|
|
chargeComplete += this.patientRegister.patientRegisterAbs[i].asbitemName + ','
|
|
this.patientRegister.patientRegisterAbs[i].groupPackageId = null
|
|
} else {
|
|
//数据库有,才添加到待删除的数组中
|
|
if (this.patientRegister.patientRegisterAbs[i].id) {
|
|
registerAsbitemIds.push(this.patientRegister.patientRegisterAbs[i].id)
|
|
}
|
|
this.patientRegister.patientRegisterAbs.splice(i, 1)
|
|
i--
|
|
}
|
|
}
|
|
|
|
if (chargeComplete) {
|
|
this.$message({ type: "info", message: `所选项目:${chargeComplete}已收费或已检,不可删除!` });
|
|
}
|
|
|
|
body = { registerAsbitemIds };
|
|
|
|
return body;
|
|
|
|
},
|
|
|
|
//添加新套餐/分组的组合项目
|
|
addGroupPackageAsb(groupPackageAsb, typeFlag, groupPackageId) {
|
|
|
|
let payTypeFlag = '0'; //默认个人支付
|
|
let lfind = -1
|
|
|
|
|
|
if (this.form.customerOrgId != this.dict.personOrgId) payTypeFlag = '1' //单位支付
|
|
|
|
for (let i = 0; i < groupPackageAsb.length; i++) {
|
|
lfind = arrayExistObj(this.patientRegister.patientRegisterAbs, 'asbitemId', groupPackageAsb[i].id)
|
|
if (lfind > - 1) {
|
|
this.patientRegister.patientRegisterAbs[lfind].groupPackageId = groupPackageId
|
|
//editCount++
|
|
continue
|
|
}
|
|
let pojo = {
|
|
asbitemId: groupPackageAsb[i].id,
|
|
asbitemName: groupPackageAsb[i].displayName,
|
|
patientRegisterId: this.form.id,
|
|
standardPrice: groupPackageAsb[i].price,
|
|
chargePrice: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailPrice : groupPackageAsb[i].price,
|
|
payTypeFlag,
|
|
discount: typeFlag == 'group' ? groupPackageAsb[i].discount : 100,
|
|
isCharge: "N",
|
|
amount: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailAmount : 1,
|
|
groupPackageId: groupPackageId
|
|
}
|
|
this.patientRegister.patientRegisterAbs.push(pojo)
|
|
}
|
|
},
|
|
|
|
|
|
|
|
//获取体检次数下的分组
|
|
getCustomerOrgGroup(customerOrgRegisterId) {
|
|
this.patientRegister.customerOrgGroup = []
|
|
getapi(`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`).then(res => {
|
|
if (res.code != - 1) {
|
|
this.patientRegister.customerOrgGroup = res.data.items;
|
|
}
|
|
})
|
|
},
|
|
|
|
//修改出生日期
|
|
changeBirthDate() {
|
|
this.form.age = birthdayToAge(this.form.birthDate)
|
|
},
|
|
|
|
//修改出生日期
|
|
changeAge() {
|
|
this.form.birthDate = ageToBirthday(this.form.age)
|
|
},
|
|
|
|
//修改身份证,生成年龄、出生、性别
|
|
changeIdNo() {
|
|
if(!this.form.idNo) return
|
|
this.Query(this.form.idNo)
|
|
let ret = parseID(this.form.idNo)
|
|
if (ret.age != -1) {
|
|
this.form.birthDate = new Date(ret.birthday)
|
|
this.form.age = ret.age
|
|
this.form.sexId = ret.sex
|
|
}
|
|
},
|
|
|
|
// //分组改变时触发
|
|
changeCustomerOrgGroupId() {
|
|
// this.patientRegister.customerOrgGroupChange++;
|
|
// if (this.form.id) this.btnSubmit('form', false);
|
|
// this.getGroupPackageAsb('group',this.form.customerOrgGroupId)
|
|
this.prAsbOpraOpts.prAsbGroup++
|
|
|
|
},
|
|
|
|
// //套餐改变时触发
|
|
changeMedicalPackageId() {
|
|
// this.patientRegister.medicalPackageChange++;
|
|
// if (this.form.id) this.btnSubmit('form', false);
|
|
// this.getGroupPackageAsb('package',this.form.medicalPackageId)
|
|
this.prAsbOpraOpts.prAsbPackage++
|
|
},
|
|
|
|
//根据姓名,身份证号 查询档案信息,用于判断人员多次体检
|
|
Query(param) {
|
|
//编辑的时候不查重
|
|
if (this.form.id || !param) return;
|
|
|
|
//console.log(`/api/app/patient/in-filter?Filter=${param}`)
|
|
let body = {
|
|
filter: param,
|
|
maxResultCount: 500
|
|
}
|
|
|
|
postapi('/api/app/patient/getlistinfilter', body).then((res) => {
|
|
if (res.code != -1) {
|
|
console.log("查重 ", res); //有数据才显示
|
|
if (res.data.items && res.data.items.length > 0) {
|
|
this.patientList = res.data.items;
|
|
this.dialogVisible = true;
|
|
}
|
|
}
|
|
});
|
|
|
|
},
|
|
|
|
//列表选中
|
|
rowick(row) {
|
|
this.patientChoosed = row;
|
|
},
|
|
|
|
patientDblclick(row) {
|
|
this.patientChoosed = row;
|
|
this.choosePatient()
|
|
},
|
|
|
|
//确定选择人员
|
|
choosePatient() {
|
|
if (!this.patientChoosed) {
|
|
alert("请选中人员档案信息");
|
|
return;
|
|
}
|
|
|
|
this.dialogVisible = false;
|
|
|
|
this.form.patientId = this.patientChoosed.id;
|
|
this.form.patientName = this.patientChoosed.displayName;
|
|
this.form.sexId = this.patientChoosed.sexId;
|
|
this.form.maritalStatusId = this.patientChoosed.maritalStatusId;
|
|
this.form.birthDate = new Date(this.patientChoosed.birthDate);
|
|
this.form.nationId = this.patientChoosed.nationId;
|
|
this.form.idNo = this.patientChoosed.idNo;
|
|
this.form.telephone = this.patientChoosed.telephone;
|
|
this.form.mobileTelephone = this.patientChoosed.mobileTelephone;
|
|
this.form.patientNo = this.patientChoosed.patientNo;
|
|
this.form.medicalTimes = this.patientChoosed.medicalTimes + 1;
|
|
|
|
if (this.form.birthDate) {
|
|
this.form.age = birthdayToAge(this.form.birthDate)
|
|
}
|
|
|
|
if (this.form.idNo) {
|
|
let ret = parseID(this.form.idNo)
|
|
|
|
if (!this.form.birthDate) this.form.birthDate = new Date(ret.birthday)
|
|
if (!this.form.age) this.form.age = ret.age
|
|
if (!this.form.sexId) this.form.age = ret.sex
|
|
}
|
|
|
|
},
|
|
|
|
registerRowClick(row) {
|
|
this.registerChoosed = row;
|
|
},
|
|
registerRowDblclick(row) {
|
|
this.registerChoosed = row;
|
|
this.chooseRegister()
|
|
},
|
|
|
|
chooseRegister() {
|
|
if (!this.registerChoosed) {
|
|
alert("请选中人员登记信息");
|
|
return;
|
|
}
|
|
|
|
objCopy(this.registerChoosed, this.form)
|
|
// this.patientRegister.patientRegisterId = this.registerChoosed.id
|
|
// this.patientRegister.photo = this.registerChoosed.photo
|
|
// this.getPatientRegisterAbs(this.registerChoosed.id)
|
|
this.dataTransOpts.tableS.patient_register.id = this.registerChoosed.id
|
|
setTimeout(() => {
|
|
this.dataTransOpts.refresh.register_check_asbitem.M++
|
|
}, 20);
|
|
|
|
this.registerVisible = false
|
|
|
|
},
|
|
|
|
changeBox(type) {
|
|
//赋值
|
|
if (this.form[type + 'Box']) {
|
|
this.form[type] = 'Y';
|
|
} else {
|
|
this.form[type] = 'N';
|
|
}
|
|
console.log('Box-type', this.form[type + 'Box'], this.form[type])
|
|
},
|
|
|
|
initBox() {
|
|
if (this.form.isVip == 'Y') {
|
|
this.form.isVipBox = true;
|
|
} else {
|
|
this.form.isVipBox = false;
|
|
}
|
|
|
|
if (this.form.isNameHide == 'Y') {
|
|
this.form.isNameHideBox = true;
|
|
} else {
|
|
this.form.isNameHideBox = false;
|
|
}
|
|
|
|
if (this.form.isPhoneFollow == 'Y') {
|
|
this.form.isPhoneFollowBox = true;
|
|
} else {
|
|
this.form.isPhoneFollowBox = false;
|
|
}
|
|
|
|
if (this.form.isLock == 'Y') {
|
|
this.form.isLockBox = true;
|
|
} else {
|
|
this.form.isLockBox = false;
|
|
}
|
|
|
|
if (!this.form.id) {
|
|
this.form.medicalCenterId = this.peisid;
|
|
}
|
|
},
|
|
|
|
// 组装基本信息保存的参数体
|
|
madePrBody() {
|
|
//赋值
|
|
let body = deepCopy(this.form);
|
|
// console.log('this.form',this.form)
|
|
// console.log('body',body)
|
|
if (this.form.birthDate) {
|
|
try {
|
|
body.birthDate = moment(body.birthDate).format("yyyy-MM-DD")
|
|
} catch (error) {
|
|
// this.form.birthDate != "Invalid date"
|
|
body.birthDate = null
|
|
}
|
|
} else {
|
|
body.birthDate = null
|
|
}
|
|
if (body.birthDate == "Invalid date") body.birthDate = null
|
|
if (isNaN(body.age)) body.age = null
|
|
// console.log('body',body)
|
|
// Invalid date
|
|
|
|
delete body.registerManType;
|
|
delete body.patientRegisterNo;
|
|
delete body.medicalTimes;
|
|
// delete body.completeFlag;
|
|
delete body.isMedicalStart;
|
|
delete body.patientNo;
|
|
delete body.creatorId;
|
|
delete body.creationTime;
|
|
delete body.lastModificationTime;
|
|
delete body.lastModifierId;
|
|
delete body.isVipBox;
|
|
delete body.isNameHideBox;
|
|
delete body.isPhoneFollowBox;
|
|
delete body.isLockBox;
|
|
delete body.photo;
|
|
|
|
// if(this.form.registerManType == 'customer') delete body.medicalStartDate;
|
|
if (this.form.id) delete body.medicalStartDate;
|
|
|
|
setNull(body, this.defaultNull);
|
|
|
|
if (typeof this.form.customerOrgId == 'object') {
|
|
if (this.form.customerOrgId.length > 0) body.customerOrgId = this.form.customerOrgId[this.form.customerOrgId.length - 1]
|
|
}
|
|
|
|
//日期转换 日期控件增加格式
|
|
// console.log("body.birthDate", body.birthDate);
|
|
// if (body.birthDate) {
|
|
// body.birthDate = moment(new Date(body.birthDate)).format(
|
|
// "yyyy-MM-DD"
|
|
// );
|
|
// }
|
|
return body
|
|
},
|
|
|
|
//提交
|
|
btnSubmit(formName, msgTip) {
|
|
this.$refs[formName].validate((valid, fields) => {
|
|
console.log('fields', fields)
|
|
if (!valid) {
|
|
this.$message.warning(fields[Object.keys(fields)[0]][0].message);
|
|
return false
|
|
}
|
|
|
|
if (this.form.customerOrgId != this.dict.personOrgId) {
|
|
if (!this.form.customerOrgRegisterId) {
|
|
this.$message.warning("请填写单位体检次数!");
|
|
return false
|
|
}
|
|
}
|
|
|
|
if (this.form.idNo && checkIDCode(this.form.idNo) == false) {
|
|
this.$message.warning("身份证号填写不合法!");
|
|
return false
|
|
}
|
|
let body = this.madePrBody()
|
|
body.registerCheckAsbitems = deepCopy(this.dataTransOpts.tableM.register_check_asbitem)
|
|
|
|
if (this.form.id) {
|
|
// 更新时,先保存明细,再更新主表
|
|
// this.prAsbOpraOpts.prAsbSave++ //触发组合项目保存
|
|
body.patientRegisterId = body.id;
|
|
} else {
|
|
delete body.id;
|
|
}
|
|
// console.log(`/api/patientregister/createreturninfo`, body);
|
|
postapi(`/api/PatientRegister/CreatePatientRegister`, body)
|
|
.then(res => {
|
|
if (res.code == 1) {
|
|
objCopy(res.data,this.form)
|
|
|
|
this.dataTransOpts.tableS.patient_register = deepCopy(res.data)
|
|
|
|
delete this.dataTransOpts.tableS.patient_register.registerCheckAsbitems
|
|
|
|
// 保存成功赋 id 值等
|
|
this.dataTransOpts.tableM.register_check_asbitem = deepCopy(res.data.registerCheckAsbitems)
|
|
// //触发已选组合项目保存
|
|
// this.prAsbOpraOpts.formId = res.data.id
|
|
// setTimeout(() => {
|
|
// this.dataTransOpts.refresh.register_check_asbitem.D++
|
|
// }, 10);
|
|
|
|
// 用于刷新登记的列表
|
|
// this.refreshRegister(Object.assign({}, res.data))
|
|
|
|
//一般读身份证照片时,会出现这种情况
|
|
if (this.patientRegister.photo && this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(res.data.id, this.patientRegister.photo);
|
|
}
|
|
}
|
|
);
|
|
|
|
});
|
|
},
|
|
|
|
// 人员新增
|
|
btnAdd(){
|
|
this.dataTransOpts.tableS.patient_register.id = ''
|
|
this.dataTransOpts.refresh.patient_register.S++
|
|
},
|
|
|
|
//将现有的数据,复制并展现,但未保存
|
|
rdCopy() {
|
|
if (!this.form.id) {
|
|
this.$message.info("该信息尚未保存,不可执行此操作!");
|
|
return;
|
|
}
|
|
this.dataTransOpts.tableS.patient_register.id = ''
|
|
this.patientRegister.photo = '/pic/Photo.jpg'
|
|
this.patientRegister.patientRegisterId = '';
|
|
this.form.id = '';
|
|
this.form.patientId = '00000000-0000-0000-0000-000000000000';
|
|
this.form.patientRegisterNo = '';
|
|
this.form.patientNo = '';
|
|
this.form.medicalTimes = 1;
|
|
this.form.patientName = '';
|
|
this.form.photo = '';
|
|
this.form.completeFlag = '1'; //
|
|
|
|
// this.patientRegister.patientRegisterAbs.forEach(e => {
|
|
// e.id = '';
|
|
// e.patientRegisterId = '';
|
|
// e.isCharge = 'N';
|
|
// e.checkCompleteFlag = '0'
|
|
// e.isLock = 'N'
|
|
// });
|
|
|
|
// 触发明细项目复制
|
|
// setTimeout(() => {
|
|
// this.prAsbOpraOpts.copyNew++
|
|
// }, 10);
|
|
this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
|
|
delete e.id
|
|
e.patientRegisterId = ''
|
|
e.isCharge = 'N'
|
|
e.isLock = 'N'
|
|
});
|
|
// console.log('this.patientRegister.patientRegisterAbs',this.patientRegister.patientRegisterAbs)
|
|
this.$message.info("操作成功,请记得点保存");
|
|
|
|
},
|
|
|
|
//删除
|
|
del() {
|
|
deletapi(
|
|
`/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`
|
|
).then((res) => {
|
|
console.log("删除 操作成功");
|
|
this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } });
|
|
this.getCustomerOrgTree();
|
|
});
|
|
},
|
|
|
|
//拍照(已废弃)
|
|
// openCamera() {
|
|
// if (!this.form.id) {
|
|
// alert("请先保存人员信息");
|
|
// return;
|
|
// }
|
|
// this.patientRegister.cameraVisble = true;
|
|
// },
|
|
|
|
//拍照(调壳程序)
|
|
photoGrah() {
|
|
if (!this.form.id) {
|
|
alert("请先保存人员信息");
|
|
return;
|
|
}
|
|
if (!this.$peisAPI) {
|
|
this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
|
|
return
|
|
}
|
|
this.$peisAPI.photoGrah()
|
|
.then(res => {
|
|
console.log('this.$peisAPI.photoGrah 原始返回结果', res)
|
|
let lres = JSON.parse(res)
|
|
if (lres.code == 1) {
|
|
let uploadPhoto = {
|
|
patientRegisterId: this.form.id,
|
|
photo: lres.data.Photo,
|
|
};
|
|
this.peoplePhoto = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg' : lres.data.PhotoFormat};base64,${lres.data.Photo}`
|
|
this.patientRegister.photo = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg' : lres.data.PhotoFormat};base64,${lres.data.Photo}`
|
|
return postapi(`/api/app/patient-register/up-load-img`, uploadPhoto)
|
|
} else {
|
|
this.$message.error("上传照片错误" + lres.code)
|
|
}
|
|
}).then(res => {
|
|
if (res.code == 1) {
|
|
let body = {
|
|
patientRegisterId: this.form.id,
|
|
photo: res.data,
|
|
};
|
|
console.log(body);
|
|
return postapi(`/api/app/patient-register/update-photo`, body);
|
|
}
|
|
}).then(res => {
|
|
if (res.code != -1) {
|
|
//console.log('拍照',res.data)
|
|
this.patientRegister.patientRegisterRd.photo = res.data.photo
|
|
console.log("操作成功");
|
|
}
|
|
}).catch(err => {
|
|
console.log('this.$peisAPI.photoGrah', err)
|
|
})
|
|
},
|
|
|
|
getPeoplePhoto(photo) {
|
|
this.peoplePhoto = photoParse(photo)
|
|
},
|
|
|
|
// 打印指引单(isPreview)
|
|
async guidePrint(ReportCode, isPreview) {
|
|
if (this.form.id.length < 1) {
|
|
this.$message.info("人员信息尚未保存,不可执行此操作!");
|
|
return;
|
|
}
|
|
if (!this.$peisAPI) {
|
|
this.$message.info("此功能,需要在壳客户端才可运行!")
|
|
return
|
|
}
|
|
|
|
let token = window.sessionStorage.getItem('token');
|
|
let user = window.sessionStorage.getItem('user');
|
|
let toOutShell = {
|
|
ReportCode, token,
|
|
preViewCanPrint: 'N',
|
|
Parameters: [
|
|
{ Name: 'printer', Value: user },
|
|
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' },
|
|
],
|
|
};
|
|
|
|
|
|
if (isPreview) {
|
|
//
|
|
//this.multipleSelection.forEach((item,index) =>{
|
|
postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
|
|
.then((res) => {
|
|
if (res.code != -1) {
|
|
toOutShell.ReportTable = res.data;
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
|
|
return this.$peisAPI.printPre(JSON.stringify(toOutShell));
|
|
}
|
|
})
|
|
.catch(err => {
|
|
this.$message.warning(err);
|
|
});
|
|
// });
|
|
} else {
|
|
|
|
postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
|
|
.then((res) => {
|
|
if (res.code != -1) {
|
|
toOutShell.ReportTable = res.data;
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
|
|
return this.$peisAPI.print(JSON.stringify(toOutShell));
|
|
}
|
|
})
|
|
.then(res => {
|
|
//console.log('this.$peisAPI.print',res)
|
|
if (JSON.parse(res).code >= 0) {
|
|
//更新打印次数
|
|
return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
|
|
}
|
|
})
|
|
.then(res => {
|
|
if (res.code != -1) {
|
|
let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
|
|
if (lfind > -1) {
|
|
if (this.patientRegister.prList[lfind].guidePrintTimes) {
|
|
this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
|
|
} else {
|
|
this.patientRegister.prList[lfind].guidePrintTimes = 1;
|
|
}
|
|
}
|
|
}
|
|
})
|
|
.catch(err => {
|
|
this.$message.warning(err);
|
|
});
|
|
|
|
}
|
|
},
|
|
|
|
//检验申请
|
|
async lisRequest() {
|
|
let isPrintLisRequest = false
|
|
let res = null
|
|
if (this.form.id.length < 1) {
|
|
this.$message.info("人员信息尚未保存,不可执行此操作!");
|
|
return;
|
|
}
|
|
|
|
try {
|
|
res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`);
|
|
console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, res)
|
|
} catch (error) {
|
|
return;
|
|
}
|
|
if (res.code != -1) {
|
|
this.$message.info("发送检验申请成功!");
|
|
isPrintLisRequest = true;
|
|
}
|
|
|
|
//重复申请,重打
|
|
if (res.code == -1 && res.message.indexOf('已申请') > -1) {
|
|
isPrintLisRequest = true;
|
|
}
|
|
|
|
if (!isPrintLisRequest) return;
|
|
|
|
try {
|
|
await this.$confirm("是否打印检验申请单?", "提示", {
|
|
confirmButtonText: "是",
|
|
cancelButtonText: "否",
|
|
type: "info",
|
|
showClose: false,
|
|
closeOnClickModal: false,
|
|
closeOnPressEscape: false,
|
|
});
|
|
} catch (error) {
|
|
return;
|
|
}
|
|
//打印检验申请单
|
|
this.lisPrint('0003', false);
|
|
},
|
|
|
|
//条码打印
|
|
lisPrint(ReportCode, isPreview) {
|
|
if (this.form.id.length < 1) {
|
|
this.$message.info("人员信息尚未保存,不可执行此操作!");
|
|
return;
|
|
}
|
|
if (!this.$peisAPI) {
|
|
this.$message.info("此功能,需要在壳客户端才可运行!")
|
|
return
|
|
}
|
|
|
|
let token = window.sessionStorage.getItem('token');
|
|
let user = window.sessionStorage.getItem('user');
|
|
let toOutShell = {
|
|
ReportCode, token,
|
|
Parameters: [
|
|
{ Name: 'printer', Value: user },
|
|
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' },
|
|
],
|
|
};
|
|
|
|
|
|
if (isPreview) {
|
|
//http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295
|
|
//this.multipleSelection.forEach((item,index) =>{
|
|
postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
|
|
.then((res) => {
|
|
if (res.code != -1) {
|
|
toOutShell.ReportTable = { lisRequest: res.data };
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
|
|
return this.$peisAPI.printPre(JSON.stringify(toOutShell));
|
|
}
|
|
})
|
|
.catch(err => {
|
|
this.$message.warning(err);
|
|
});
|
|
// });
|
|
} else {
|
|
|
|
postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
|
|
.then((res) => {
|
|
if (res.code != -1) {
|
|
toOutShell.ReportTable = { lisRequest: res.data };
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
|
|
return this.$peisAPI.print(JSON.stringify(toOutShell));
|
|
}
|
|
})
|
|
.then(res => {
|
|
if (res.code != -1) {
|
|
//更新打印状态 /api/app/lisrequest/updatelisrequestisprint
|
|
// {
|
|
// "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId)
|
|
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
// "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
// }
|
|
return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.form.id })
|
|
}
|
|
})
|
|
.catch(err => {
|
|
this.$message.warning(err);
|
|
});
|
|
|
|
}
|
|
},
|
|
|
|
//补打条码
|
|
reLisRequest() {
|
|
if (this.form.id.length < 1) {
|
|
this.$message.info("人员信息尚未保存,不可执行此操作!");
|
|
return;
|
|
}
|
|
this.brushTimes++;
|
|
this.patientRegister.lisRequestVisble = true;
|
|
},
|
|
|
|
//手动合并项目
|
|
reMergeAsbitem() {
|
|
if (this.form.id.length < 1) {
|
|
this.$message.info("人员信息尚未保存,不可执行此操作!");
|
|
return;
|
|
}
|
|
this.brushTimes++;
|
|
this.patientRegister.mergeAsbitemVisble = true;
|
|
},
|
|
|
|
async toCharge(patientRegisterNo) {
|
|
|
|
if (!patientRegisterNo) {
|
|
this.$message.warning("请先保存人员信息!")
|
|
return
|
|
}
|
|
|
|
let chargeMoney = Number(0)
|
|
//支付方式,比如是0自费、2免费、1单位支付
|
|
this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
|
|
if (e.payTypeFlag == '0' && e.isCharge == 'N') chargeMoney += Number(e.total)
|
|
});
|
|
if (chargeMoney == 0) {
|
|
this.$message.warning({ showClose: true, message: '没有可收费的记录!' })
|
|
return
|
|
}
|
|
|
|
|
|
// try {
|
|
// let res = await proApi.getPrAsb(this.form.id)
|
|
// if (res.code == -1) {
|
|
// this.$message.warning(`操作失败,原因:${res.message}`)
|
|
// return
|
|
// }
|
|
// } catch (error) {
|
|
// this.$message.warning(`操作失败,原因:${error}`)
|
|
// return
|
|
// }
|
|
|
|
|
|
//多次重复点击时,刷新处理
|
|
this.chargePatientRegisterNo = patientRegisterNo
|
|
setTimeout(() => {
|
|
this.dataTransOpts.refresh.charge.S++
|
|
}, 10)
|
|
this.dialogWin.charge = true
|
|
|
|
},
|
|
|
|
//关闭收费窗口时,刷新收费状态信息
|
|
closeDialogCharge() {
|
|
// this.prAsbOpraOpts.prAsbQuery++
|
|
this.dataTransOpts.refresh.register_check_asbitem.D++
|
|
},
|
|
|
|
//触发人员信息保存(更新)
|
|
triggerHeadSave() {
|
|
//id不为空则编辑 api/patientregister/updatepatientregister
|
|
let body = this.madePrBody()
|
|
// console.log(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body);
|
|
postapi(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body).then((res) => {
|
|
if (res.code != -1) {
|
|
console.log("操作成功");
|
|
//一般读身份证照片时,会出现这种情况
|
|
if (this.patientRegister.photo && this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(this.form.id, this.patientRegister.photo);
|
|
objCopy(this.form, this.patientRegister.patientRegisterRd);
|
|
|
|
this.refreshRegister(Object.assign({}, this.form))
|
|
}
|
|
});
|
|
|
|
},
|
|
|
|
// 新增保存基本信息产生新的ID,等明细保存后,再更新表单form.id
|
|
refreshFormId() {
|
|
console.log('refreshFormId', this.prAsbOpraOpts.formId)
|
|
this.form.id = this.prAsbOpraOpts.formId
|
|
this.prAsbOpraOpts.formId = '' //清空
|
|
|
|
/**/
|
|
// this.patientRegister.prList.push(res.data); //列表添加记录
|
|
this.patientRegister.patientRegisterId = this.form.id;
|
|
objCopy(this.form, this.patientRegister.patientRegisterRd);
|
|
|
|
//this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新)放在窗口关闭事件中去
|
|
// let curRow = deepCopy(this.patientRegister.patientRegisterRd)
|
|
// curRow.index = this.patientRegister.prList.length
|
|
// this.patientRegister.prList.push(curRow)
|
|
},
|
|
|
|
//回车替代tab键
|
|
enterToTab() {
|
|
this.$nextTick(() => {
|
|
let inputs = document.querySelectorAll("form input"); //用数组可以读取多个标签的元素 //.inline-input
|
|
//console.log('inputs',inputs);
|
|
// 为每个输入框添加键盘事件监听器
|
|
inputs.forEach((input, i) => {
|
|
|
|
input.addEventListener('keydown', (event) => {
|
|
|
|
// 如果按下的是回车键
|
|
// console.log('data-ismultiline',input.getAttribute('data-ismultiline'));
|
|
|
|
if (event.keyCode === 13) {
|
|
// 阻止回车键的默认行为(换行)
|
|
event.preventDefault();
|
|
|
|
// 跳至下一个输入框
|
|
for (let j = i + 1; j < inputs.length; j++) {
|
|
if (inputs[j].getAttribute('disabled') != "disabled") {
|
|
inputs[j].focus();
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
},
|
|
|
|
},
|
|
|
|
//监听事件
|
|
watch: {
|
|
//人员ID未切换换时 也可以强制刷新数据
|
|
"dataTransOpts.refresh.patient_register.S": {
|
|
// immediate: true,
|
|
handler(newVal, oldVal) {
|
|
console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`);
|
|
this.initFormData(this.dataTransOpts.tableS.patient_register.id)
|
|
}
|
|
},
|
|
|
|
//拍照触发
|
|
"form.photo"(newVal, oldVal) {
|
|
//console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
|
|
if (newVal != oldVal) {
|
|
this.getPeoplePhoto(newVal)
|
|
}
|
|
},
|
|
|
|
//修改单位触发
|
|
"form.customerOrgId": {
|
|
// immediate:true,
|
|
// // deep:true,
|
|
handler(newVal, oldVal) {
|
|
//console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
|
|
if (newVal != oldVal) {
|
|
this.changeCustomerOrgId(newVal)
|
|
}
|
|
}
|
|
},
|
|
|
|
// 从体检人员登记列表 点登记,触发
|
|
// 清空查询条件
|
|
"dataTransOpts.plus.clearPatientRegisterQuery":{
|
|
immediate:true,
|
|
handler(newVal, oldVal) {
|
|
console.log('从体检人员登记列表 点登记,触发',newVal, oldVal)
|
|
if(newVal != oldVal){
|
|
this.preCustomerOrgId = this.patientRegister.query.customerOrgId
|
|
console.log('this.preCustomerOrgId',this.preCustomerOrgId)
|
|
}
|
|
}
|
|
},
|
|
|
|
},
|
|
};
|
|
</script>
|
|
<style scoped>
|
|
.btn {
|
|
margin-top: 5px;
|
|
}
|
|
|
|
.commonbutton {
|
|
width: 100px;
|
|
}
|
|
|
|
.query {
|
|
margin-left: 10px;
|
|
}
|
|
|
|
.querySpan {
|
|
margin-right: 2px;
|
|
}
|
|
</style>
|