pengjun 2 years ago
parent
commit
9ba4344d50
  1. 6
      src/components/patientRegister/LisRequest.vue
  2. 8
      src/components/patientRegister/MergeAsbitem.vue
  3. 479
      src/components/patientRegister/PatientRegisterEdit.vue
  4. 154
      src/components/patientRegister/PatientRegisterEditItemBatch.vue
  5. 2
      src/components/patientRegister/PatientRegisterItem.vue
  6. 436
      src/components/patientRegister/PatientRegisterList.vue
  7. 52
      src/components/patientRegister/patientRegisterAsbItem.vue
  8. 3
      src/store/index.js

6
src/components/patientRegister/LisRequest.vue

@ -25,13 +25,13 @@
<!-- 按钮区域 -->
<div style="display: flex; margin-top: 30px; margin-left: 280px">
<div style="margin-left: 10px">
<el-button type="primary" @click="submit" style="width:80px;">确定</el-button>
<el-button class="commonbutton" type="primary" @click="submit" style="width:80px;">确定</el-button>
</div>
<div style="margin-left: 10px">
<el-button type="success" @click="lisPrint('0002', false)" style="width:80px;">条码打印</el-button>
<el-button class="commonbutton" type="success" @click="lisPrint('0002', false)" style="width:80px;">条码打印</el-button>
</div>
<div style="margin-left: 10px">
<el-button type="danger" @click="patientRegister.lisRequestVisble = false" style="width:80px;">关闭</el-button>
<el-button class="commonbutton" type="danger" @click="patientRegister.lisRequestVisble = false" style="width:80px;">关闭</el-button>
</div>
</div>
</div>

8
src/components/patientRegister/MergeAsbitem.vue

@ -11,7 +11,7 @@
<el-table :data="tableData" border style="width: 100%" row-key="id" height="300" highlight-current-row size="small"
@selection-change="handleSelectionChange" :span-method="spanMethod" ref="tableData"
:row-style="{ height: '30px' }">
<el-table-column type="selection" :selectable="selectable" />
<el-table-column type="selection" :selectable="selectable" align="center" />
<el-table-column label="项目类别" width="120" prop="itemTypeName" />
<el-table-column label="组合项目" width="140" prop="asbitemName" />
<!-- isItemResultMerger 项目是否可以合并 -->
@ -31,13 +31,13 @@
<!-- 按钮区域 -->
<div style="display: flex; margin-top: 30px; margin-left: 280px">
<div style="margin-left: 10px">
<el-button type="primary" @click="mergeSubmit" style="width:80px;">合并项目</el-button>
<el-button class="commonbutton" type="primary" @click="mergeSubmit" style="width:80px;">合并项目</el-button>
</div>
<div style="margin-left: 10px">
<el-button type="info" @click="unMergeSubmit" style="width:80px;">取消合并</el-button>
<el-button class="commonbutton" type="info" @click="unMergeSubmit" style="width:80px;">取消合并</el-button>
</div>
<div style="margin-left: 10px">
<el-button type="danger" @click="patientRegister.mergeAsbitemVisble = false" style="width:80px;">关闭</el-button>
<el-button class="commonbutton" type="danger" @click="patientRegister.mergeAsbitemVisble = false" style="width:80px;">关闭</el-button>
</div>
</div>
</div>

479
src/components/patientRegister/PatientRegisterEdit.vue

@ -1,10 +1,11 @@
<template>
<div>
<!--组件主体-->
<div style="display: flex">
<div :style="'width:' + (window.pageWidth - 110 - 20) + 'px;'">
<!--查询条件-->
<div v-show="checkPagePriv(pagePriv.privs,'查找')" style="position: absolute;top:28px;left:180px;">
<PatientRegisterEditQuery/>
<div v-show="checkPagePriv(pagePriv.privs, '查找')" style="position: absolute;top:28px;left:180px;">
<PatientRegisterEditQuery />
</div>
<div>
<el-form ref="form" :model="form" label-width="80px" :rules="rules" size="medium">
@ -12,9 +13,10 @@
<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"
:style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" filterable
popper-class="example"
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }"
:disabled="(form.completeFlag == '3' || isDoctor != '1') ? true:false" size="small">
:disabled="(form.completeFlag == '3' || isDoctor != '1') ? true : false" size="small">
</el-cascader>
</el-form-item>
</el-col>
@ -48,7 +50,8 @@
<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-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">
@ -62,9 +65,9 @@
<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-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">
@ -133,7 +136,8 @@
</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-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>
@ -202,7 +206,8 @@
</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"
<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">
@ -284,7 +289,8 @@
</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">
<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">
@ -337,135 +343,140 @@
</div>
<!--人员登记组合项目明细 register_asbitem-->
<div>
<PatientRegisterItem :prForm="form" :prAsbOpraOpts="prAsbOpraOpts" :triggerHeadSave="triggerHeadSave" :refreshFormId="refreshFormId"/>
<PatientRegisterItem :prForm="form" :prAsbOpraOpts="prAsbOpraOpts" :triggerHeadSave="triggerHeadSave"
:refreshFormId="refreshFormId" />
</div>
</div>
<div style="margin-left: 10px;">
<div v-show="checkPagePriv(pagePriv.privs,'拍照')">
<div v-show="checkPagePriv(pagePriv.privs, '拍照')">
<el-button type="primary" class="commonbutton" @click="photoGrah" icon="el-icon-camera">拍照</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'读身份证')" class="btn">
<div v-show="checkPagePriv(pagePriv.privs, '读身份证')" class="btn">
<el-button @click="peopleIcCard" class="commonbutton">读身份证</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'复制新增')" class="btn">
<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">
<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">
<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">
<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">
<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">
<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">
<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">
<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;">
<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">
<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">
<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">
<div v-show="checkPagePriv(pagePriv.privs, '收费')" class="btn">
<el-button type="success" class="commonbutton" @click="toCharge(form.patientRegisterNo)">收费</el-button>
</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 @click="dialogVisible = false" style="width:90px;">取消</el-button>
<el-button type="primary" @click="choosePatient" style="width:90px;">确定</el-button>
</span>
</el-dialog>
<!-- 拍照openCamera 网页模式已废弃
<!--组件弹窗-->
<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" :organizationUnitId="form.organizationUnitId" :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>
<!-- 检验条码补打 -->
<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" :organizationUnitId="form.organizationUnitId" :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>
@ -473,7 +484,11 @@ import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import mm from "../../utlis/mm";
import { getPagePriv,checkPagePriv, objCopy, setNull, dddw,checkIDCode, parseID, birthdayToAge,ageToBirthday, deepCopy, arrayFilter, arrayReduce,parsIcCardtoLocal, photoParse, savePeoplePhoto, arrayExistObj } from "../../utlis/proFunc";
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";
@ -492,12 +507,12 @@ export default {
PatientRegisterEditQuery
},
// isDoctor: '0:/1:()'
props: ['isDoctor','patientRegisterId','editTimes','refreshRegister'],
props: ['isDoctor', 'patientRegisterId', 'editTimes', 'refreshRegister', 'refFuncSetData'],
data() {
return {
pagePriv:{
routeUrlorPageName:'PatientRegisterEdit', //
privs:[] //
pagePriv: {
routeUrlorPageName: 'PatientRegisterEdit', //
privs: [] //
},
apiurl: mm.apiurl,
@ -507,9 +522,9 @@ export default {
peoplePhoto: '',
form: {
registerManType:'customer', //customer doctor
registerManType: 'customer', //customer doctor
id: "", //id
photo:'', //
photo: '', //
patientId: "00000000-0000-0000-0000-000000000000", //ID 00000-0000...
patientNo: "", //
customerOrgId: ["00000000-0000-0000-0000-000000000000"], //
@ -556,9 +571,9 @@ export default {
isLockBox: false, //
customerOrgRegisterId: null,
isMaxMedicalTimes: 'N',
medicalStartDate:null
medicalStartDate: null
}, //
formInit:{}, //
formInit: {}, //
customerOrgRegisterList: [], //
defaultNull: [
"customerOrgId",
@ -576,7 +591,7 @@ export default {
], //uuidnull
rules: {
customerOrgId:[
customerOrgId: [
{ required: true, message: "请填写单位", trigger: "blur" },
],
patientName: [
@ -592,23 +607,23 @@ export default {
patientChoosed: {}, //
registerVisible:false,
patientRegisters:[],
registerChoosed:{},
registerVisible: false,
patientRegisters: [],
registerChoosed: {},
dialogCamera: false, //
chargePatientRegisterNo:'', //
chargePatientRegisterNo: '', //
//
prAsbOpraOpts:{
formId:'', //form.idformId
copyNew:0, //
payTypeFlag:'', //
prAsbSave:0, //
prAsbQuery:0,//
prAsbGroup:0, //
prAsbPackage:0, //
prAsbOpraOpts: {
formId: '', //form.idformId
copyNew: 0, //
payTypeFlag: '', //
prAsbSave: 0, //
prAsbQuery: 0,//
prAsbGroup: 0, //
prAsbPackage: 0, //
},
};
},
@ -616,7 +631,7 @@ export default {
created() {
//
let userPriv = window.sessionStorage.getItem('userPriv')
if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
this.formInit = deepCopy(this.form)
//
@ -630,36 +645,36 @@ export default {
},
computed: {
...mapState(["window","dialogWin","dataTransOpts","dict", "patientRegister", "customerOrg", "projPriv"]),
...mapState(["window", "dialogWin", "dataTransOpts", "dict", "patientRegister", "customerOrg", "projPriv"]),
//()
isComplete(){
return this.form.completeFlag == '3' ? true:false;
isComplete() {
return this.form.completeFlag == '3' ? true : false;
},
// disabled
displayPackage(){
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
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(){
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
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
@ -667,7 +682,7 @@ export default {
},
methods: {
...mapActions(['getPatientRegisterAbs']),
dddw,moment,checkPagePriv,
dddw, moment, checkPagePriv,
//
dictInit() {
@ -744,7 +759,7 @@ export default {
});
//
postapi("/api/app/medicalpackage/GetBasicList",{}).then((res) => {
postapi("/api/app/medicalpackage/GetBasicList", {}).then((res) => {
if (res.code == 1) {
this.dict.medicalPackage = res.data;
}
@ -776,17 +791,17 @@ export default {
// form
async initFormData(patientRegisterId){
async initFormData(patientRegisterId) {
this.peisid = window.sessionStorage.getItem('peisid');
if (!patientRegisterId) { //
objCopy(this.formInit, this.form);
this.form.organizationUnitId = this.peisid; //
this.form.customerOrgId = this.patientRegister.query.customerOrgId||this.dict.personOrgId //
this.form.customerOrgId = this.patientRegister.query.customerOrgId || this.dict.personOrgId //
this.form.customerOrgParentId = await this.getParentCustomerOrgId(this.form.customerOrgId) //
}else{
} else {
// let res = await getapi(`/api/app/patient-register/${patientRegisterId}`)
let res = await postapi(`/api/app/patientregister/getinfoorpatient?PatientRegisterId=${patientRegisterId}`)
this.form = res.data
@ -802,26 +817,26 @@ export default {
},
//
async changeCustomerOrgId(v){
async changeCustomerOrgId(v) {
let customerOrgId = ""
if(Array.isArray(v) && v.length > 0){
if (Array.isArray(v) && v.length > 0) {
customerOrgId = v[v.length - 1]
}else{
} else {
customerOrgId = v
}
let customerOrgParentId = await this.getParentCustomerOrgId(customerOrgId)
let customerOrgParentId = await this.getParentCustomerOrgId(customerOrgId)
if(customerOrgParentId){
if (customerOrgParentId) {
if (customerOrgParentId != this.dict.personOrgId) this.getCustomerOrgRegisterList(customerOrgParentId)
// /
if(this.form.customerOrgParentId != customerOrgParentId){
if (this.form.customerOrgParentId != customerOrgParentId) {
if (customerOrgParentId == this.dict.personOrgId) {
this.form.customerOrgRegisterId = null
this.form.customerOrgGroupId = null
this.form.medicalPackageId = null
this.patientRegister.customerOrgGroup = []
}else{
} else {
this.form.customerOrgRegisterId = null
this.form.customerOrgGroupId = null
this.form.medicalPackageId = null
@ -829,9 +844,9 @@ export default {
// this.getCustomerOrgRegisterList(customerOrgParentId)
}
if(this.form.customerOrgParentId == this.dict.personOrgId){
if (this.form.customerOrgParentId == this.dict.personOrgId) {
this.changeMedicalPackageId()
}else{
} else {
this.changeCustomerOrgGroupId()
}
this.form.customerOrgParentId = customerOrgParentId
@ -840,56 +855,56 @@ export default {
},
// ID
async getParentCustomerOrgId(customerOrgId){
let customerOrgParentId = null
if(!customerOrgId) return customerOrgParentId
if(typeof customerOrgId == 'string'){
async getParentCustomerOrgId(customerOrgId) {
let customerOrgParentId = null
if (!customerOrgId) return customerOrgParentId
if (typeof customerOrgId == 'string') {
try {
let res = await getapi(`/api/app/customer-org/parent/${this.form.customerOrgId}`)
if(res.code != -1) customerOrgParentId = res.data
if (res.code != -1) customerOrgParentId = res.data
} catch (error) {
console.log('获取顶级单位ID出错:',error)
console.log('获取顶级单位ID出错:', error)
}
}else if(customerOrgId.length > 0){
} else if (customerOrgId.length > 0) {
customerOrgParentId = customerOrgId[0]
}
return customerOrgParentId
},
//
getCustomerOrgRegisterList(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
.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}`) //
}
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;
}
})
}).then(res => {
if (res && res.code != -1) {
this.patientRegister.customerOrgGroup = res.data.items;
}
})
},
//
peopleIcCard() {
if(!this.$peisAPI) {
if (!this.$peisAPI) {
this.$message.info("此功能,需要在壳客户端才可运行!")
return
}
this.$peisAPI.peopleIcCard().then(res => {
console.log('peopleIcCard',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)
@ -1002,11 +1017,11 @@ export default {
asbitemName: groupPackageAsb[i].displayName,
patientRegisterId: this.form.id,
standardPrice: groupPackageAsb[i].price,
chargePrice: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailPrice:groupPackageAsb[i].price,
chargePrice: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailPrice : groupPackageAsb[i].price,
payTypeFlag,
discount: typeFlag == 'group' ? groupPackageAsb[i].discount:100,
discount: typeFlag == 'group' ? groupPackageAsb[i].discount : 100,
isCharge: "N",
amount: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailAmount:1,
amount: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailAmount : 1,
groupPackageId: groupPackageId
}
this.patientRegister.patientRegisterAbs.push(pojo)
@ -1070,11 +1085,11 @@ export default {
//console.log(`/api/app/patient/in-filter?Filter=${param}`)
let body = {
filter:param,
maxResultCount:500
filter: param,
maxResultCount: 500
}
postapi('/api/app/patient/getlistinfilter',body).then((res) => {
postapi('/api/app/patient/getlistinfilter', body).then((res) => {
if (res.code != -1) {
console.log("查重 ", res); //
if (res.data.items && res.data.items.length > 0) {
@ -1091,7 +1106,7 @@ export default {
this.patientChoosed = row;
},
patientDblclick(row){
patientDblclick(row) {
this.patientChoosed = row;
this.choosePatient()
},
@ -1131,15 +1146,15 @@ export default {
},
registerRowClick(row){
registerRowClick(row) {
this.registerChoosed = row;
},
registerRowDblclick(row){
registerRowDblclick(row) {
this.registerChoosed = row;
this.chooseRegister()
},
chooseRegister(){
chooseRegister() {
if (!this.registerChoosed) {
alert("请选中人员登记信息");
return;
@ -1198,7 +1213,7 @@ export default {
},
//
madePrBody(){
madePrBody() {
//
let body = deepCopy(this.form);
// console.log('this.form',this.form)
@ -1210,11 +1225,11 @@ export default {
// this.form.birthDate != "Invalid date"
body.birthDate = null
}
}else{
} else {
body.birthDate = null
}
if(body.birthDate == "Invalid date") body.birthDate = null
if(isNaN(body.age)) body.age = null
if (body.birthDate == "Invalid date") body.birthDate = null
if (isNaN(body.age)) body.age = null
// console.log('body',body)
// Invalid date
@ -1236,12 +1251,12 @@ export default {
delete body.photo;
// if(this.form.registerManType == 'customer') delete body.medicalStartDate;
if(this.form.id) 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]
if (typeof this.form.customerOrgId == 'object') {
if (this.form.customerOrgId.length > 0) body.customerOrgId = this.form.customerOrgId[this.form.customerOrgId.length - 1]
}
//
@ -1256,31 +1271,31 @@ export default {
//
btnSubmit(formName, msgTip) {
this.$refs[formName].validate((valid,fields) => {
console.log('fields',fields)
if(!valid){
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){
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){
if (this.form.idNo && checkIDCode(this.form.idNo) == false) {
this.$message.warning("身份证号填写不合法!");
return false
}
if (this.form.id){
if (this.form.id) {
//
this.prAsbOpraOpts.prAsbSave++ //
}else {
} else {
let body = this.madePrBody()
//id
console.log(`/api/patientregister/createreturninfo`, body);
@ -1293,16 +1308,16 @@ export default {
//
this.prAsbOpraOpts.formId = res.data.id
this.dataTransOpts.tableS.patient_register.id = res.data.id
let temp = Object.assign({},res.data,{id:''})
objCopy(temp,this.form)
let temp = Object.assign({}, res.data, { id: '' })
objCopy(temp, this.form)
// this.prAsbOpraOpts.formId
setTimeout(() =>{
setTimeout(() => {
this.prAsbOpraOpts.prAsbSave++
},20)
}, 20)
//
this.refreshRegister(Object.assign({},res.data))
this.refreshRegister(Object.assign({}, res.data))
//
if (this.patientRegister.photo && this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(res.data.id, this.patientRegister.photo);
@ -1375,7 +1390,7 @@ export default {
alert("请先保存人员信息");
return;
}
if(!this.$peisAPI) {
if (!this.$peisAPI) {
this.$message.info("此功能,需要在壳客户端才可运行!")
return
}
@ -1424,7 +1439,7 @@ export default {
this.$message.info("人员信息尚未保存,不可执行此操作!");
return;
}
if(!this.$peisAPI) {
if (!this.$peisAPI) {
this.$message.info("此功能,需要在壳客户端才可运行!")
return
}
@ -1541,7 +1556,7 @@ export default {
this.$message.info("人员信息尚未保存,不可执行此操作!");
return;
}
if(!this.$peisAPI) {
if (!this.$peisAPI) {
this.$message.info("此功能,需要在壳客户端才可运行!")
return
}
@ -1620,16 +1635,16 @@ export default {
this.patientRegister.mergeAsbitemVisble = true;
},
async toCharge(patientRegisterNo){
async toCharge(patientRegisterNo) {
if(!patientRegisterNo){
if (!patientRegisterNo) {
this.$message.warning("请先保存人员信息!")
return
}
try {
let res = await proApi.getPrAsb(this.form.id)
if(res.code == -1){
if (res.code == -1) {
this.$message.warning(`操作失败,原因:${res.message}`)
return
}
@ -1648,13 +1663,13 @@ export default {
},
//
closeDialogCharge(){
closeDialogCharge() {
// this.prAsbOpraOpts.prAsbQuery++
this.dataTransOpts.refresh.register_asbitem.M++
},
//
triggerHeadSave(){
triggerHeadSave() {
//id api/patientregister/updatepatientregister
let body = this.madePrBody()
// console.log(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body);
@ -1665,15 +1680,15 @@ export default {
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))
this.refreshRegister(Object.assign({}, this.form))
}
});
},
// IDform.id
refreshFormId(){
console.log('refreshFormId',this.prAsbOpraOpts.formId)
refreshFormId() {
console.log('refreshFormId', this.prAsbOpraOpts.formId)
this.form.id = this.prAsbOpraOpts.formId
this.prAsbOpraOpts.formId = '' //
@ -1694,7 +1709,7 @@ export default {
let inputs = document.querySelectorAll("form input"); // //.inline-input
//console.log('inputs',inputs);
//
inputs.forEach((input,i) => {
inputs.forEach((input, i) => {
input.addEventListener('keydown', (event) => {
@ -1706,8 +1721,8 @@ export default {
event.preventDefault();
//
for(let j=i+1; j<inputs.length;j++){
if(inputs[j].getAttribute('disabled') != "disabled" ){
for (let j = i + 1; j < inputs.length; j++) {
if (inputs[j].getAttribute('disabled') != "disabled") {
inputs[j].focus();
break;
}
@ -1724,8 +1739,8 @@ export default {
//
watch: {
//ID
"dataTransOpts.refresh.patient_register.S":{
immediate:true,
"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)
@ -1741,7 +1756,7 @@ export default {
},
//
"form.customerOrgId":{
"form.customerOrgId": {
// immediate:true,
// // deep:true,
handler(newVal, oldVal) {
@ -1756,8 +1771,6 @@ export default {
};
</script>
<style scoped>
.btn {
margin-top: 5px;
}
@ -1769,7 +1782,7 @@ export default {
.query {
margin-left: 10px;
}
.querySpan {
margin-right: 2px;
}
</style>
}</style>

154
src/components/patientRegister/PatientRegisterEditItemBatch.vue

@ -5,90 +5,43 @@
批量调整分组只针对单位体检有效个人体检将忽略此操作不能调整已收费或已检的项目及已总检的体检人员
</div>
<div>
<br /><el-radio v-model="asbitemBatch.operate" label="add"
>增加项目</el-radio
>
<el-radio v-model="asbitemBatch.operate" label="del"
>删除项目</el-radio
>
<br /><el-radio v-model="asbitemBatch.operate" label="add">增加项目</el-radio>
<el-radio v-model="asbitemBatch.operate" label="del">删除项目</el-radio>
</div>
<div>
<br /><el-checkbox
v-model="asbitemBatch.isDeleteGroup"
:disabled="asbitemBatch.operate == 'add' ? true : false"
>如果删除项目属于分组则删除体检记录信息的分组设置</el-checkbox
>
<br /><el-checkbox v-model="asbitemBatch.isDeleteGroup"
:disabled="asbitemBatch.operate == 'add' ? true : false">如果删除项目属于分组则删除体检记录信息的分组设置</el-checkbox>
</div>
<div>
<br /><span>直接录入</span>
<el-select
v-model="asbitemBatch.asbItemId"
placeholder="快速选择组合项目"
size="small" highlight-current-row
filterable :filter-method="filterMethod"
clearable @clear="quickAsb = deepCopy(asbItemQuick)"
@change="quickChoosedAsb"
default-first-option ref="quickAsbOCX"
style="width: 150px; text-align: left; padding-right: 15px"
>
<el-option
v-for="item in quickAsb"
:key="item.id"
:value="item.id"
:label="item.displayName"
/>
<el-select v-model="asbitemBatch.asbItemId" placeholder="快速选择组合项目" size="small" highlight-current-row filterable
:filter-method="filterMethod" clearable @clear="quickAsb = deepCopy(asbItemQuick)" @change="quickChoosedAsb"
default-first-option ref="quickAsbOCX" style="width: 150px; text-align: left; padding-right: 15px">
<el-option v-for="item in quickAsb" :key="item.id" :value="item.id" :label="item.displayName" />
</el-select>
</div>
<div style="display: flex; margin-top: 2px">
<div style="width: 480px">
<el-table
:data="asbitemBatch.asbitemsTemp"
height="240"
width="100%"
show-summary
@row-dblclick="removeAbs"
size="small" highlight-current-row
@row-click="rowClickaAbitemCurr"
border
>
<el-table-column
label="组合项目"
width="150"
prop="asbitemName"
/>
<el-table :data="asbitemBatch.asbitemsTemp" height="240" width="100%" show-summary @row-dblclick="removeAbs"
size="small" highlight-current-row @row-click="rowClickaAbitemCurr" border>
<el-table-column label="组合项目" width="150" prop="asbitemName" />
<el-table-column label="数量" prop="amount" width="60">
<template slot-scope="scope">
<el-input
type="number"
v-model="scope.row.amount"
size="small"
:disabled="asbitemBatch.operate == 'del' ? true : false"
/>
<el-input type="number" v-model="scope.row.amount" size="small"
:disabled="asbitemBatch.operate == 'del' ? true : false" />
</template>
</el-table-column>
<el-table-column label="实收价格" prop="chargePrice" width="90">
<template slot-scope="scope">
<el-input
type="number"
v-model="scope.row.chargePrice"
size="small"
:disabled="asbitemBatch.operate == 'del' ? true : false"
/>
<el-input type="number" v-model="scope.row.chargePrice" size="small"
:disabled="asbitemBatch.operate == 'del' ? true : false" />
</template>
</el-table-column>
<el-table-column label="支付方式" prop="payTypeFlag" width="120">
<template slot-scope="scope">
<el-select
v-model="scope.row.payTypeFlag"
size="small"
:disabled="asbitemBatch.operate == 'del' ? true : false"
>
<el-option
v-for="item in dict.payType"
:key="item.id"
:label="item.displayName"
:value="item.id"
/>
<el-select v-model="scope.row.payTypeFlag" size="small"
:disabled="asbitemBatch.operate == 'del' ? true : false">
<el-option v-for="item in dict.payType" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</template>
</el-table-column>
@ -96,66 +49,34 @@
</div>
<div style="display: block; width: 110px; margin-left: 10px">
<div style="margin-top: 5px">
<el-button
type="danger"
@click="asbitemDel(1)"
style="width: 100px"
>删除</el-button
>
<el-button class="commonbutton" type="danger" @click="asbitemDel(1)" style="width: 100px">删除</el-button>
</div>
<div style="margin-top: 5px">
<el-button
type="danger"
@click="asbitemDel(0)"
style="width: 100px"
>删除全部</el-button
>
<el-button class="commonbutton" type="danger" @click="asbitemDel(0)" style="width: 100px">删除全部</el-button>
</div>
<div style="margin-top: 5px">
<el-button
type="primary"
@click="changePayTypeFlag('0')"
style="width: 100px"
>全个人支付</el-button
>
<el-button class="commonbutton" type="primary" @click="changePayTypeFlag('0')" style="width: 100px">全个人支付</el-button>
</div>
<div style="margin-top: 5px">
<el-button
type="primary"
@click="changePayTypeFlag('1')"
style="width: 100px"
>全单位支付</el-button
>
<el-button class="commonbutton" type="primary" @click="changePayTypeFlag('1')" style="width: 100px">全单位支付</el-button>
</div>
<div style="margin-top: 5px">
<el-button
type="primary"
@click="changePayTypeFlag('2')"
style="width: 100px"
>全赠送</el-button
>
<el-button class="commonbutton" type="primary" @click="changePayTypeFlag('2')" style="width: 100px">全赠送</el-button>
</div>
</div>
</div>
<div style="display: flex;margin-top: 5px;margin-right: 10px;justify-content:space-between;">
<div></div>
<div>
<el-button type="primary" @click="asbitemBatchHandle"> </el-button>
<el-button @click="dialogWin.PatientRegisterEditItemBatch = false"> </el-button>
<el-button class="commonbutton" type="primary" @click="asbitemBatchHandle"> </el-button>
<el-button class="commonbutton" @click="dialogWin.PatientRegisterEditItemBatch = false"> </el-button>
</div>
</div>
</div>
<!-- 通用进度条 -->
<el-dialog
title="数据处理中……"
:visible.sync="elProgress.display"
width="600px"
height="400"
:show-close="false"
:close-on-click-modal="false"
:append-to-body="true"
>
<el-dialog title="数据处理中……" :visible.sync="elProgress.display" width="600px" height="400" :show-close="false"
:close-on-click-modal="false" :append-to-body="true">
<ElProgressOCX />
</el-dialog>
</div>
@ -181,7 +102,7 @@ export default {
components: {
ElProgressOCX,
},
props:["multipleSelection"],
props: ["multipleSelection"],
data() {
return {
asbitemBatch: {
@ -192,7 +113,7 @@ export default {
asbitemCurr: {}, //()
},
asbItemQuick:[], //
asbItemQuick: [], //
quickAsb: [], //
};
@ -222,7 +143,7 @@ export default {
},
methods: {
moment,dddw,deepCopy,
moment, dddw, deepCopy,
//
filterMethod(keyWords) {
@ -232,9 +153,9 @@ export default {
this.asbItemQuick.forEach((item) => {
if (
item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) >
-1 ||
-1 ||
item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) >
-1 ||
-1 ||
item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
) {
this.quickAsb.push(item);
@ -427,11 +348,11 @@ export default {
},
//
dictInit(){
dictInit() {
//
postapi('/api/app/asbitem/GetBasicList',{isFilterActive:'Y'}).then(res =>{
if(res.code != -1){
postapi('/api/app/asbitem/GetBasicList', { isFilterActive: 'Y' }).then(res => {
if (res.code != -1) {
this.asbItemQuick = res.data
this.quickAsb = res.data
}
@ -442,10 +363,10 @@ export default {
//
watch: {
"dataTransOpts.refresh.asbitem.M":{
"dataTransOpts.refresh.asbitem.M": {
immediate: true, //
// deep: true, //
handler(newVal,oldVal){
handler(newVal, oldVal) {
console.log(`watch: 刷新在用组合项目 newVal: ${newVal} oldVal:${oldVal}`)
this.dictInit()
}
@ -471,5 +392,4 @@ export default {
.btnClass {
width: 100px;
}
</style>

2
src/components/patientRegister/PatientRegisterItem.vue

@ -96,7 +96,7 @@
<el-table-column label="已选组合项目" min-width="120" prop="asbitemName" >
<template slot-scope="scope">
<div>
<el-tooltip class="item" effect="dark" content="套餐/分组中包含组合项目" placement="top">
<el-tooltip class="item" effect="dark" content="标五角星表示属于分组或套餐的项目" placement="top">
<i v-if="scope.row.groupPackageId" class="el-icon-star-on" style="font-size: 14px;color: purple;"></i>
</el-tooltip>
{{ scope.row.asbitemName }}

436
src/components/patientRegister/PatientRegisterList.vue

@ -1,74 +1,77 @@
<template>
<div style="display: flex">
<div :style="'width:' + (window.pageWidth - 200-145) + 'px;'" @contextmenu.prevent="onContextmenu">
<div>
<el-table @body-scrolling="load" :data="patientRegister.prList" border
:height="window.pageHeight < 600 ? 248 : Math.floor(((window.pageHeight - 250) * 2) / 3)" highlight-current-row
@row-click="rowClick" size="small" row-key="id" @selection-change="handleSelectionChange"
@cell-contextmenu="onCellRightClick" ref="info" id="info" :row-class-name="handleRowClassName">
<!-- 取消勾选改为选中
<div>
<!--组件主体-->
<div style="display: flex">
<div :style="'width:' + (window.pageWidth - 200 - 145) + 'px;'" @contextmenu.prevent="onContextmenu">
<div>
<el-table @body-scrolling="load" :data="tableData" border
:height="window.pageHeight < 600 ? 248 : Math.floor(((window.pageHeight - 250) * 2) / 3)"
highlight-current-row @row-click="rowClick" size="small" row-key="id"
@selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick" ref="info" id="info"
:row-class-name="handleRowClassName">
<!-- 取消勾选改为选中
<el-table-column type="selection" width="40" show-overflow-tooltip/>
:height="window.pageHeight < 600 ? 202 : Math.floor(((window.pageHeight - 302) * 2) / 3)"
-->
<el-table-column v-for="(item, index) in headerCols" :key="`col_${index}`" :min-width="dropCol[index].minWidth"
:align="dropCol[index].align" :label="item.label" :prop="dropCol[index].prop"
:sortable="dropCol[index].prop == 'sn' ? false : true">
<template slot-scope="scope">
<div v-if="dropCol[index].prop == 'sn'">
{{ scope.$index + 1 }}
</div>
<div v-else-if="dropCol[index].prop == 'completeFlag'">
{{ dddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}
</div>
<div v-else-if="dropCol[index].prop == 'guidePrintTimes'">
<i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0" style="font-size: 20px; color: green" />
</div>
<div v-else-if="dropCol[index].prop == 'isLock'
|| dropCol[index].prop == 'isVip'
|| dropCol[index].prop == 'isUpload'
">
{{ scope.row[dropCol[index].prop] == "Y" ? "是" : "否" }}
</div>
<div v-else-if="dropCol[index].prop == 'customerOrgParentName'">
{{ scope.row.customerOrgParentName
? scope.row.customerOrgParentName
: scope.row.customerOrgName }}
</div>
<div v-else-if="dropCol[index].prop == 'sexId'">
{{ dddw(dict.sex, "id", scope.row[dropCol[index].prop], "displayName") }}
</div>
<div v-else-if="dropCol[index].prop == 'groupPack'">
<div
v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
{{ dddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }}
<el-table-column v-for="(item, index) in headerCols" :key="`col_${index}`"
:min-width="dropCol[index].minWidth" :align="dropCol[index].align" :label="item.label"
:prop="dropCol[index].prop" :sortable="dropCol[index].prop == 'sn' ? false : true">
<template slot-scope="scope">
<div v-if="dropCol[index].prop == 'sn'">
{{ scope.$index + 1 }}
</div>
<div
v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
{{ dddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }}
<div v-else-if="dropCol[index].prop == 'completeFlag'">
{{ dddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}
</div>
</div>
<div v-else-if="dropCol[index].prop == 'nationId'">
{{ dddw(dict.nation, "id", scope.row[dropCol[index].prop], "displayName") }}
</div>
<div v-else-if="dropCol[index].prop == 'birthDate'
|| dropCol[index].prop == 'creationTime'">
{{ scope.row[dropCol[index].prop] ? moment(scope.row[dropCol[index].prop]).format('yyyy-MM-DD') : '' }}
</div>
<div v-else-if="dropCol[index].prop == 'maritalStatusId'">
{{ dddw(dict.maritalStatus, "id", scope.row[dropCol[index].prop], "displayName") }}
</div>
<div v-else-if="dropCol[index].prop == 'medicalTypeId'">
{{ dddw(dict.medicalType, "id", scope.row[dropCol[index].prop], "displayName") }}
</div>
<div v-else-if="dropCol[index].prop == 'personnelTypeId'">
{{ dddw(dict.personnelType, "id", scope.row[dropCol[index].prop], "displayName") }}
</div>
<div v-else>
{{ scope.row[dropCol[index].prop] }}
</div>
</template>
</el-table-column>
<!--
<div v-else-if="dropCol[index].prop == 'guidePrintTimes'">
<i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0" style="font-size: 20px; color: green" />
</div>
<div v-else-if="dropCol[index].prop == 'isLock'
|| dropCol[index].prop == 'isVip'
|| dropCol[index].prop == 'isUpload'
">
{{ scope.row[dropCol[index].prop] == "Y" ? "是" : "否" }}
</div>
<div v-else-if="dropCol[index].prop == 'customerOrgParentName'">
{{ scope.row.customerOrgParentName
? scope.row.customerOrgParentName
: scope.row.customerOrgName }}
</div>
<div v-else-if="dropCol[index].prop == 'sexId'">
{{ dddw(dict.sex, "id", scope.row[dropCol[index].prop], "displayName") }}
</div>
<div v-else-if="dropCol[index].prop == 'groupPack'">
<div
v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
{{ dddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }}
</div>
<div
v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
{{ dddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }}
</div>
</div>
<div v-else-if="dropCol[index].prop == 'nationId'">
{{ dddw(dict.nation, "id", scope.row[dropCol[index].prop], "displayName") }}
</div>
<div v-else-if="dropCol[index].prop == 'birthDate'
|| dropCol[index].prop == 'creationTime'">
{{ scope.row[dropCol[index].prop] ? moment(scope.row[dropCol[index].prop]).format('yyyy-MM-DD') : '' }}
</div>
<div v-else-if="dropCol[index].prop == 'maritalStatusId'">
{{ dddw(dict.maritalStatus, "id", scope.row[dropCol[index].prop], "displayName") }}
</div>
<div v-else-if="dropCol[index].prop == 'medicalTypeId'">
{{ dddw(dict.medicalType, "id", scope.row[dropCol[index].prop], "displayName") }}
</div>
<div v-else-if="dropCol[index].prop == 'personnelTypeId'">
{{ dddw(dict.personnelType, "id", scope.row[dropCol[index].prop], "displayName") }}
</div>
<div v-else>
{{ scope.row[dropCol[index].prop] }}
</div>
</template>
</el-table-column>
<!--
"sexHormoneTermId": "00000000-0000-0000-0000-000000000000",
"interposeMeasure": null,
"medicalConclusionId": "00000000-0000-0000-0000-000000000000",
@ -94,36 +97,37 @@
"creatorId": null,
"id": "3a0c196d-a6d0-37fe-5c32-4806bdc4530f"
-->
</el-table>
<div style="display: flex;justify-content:space-between;">
<div></div>
<div>
<span style="font-size:12px;">{{ loadOpts.totalCount }} 条记录当前显示{{ patientRegister.prList.length }} </span>
</el-table>
<div style="display: flex;justify-content:space-between;">
<div></div>
<div>
<span style="font-size:12px;">{{ loadOpts.totalCount }} 条记录当前显示{{ tableData.length }}
</span>
</div>
</div>
</div>
<!-- 给合项目 基本信息 -->
<el-tabs v-model="tabChoosed" style="margin-top: -22px;">
<!-- 给合项目 -->
<el-tab-pane label="已选组合项目" name="1">
<PatientRegisterAsbItem />
</el-tab-pane>
</el-tabs>
</div>
<!-- 给合项目 基本信息 -->
<el-tabs v-model="tabChoosed" style="margin-top: -22px;">
<!-- 给合项目 -->
<el-tab-pane label="已选组合项目" name="1">
<PatientRegisterAsbItem />
</el-tab-pane>
</el-tabs>
</div>
<div style="margin-left: 10px;">
<div v-show="checkPagePriv(pagePriv.privs, '人员登记')" class="listBtn">
<el-button type="success" class="commonbutton" @click="btnAdd">人员登记</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '批量正式登记')" class="listBtn">
<el-button type="success" class="commonbutton" @click="btnAddBatch">批量正式登记</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '编辑')" class="listBtn">
<el-button type="primary" class="commonbutton" @click="btnEdit">编辑</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '删除')" class="listBtn">
<el-button type="danger" class="commonbutton" @click="btnDel">删除</el-button>
</div>
<!--
<div style="margin-left: 10px;">
<div v-show="checkPagePriv(pagePriv.privs, '人员登记')" class="listBtn">
<el-button type="success" class="commonbutton" @click="btnAdd">人员登记</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '批量正式登记')" class="listBtn">
<el-button type="success" class="commonbutton" @click="btnAddBatch">批量正式登记</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '编辑')" class="listBtn">
<el-button type="primary" class="commonbutton" @click="btnEdit">编辑</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '删除')" class="listBtn">
<el-button type="danger" class="commonbutton" @click="btnDel">删除</el-button>
</div>
<!--
<div class="listBtn">
<el-button
type=""
@ -137,66 +141,65 @@
<el-button type="" class="btnClass commonbutton">健康档案</el-button>
</div>
-->
<div v-show="checkPagePriv(pagePriv.privs, '批量调整分组')" class="listBtn">
<el-button type="" class="commonbutton" @click="btnGroupBatch">批量调整分组</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '批量调整项目')" class="listBtn">
<el-button type="" class="commonbutton" @click="btnAsbBatch">批量调整项目</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '指引单打印')" class="listBtn">
<el-button type="" class="commonbutton" @click="guidePrint('0001', false)">指引单打印</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '指引单预览')" class="listBtn">
<el-button type="" class="commonbutton" @click="guidePrint('0001', true)">指引单预览</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '人员信息导出')" class="listBtn">
<el-button type="" class="commonbutton" @click="btnExport('info')">人员信息导出</el-button>
</div>
<!--
<div v-show="checkPagePriv(pagePriv.privs, '批量调整分组')" class="listBtn">
<el-button type="" class="commonbutton" @click="btnGroupBatch">批量调整分组</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '批量调整项目')" class="listBtn">
<el-button type="" class="commonbutton" @click="btnAsbBatch">批量调整项目</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '指引单打印')" class="listBtn">
<el-button type="" class="commonbutton" @click="guidePrint('0001', false)">指引单打印</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '指引单预览')" class="listBtn">
<el-button type="" class="commonbutton" @click="guidePrint('0001', true)">指引单预览</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '人员信息导出')" class="listBtn">
<el-button type="" class="commonbutton" @click="btnExport('info')">人员信息导出</el-button>
</div>
<!--
<div class="listBtn">
<el-button type="" class="btnClass commonbutton" @click="rowSelected(patientRegister.prList)">选中</el-button>
<el-button type="" class="btnClass commonbutton" @click="rowSelected(tableData)">选中</el-button>
</div>
-->
</div>
</div>
<!--组件弹窗-->
<div>
<!-- 体检人员登记 :title="patientRegister.patientRegisterRd.id ? '体检人员--编辑' : '体检人员--新增'" -->
<el-dialog :title="dataTransOpts.tableS.patient_register.id ? '体检人员--编辑' : '体检人员--新增'"
:visible.sync="dialogWin.PatientRegisterEdit" :close-on-click-modal="false" fullscreen
@close="close_dialogWin_PatientRegisterEdit">
<!-- :formInitData="patientRegister.patientRegisterRd" -->
<PatientRegisterEdit :isDoctor="'0'" :patientRegisterId="patientRegister.patientRegisterRd.id"
:editTimes="editTimes" :refreshRegister="refreshRegister" :refFuncSetData="refFuncSetData"/>
</el-dialog>
<!-- 拍照 -->
<el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="800" :show-close="false"
:append-to-body="true" :close-on-click-modal="false">
<Camera :id="patientRegister.patientRegisterId" />
</el-dialog>
<!-- 批量调整分组 -->
<el-dialog title="批量调整分组" :visible.sync="dialogWin.PatientRegisterEditGroupBatch" width="600px" height="800px"
:append-to-body="true" :close-on-click-modal="false">
<PatientRegisterEditGroupBatch :multipleSelection="multipleSelection" />
</el-dialog>
<!-- 批量调整项目 -->
<el-dialog title="批量调整项目" :visible.sync="dialogWin.PatientRegisterEditItemBatch" width="610px" height="800px"
:append-to-body="true" :close-on-click-modal="false">
<PatientRegisterEditItemBatch :multipleSelection="multipleSelection" />
</el-dialog>
<!-- 通用进度条 -->
<el-dialog title="数据处理中……" :visible.sync="elProgress.display" width="600px" height="400" :show-close="false"
:close-on-click-modal="false" :append-to-body="true">
<ElProgressOCX />
</el-dialog>
</div>
<!-- 体检人员登记 :title="patientRegister.patientRegisterRd.id ? '体检人员--编辑' : '体检人员--新增'" -->
<el-dialog :title="dataTransOpts.tableS.patient_register.id ? '体检人员--编辑' : '体检人员--新增'" :visible.sync="dialogVisible"
:close-on-click-modal="false" fullscreen @close="closeDialogPR">
<!-- :formInitData="patientRegister.patientRegisterRd" -->
<PatientRegisterEdit :isDoctor="'0'" :patientRegisterId="patientRegister.patientRegisterRd.id"
:editTimes="editTimes" :refreshRegister="refreshRegister" />
</el-dialog>
<!-- 拍照 -->
<el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="800" :show-close="false"
:append-to-body="true" :close-on-click-modal="false">
<Camera :id="patientRegister.patientRegisterId" />
</el-dialog>
<!-- 指引单 -->
<el-dialog title="指引单" :visible.sync="dialogGuide" width="400" height="800" :append-to-body="true"
:close-on-click-modal="false">
<div>{{ guideMsg }}</div>
</el-dialog>
<!-- 批量调整分组 -->
<el-dialog title="批量调整分组" :visible.sync="dialogWin.PatientRegisterEditGroupBatch" width="600px" height="800px"
:append-to-body="true" :close-on-click-modal="false">
<PatientRegisterEditGroupBatch :multipleSelection="multipleSelection" />
</el-dialog>
<!-- 批量调整项目 -->
<el-dialog title="批量调整项目" :visible.sync="dialogWin.PatientRegisterEditItemBatch" width="610px" height="800px"
:append-to-body="true" :close-on-click-modal="false">
<PatientRegisterEditItemBatch :multipleSelection="multipleSelection" />
</el-dialog>
<!-- 通用进度条 -->
<el-dialog title="数据处理中……" :visible.sync="elProgress.display" width="600px" height="400" :show-close="false"
:close-on-click-modal="false" :append-to-body="true">
<ElProgressOCX />
</el-dialog>
</div>
</template>
<script>
@ -243,11 +246,12 @@ export default {
startPoint: -1, // -1
endPoint: -1, // -1
tableData: [], //
tableDataCurrentRow: {}, //
multipleSelection: [], //
dialogVisible: false,
dialogCamera: false,
dialogGuide: false,
guideMsg: "guideMsg",
tabChoosed: "1",
formInitData: {}, //
editTimes: 0,
@ -354,12 +358,17 @@ export default {
}
},
//
rowSelected(rows) {
rows.forEach((e) => {
this.$refs["info"].toggleRowSelection(e, true);
});
},
refFuncSetData(item, v) {
setData(this, item, v)
},
// (isPreview)
async guidePrint(ReportCode, isPreview) {
if (!this.$peisAPI) {
@ -381,7 +390,7 @@ export default {
//start -------------------------
this.multipleSelection = []
this.patientRegister.prList.forEach(e => {
this.tableData.forEach(e => {
if (e.choosed) {
this.multipleSelection.push(deepCopy(e))
}
@ -435,15 +444,15 @@ export default {
if (JSON.parse(resPeisAPI).code < 0) continue
resPrintTimes = postapi("api/app/patientregister/updatepatientregisterguideprinttimesmany", [this.multipleSelection[i].id]);
if (resPrintTimes.code == -1) continue
lfind = arrayExistObj(this.patientRegister.prList, "id", this.multipleSelection[i].id);
lfind = arrayExistObj(this.tableData, "id", this.multipleSelection[i].id);
if (lfind > -1) {
if (this.patientRegister.prList[lfind].guidePrintTimes) {
this.patientRegister.prList[lfind].guidePrintTimes =
if (this.tableData[lfind].guidePrintTimes) {
this.tableData[lfind].guidePrintTimes =
Number(
this.patientRegister.prList[lfind].guidePrintTimes
this.tableData[lfind].guidePrintTimes
) + 1;
} else {
this.patientRegister.prList[lfind].guidePrintTimes = 1;
this.tableData[lfind].guidePrintTimes = 1;
}
}
} catch (error) {
@ -466,7 +475,7 @@ export default {
});
//
if (!rows.length) {
this.patientRegister.prList.forEach((item) => {
this.tableData.forEach((item) => {
item.highLightBg = "";
});
}
@ -483,32 +492,32 @@ export default {
//
rowClick(row) {
//console.log("this.patientRegister.prList",this.window,this.patientRegister.prList);
//console.log("this.tableData",this.window,this.tableData);
// shift
if (this.window.shift) {
//
this.patientRegister.prList.forEach((e, index) => {
this.tableData.forEach((e, index) => {
e.choosed = false;
e.index = index;
});
if (this.startPoint == -1) {
this.patientRegister.prList[row.index].choosed = true;
this.tableData[row.index].choosed = true;
this.startPoint = row.index;
} else {
if (this.startPoint > row.index) {
for (let i = row.index; i <= this.startPoint; i++) {
this.patientRegister.prList[i].choosed = true;
this.tableData[i].choosed = true;
}
} else if (this.startPoint <= row.index) {
for (let i = this.startPoint; i <= row.index; i++) {
this.patientRegister.prList[i].choosed = true;
this.tableData[i].choosed = true;
}
}
}
} else if (this.window.ctrl) { // ctrl
this.patientRegister.prList[row.index].choosed = true;
this.tableData[row.index].choosed = true;
if (this.startPoint == -1) {
this.startPoint = row.index;
}
@ -516,22 +525,22 @@ export default {
// ctrl shift
//
console.log("清除所有选择");
this.patientRegister.prList.forEach((e, index) => {
this.tableData.forEach((e, index) => {
e.choosed = false;
e.index = index;
});
console.log(this.patientRegister.prList, row.index);
console.log(this.patientRegister.prList[row.index].choosed);
console.log(this.tableData, row.index);
console.log(this.tableData[row.index].choosed);
this.patientRegister.prList[row.index].choosed = true;
this.tableData[row.index].choosed = true;
this.startPoint = row.index;
}
//
console.log('row.index <= this.startPoint', row.index, this.startPoint)
let lfind = -1
for (let i = 0; i < this.patientRegister.prList.length; i++) {
if (this.patientRegister.prList[i].choosed) {
for (let i = 0; i < this.tableData.length; i++) {
if (this.tableData[i].choosed) {
lfind = i
break
}
@ -539,21 +548,22 @@ export default {
if (lfind > -1) {
//
this.dataTransOpts.tableS.patient_register.id = this.patientRegister.prList[lfind].id
// this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId);
this.dataTransOpts.tableS.patient_register.id = this.tableData[lfind].id
this.tableDataCurrentRow = deepCopy(this.tableData[lfind])
// this.getCustomerOrgGroup(this.tableData[lfind].customerOrgParentId);
setTimeout(() => {
this.dataTransOpts.refresh.register_asbitem.M++ //
}, 20);
}, 10);
//
// if(this.patientRegister.patientRegisterRd.id != this.patientRegister.prList[lfind].id){
// this.setForm(this.patientRegister.prList[lfind])
// // this.patientRegister.query.customerOrgParentId = this.patientRegister.prList[lfind].customerOrgParentId;
// if(this.patientRegister.patientRegisterRd.id != this.tableData[lfind].id){
// this.setForm(this.tableData[lfind])
// // this.patientRegister.query.customerOrgParentId = this.tableData[lfind].customerOrgParentId;
// this.patientRegister.customerOrgGroupChange = 0; //0
// this.patientRegister.medicalPackageChange = 0; //0
// // this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId);
// // this.getCustomerOrgGroup(this.tableData[lfind].customerOrgParentId);
// this.dict.asbItem = [...this.dict.asbItemAll];
// this.getPatientRegisterAbs(this.patientRegister.prList[lfind].id);
// this.getPatientRegisterAbs(this.tableData[lfind].id);
// }
}
@ -576,12 +586,12 @@ export default {
// this.setForm(this.patientRegister.patientRegisterRdInit)
// this.patientRegister.patientRegisterAbs = [];
// this.patientRegister.patientRegisterRd.id = ''
// this.dialogVisible = true;
// this.dialogWin.PatientRegisterEdit = true;
// this.editTimes++; //
// this.getPatientRegisterAbs();
this.dataTransOpts.tableS.patient_register.id = ''
this.dialogVisible = true;
this.dialogWin.PatientRegisterEdit = true;
setTimeout(() => {
//
this.dataTransOpts.refresh.patient_register.S++ //
@ -602,7 +612,7 @@ export default {
let patientRegisterIds = []
// start
this.multipleSelection = [];
this.patientRegister.prList.forEach((e) => {
this.tableData.forEach((e) => {
if (e.choosed && e.completeFlag == '0') {
this.multipleSelection.push(e);
patientRegisterIds.push(e.id)
@ -621,8 +631,8 @@ export default {
if (res.code != -1) {
console.log('操作成功!')
patientRegisterIds.forEach(e => {
let lfind = arrayExistObj(this.patientRegister.prList, 'id', e)
if (lfind > -1) this.patientRegister.prList[lfind].completeFlag = completeFlag
let lfind = arrayExistObj(this.tableData, 'id', e)
if (lfind > -1) this.tableData[lfind].completeFlag = completeFlag
});
}
})
@ -638,8 +648,8 @@ export default {
this.$message.warning("请选择要操作的记录");
return;
}
//console.log(this.patientRegister.patientRegisterRd,this.patientRegister.prList)
this.dialogVisible = true;
//console.log(this.patientRegister.patientRegisterRd,this.tableData)
this.dialogWin.PatientRegisterEdit = true;
//
this.dataTransOpts.refresh.patient_register.S++ //()
this.dataTransOpts.plus.clearPatientRegisterQuery++ //
@ -647,29 +657,29 @@ export default {
},
//
async closeDialogPR() {
async close_dialogWin_PatientRegisterEdit() {
// dataTransOpts.tableS.patient_register.id ()
if (!this.dataTransOpts.tableS.patient_register.id) return
let id = this.dataTransOpts.tableS.patient_register.id
if (!id){
id = this.tableDataCurrentRow.id
}
if(!id) return
this.dataTransOpts.tableS.patient_register.id = id
//
this.patientRegister.prList.forEach(e => {
e.choosed = false
})
let res = await postapi(`/api/app/patientregister/getinfoorpatient?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
if (res.code != 1) return
// let res = await postapi(`/api/app/patientregister/getinfoorpatient?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
// if (res.code != 1) return
this.patientRegister.prList.forEach(e => {
e.choosed = false
});
let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.dataTransOpts.tableS.patient_register.id)
// this.tableData.forEach(e => {
// e.choosed = false
// });
let lfind = arrayExistObj(this.tableData, 'id', this.dataTransOpts.tableS.patient_register.id)
if (lfind > -1) {
objCopy(res.data, this.patientRegister.prList[lfind])
this.patientRegister.prList[lfind].choosed = true
objCopy(this.tableDataCurrentRow,this.tableData[lfind])
} else {
lfind = this.patientRegister.prList.length
this.patientRegister.prList.push(res.data)
this.patientRegister.prList[lfind].index = lfind
this.patientRegister.prList[lfind].choosed = true
lfind = this.tableData.length
this.tableDataCurrentRow.index = lfind
this.tableDataCurrentRow.choosed = true
this.tableData.push(this.tableDataCurrentRow)
}
// register_asbitem
@ -678,10 +688,10 @@ export default {
// setTimeout(() => {
// this.$refs['info'].setCurrentRow(currentRow)
// this.setForm(currentRow)
// // this.patientRegister.query.customerOrgParentId = this.patientRegister.prList[lfind].customerOrgParentId;
// // this.patientRegister.query.customerOrgParentId = this.tableData[lfind].customerOrgParentId;
// this.patientRegister.customerOrgGroupChange = 0; //0
// this.patientRegister.medicalPackageChange = 0; //0
// // this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId);
// // this.getCustomerOrgGroup(this.tableData[lfind].customerOrgParentId);
// this.dict.asbItem = [...this.dict.asbItemAll];
// this.getPatientRegisterAbs(currentRow.id);
// }, 100)
@ -703,7 +713,7 @@ export default {
//start -------------------------
this.multipleSelection = []
this.patientRegister.prList.forEach(e => {
this.tableData.forEach(e => {
if (e.choosed) {
this.multipleSelection.push(deepCopy(e))
}
@ -734,7 +744,7 @@ export default {
.then((res) => {
if (res.code != -1) {
console.log("操作成功");
arrayReduce(this.patientRegister.prList, this.multipleSelection, 'id=id')
arrayReduce(this.tableData, this.multipleSelection, 'id=id')
this.setForm(this.patientRegister.patientRegisterRdInit)
this.getPatientRegisterAbs();
}
@ -843,13 +853,13 @@ export default {
let oldCount = 0
if (body.skipCount == 0) { //
this.patientRegister.prList = [];
this.tableData = [];
} else {
// ,
oldCount = this.patientRegister.prList.length
oldCount = this.tableData.length
}
curLoad.forEach((e, index) => {
this.patientRegister.prList.push(Object.assign({ index: Number(oldCount) + Number(index), choosed: false }, e))
this.tableData.push(Object.assign({ index: Number(oldCount) + Number(index), choosed: false }, e))
})
//
@ -954,7 +964,7 @@ export default {
}
// start
this.multipleSelection = [];
this.patientRegister.prList.forEach((e) => {
this.tableData.forEach((e) => {
if (e.choosed) this.multipleSelection.push(e);
});
// end
@ -977,7 +987,7 @@ export default {
}
// start
this.multipleSelection = [];
this.patientRegister.prList.forEach((e) => {
this.tableData.forEach((e) => {
if (e.choosed) this.multipleSelection.push(e);
});
// end
@ -1269,7 +1279,7 @@ export default {
//console.log('watch:patientRegister.query.customerOrgId:',newVal,oldVal)
//
if (newVal && newVal != oldVal) {
this.patientRegister.prList = []
this.tableData = []
this.dataTransOpts.tableM.register_asbitem = []
}
}

52
src/components/patientRegister/patientRegisterAsbItem.vue

@ -2,11 +2,15 @@
<div>
<el-table :data="dataTransOpts.tableM.register_asbitem" border
:height="window.pageHeight < 600 ? 124 : Math.floor((window.pageHeight - 228) / 3)" size="small"
highlight-current-row :summary-method="getSummaries" show-summary
ref="patientRegister.patientRegisterAbs">
highlight-current-row :summary-method="getSummaries" show-summary ref="patientRegister.patientRegisterAbs">
<el-table-column label="序号" width="50" align="center">
<template slot-scope="scope">
<div><i v-if="scope.row.groupPackageId" class="el-icon-star-on" style="font-size: 16px;color: purple;"></i>{{ scope.$index + 1 }}</div>
<div>
<el-tooltip class="item" effect="dark" content="标五角星表示属于分组或套餐的项目" placement="left">
<i v-if="scope.row.groupPackageId" class="el-icon-star-on" style="font-size: 16px;color: purple;" />
</el-tooltip>
{{ scope.$index + 1 }}
</div>
</template>
</el-table-column>
<el-table-column prop="asbitemName" label="已选组合项目" width="120" />
@ -14,7 +18,7 @@
<el-table-column prop="discount" label="折扣" align="center" />
<el-table-column prop="amount" label="数量" width="50" align="center" />
<el-table-column prop="chargePrice" label="价格" align="center" />
<el-table-column prop="payTypeFlag" label="支付方式" align="center" >
<el-table-column prop="payTypeFlag" label="支付方式" align="center">
<template slot-scope="scope">
<div>{{ dddw(dict.payType, "id", scope.row.payTypeFlag, "displayName") }}</div>
</template>
@ -24,7 +28,7 @@
<el-checkbox :value="scope.row.isCharge == 'Y'" align="center" />
</template>
</el-table-column>
<el-table-column prop="checkCompleteFlag" label="状态" min-width="50" align="center" >
<el-table-column prop="checkCompleteFlag" label="状态" min-width="50" align="center">
<template slot-scope="scope">
<div>
{{
@ -38,13 +42,13 @@
</div>
</template>
</el-table-column>
<el-table-column prop="isLock" label="锁" min-width="50" align="center" >
<el-table-column prop="isLock" label="锁" min-width="50" align="center">
<template slot-scope="scope">
<el-checkbox :value="scope.row.isLock == 'Y'" align="center" />
</template>
</el-table-column>
<el-table-column prop="creatorName" label="登记人" min-width="70" align="center" />
<el-table-column prop="creationTime" label="登记日期" min-width="90" align="center" >
<el-table-column prop="creationTime" label="登记日期" min-width="90" align="center">
<template slot-scope="scope">
<div>{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}</div>
</template>
@ -68,7 +72,7 @@ export default {
},
updated(){
updated() {
this.$nextTick(() => {
this.$refs['patientRegister.patientRegisterAbs'].doLayout()
})
@ -81,25 +85,23 @@ export default {
...mapState(["window", "dataTransOpts", "dict", "patientRegister"]),
},
methods: {
dddw,moment,
dddw, moment,
//
retrieveRegister_asbitem(id){
if(!id){
this.dataTransOpts.tableM.register_asbitem = []
return
}
retrieveRegister_asbitem(id) {
this.dataTransOpts.tableM.register_asbitem = []
if (!id) return
getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`)
.then(res => {
console.log(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, res)
if (res.code != -1) {
res.data.forEach(e => {
e.standTotal = e.amount * e.standardPrice
e.total = e.amount * e.chargePrice
});
this.dataTransOpts.tableM.register_asbitem = res.data
}
})
.then(res => {
console.log(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, res)
if (res.code != -1) {
res.data.forEach(e => {
e.standTotal = e.amount * e.standardPrice
e.total = e.amount * e.chargePrice
});
this.dataTransOpts.tableM.register_asbitem = res.data
}
})
},
@ -156,7 +158,7 @@ export default {
//
watch: {
//ID
"dataTransOpts.refresh.register_asbitem.M":{
"dataTransOpts.refresh.register_asbitem.M": {
// immediate:true,
handler(newVal, oldVal) {
console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`);

3
src/store/index.js

@ -357,7 +357,8 @@ export default new Vuex.Store({
sum_diagnosis: [], // 总检诊断
},
plus: {
clearPatientRegisterQuery: 0,
clearPatientRegisterQuery: 0, //清空人员登记界面查询条件
PatientRegisterEditItemBatch:0, //刷新批量调整项目窗口
}
},

Loading…
Cancel
Save