Browse Source

rydj

master
pengjun 3 years ago
parent
commit
316e383a8b
  1. 44
      src/components/customerOrg/customerOrgEdit.vue
  2. 4
      src/components/itemSet/ReferenceRange.vue
  3. 255
      src/components/patientRegister/PatientRegisterEdit.vue
  4. 167
      src/components/patientRegister/PatientRegisterList.vue
  5. 2
      src/components/patientRegister/customerOrgTreeAll.vue
  6. 42
      src/store/index.js
  7. 11
      src/utlis/proFunc.js
  8. 15
      src/views/customerOrg/patientRegister.vue

44
src/components/customerOrg/customerOrgEdit.vue

@ -139,7 +139,7 @@
import { mapState,mapMutations } from 'vuex'
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate } from '../../utlis/proFunc'
import { tcdate,objCopy } from '../../utlis/proFunc'
export default {
components: {
@ -245,37 +245,25 @@ export default {
//
Onsubmit(formName) {
console.log('vuex data',this.customerOrg.customerOrgRd)
let vpojo = this.customerOrg.customerOrgRd
this.$refs[formName].validate((valid) => {
if (valid) {
//
this.pojo = {
displayName: vpojo.displayName,
shortName: vpojo.shortName,
invoiceName: vpojo.invoiceName,
parentId: vpojo.parentId,
telephone: vpojo.telephone,
fax: vpojo.fax,
postalCode: vpojo.postalCode,
address: vpojo.address,
bank: vpojo.bank,
accounts: vpojo.accounts,
orgTypeId: vpojo.orgTypeId,
remark: vpojo.remark,
isLock: vpojo.isLock,
isActive: vpojo.isActive,
organizationUnitId: vpojo.organizationUnitId
}
objCopy(this.customerOrg.customerOrgRd,this.pojo)
//
if(this.pojo.parentId && this.pojo.parentId.length > 0){
this.pojo.parentId = this.pojo.parentId[this.pojo.parentId.length - 1]
if(typeof this.pojo.parentId === "string"){
if(!this.pojo.parentId || this.pojo.parentId.length < 1){
this.pojo.parentId = null
}
}else{
this.pojo.parentId = null
if(this.pojo.parentId && this.pojo.parentId.length > 0){
this.pojo.parentId = this.pojo.parentId[this.pojo.parentId.length - 1]
}else{
this.pojo.parentId = null
}
}
console.log('pojo',this.pojo)
console.log(this.customerOrg.customerOrgRd)
console.log('pojo',this.pojo,'this.customerOrg.customerOrgRd',this.customerOrg.customerOrgRd)
if(this.customerOrg.customerOrgRd.id.length < 1){
//id
postapi(`/api/app/customer-org`, this.pojo).then(
@ -294,8 +282,10 @@ export default {
//id
putapi(`/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`, this.pojo).then(
(res) => {
this.$message.success("更新 操作成功");
this.getCustomerOrgTree()
if(res.code == 1){
this.$message.success("更新 操作成功");
this.getCustomerOrgTree()
}
}
);
}

4
src/components/itemSet/ReferenceRange.vue

@ -217,11 +217,11 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deletapi(`/api/app/reference-range/${this.id}`, this.form).then(res => {
return deletapi(`/api/app/reference-range/${this.id}`, this.form)
}).then(res => {
this.$message.success('删除成功')
this.getlist(this.itemId, this.ReferenceRangeTypeFlag)
this.id = ''
})
}).catch(() => {
this.$message({
type: 'info',

255
src/components/patientRegister/PatientRegisterEdit.vue

@ -17,8 +17,8 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="档案号" prop="patientId">
<el-input v-model="form.patientId" disabled></el-input>
<el-form-item label="档案号" prop="patientNo">
<el-input v-model="form.patientNo" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6" />
@ -26,7 +26,7 @@
<el-row>
<el-col :span="6">
<el-form-item label="姓名" prop="patientName">
<el-input v-model="form.patientName"></el-input>
<el-input v-model="form.patientName" @blur="query(form.patientName)"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
@ -68,13 +68,20 @@
<el-row>
<el-col :span="6">
<el-form-item label="体检类别" prop="medicalTypeId">
<el-select v-model="form.medicalTypeId" placeholder="请选择">
<el-select v-model="form.medicalTypeId" placeholder="请选择" filterable>
<el-option v-for="item in dict.medicalType" :key="item.id" :label="item.displayName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="人员类别" prop="personnelTypeId">
<el-select v-model="form.personnelTypeId" placeholder="请选择" filterable>
<el-option v-for="item in dict.personnelType" :key="item.id" :label="item.displayName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="工卡号" prop="jobCardNo">
<el-input v-model="form.jobCardNo"></el-input>
@ -95,7 +102,44 @@
<el-input v-model="form.jobTitle"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="邮箱" prop="email">
<el-input v-model="form.email"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="身份证号" prop="idNo">
<el-input v-model="form.idNo" @blur="query(form.idNo)"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="地址" prop="address">
<el-input v-model="form.address"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="邮政编码" prop="postalCode">
<el-input v-model="form.postalCode"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="电话" prop="telephone">
<el-input v-model="form.telephone"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="手机号" prop="mobileTelephone">
<el-input v-model="form.mobileTelephone"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="民族" prop="nationId">
<el-select v-model="form.nationId" placeholder="请选择" filterable>
<el-option v-for="item in dict.nation" :key="item.id" :label="item.displayName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="介绍人" prop="salesman">
<el-input v-model="form.salesman"></el-input>
@ -153,7 +197,7 @@
<el-col :span="6">
<el-form-item label="分组" prop="customerOrgGroupId">
<el-select v-model="form.customerOrgGroupId" placeholder="请选择" filterable clearable
:disabled="form.customerOrgId == '00000000-0000-0000-0000-000000000000' ? false : true">
:disabled="form.customerOrgId === dict.personOrgId ? true : false">
<el-option v-for="item in patientRegister.customerOrgGroup" :key="item.id" :label="item.displayName"
:value="item.id">
</el-option>
@ -163,7 +207,7 @@
<el-col :span="6">
<el-form-item label="套餐" prop="medicalPackageId">
<el-select v-model="form.medicalPackageId" placeholder="请选择" filterable clearable
:disabled="form.customerOrgId == '00000000-0000-0000-0000-000000000000' ? true : false">
:disabled="form.customerOrgId === dict.personOrgId ? false : true">
<el-option v-for="item in dict.medicalPackage" :key="item.id" :label="item.displayName" :value="item.id">
</el-option>
</el-select>
@ -213,6 +257,7 @@
</div>
</el-image>
</div>
<!-- 按钮区域 -->
<div style="margin-left: 10px;" width="120px">
<div class="btn">
@ -237,6 +282,44 @@
<el-button type="primary" @click="">复制新增</el-button>
</div>
</div>
<!-- 人员档案列表 -->
<el-dialog title="人员档案列表" :visible.sync="dialogVisible" width="800" :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" ref="patientList">
<el-table-column type="index" width="30"/>
<el-table-column prop="displayName" label="姓名" />
<el-table-column prop="sexId" label="性别">
<template slot-scope="scope">
<div>{{ ldddw(dict.sex, 'id', scope.row.sexId, 'displayName') }}</div>
</template>
</el-table-column>
<el-table-column prop="maritalStatusId" label="婚姻">
<template slot-scope="scope">
<div>{{ ldddw(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">{{ lmoment(scope.row.birthDate, 'yyyy-MM-DD') }}</div>
</template>
</el-table-column>
<el-table-column prop="nationId" label="民族">
<template slot-scope="scope">
<div>{{ ldddw(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-column label="末次体检" />
<el-table-column label="体检次数" />
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="choosePatient"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
@ -244,7 +327,7 @@
import moment from 'moment';
import { mapState } from 'vuex'
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate, objCopy } from '../../utlis/proFunc'
import { objCopy,setNull,dddw } from '../../utlis/proFunc'
export default {
components: {
@ -252,15 +335,11 @@ export default {
},
data() {
return {
data: {
organizationdata: [], //
customerOrgType: [], //
},
form: {
id: '', //id
patientId: '00000000-0000-0000-0000-000000000000', //ID 00000-0000...
patientNo:'',//
customerOrgId: null, //
customerOrgGroupId: null, //
medicalPackageId: null,//
@ -287,15 +366,40 @@ export default {
isMedicalStart: 'N', //
patientRegisterNo: '', //
medicalTimes: 1, //
organizationUnitId: null //
}, //
organizationUnitId: null, //
address:'', //
email:'', //email
idNo:'', //
telephone:'', //
mobileTelephone:'', //
nationId:null, //
postalCode:'', //
}, //
defaultNull:[
'customerOrgId',
'customerOrgGroupId',
'medicalPackageId',
'age',
'medicalTypeId',
'personnelTypeId',
'sexHormoneTermId',
'organizationUnitId',
'nationId',
], //uuidnull
rules: {
patientName: [
{ required: true, message: "请输入姓名", trigger: "blur" },
],
organizationUnitId: [
{ required: true, message: "请填写体检中心", trigger: "blur" },
],
},
dialogVisible:false,
patientList:[],//
patientChoosed:{}, //
};
},
@ -308,7 +412,7 @@ export default {
//
//console.log('mounted this.patientRegister.patientRegisterRd',this.patientRegister.patientRegisterRd)
objCopy(this.patientRegister.patientRegisterRd, this.form)
//console.log('mounted this.form',this.form)
console.log('mounted this.form',this.form)
},
computed: {
@ -320,6 +424,58 @@ export default {
console.log('this.form1', this.form)
},
//
query(param){
//
if(this.form.id || !param) return
this.dialogVisible = true
console.log(param)
getapi(`/api/app/patient/in-filter?Filter=${param}`)
.then(
(res) => {
if(res.code == 1){
//console.log('res',res)
this.patientList = res.data.items
}
}
)
},
//
rowick(row){
this.patientChoosed = row
},
//
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 = 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
},
ldddw(arrayData, key, value, display) {
return dddw(arrayData, key, value, display)
},
lmoment(date, forMat) {
return moment(new Date(date)).format(forMat)
},
//
Onsubmit(formName) {
this.$refs[formName].validate((valid) => {
@ -332,39 +488,51 @@ export default {
delete body.medicalTimes
delete body.completeFlag
delete body.isMedicalStart
delete body.patientNo
delete body.customerOrgGroupId
delete body.medicalPackageId
setNull(body,this.defaultNull)
//
console.log('body.birthDate',body.birthDate)
if(body.birthDate){
body.birthDate = moment(new Date(body.birthDate)).format('yyyy-MM-DD')
}
console.log('body.birthDate',body.birthDate)
//moment(pub.dateAddSeconds(new Date('2022-12-09T02:39:33.983Z'),60*60)).format('yyyyMMDDHHmmssSSS')
console.log('this.form.id',this.form.id)
console.log('body',body)
if (this.form.id.length < 1) {
//id
postapi(`/api/app/patient-register`, body).then(
postapi(`/api/app/patient-register`, body)
.then(
(res) => {
if(res.code == 1){
//console.log('res',res)
this.$message.success("创健 操作成功");
this.patientRegister.patientRegisterId = res.id
this.patientRegister.patientRegisterRd = res
objCopy(res.data,this.form)
this.patientRegister.patientRegisterId = res.data.id
this.patientRegister.patientRegisterRd = res.data
this.patientRegister.query.times++
return getapi(`/api/app/patient/${this.form.patientId}`)
}
}
)
.then(
(res) => {
if(res.code == 1){
//
this.form.patientNo = res.data.patientNo
}
}
);
} else {
//id
putapi(`/api/app/patient-register/${this.form.id}`, body).then(
//id
putapi(`/api/app/patient-register?PatientRegisterId=${this.form.id}`, body).then(
(res) => {
this.$message.success("更新 操作成功");
objCopy(this.patientRegister.patientRegisterRd,this.form)
this.patientRegister.query.times++
}
);
}
@ -372,16 +540,13 @@ export default {
alert('未通过数据校验');
return false;
}
});
})
},
//
add() {
this.customerOrg.customerOrgId = ''
this.customerOrg.customerOrgRd = {
id: '', isLock: 'N',
isActive: 'Y'
}
//
},
//
@ -398,15 +563,21 @@ export default {
//
watch: {
'patientRegister.patientRegisterRd.customerOrgId'(newVal, oldVal) {
//
'patientRegister.addTimes'(newVal, oldVal) {
//console.log('patientRegister.addTimes newVal',newVal,' oldVal',oldVal)
if (newVal != oldVal) {
//console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
objCopy(this.patientRegister.patientRegisterRd, this.form)
//console.log('this.patientRegister.patientRegisterRdInit',this.patientRegister.patientRegisterRdInit)
objCopy(this.patientRegister.patientRegisterRdInit, this.form)
//console.log('this.form',this.form)
}
},
//
'patientRegister.patientRegisterRd.id'(newVal, oldVal) {
if (newVal != oldVal) {
//console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
//console.log('patientRegister.patientRegisterRd.id newVal',newVal,' oldVal',oldVal)
if (newVal != oldVal) {
//console.log('newVal',newVal)
objCopy(this.patientRegister.patientRegisterRd, this.form)
}
},

167
src/components/patientRegister/PatientRegisterList.vue

@ -1,17 +1,8 @@
<template>
<div>
<div style="display: flex">
<el-table
:data="dataList"
border
style="width: 90%; height: 480px"
row-key="id"
size="small"
class="el-table__body-wrapper tbody"
highlight-current-row
@row-click="rowick"
ref="dataList"
>
<el-table :data="dataList" border width="100%" height="480" row-key="id" size="small"
class="el-table__body-wrapper tbody" highlight-current-row @row-click="rowick" ref="dataList">
<el-table-column prop="completeFlag" label="体检进度">
<template slot-scope="scope">
<div>{{ ldddw(dict.completeFlag, 'id', scope.row.completeFlag, 'displayName') }}</div>
@ -19,16 +10,18 @@
</el-table-column>
<el-table-column prop="isLock" label="锁住">
<template slot-scope="scope">
<div>{{ scope.row.isLock == 'Y' ? '是':'否' }}</div>
<div>{{ scope.row.isLock == 'Y' ? '是' : '否' }}</div>
</template>
</el-table-column>
<el-table-column prop="customerOrgId" label="单位">
<el-table-column prop="customerOrgParentName" label="单位" width="180">
<template slot-scope="scope">
<div>{{ ldddw(patientRegister.customerOrgTreeAll, 'id', scope.row.customerOrgId, 'displayName') }}</div>
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName:scope.row.customerOrgName }}</div>
</template>
</el-table-column>
<el-table-column label="部门">
<el-table-column prop="customerOrgName" label="部门" width="180">
<template slot-scope="scope">
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgName:'' }}</div>
</template>
</el-table-column>
<el-table-column prop="patientName" label="姓名" />
<el-table-column prop="sexId" label="性别">
@ -37,16 +30,16 @@
</template>
</el-table-column>
<el-table-column prop="age" label="年龄" />
<el-table-column prop="patientRegisterNo" label="条码号" />
<el-table-column prop="patientNo" label="档案号" />
<el-table-column prop="patientRegisterNo" label="条码号" width="150" />
<el-table-column prop="patientNo" label="档案号" />
<el-table-column prop="medicalTimes" label="体检次数"></el-table-column>
<el-table-column label="分组/套餐">
<el-table-column label="分组/套餐" width="150">
<template slot-scope="scope">
<div :v-if="scope.row.customerOrgId === dict.personOrgId">
{{ ldddw(dict.medicalPackage, 'id', scope.row.medicalPackageId, 'displayName') }}
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
套餐{{ ldddw(dict.medicalPackage, 'id', scope.row.medicalPackageId, 'displayName') }}
</div>
<div :v-if="scope.row.customerOrgId !== dict.personOrgId">
{{ ldddw(dict.customerOrgGroupAll, 'id', scope.row.customerOrgGroupId, 'displayName') }}
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
分组{{ ldddw(dict.customerOrgGroupAll, 'id', scope.row.customerOrgGroupId, 'displayName') }}
</div>
</template>
</el-table-column>
@ -55,12 +48,16 @@
<div>{{ ldddw(dict.nation, 'id', scope.row.nationId, 'displayName') }}</div>
</template>
</el-table-column>
<el-table-column prop="idNo" label="身份证" />
<el-table-column prop="birthDate" label="出生日期" />
<el-table-column prop="email" label="邮箱" />
<el-table-column prop="mobileTelephone" label="手机" />
<el-table-column prop="telephone" label="电话" />
<el-table-column prop="address" label="地址" />
<el-table-column prop="idNo" label="身份证" width="150" />
<el-table-column prop="birthDate" label="出生日期" width="100">
<template slot-scope="scope">
<div v-if="scope.row.birthDate">{{ lmoment(scope.row.birthDate, 'yyyy-MM-DD') }}</div>
</template>
</el-table-column>
<el-table-column prop="email" label="邮箱" width="100" />
<el-table-column prop="mobileTelephone" label="手机" width="100" />
<el-table-column prop="telephone" label="电话" width="100" />
<el-table-column prop="address" label="地址" width="300" />
<el-table-column prop="medicalCardNo" label="体检卡号" />
<el-table-column prop="jobCardNo" label="工卡号" />
<el-table-column prop="maritalStatusId" label="婚姻状况">
@ -70,12 +67,14 @@
</el-table-column>
<el-table-column prop="medicalTypeId" label="体检类别">
<template slot-scope="scope">
<div>{{ ldddw(dict.medicalType, 'id', scope.row.medicalTypeId, 'displayName') }}</div>
<div v-if="scope.row.medicalTypeId !== dict.personOrgId">{{ ldddw(dict.medicalType, 'id',
scope.row.medicalTypeId, 'displayName') }}</div>
</template>
</el-table-column>
<el-table-column prop="personnelTypeId" label="人员类别">
<template slot-scope="scope">
<div>{{ ldddw(dict.personnelType, 'id', scope.row.personnelTypeId, 'displayName') }}</div>
<div v-if="scope.row.personnelTypeId !== dict.personOrgId">{{ ldddw(dict.personnelType, 'id',
scope.row.personnelTypeId, 'displayName') }}</div>
</template>
</el-table-column>
<el-table-column prop="jobPost" label="职务" />
@ -83,14 +82,18 @@
<el-table-column prop="salesman" label="介绍人" />
<el-table-column prop="isVip" label="是否VIP">
<template slot-scope="scope">
<div>{{ scope.row.isVip == 'Y' ? '是':'否' }}</div>
<div>{{ scope.row.isVip == 'Y' ? '是' : '否' }}</div>
</template>
</el-table-column>
<el-table-column prop="creatorName" label="登记人" />
<el-table-column prop="creationTime" label="登记日期" />
<el-table-column prop="creationTime" label="登记日期" width="100">
<template slot-scope="scope">
<div>{{ lmoment(scope.row.creationTime, 'yyyy-MM-DD') }}</div>
</template>
</el-table-column>
<el-table-column prop="isUpload" label="是否上传">
<template slot-scope="scope">
<div>{{ scope.row.isUpload == 'Y' ? '是':'否' }}</div>
<div>{{ scope.row.isUpload == 'Y' ? '是' : '否' }}</div>
</template>
</el-table-column>
@ -131,7 +134,7 @@
<el-button type="primary" @click="edit">编辑</el-button>
</div>
<div class="listBtn">
<el-button type="danger" @click="">删除</el-button>
<el-button type="danger" @click="del">删除</el-button>
</div>
<div class="listBtn">
<el-button type="primary" @click="">拍照</el-button>
@ -152,28 +155,18 @@
</div>
<!-- 体检人员登记 -->
<el-dialog
:title="patientRegister.patientRegisterId ? '编辑':'新增'"
:visible.sync="dialogVisible"
width="1000px"
>
<PatientRegisterEdit :id="this.patientRegister.patientRegisterId" :customerOrgId="this.patientRegister.query.customerOrgId"/>
</el-dialog>
<el-dialog :visible.sync="dialogCamera"
width="1000px">
<el-dialog :title="patientRegister.patientRegisterId ? '编辑' : '新增'" :visible.sync="dialogVisible" width="1000px">
<PatientRegisterEdit />
</el-dialog>
</div>
</template>
<script>
import moment from "moment";
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import PatientRegisterEdit from '../../components/patientRegister/PatientRegisterEdit.vue'
import { dddw } from "@/utlis/proFunc";
import { dddw, objCopy } from "@/utlis/proFunc";
export default {
components: {
@ -181,20 +174,20 @@ export default {
},
data() {
return {
dataList:[],//
dialogVisible:false,
dialogCamera:false,
dataList: [],//
dialogVisible: false,
dialogCamera: false,
};
},
created() {},
created() { },
//
mounted() {
},
computed:{
...mapState(['dict','patientRegister','customerOrg']),
computed: {
...mapState(['dict', 'patientRegister', 'customerOrg']),
},
methods: {
//
@ -206,42 +199,71 @@ export default {
//
add() {
let customerOrgId = this.patientRegister.query.customerOrgId
if(!customerOrgId){
if (!customerOrgId) {
alert("请选择单位或个人")
return
}
//console.log('customerOrgId',customerOrgId)
this.patientRegister.patientRegisterId = ''
this.patientRegister.patientRegisterRd = {
id:'', //ID
customerOrgId:this.patientRegister.query.customerOrgId, //ID
}
//console.log('add',this.patientRegister.patientRegisterRd)
this.patientRegister.patientRegisterId = ''
this.patientRegister.patientRegisterRdInit.id = ''
this.patientRegister.patientRegisterRdInit.customerOrgId = this.patientRegister.query.customerOrgId
this.patientRegister.addTimes++
this.dialogVisible = true
},
edit() {
if(!this.patientRegister.patientRegisterId){
alert("请选择人员")
if (!this.patientRegister.patientRegisterId) {
alert("请选择要操作的记录")
return
}
this.dialogVisible = true
},
ldddw(arrayData,key,value,display){
return dddw(arrayData,key,value,display)
del() {
if (!this.patientRegister.patientRegisterId) {
alert("请选择要操作的记录")
return
}
this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
//console.log('${this.patientRegister.patientRegisterId}',this.patientRegister.patientRegisterId)
return deletapi(`/api/app/patient-register/${this.patientRegister.patientRegisterId}`)
}).then(res => {
this.$message.success('删除成功')
this.patientRegister.query.times++
this.patientRegister.patientRegisterId = ''
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
ldddw(arrayData, key, value, display) {
return dddw(arrayData, key, value, display)
},
lmoment(date, forMat) {
return moment(new Date(date)).format(forMat)
},
//
query(){
query() {
getapi("/api/app/patient-register/in-filter").then(
(res) => {
this.dataList = res.data.items;
this.dataList = res.data;
}
);
);
},
},
//
@ -249,7 +271,7 @@ export default {
//
'patientRegister.query.times'(newVal, oldVal) {
if (newVal != oldVal) {
alert('触发查询事件')
//alert('')
this.query()
}
},
@ -267,7 +289,8 @@ export default {
.box {
display: flex;
}
.listBtn {
margin-top:10px;
margin-top: 10px;
}
</style>

2
src/components/patientRegister/customerOrgTreeAll.vue

@ -32,7 +32,7 @@ export default {
(res) => {
//customerOrgTree = res.data;
console.log('res.data',res.data)
this.patientRegister.customerOrgTreeAll =[{displayName: "个人体检", id: "00000000-0000-0000-0000-000000000000"},...res.data]
this.patientRegister.customerOrgTreeAll =res.data
//tcdate(this.patientRegister.customerOrgTreeAll)
}
);

42
src/store/index.js

@ -31,6 +31,47 @@ export default new Vuex.Store({
customerOrgTreeAll: [], //体检单位列表(含个人)
patientRegisterId:'', //当前单位ID(可根据此值是否为空,判断是新增还是编辑)
patientRegisterRd:{}, //体检人员记录
addTimes:0, //用于触发新增时初始化赋值
patientRegisterRdInit: {
id: '', //id
patientId: '00000000-0000-0000-0000-000000000000', //档案号ID 选择了档案就传档案号,未选就传00000-0000...
patientNo:'',//档案号
customerOrgId: null, //单位编号
customerOrgGroupId: null, //分组
medicalPackageId: null,//套餐
patientName: '', //姓名
birthDate: '', //字符串 如:2012-01-29
sexId: 'U', //性别 默认未知U
age: null, //年龄
jobCardNo: '', //工卡号
medicalCardNo: '', //体检卡号
maritalStatusId: 'U', //婚姻状况 默认未知
medicalTypeId: null, //体检类别
personnelTypeId: null, //人员类别
jobPost: '', //职务
jobTitle: '', //职称
photo: '', //照片
salesman: '', //介绍人
sexHormoneTermId: null, //性激素期限
isNameHide: 'N', //隐藏姓名
isPhoneFollow: 'N', //电话随访
isVip: 'N', //vip客户
remark: '', //
isLock: 'N', //是否锁住
completeFlag: '1', //完成标志 0:预登记,1:未检,2:部份已检,3:已总检 【创建编辑时不操作】
isMedicalStart: 'N', //体检开始标志 【创建编辑时不操作】
patientRegisterNo: '', //条码号 【创建编辑时不操作】
medicalTimes: 1, //条码号 【创建编辑时不操作】
organizationUnitId: null, //体检中心
address:'', //地址
email:'', //email
idNo:'', //身份证号
telephone:'', //电话
mobileTelephone:'', //手机号
nationId:null, //民族编号
postalCode:'', //邮编
}, //体检人员记录(初始值)一般创建用
query:{
times:0, //触发查询次数
customerOrgId:'', //体检单位ID
@ -54,6 +95,7 @@ export default new Vuex.Store({
],
medicalPackage:[], //所有套餐
customerOrgGroupAll:[], //所有分组,不限单位,不限次数
customerOrg:[], //所有单位,非树结构
},

11
src/utlis/proFunc.js

@ -33,3 +33,14 @@ exports.dddw = (arrayData,key,value,display) => {
}
return ret
}
//一般uuid字段为空时,需设置为null值
exports.setNull = (obj,arrayCols) => {
if(arrayCols){
for(let i=0;i<arrayCols.length;i++){
if(!obj[arrayCols[i]] || obj[arrayCols[i]] < 1){
obj[arrayCols[i]] = null
}
}
}
}

15
src/views/customerOrg/patientRegister.vue

@ -79,6 +79,13 @@ export default {
}
);
//
getapi("/api/app/customer-org/in-filter").then(
(res) => {
this.dict.customerOrg = res.data.items;
}
);
//
getapi("/api/app/medical-type/in-filter").then(
(res) => {
@ -86,6 +93,14 @@ export default {
}
);
//
getapi("/api/app/personnel-type/in-filter").then(
(res) => {
this.dict.personnelType = res.data.items;
}
);
//
getapi("/api/app/marital-statuses").then(
(res) => {

Loading…
Cancel
Save