|
|
|
@ -1,13 +1,13 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div @contextmenu.prevent="onContextmenu"> |
|
|
|
<el-table :data="patientRegister.prList" border |
|
|
|
:height="(window.pageHeight < 600) ? 290 : (window.pageHeight - 350)" highlight-current-row @row-click="rowClick" |
|
|
|
size="small" @selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick"> |
|
|
|
<div> |
|
|
|
<el-table :data="patientRegister.prList" border ref="info" id="info" |
|
|
|
:height="(window.pageHeight < 600) ? 240 : (window.pageHeight - 360)" highlight-current-row @row-click="rowClick" |
|
|
|
size="small" @selection-change="handleSelectionChange" > |
|
|
|
<el-table-column type="selection" width="40" align="center" /> |
|
|
|
<el-table-column prop="completeFlag" label="体检进度"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div> |
|
|
|
<div>{{ dddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="guidePrintTimes" label="打印" width="50" align="center"> |
|
|
|
@ -20,45 +20,17 @@ |
|
|
|
<div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="customerOrgName" label="单位" width="180" /> |
|
|
|
<!-- |
|
|
|
<el-table-column prop="customerOrgParentName" label="单位" width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
--> |
|
|
|
<el-table-column prop="departmentName" label="部门" width="180" /> |
|
|
|
<!-- |
|
|
|
<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="customerOrgName" label="单位" width="180" /> |
|
|
|
<el-table-column prop="departmentName" label="部门" width="180" /> |
|
|
|
<el-table-column prop="patientName" label="姓名" /> |
|
|
|
<el-table-column prop="sexName" label="性别" align="center" /> |
|
|
|
<!-- |
|
|
|
<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="sexName" label="性别" align="center" /> |
|
|
|
<el-table-column prop="age" label="年龄" align="center" /> |
|
|
|
<el-table-column prop="patientRegisterNo" label="条码号" width="150" /> |
|
|
|
<el-table-column prop="patientNo" label="档案号" /> |
|
|
|
<el-table-column prop="medicalTimes" label="体检次数" align="center" /> |
|
|
|
<el-table-column label="分组/套餐" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- |
|
|
|
<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.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId"> |
|
|
|
{{ ldddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }} |
|
|
|
</div> |
|
|
|
--> |
|
|
|
|
|
|
|
<div v-if="scope.row.medicalPackageName"> |
|
|
|
{{ scope.row.medicalPackageName }} |
|
|
|
</div> |
|
|
|
@ -70,7 +42,7 @@ |
|
|
|
<el-table-column prop="nationId" label="民族"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
{{ ldddw(dict.nation, "nationId", scope.row.nationId, "displayName") }} |
|
|
|
{{ dddw(dict.nation, "nationId", scope.row.nationId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -91,21 +63,21 @@ |
|
|
|
<el-table-column prop="maritalStatusId" label="婚姻状况"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
{{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }} |
|
|
|
{{ dddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="medicalTypeId" label="体检类别"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.medicalTypeId !== dict.personOrgId"> |
|
|
|
{{ ldddw(dict.medicalType, "id", scope.row.medicalTypeId, "displayName") }} |
|
|
|
{{ dddw(dict.medicalType, "id", scope.row.medicalTypeId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="personnelTypeId" label="人员类别"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.personnelTypeId !== dict.personOrgId"> |
|
|
|
{{ ldddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }} |
|
|
|
{{ dddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -158,6 +130,13 @@ |
|
|
|
"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> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -193,115 +172,37 @@ export default { |
|
|
|
rClickRow: null, //右击的行 |
|
|
|
rClickColumn: null, //右击的列(预留) |
|
|
|
|
|
|
|
dialogGroup: false, |
|
|
|
groupBatch: { |
|
|
|
patientRegisterId: null, |
|
|
|
customerOrgGroupId: null, |
|
|
|
payTypeFlag: "1", //0:个人付费,1:单位付费 2:免费 |
|
|
|
isReserveAddAsbitem: true, //是否保留加做项目 |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
dialogAsbitem: false, |
|
|
|
asbitemBatch: { |
|
|
|
operate: 'add', |
|
|
|
isDeleteGroup: false, |
|
|
|
asbItemId: '', |
|
|
|
asbitemsTemp: [], //删除或增加项目临时用 |
|
|
|
asbitemCurr: {}, //当前选中要删除的项目(批量调整) |
|
|
|
dom: null, //用于滚动加载数据 |
|
|
|
lazyLoading: false, //是否懒加载中 |
|
|
|
loadOpts: { |
|
|
|
totalCount: 0, |
|
|
|
skipCount: 0, |
|
|
|
maxResultCount: 100, |
|
|
|
}, |
|
|
|
quickAsb: [], //可供快速选择的组合项目 |
|
|
|
loadOptsInit: {}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
created() { }, |
|
|
|
created() { |
|
|
|
this.loadOptsInit = Object.assign({}, this.loadOpts) |
|
|
|
}, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
mounted() { |
|
|
|
this.quickAsb = this.dict.asbItemAll; |
|
|
|
|
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
this.scrollFull() |
|
|
|
}) |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapState(["window", "dict", 'dataTransOpts', "patientRegister", "customerOrg","report"]), |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]), |
|
|
|
|
|
|
|
// 打印指引单(isPreview) |
|
|
|
async guidePrint(ReportCode, isPreview) { |
|
|
|
let token = window.sessionStorage.getItem('token'); |
|
|
|
let user = window.sessionStorage.getItem('user'); |
|
|
|
let toOutShell = { |
|
|
|
ReportCode, token, |
|
|
|
isBuildImage: 'N', |
|
|
|
preViewCanPrint: 'N', |
|
|
|
Parameters: [ |
|
|
|
{ Name: 'printer', Value: user }, |
|
|
|
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' }, |
|
|
|
], |
|
|
|
}; |
|
|
|
let lfind = -1; |
|
|
|
|
|
|
|
|
|
|
|
if (this.multipleSelection.length < 1) { |
|
|
|
this.$message.info("请勾选要打印指引单的人员记录!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!this.$peisAPI) { |
|
|
|
this.$message.info("此功能,需要在壳客户端才可运行!") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (isPreview) { |
|
|
|
// |
|
|
|
//this.multipleSelection.forEach((item,index) =>{ |
|
|
|
|
|
|
|
postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}`) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
toOutShell.ReportTable = res.data; |
|
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); |
|
|
|
return this.$peisAPI.printPre(JSON.stringify(toOutShell)); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.$message.warning(err); |
|
|
|
}); |
|
|
|
// }); |
|
|
|
} else { |
|
|
|
this.multipleSelection.forEach((item, index) => { |
|
|
|
postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${item.id}`) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
toOutShell.ReportTable = res.data; |
|
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); |
|
|
|
return this.$peisAPI.print(JSON.stringify(toOutShell)); |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
if (res.code != -1) { |
|
|
|
//更新打印次数 |
|
|
|
return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany', [item.id]) |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
if (res.code != -1) { |
|
|
|
lfind = arrayExistObj(this.patientRegister.prList, 'id', item.id) |
|
|
|
if (lfind > -1) { |
|
|
|
if (this.patientRegister.prList[lfind].guidePrintTimes) { |
|
|
|
this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1; |
|
|
|
} else { |
|
|
|
this.patientRegister.prList[lfind].guidePrintTimes = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.$message.warning(err); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
dddw, |
|
|
|
|
|
|
|
handleSelectionChange(val) { |
|
|
|
this.multipleSelection = val; |
|
|
|
@ -332,124 +233,40 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//体检次数 相关操作 |
|
|
|
add() { |
|
|
|
let customerOrgId = this.patientRegister.query.customerOrgId; |
|
|
|
if (!customerOrgId) { |
|
|
|
alert("请选择单位或个人"); |
|
|
|
return; |
|
|
|
} |
|
|
|
//console.log('customerOrgId',customerOrgId) |
|
|
|
this.patientRegister.patientRegisterId = ""; |
|
|
|
// this.patientRegister.patientRegisterRd.photo = ''; |
|
|
|
// this.patientRegister.patientRegisterRdInit.id = ""; |
|
|
|
// this.patientRegister.patientRegisterRdInit.customerOrgId = this.patientRegister.query.customerOrgId; |
|
|
|
// this.patientRegister.addTimes++; |
|
|
|
// this.patientRegister.patientRegisterTimes++; |
|
|
|
this.patientRegister.patientRegisterRdInit.customerOrgId = this.patientRegister.query.customerOrgId; |
|
|
|
this.formInitData = { ...this.patientRegister.patientRegisterRdInit }; |
|
|
|
this.patientRegister.patientRegisterAbs = []; |
|
|
|
this.dialogVisible = true; |
|
|
|
this.editTimes++; //触发表单窗口,数据更新 |
|
|
|
this.getPatientRegisterAbs(); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
edit() { |
|
|
|
if (!this.patientRegister.patientRegisterRd.id) { |
|
|
|
alert("请选择要操作的记录"); |
|
|
|
return; |
|
|
|
} |
|
|
|
//this.patientRegister.patientRegisterTimes++; |
|
|
|
this.getPatientRegisterAbs(this.patientRegister.patientRegisterRd.id); |
|
|
|
this.formInitData = { ...this.patientRegister.patientRegisterRd }; |
|
|
|
this.dialogVisible = true; |
|
|
|
this.editTimes++; //触发表单窗口,数据更新 |
|
|
|
}, |
|
|
|
|
|
|
|
//拍照 |
|
|
|
openCamera() { |
|
|
|
if (!this.patientRegister.patientRegisterId) { |
|
|
|
alert("请选择要操作的记录"); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.patientRegister.cameraVisble = true; |
|
|
|
}, |
|
|
|
|
|
|
|
//删除(可批量删除) |
|
|
|
// /api/app/patient-register/many?PatientRegisterIds=3a0c2cac-f44c-f407-9504-c1fc5e80a159&PatientRegisterIds=3a0c2cb3-d10c-ed70-db6a-b835e75ce641 |
|
|
|
del() { |
|
|
|
if (this.multipleSelection.length < 1) { |
|
|
|
alert("请先勾选要操作的记录"); |
|
|
|
return; |
|
|
|
} |
|
|
|
let patientRegisterIds = []; |
|
|
|
for (let i = 0; i < this.multipleSelection.length; i++) { |
|
|
|
patientRegisterIds.push(this.multipleSelection[i]["id"]); |
|
|
|
} |
|
|
|
|
|
|
|
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
//console.log('{patientRegisterIds}',{patientRegisterIds}) |
|
|
|
return postapi(`/api/app/patient-register/delete-many`, { |
|
|
|
patientRegisterIds, |
|
|
|
}); |
|
|
|
}) |
|
|
|
.then((res) => { |
|
|
|
console.log("删除成功"); |
|
|
|
this.patientRegister.query.times++; |
|
|
|
this.patientRegister.patientRegisterId = ""; |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: "info", |
|
|
|
message: "已取消删除", |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//单个删除方式 |
|
|
|
delBak() { |
|
|
|
if (!this.patientRegister.patientRegisterId) { |
|
|
|
alert("请选择要操作的记录"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
async load() { |
|
|
|
this.loadOpts.skipCount++ |
|
|
|
await this.btnQuery() |
|
|
|
}, |
|
|
|
//滚动加载数据 |
|
|
|
scrollFull() { |
|
|
|
this.dom = this.$refs['info'].bodyWrapper |
|
|
|
console.log('this.dom', this.dom) |
|
|
|
|
|
|
|
this.dom.addEventListener('scroll', async () => { |
|
|
|
// console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight); |
|
|
|
if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight && !this.lazyLoading) { |
|
|
|
// 获取到的不是全部数据 当滚动到底部 |
|
|
|
console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight); |
|
|
|
if ((Number(this.loadOpts.skipCount) + 1) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) { |
|
|
|
this.lazyLoading = false |
|
|
|
} else { |
|
|
|
this.lazyLoading = true |
|
|
|
await this.load() |
|
|
|
this.lazyLoading = false |
|
|
|
// this.dom.scrollTop = this.dom.scrollTop - 100 |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
//console.log('${this.patientRegister.patientRegisterId}',this.patientRegister.patientRegisterId) |
|
|
|
return deletapi(`/api/app/patient-register/${this.patientRegister.patientRegisterId}`); |
|
|
|
}) |
|
|
|
.then((res) => { |
|
|
|
console.log("删除成功"); |
|
|
|
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() { |
|
|
|
async btnQuery() { |
|
|
|
if (this.fromType == 'report') { |
|
|
|
this.reportQuery() |
|
|
|
await this.reportQuery() |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@ -502,7 +319,15 @@ export default { |
|
|
|
|
|
|
|
// 报告查询 |
|
|
|
reportQuery() { |
|
|
|
let body = {}, customerOrgs = []; |
|
|
|
if (this.loadOpts.skipCount != 0 && this.loadOpts.skipCount * this.loadOpts.maxResultCount >= this.loadOpts.totalCount) return |
|
|
|
console.log('reportQuery', this.loadOpts) |
|
|
|
|
|
|
|
let body = { |
|
|
|
skipCount: this.loadOpts.skipCount, |
|
|
|
maxResultCount: this.loadOpts.maxResultCount |
|
|
|
}; |
|
|
|
|
|
|
|
let customerOrgs = []; |
|
|
|
|
|
|
|
if (this.report.dataCusOrgOCX.length > 0) { |
|
|
|
this.report.dataCusOrgOCX.forEach(e => { |
|
|
|
@ -538,483 +363,32 @@ export default { |
|
|
|
if (this.patientRegister.query.isUpload) body.isUpload = this.patientRegister.query.isUpload |
|
|
|
//console.log('/api/app/peisreport/getpatientregisterreport',body) |
|
|
|
postapi('/api/app/peisreport/getpatientregisterreport', body).then(res => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.patientRegister.prList = res.data.items |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//右击菜单 |
|
|
|
onCellRightClick(row, column) { |
|
|
|
this.rClickRow = { ...row }; //右击的行 |
|
|
|
this.rClickColumn = { ...column }; //右击的列(预留) |
|
|
|
console.log(row, column.property); |
|
|
|
}, |
|
|
|
onContextmenu(event) { |
|
|
|
//console.log('onContextmenu',event); |
|
|
|
if (!this.rClickRow) return false; |
|
|
|
let row = { ...this.rClickRow }; |
|
|
|
this.$contextmenu({ |
|
|
|
items: [ |
|
|
|
{ |
|
|
|
label: "发送检验申请", |
|
|
|
onClick: () => { |
|
|
|
this.lisRequest(row.id); |
|
|
|
if (res.code > -1) { |
|
|
|
// 刷新最大记录数 |
|
|
|
this.loadOpts.totalCount = res.data.totalCount |
|
|
|
|
|
|
|
if (body.skipCount == 0) { //查询 |
|
|
|
this.patientRegister.prList = []; |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "预览检验条码", |
|
|
|
onClick: () => { |
|
|
|
this.lisPrint(row.id, '0002', true); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "打印检验条码", |
|
|
|
onClick: () => { |
|
|
|
this.lisPrint(row.id, '0002', false); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "预览Pacs条码", |
|
|
|
onClick: () => { |
|
|
|
this.pacsPrint(row.id, '0004', true); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "打印Pacs条码", |
|
|
|
onClick: () => { |
|
|
|
this.pacsPrint(row.id, '0004', false); |
|
|
|
} |
|
|
|
}, |
|
|
|
], |
|
|
|
event, |
|
|
|
//x: event.clientX, |
|
|
|
//y: event.clientY, |
|
|
|
customClass: "custom-class", |
|
|
|
zIndex: 3, |
|
|
|
minWidth: 80, |
|
|
|
}); |
|
|
|
|
|
|
|
this.rClickRow = null; |
|
|
|
return false; |
|
|
|
}, |
|
|
|
this.patientRegister.prList = this.patientRegister.prList.concat(res.data.items) |
|
|
|
|
|
|
|
//批量更新分组按钮 |
|
|
|
btnGroupBatch() { |
|
|
|
let customerOrgId = this.patientRegister.query.customerOrgId; |
|
|
|
if (!customerOrgId) { |
|
|
|
alert("请选择单位或个人"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (this.multipleSelection.length < 1) { |
|
|
|
this.$message.info("请勾选要操作的人员!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this.dialogGroup = true; |
|
|
|
}, |
|
|
|
|
|
|
|
//批量更新分组处理 |
|
|
|
async groupBatchHandle() { |
|
|
|
let groupBatch = { patientRegisterId: null, ...this.groupBatch }; |
|
|
|
|
|
|
|
if (groupBatch.isReserveAddAsbitem) { |
|
|
|
groupBatch.isReserveAddAsbitem = 'Y'; |
|
|
|
} else { |
|
|
|
groupBatch.isReserveAddAsbitem = 'N'; |
|
|
|
} |
|
|
|
console.log('groupBatch', groupBatch); |
|
|
|
if (!groupBatch.customerOrgGroupId) { |
|
|
|
this.$message.warning("请选择分组"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
for (let i = 0; i < this.multipleSelection.length; i++) { |
|
|
|
groupBatch.patientRegisterId = this.multipleSelection[i].id; |
|
|
|
try { |
|
|
|
await postapi('/api/app/patientregister/updatepatientregistercustomerorggroup', groupBatch); |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
} |
|
|
|
console.log("操作成功!"); |
|
|
|
this.dialogGroup = false; |
|
|
|
this.query(); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//快速查询项目 |
|
|
|
remoteMethod(keyWords) { |
|
|
|
//console.log('remoteMethod',this.dict.asbItemQuick) |
|
|
|
if (keyWords) { |
|
|
|
this.quickAsb = []; |
|
|
|
this.dict.asbItemQuick.forEach(item => { |
|
|
|
if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 |
|
|
|
|| item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 |
|
|
|
|| item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1) { |
|
|
|
this.quickAsb.push(item); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.quickAsb = [...this.dict.asbItemQuick]; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//快速选择项目 |
|
|
|
quickChoosedAsb(v) { |
|
|
|
//过滤已选的的组合项目 |
|
|
|
let lfind = -1 |
|
|
|
if (v) { |
|
|
|
lfind = arrayExistObj(this.quickAsb, 'id', v) |
|
|
|
if (lfind > -1) { |
|
|
|
this.asbitemBatch.asbitemsTemp.push({ |
|
|
|
asbitemId: v, |
|
|
|
asbitemName: this.quickAsb[lfind].displayName, //仅作显示用 |
|
|
|
patientRegisterId: null, |
|
|
|
standardPrice: this.quickAsb[lfind].price, |
|
|
|
chargePrice: this.quickAsb[lfind].price, |
|
|
|
payTypeFlag: '1',//默认单位支付 |
|
|
|
isCharge: 'N', |
|
|
|
amount: 1, |
|
|
|
}); |
|
|
|
this.quickAsb.splice(lfind, 1); |
|
|
|
arrayReduce(this.dict.asbItemQuick, { id: v }, 'id'); |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(v, this.asbitemBatch.asbitemsTemp) |
|
|
|
}, |
|
|
|
|
|
|
|
//删除临时显示的组合项目 |
|
|
|
removeAbs(row) { |
|
|
|
let lfind = arrayExistObj(this.asbitemBatch.asbitemsTemp, 'asbitemId', row.asbitemId); |
|
|
|
if (lfind > - 1) this.asbitemBatch.asbitemsTemp.splice(lfind, 1); |
|
|
|
}, |
|
|
|
|
|
|
|
rowClickaAbitemCurr(row) { |
|
|
|
this.asbitemBatch.asbitemCurr = row; |
|
|
|
}, |
|
|
|
|
|
|
|
btnRemoveAbs() { |
|
|
|
if (!this.asbitemBatch.asbitemCurr.asbitemId) { |
|
|
|
this.$message.warning("请选择要删除的组合项目!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.removeAbs(this.asbitemBatch.asbitemCurr); |
|
|
|
this.asbitemBatch.asbitemCurr.asbitemId = null; |
|
|
|
}, |
|
|
|
|
|
|
|
removeAllAbs() { |
|
|
|
this.asbitemBatch.asbitemsTemp = []; |
|
|
|
}, |
|
|
|
|
|
|
|
//批量更新项目 |
|
|
|
asbBatch() { |
|
|
|
let customerOrgId = this.patientRegister.query.customerOrgId; |
|
|
|
if (!customerOrgId) { |
|
|
|
alert("请选择单位或个人"); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.dialogAsbitem = true; |
|
|
|
//供快速选择的组合项目 |
|
|
|
this.dict.asbItemQuick = [...this.dict.asbItemAll]; |
|
|
|
this.asbitemBatch.asbitemCurr.asbitemId = null; |
|
|
|
this.asbitemBatch.asbitemsTemp = []; |
|
|
|
}, |
|
|
|
|
|
|
|
asbitemDel(type) { |
|
|
|
//typ==0 为批量删除 |
|
|
|
if (Number(type) == 0) { |
|
|
|
this.asbitemBatch.asbitemsTemp = []; |
|
|
|
} else { |
|
|
|
if (!this.asbitemBatch.asbitemCurr.asbitemId) { |
|
|
|
this.$message.warning("请选中要删除的项目!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
//console.log(this.asbitemBatch.asbitemsTemp,this.asbitemBatch.asbitemCurr) |
|
|
|
let lfind = arrayExistObj(this.asbitemBatch.asbitemsTemp, 'asbitemId', this.asbitemBatch.asbitemCurr.asbitemId); |
|
|
|
if (lfind > -1) { |
|
|
|
this.asbitemBatch.asbitemsTemp.splice(lfind, 1); |
|
|
|
this.asbitemBatch.asbitemCurr.asbitemId = null; |
|
|
|
} |
|
|
|
//console.log(lfind); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//批量调整支付方式 |
|
|
|
changePayTypeFlag(flag) { |
|
|
|
this.asbitemBatch.asbitemsTemp.forEach(e => { |
|
|
|
e.payTypeFlag = flag; |
|
|
|
return e; |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
async asbitemBatchHandle() { |
|
|
|
let msg = '', body = {}; |
|
|
|
if (this.asbitemBatch.asbitemsTemp.length == 0) { |
|
|
|
this.$message.warning("没有选择组合项目,不可执行此操作!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (this.asbitemBatch.operate == 'add') { |
|
|
|
this.asbitemBatch.asbitemsTemp.forEach((e, index) => { |
|
|
|
if (!e.amount || !e.chargePrice) { |
|
|
|
msg = '第 ' + (index + 1) + " 行,未输入数量或价格!"; |
|
|
|
} |
|
|
|
}); |
|
|
|
if (msg) { |
|
|
|
this.$message.warning(msg); |
|
|
|
return; |
|
|
|
} |
|
|
|
// { |
|
|
|
// "medicalCenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "createRegisterAsbitemDtos": [ |
|
|
|
// { |
|
|
|
// "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "standardPrice": 0, |
|
|
|
// "chargePrice": 0, |
|
|
|
// "payTypeFlag": "string", |
|
|
|
// "isCharge": "string", |
|
|
|
// "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "amount": 0, |
|
|
|
// "groupPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
|
|
|
// } |
|
|
|
// ] |
|
|
|
// } |
|
|
|
let createRegisterAsbitemDtos = [...this.asbitemBatch.asbitemsTemp]; |
|
|
|
|
|
|
|
createRegisterAsbitemDtos.forEach(e => { |
|
|
|
delete e.asbitemName; |
|
|
|
return e; |
|
|
|
}); |
|
|
|
for (let i = 0; i < this.multipleSelection.length; i++) { |
|
|
|
createRegisterAsbitemDtos.forEach(e => { |
|
|
|
e.patientRegisterId = this.multipleSelection[i].id; |
|
|
|
return e; |
|
|
|
}); |
|
|
|
body = { |
|
|
|
medicalCenterId: this.multipleSelection[i].medicalCenterId, |
|
|
|
createRegisterAsbitemDtos, |
|
|
|
} |
|
|
|
try { |
|
|
|
await postapi('/api/app/registerasbitem/createregisterasbitemincustomerorgmany', body); |
|
|
|
} catch (error) { |
|
|
|
console.log('批量增加项目错误,原因:', error); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
// { |
|
|
|
// isDeleteGroup: 'N', |
|
|
|
// patientRegisterId: null, |
|
|
|
// asbitemIds: [], |
|
|
|
// } |
|
|
|
let asbitemIds = []; |
|
|
|
if (this.asbitemBatch.isDeleteGroup) { |
|
|
|
body.isDeleteGroup = 'Y'; |
|
|
|
} else { |
|
|
|
body.isDeleteGroup = 'N'; |
|
|
|
} |
|
|
|
for (let i = 0; i < this.multipleSelection.length; i++) { |
|
|
|
|
|
|
|
this.asbitemBatch.asbitemsTemp.forEach(e => { |
|
|
|
asbitemIds.push(e.asbitemId); |
|
|
|
}); |
|
|
|
|
|
|
|
body.patientRegisterId = this.multipleSelection[i].id; |
|
|
|
body.asbitemIds = asbitemIds |
|
|
|
|
|
|
|
try { |
|
|
|
await postapi('/api/app/registerasbitem/deleteregisterasbitemincustomerorgmany', body); |
|
|
|
} catch (error) { |
|
|
|
console.log('批量删除项目错误,原因:', error); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
console.log("操作成功!"); |
|
|
|
this.dialogAsbitem = false; |
|
|
|
this.query(); |
|
|
|
}, |
|
|
|
|
|
|
|
//检验申请 |
|
|
|
async lisRequest(prId) { |
|
|
|
let isPrintLisRequest = false |
|
|
|
let res = null |
|
|
|
if (prId.length < 1) { |
|
|
|
this.$message.info("人员信息尚未保存,不可执行此操作!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${prId}`); |
|
|
|
console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${prId}`, res) |
|
|
|
} catch (error) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (res.code != -1) { |
|
|
|
this.$message.info("发送检验申请成功!"); |
|
|
|
isPrintLisRequest = true; |
|
|
|
} |
|
|
|
|
|
|
|
//重复申请,重打 |
|
|
|
if (res.code == -1 && res.message.indexOf('已申请') > -1) { |
|
|
|
isPrintLisRequest = true; |
|
|
|
} |
|
|
|
|
|
|
|
if (!isPrintLisRequest) return; |
|
|
|
|
|
|
|
try { |
|
|
|
await this.$confirm("是否打印检验申请单?", "提示", { |
|
|
|
confirmButtonText: "是", |
|
|
|
cancelButtonText: "否", |
|
|
|
type: "info", |
|
|
|
showClose: false, |
|
|
|
closeOnClickModal: false, |
|
|
|
closeOnPressEscape: false, |
|
|
|
}); |
|
|
|
} catch (error) { |
|
|
|
return; |
|
|
|
} |
|
|
|
//打印检验申请单 |
|
|
|
this.lisPrint(prId, '0003', false); |
|
|
|
}, |
|
|
|
|
|
|
|
//检验条码打印 |
|
|
|
lisPrint(prId, ReportCode, isPreview) { |
|
|
|
|
|
|
|
let token = window.sessionStorage.getItem('token'); |
|
|
|
let user = window.sessionStorage.getItem('user'); |
|
|
|
let toOutShell = { |
|
|
|
ReportCode, token, |
|
|
|
isBuildImage: 'N', |
|
|
|
preViewCanPrint: 'N', |
|
|
|
Parameters: [ |
|
|
|
{ Name: 'printer', Value: user }, |
|
|
|
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' }, |
|
|
|
], |
|
|
|
}; |
|
|
|
|
|
|
|
if (!this.$peisAPI) { |
|
|
|
this.$message.info("此功能,需要在壳客户端才可运行!") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (isPreview) { |
|
|
|
//http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295 |
|
|
|
//this.multipleSelection.forEach((item,index) =>{ |
|
|
|
postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
toOutShell.ReportTable = { lisRequest: res.data }; |
|
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); |
|
|
|
return this.$peisAPI.printPre(JSON.stringify(toOutShell)); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.$message.warning(err); |
|
|
|
}); |
|
|
|
// }); |
|
|
|
} else { |
|
|
|
|
|
|
|
postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
toOutShell.ReportTable = { lisRequest: res.data }; |
|
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); |
|
|
|
return this.$peisAPI.print(JSON.stringify(toOutShell)); |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
if (res.code != -1) { |
|
|
|
//更新打印状态 /api/app/lisrequest/updatelisrequestisprint |
|
|
|
// { |
|
|
|
// "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId) |
|
|
|
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
|
|
|
// } |
|
|
|
return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: prId }) |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.$message.warning(err); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//pacs条码打印 |
|
|
|
pacsPrint(prId, ReportCode, isPreview) { |
|
|
|
|
|
|
|
let token = window.sessionStorage.getItem('token'); |
|
|
|
let user = window.sessionStorage.getItem('user'); |
|
|
|
let toOutShell = { |
|
|
|
ReportCode, token, |
|
|
|
isBuildImage: 'N', |
|
|
|
preViewCanPrint: 'Y', |
|
|
|
Parameters: [ |
|
|
|
{ Name: 'printer', Value: user }, |
|
|
|
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' }, |
|
|
|
], |
|
|
|
}; |
|
|
|
|
|
|
|
if (!this.$peisAPI) { |
|
|
|
this.$message.info("此功能,需要在壳客户端才可运行!") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (isPreview) { |
|
|
|
//http://140.143.162.39:9529/api/app/printreport/getpacsnoreport?PatientRegisterId=3a0c990e-5756-2dc0-19d5-69a617fe4048 |
|
|
|
//this.multipleSelection.forEach((item,index) =>{ |
|
|
|
postapi(`/api/app/printreport/getpacsnoreport?PatientRegisterId=${prId}`) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
toOutShell.ReportTable = { lisRequest: res.data }; |
|
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); |
|
|
|
return this.$peisAPI.printPre(JSON.stringify(toOutShell)); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.$message.warning(err); |
|
|
|
}); |
|
|
|
// }); |
|
|
|
} else { |
|
|
|
|
|
|
|
postapi(`/api/app/printreport/getpacsnoreport?PatientRegisterId=${prId}`) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
toOutShell.ReportTable = { lisRequest: res.data }; |
|
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); |
|
|
|
return this.$peisAPI.print(JSON.stringify(toOutShell)); |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
if (res.code != -1) { |
|
|
|
//更新打印状态 /api/app/lisrequest/updatelisrequestisprint |
|
|
|
// { |
|
|
|
// "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId) |
|
|
|
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
|
|
|
// } |
|
|
|
return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: prId }) |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.$message.warning(err); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//监听事件 |
|
|
|
watch: { |
|
|
|
//触发查询事件 |
|
|
|
"patientRegister.query.times"(newVal, oldVal) { |
|
|
|
if (newVal != oldVal) { |
|
|
|
//alert('触发查询事件') |
|
|
|
this.query(); |
|
|
|
"patientRegister.query.times":{ |
|
|
|
// immediate:true, |
|
|
|
handler(newVal, oldVal) { |
|
|
|
console.log('查询触发',newVal, oldVal) |
|
|
|
if(newVal != oldVal){ |
|
|
|
this.btnQuery(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|