Browse Source

charge

master
pengjun 3 years ago
parent
commit
8091b79a45
  1. 145
      src/components/doctorCheck/PatientRegisterList.vue
  2. 414
      src/components/report/BtnReport.vue
  3. 996
      src/components/report/PatientRegisterListNobtn.vue
  4. 123
      src/components/report/PatientRegisterQueryNobtn.vue
  5. 76
      src/components/report/RegisterCheckStatus.vue
  6. 1
      src/store/index.js
  7. 439
      src/views/charge/charge.vue
  8. 472
      src/views/report/report.vue

145
src/components/doctorCheck/PatientRegisterList.vue

@ -1,113 +1,61 @@
<template>
<div>
<!-- 查询条件 -->
<!-- 查询条件 -->
<div style="display: flex; flex-wrap: wrap; width: 100%">
<div class="block query">
<span class="demonstration">登记日期</span>
<el-date-picker
v-model="patientRegister.query.dateRange"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
size="small"
style="width: 240px"
>
<el-date-picker v-model="patientRegister.query.dateRange" type="daterange" align="right" unlink-panels
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" size="small"
style="width: 240px">
</el-date-picker>
</div>
<div class="query">
<span>条码号</span>
<el-input
placeholder="条码号"
v-model="patientRegister.query.patientRegisterNo"
size="small"
clearable
style="width: 150px"
/>
<el-input placeholder="条码号" v-model="patientRegister.query.patientRegisterNo" size="small" clearable
style="width: 150px" />
</div>
<div class="query">
<span>档案号</span>
<el-input
placeholder="档案号"
v-model="patientRegister.query.patientNo"
size="small"
clearable
style="width: 135px"
/>
<el-input placeholder="档案号" v-model="patientRegister.query.patientNo" size="small" clearable
style="width: 135px" />
</div>
<div class="query">
<span>姓名</span>
<el-input
placeholder="姓名"
v-model="patientRegister.query.patientName"
size="small"
clearable
style="width: 100px"
/>
<el-input placeholder="姓名" v-model="patientRegister.query.patientName" size="small" clearable
style="width: 100px" />
</div>
<div class="query">
<span>性别</span>
<el-select
v-model="patientRegister.query.sex"
placeholder="请选择" clearable
style="width: 80px" size="small"
>
<el-option
v-for="item in dict.forSex"
:key="item.id"
:label="item.displayName"
:value="item.id"
>
<el-select v-model="patientRegister.query.sex" placeholder="请选择" clearable style="width: 80px" size="small">
<el-option v-for="item in dict.forSex" :key="item.id" :label="item.displayName" :value="item.id">
</el-option>
</el-select>
</div>
<div class="query">
<span>身份证号</span>
<el-input
placeholder="身份证号"
v-model="patientRegister.query.idCardNo"
size="small"
clearable
style="width: 180px"
/>
<el-input placeholder="身份证号" v-model="patientRegister.query.idCardNo" size="small" clearable
style="width: 180px" />
</div>
<div class="query">
<el-cascader
v-model="patientRegister.query.customerOrgId"
:options="patientRegister.customerOrgTreeAll"
:props="{
checkStrictly: true,
expandTrigger: 'hover',
...customerOrg.treeprops,
}"
:show-all-levels="false"
size="small" clearable placeholder="请选择单位"
>
<div class="query">
<el-cascader v-model="patientRegister.query.customerOrgId" :options="patientRegister.customerOrgTreeAll" :props="{
checkStrictly: true,
expandTrigger: 'hover',
...customerOrg.treeprops,
}" :show-all-levels="false" size="small" clearable placeholder="请选择单位">
</el-cascader>
<el-checkbox v-model="patientRegister.query.customerOrgFlag">单位作为查询条件</el-checkbox>
</div>
<div class="query">
<span>状态</span>
<el-select
v-model="patientRegister.query.completeFlag"
placeholder="请选择" clearable
style="width: 80px" size="small"
>
<el-option
v-for="item in dict.completeFlag"
:key="item.id"
:label="item.displayName"
:value="item.id"
>
<el-select v-model="patientRegister.query.completeFlag" placeholder="请选择" clearable style="width: 80px"
size="small">
<el-option v-for="item in dict.completeFlag" :key="item.id" :label="item.displayName" :value="item.id">
</el-option>
</el-select>
</div>
</div>
<!-- 人员列表 -->
<!-- 人员列表 -->
<div style="display: flex;margin-top: 10px;">
<el-table :data="dataList" border width="100%" height="430" row-key="id" size="small"
class="el-table__body-wrapper tbody" highlight-current-row @row-click="rowick" ref="dataList">
@ -214,7 +162,7 @@
<template slot-scope="scope">
<div>{{ scope.row.isUpload == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
</el-table-column>
</el-table>
<div style="margin-left: 10px">
@ -223,27 +171,27 @@
</div>
<div class="listBtn">
<el-button type="danger" @click="close">关闭</el-button>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import moment from "moment";
import { mapState, mapMutations} from "vuex";
import { mapState, mapMutations } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce } from "@/utlis/proFunc";
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
import Camera from "../../components/patientRegister/Camera.vue";
export default {
export default {
components: {
PatientRegisterEdit,
Camera,
},
props:['win'],
props: ['win'],
data() {
return {
dataList: [], //
@ -290,20 +238,20 @@ export default {
//
mounted() { },
computed: {
...mapState(["dict", "patientRegister", "customerOrg","doctorCheck","sumDoctorCheck"]),
...mapState(["dict", "patientRegister", "customerOrg", "doctorCheck", "sumDoctorCheck"]),
},
methods: {
...mapMutations(['doctorCheckPrBaseInit','sumPREditInit']),
...mapMutations(['doctorCheckPrBaseInit', 'sumPREditInit']),
//
rowick(row) {
this.doctorCheckPrBaseInit()
this.doctorCheck.prBase.patientRegisterNo = row.patientRegisterNo
objCopy(row,this.doctorCheck.prBase) //
objCopy(row, this.doctorCheck.prBase) //
this.sumPREditInit()
objCopy(row,this.sumDoctorCheck.sumPREdit) //
objCopy(row, this.sumDoctorCheck.sumPREdit) //
},
ldddw(arrayData, key, value, display) {
@ -317,7 +265,7 @@ export default {
//
query() {
let body = {}
console.log(`this.patientRegister.query`, this.patientRegister.query)
if (this.patientRegister.query.customerOrgFlag) {
@ -353,21 +301,21 @@ export default {
//
close(){
close() {
//console.log('this.win',this.win)
if(this.win == 'doctorCheck'){
this.doctorCheck.doctorCheckDialogVisible=false
}else{
this.sumDoctorCheck.sumDoctorCheckDialogVisible=false
if (this.win == 'doctorCheck') {
this.doctorCheck.doctorCheckDialogVisible = false
} else {
this.sumDoctorCheck.sumDoctorCheckDialogVisible = false
}
},
},
//
watch: {
},
};
</script>
@ -375,9 +323,10 @@ export default {
.box {
display: flex;
}
.query{
margin-left: 5px;
margin-bottom: 2px;
.query {
margin-left: 5px;
margin-bottom: 2px;
}
.listBtn {

414
src/components/report/BtnReport.vue

@ -0,0 +1,414 @@
<template>
<div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="prList">查询</el-button>
</div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="toDoctorCheck">预览报告</el-button>
</div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="save">打印报告</el-button>
</div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="edit">领用报告</el-button>
</div>
</div>
</template>
<script>
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { arrayExistObj, parseID } from "../../utlis/proFunc";
//import PatientRegisterList from "../doctorCheck/PatientRegisterList.vue";
export default {
components: {
//PatientRegisterList,
},
data() {
return {
};
},
created() { },
//
mounted() {
},
computed: {
...mapState(["dict", "patientRegister", "doctorCheck", "sumDoctorCheck"]),
},
methods: {
prList() {
this.sumDoctorCheck.sumDoctorCheckDialogVisible = true
},
//to
toDoctorCheck() {
this.$router.push({ path: "/doctorCheck" });
},
//
optGrant(optType) {
let ret = ''
if (!this.sumDoctorCheck.sumPREdit.id) return '请选择体检人员'
if (this.sumDoctorCheck.sumPREdit.isLock == 'Y') return '人员已锁定,不可执行此操作'
if (optType == 'save') {
//if (!this.sumDoctorCheck.sumPREdit.summaryDoctor) return ""
if (this.sumDoctorCheck.sumPREdit.completeFlag == '3') return "该人员已总检,不可再执行此操作,如需操作请点【修改】"
if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'edit') {
if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员尚未总检,无需执行此操作"
if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'del') {
if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员尚未总检,无需执行此操作"
if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'audit') {
if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该检查项目尚未保存,不可执行此操作"
if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return "该人员检查已审核,无需再执行此操作"
}
if (optType == 'unAudit') {
if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员尚未总检,不可执行此操作"
if (this.sumDoctorCheck.sumPREdit.isAudit == 'N') return "该人员检查尚未审核,无需执行此操作"
}
if (optType == 'report') {
if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员检查尚未总检,不可执行此操作"
if (this.sumDoctorCheck.sumPREdit.isAudit == 'N') return "该人员检查尚未审核,不可执行此操作"
}
return ret
},
//
save() {
let ret = this.optGrant('save')
if (ret) {
alert(ret)
return
}
//
this.updateSumDoctorCheck();
//
this.saveSummary();
//
this.saveSuggestion();
},
//
edit() {
let ret = this.optGrant('edit')
if (ret) {
alert(ret)
return
}
this.sumDoctorCheck.sumPREdit.completeFlag = '2'
},
//
del() {
let body = {
patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
//summaryDoctor: this.sumDoctorCheck.sumPREdit.summaryDoctor,
//summaryDate: this.sumDoctorCheck.sumPREdit.summaryDate,
completeFlag: '2'
}
console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
postapi(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
.then((res) => {
console.log("del", res.data);
if (res.code != -1) {
this.sumDoctorCheck.sumPREdit.completeFlag = '2';
console.log(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
return postapi(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
}
})
.then((res) => {
console.log("deletesumsuggestionmany", res.data);
if (res.code != -1) {
console.log(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
return postapi(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
}
})
.then((res) => {
console.log("deletesumsuggestionmany", res.data);
if (res.code != -1) {
this.$message({ type: "success", message: `取消总检成功!` });
}
})
.catch((err) => {
this.$message({ type: "error", message: `取消总检失败,原因:${err}` });
});
},
//
audit() {
let ret = this.optGrant('audit')
if (ret) {
alert(ret)
return
}
let body = {
patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
//auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
//auditDate: "string"
isAudit: 'Y'
}
console.log(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
postapi(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
.then((res) => {
console.log("audit", res.data);
if (res.code != -1) {
this.sumDoctorCheck.sumPREdit.isAudit = 'Y';
this.$message({ type: "success", message: `总检审核成功` });
}
})
.catch((err) => {
this.$message({ type: "error", message: `总检审核失败,原因:${err}` });
});
},
//
unAudit() {
let ret = this.optGrant('unAudit')
if (ret) {
alert(ret)
return
}
let body = {
patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
//auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
//auditDate: "string"
isAudit: 'N'
}
console.log(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
postapi(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
.then((res) => {
console.log("unAudit", res.data);
if (res.code != -1) {
this.sumDoctorCheck.sumPREdit.isAudit = 'N';
this.$message({ type: "success", message: `取消总检审核成功` });
}
})
.catch((err) => {
this.$message({ type: "error", message: `取消总检审核失败,原因:${err}` });
});
},
//
report() {
let ret = this.optGrant('report')
if (ret) {
alert(ret)
return
}
///3a0c990e-5756-2dc0-19d5-69a617fe4048
let ReportCode = '0005';
let token = localStorage.getItem('token');
let user = localStorage.getItem('user');
let toOutShell = {
ReportCode, token,
preViewCanPrint: this.sumDoctorCheck.sumPREdit.isAudit,
Parameters: [
{ Name: 'printer', Value: user },
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' },
{ Name: "peisReportFirstPage", Value: "pic/peisReportFirstPage.jpg" },
{ Name: "peisReportPageHeader", Value: "pic/peisReportPageHeader.jpg" },
{ Name: "peisReportPageFooter", Value: "pic/peisReportPageFooter.jpg" }
],
};
postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.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);
});
},
//
addSuggtion() {
let id = String(new Date().getTime())
let pojo = {
id,
patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
details: [
{
sumSuggestionHeaderId: id,
suggestionContent: '',
}
]
}
this.sumDoctorCheck.suggestionList.push(pojo);
},
//
reCheck() {
console.log("parseID('123456198007240000')", parseID('123456198007240000'))
let ret = this.optGrant('reCheck')
if (ret) {
alert(ret)
return
}
},
//
intervene() {
let ret = this.optGrant('intervene')
if (ret) {
alert(ret)
return
}
},
//
updateSumDoctorCheck() {
let body = {
patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
//summaryDoctor:this.sumDoctorCheck.sumPREdit.summaryDoctor,
//summaryDate: this.sumDoctorCheck.sumPREdit.summaryDate,
completeFlag: '3'
}
console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
postapi(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
.then((res) => {
console.log("updateSumDoctorCheck", res.data);
if (res.code != -1) {
this.sumDoctorCheck.sumPREdit.completeFlag = '3';
this.$message({ type: "success", message: `总检保存成功!` });
}
})
.catch((err) => {
this.$message({ type: "error", message: `总检保存失败,原因:${err}` });
});
},
//
saveSummary() {
let body = []
this.sumDoctorCheck.summaryList.forEach(item => {
delete item.id;
delete item.summaryFlag;
delete item.displayOrder;
item.details.forEach(e => {
delete e.sumSummaryHeaderId;
delete e.displayOrder;
})
body.push(item)
});
console.log(`/api/app/sumsummaryheader/createsumsummary`, body)
if (body.length < 1) return
postapi(`/api/app/sumsummaryheader/createsumsummary`, body)
.then((res) => {
console.log("saveSummary", res.data);
if (res.code != -1) {
//this.sumDoctorCheck.sumPREdit.completeFlag = '1';
}
})
.catch((err) => {
this.$message({ type: "error", message: `综述保存失败,原因:${err}` });
});
},
//
saveSuggestion() {
let body = []
this.sumDoctorCheck.suggestionList.forEach(item => {
delete item.id;
delete item.suggestionFlag;
delete item.displayOrder;
item.details.forEach(e => {
delete e.sumSuggestionHeaderId;
delete e.displayOrder;
})
body.push(item)
});
console.log(`/api/app/sumsuggestionheader/createsumsuggestion`, body)
if (body.length < 1) return
postapi(`/api/app/sumsuggestionheader/createsumsuggestion`, body)
.then((res) => {
console.log("saveSuggestion", res.data);
if (res.code != -1) {
//this.sumDoctorCheck.sumPREdit.completeFlag = '1';
}
})
.catch((err) => {
this.$message({ type: "error", message: `建议保存失败,原因:${err}` });
});
},
addSummary() {
if (!this.sumDoctorCheck.sumPREdit.id) {
alert("请选择检查项目")
return
}
this.doctorCheck.checkSummaryList.push({
registerCheckId: this.sumDoctorCheck.sumPREdit.id,
summary: '',
summaryFlag: 'N',
})
this.doctorCheck.checkSuggestionList.push({
registerCheckId: this.sumDoctorCheck.sumPREdit.id,
suggestion: '',
})
},
},
//()
watch: {
//1
"patientRegister.query.CustomerOrgParentId"(newVal, oldVal) {
console.log(
"watch patientRegister.query.CustomerOrgParentId newVal:",
newVal,
" oldVal:",
oldVal
);
if (newVal != oldVal && newVal !== this.dict.personOrgId) {
this.getCustomerOrgGroup(newVal);
}
},
},
};
</script>
<style scoped>
.listBtn {
margin-top: 10px;
/*
text-align: center;
*/
}
.btnClass {
width: 110px;
}
</style>

996
src/components/report/PatientRegisterListNobtn.vue

@ -0,0 +1,996 @@
<template>
<div>
<div @contextmenu.prevent="onContextmenu">
<el-table :data="patientRegister.prList" border :height="(window.pageHeight < 600) ? 260:(window.pageHeight - 340)" highlight-current-row
@row-click="rowick" size="small" @selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick">
<el-table-column type="selection" width="40"></el-table-column>
<el-table-column prop="completeFlag" label="体检进度">
<template slot-scope="scope">
<div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="guidePrintTimes" label="打印" width="50">
<template slot-scope="scope">
<i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0" style="font-size: 24px;color: green;"></i>
</template>
</el-table-column>
<el-table-column prop="isLock" label="锁住">
<template slot-scope="scope">
<div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
<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="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="性别">
<template slot-scope="scope">
<div>{{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="age" 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="分组/套餐" 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>
</template>
</el-table-column>
<el-table-column prop="nationId" label="民族">
<template slot-scope="scope">
<div>
{{ ldddw(dict.nation, "nationId", scope.row.nationId, "displayName") }}
</div>
</template>
</el-table-column>
<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="180" />
<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="婚姻状况">
<template slot-scope="scope">
<div>
{{ ldddw(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") }}
</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") }}
</div>
</template>
</el-table-column>
<el-table-column prop="jobPost" label="职务" />
<el-table-column prop="jobTitle" label="职称" />
<el-table-column prop="salesman" label="介绍人" />
<el-table-column prop="isVip" label="是否VIP">
<template slot-scope="scope">
<div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
<el-table-column prop="creatorName" 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>
</template>
</el-table-column>
<!--
"sexHormoneTermId": "00000000-0000-0000-0000-000000000000",
"interposeMeasure": null,
"medicalConclusionId": "00000000-0000-0000-0000-000000000000",
"reportPrintTimes": 0,
"isMedicalStart": "N",
"medicalStartDate": "6/28/2023",
"isRecoverGuide": "N",
"summaryDate": "",
"summaryDoctor": null,
"isAudit": "N",
"auditDoctor": null,
"auditDate": "",
"isNameHide": "N",
"isPhoneFollow": "N",
"thirdInfo": null,
"guidePrintTimes": null,
"remark": null,
"organizationUnitId": "00000000-0000-0000-0000-000000000000",
"customerOrgRegisterId": "00000000-0000-0000-0000-000000000000",
"lastModifierName": "",
"lastModificationTime": null,
"lastModifierId": null,
"creatorId": null,
"id": "3a0c196d-a6d0-37fe-5c32-4806bdc4530f"
-->
</el-table>
</div>
</div>
</template>
<script>
import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc";
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
import Camera from "../../components/patientRegister/Camera.vue";
import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue";
export default {
components: {
PatientRegisterEdit,
Camera,
PatientRegisterAsbItem,
},
data() {
return {
multipleSelection: [], //
dialogVisible: false,
dialogCamera: false,
dialogGuide: false,
guideMsg: 'guideMsg',
tabChoosed: "1",
formInitData: {}, //
editTimes: 0,
rClickRow: null, //
rClickColumn: null, //
dialogGroup: false,
groupBatch: {
patientRegisterId: null,
customerOrgGroupId: null,
payTypeFlag: "1", //01 2
isReserveAddAsbitem: true, //
},
dialogAsbitem: false,
asbitemBatch: {
operate: 'add',
isDeleteGroup: false,
asbItemId: '',
asbitemsTemp: [], //
asbitemCurr: {}, //()
},
quickAsb: [], //
};
},
created() { },
//
mounted() {
this.quickAsb = this.dict.asbItemAll;
},
computed: {
...mapState(["window", "dict", "patientRegister", "customerOrg"]),
},
methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
// (isPreview)
async guidePrint(ReportCode, isPreview) {
let token = localStorage.getItem('token');
let user = localStorage.getItem('user');
let toOutShell = {
ReportCode, token,
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 (isPreview) {
//
//this.multipleSelection.forEach((item,index) =>{
getapi(`/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) => {
getapi(`/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.toLowerCase() == 'success') {
//
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);
});
});
}
},
handleSelectionChange(val) {
this.multipleSelection = val;
//console.log('this.multipleSelection',this.multipleSelection)
},
// /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
getCustomerOrgGroup(customerOrgld) {
getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`)
.then((res) => {
console.log("getCustomerOrgGroup", res.data);
if (res.code == 1) {
this.patientRegister.customerOrgGroup = res.data;
}
});
},
//
rowick(row) {
this.patientRegister.photo = ""; //
this.patientRegister.patientRegisterId = row.id;
this.patientRegister.patientRegisterRd = row;
this.patientRegister.query.customerOrgParentId = row.customerOrgParentId;
this.patientRegister.customerOrgGroupChange = 0; //0
this.patientRegister.medicalPackageChange = 0; //0
this.getCustomerOrgGroup(row.customerOrgParentId);
this.dict.asbItem = [...this.dict.asbItemAll]
this.getPatientRegisterAbs(row.id);
},
//
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) => {
this.$message.success("删除成功");
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",
})
.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);
},
//
async query() {
this.patientRegister.prList = [];
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let body = {}
console.log(`this.patientRegister.query`, this.patientRegister.query)
if (this.patientRegister.query.customerOrgFlag) {
if (this.patientRegister.query.CustomerOrgParentId) {
body.customerOrgId = this.patientRegister.query.CustomerOrgParentId
} else {
if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId
}
}
if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex
if (this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName
if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag
//StartDate EndDate
if (this.patientRegister.query.dateRange) {
body.startDate = moment(new Date(this.patientRegister.query.dateRange[0])).format("yyyy-MM-DD")
body.endDate = moment(new Date(this.patientRegister.query.dateRange[1])).format("yyyy-MM-DD")
}
if (this.patientRegister.query.idCardNo) body = { idNo: this.patientRegister.query.idCardNo }
if (this.patientRegister.query.patientNo) body = { patientNo: this.patientRegister.query.patientNo }
if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo }
console.log('/api/app/patientregister/getlistinfilter', body)
postapi('/api/app/patientregister/getlistinfilter', body)
.then((res) => {
if (res.code != -1) {
this.patientRegister.prList = res.data.items;
}
loading.close();
})
.catch((err) => {
loading.close();
});
// try {
// let res =await postapi('/api/app/patientregister/getlistinfilter', body);
// this.patientRegister.prList = res.data;
// } catch (error) {
// console.log("query error",error);
// }
},
//
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);
}
},
{
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;
},
//
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);
}
}
this.$message.success("操作成功!");
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;
}
// {
// "organizationUnitId": "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 = {
organizationUnitId:this.multipleSelection[i].organizationUnitId,
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);
}
}
}
this.$message.success("操作成功!");
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 = localStorage.getItem('token');
let user = localStorage.getItem('user');
let toOutShell = {
ReportCode, token,
preViewCanPrint: 'N',
Parameters: [
{ Name: 'printer', Value: user },
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' },
],
};
if (isPreview) {
//http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295
//this.multipleSelection.forEach((item,index) =>{
postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${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.toLowerCase() == 'success') {
// /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 = localStorage.getItem('token');
let user = localStorage.getItem('user');
let toOutShell = {
ReportCode, token,
preViewCanPrint: 'Y',
Parameters: [
{ Name: 'printer', Value: user },
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' },
],
};
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.toLowerCase() == 'success') {
// /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.patientRegisterRd.id"(newVal, oldVal) {
if (newVal != oldVal) {
//console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
objCopy(this.patientRegister.patientRegisterRd, this.form);
}
},
},
};
</script>
<style scoped>
.box {
display: flex;
}
.listBtn {
margin-top: 5px;
text-align: center;
}
.btnClass {
width: 110px;
}
::v-deep .el-input__inner {
text-align: center;
padding-left: 1px;
padding-right: 1px;
}
::v-deep .el-table th.el-table__cell {
text-align: center;
padding-left: 1px;
padding-right: 1px;
}
::v-deep .el-table td.el-table__cell {
padding-left: 1px;
padding-right: 1px;
}
::v-deep .el-table .cell {
padding-left: 1px;
padding-right: 1px;
}
::v-deep input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none !important;
margin: 0 !important;
}</style>

123
src/components/report/PatientRegisterQueryNobtn.vue

@ -0,0 +1,123 @@
<template>
<div style="display: flex">
<div style="display: flex; flex-wrap: wrap; height:100px;">
<div class="query">
<el-select v-model="patientRegister.query.dateType" placeholder="请选择" filterable clearable size="small" style="width: 100px">
<el-option label="登记日期" value="creationTime" />
<el-option label="体检日期" value="medicalStartDate" />
<el-option label="总检日期" value="summaryDate" />
</el-select>
<el-date-picker v-model="patientRegister.query.dateRange" type="daterange" align="right" unlink-panels
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" size="small"
style="width: 240px">
</el-date-picker>
</div>
<div class="query">
<span>条码号</span>
<el-input placeholder="条码号" v-model="patientRegister.query.patientRegisterNo" size="small" clearable
style="width: 150px" />
</div>
<div class="query">
<span>档案号</span>
<el-input placeholder="档案号" v-model="patientRegister.query.patientNo" size="small" clearable
style="width: 135px" />
</div>
<div class="query">
<span>姓名</span>
<el-input placeholder="姓名" v-model="patientRegister.query.patientName" size="small" clearable
style="width: 100px" />
</div>
<div class="query">
<span>性别</span>
<el-select v-model="patientRegister.query.sex" placeholder="请选择" style="width: 80px" size="small">
<el-option v-for="item in dict.forSex" :key="item.id" :label="item.displayName" :value="item.id">
</el-option>
</el-select>
</div>
<div class="query">
<span>身份证号</span>
<el-input placeholder="身份证号" v-model="patientRegister.query.idCardNo" size="small" clearable
style="width: 180px" />
</div>
<div class="query">
<el-cascader v-model="patientRegister.query.customerOrgId" :options="patientRegister.customerOrgTreeAll"
:props="{checkStrictly: true,expandTrigger: 'hover',...customerOrg.treeprops,}" placeholder="请选择单位"
:show-all-levels="false" clearable :disabled="orgEnable == 'Y' ? false : true" size="small">
</el-cascader>
<el-checkbox v-model="patientRegister.query.customerOrgFlag">单位作为查询条件</el-checkbox>
</div>
<div class="query">
<span>状态</span>
<el-select v-model="patientRegister.query.completeFlag" placeholder="请选择" clearable style="width: 80px"
size="small">
<el-option v-for="item in dict.completeFlag" :key="item.id" :label="item.displayName" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</div>
</template>
<script>
import { mapState } from "vuex";
export default {
components: {},
props: ["orgEnable"],
data() {
return {
dialogVisible: false,
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
};
},
created() { },
//
mounted() { },
computed: {
...mapState(["window", "dict", "patientRegister", "customerOrg"]),
},
methods: {
},
};
</script>
<style scoped>
.query {
margin-left: 10px;
}
</style>

76
src/components/report/RegisterCheckStatus.vue

@ -0,0 +1,76 @@
<template>
<div>
<el-table :data="doctorCheck.RegisterCheckList" border
:height="(window.pageHeight < 600) ? 260 : (window.pageHeight - 340)" size="small" highlight-current-row
ref="doctorCheck.RegisterCheckList">
<el-table-column prop="asbitemName" label="组合项目" width="120" />
<el-table-column prop="checkCompleteFlag" label="状态">
<template slot-scope="scope">
<div>
<el-radio v-model="scope.row.checkCompleteFlag" label="0">未检</el-radio>
<el-radio v-model="scope.row.checkCompleteFlag" label="1">已检</el-radio>
<el-radio v-model="scope.row.checkCompleteFlag" label="2">弃检</el-radio>
</div>
</template>
</el-table-column>
<el-table-column prop="checkDate" label="检查日期" width="90">
<template slot-scope="scope">
<div>{{ moment(scope.row.checkDate).format("yyyy-MM-DD") }}</div>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import moment from "moment";
import { mapState } from "vuex";
export default {
components: {},
data() {
return {};
},
created() { },
//
mounted() { },
computed: {
...mapState(["window", "dict", "doctorCheck"]),
},
methods: {
moment,
},
};
</script>
<style scoped>
::v-deep .el-input__inner {
text-align: center;
padding-left: 1px;
padding-right: 1px;
}
::v-deep .el-table th.el-table__cell {
text-align: center;
padding-left: 1px;
padding-right: 1px;
}
::v-deep .el-table td.el-table__cell {
padding-left: 1px;
padding-right: 1px;
}
::v-deep .el-table .cell {
padding-left: 1px;
padding-right: 1px;
}
::v-deep input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none !important;
margin: 0 !important;
}
</style>

1
src/store/index.js

@ -105,6 +105,7 @@ export default new Vuex.Store({
customerOrgGroupChange: 0, //控制体检列表记录切换时,0 无需触发更换分组操作
medicalPackageChange: 0, //控制体检列表记录切换时,0 无需触发更换套餐操作
query: {
dateType:'creationTime', //登记日期
times: 0, //触发查询次数
customerOrgId: "", //体检单位ID
CustomerOrgParentId: "", //单位父级ID

439
src/views/charge/charge.vue

@ -19,16 +19,20 @@
</div>
</div>
<div style="display:flex;margin-top:10px;">
<el-radio v-model="query.chargeFlag" label="N">未收费</el-radio>
<el-radio v-model="query.chargeFlag" label="Y">已收费</el-radio>
<el-radio v-model="query.chargeFlag" label="B">已退费</el-radio>
<el-radio-group v-model="query.chargeFlag" @input="Query" size="mini">
<el-radio label="N">未收费</el-radio>
<el-radio label="Y">已收费</el-radio>
<el-radio label="B">已退费</el-radio>
</el-radio-group>
</div>
</div>
<!-- 列表 -->
<div class="prListDivClass">
<el-table :data="patientRegister.prList" border highlight-current-row
:height="(window.pageHeight > 600 ? (window.pageHeight - 230) : 350)" @row-click="rowClick" size="small"
@selection-change="handleSelectionChange">
<el-table :data="patientList" border highlight-current-row
:height="(window.pageHeight > 600 ? (window.pageHeight - 230) : 350)" @row-click="rowClick" size="small">
<!--
<el-table-column prop="patientRegisterId" label="体检记录ID" />
-->
<el-table-column prop="customerOrgParentName" label="单位" width="180">
<template slot-scope="scope">
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}
@ -36,110 +40,29 @@
</template>
</el-table-column>
<el-table-column prop="patientName" 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="sexId" label="性别" />
<el-table-column prop="age" 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="分组/套餐" width="150">
<template slot-scope="scope">
<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>
</template>
</el-table-column>
<el-table-column prop="completeFlag" label="体检进度">
<template slot-scope="scope">
<div>{{ dddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="guidePrintTimes" label="打印" width="50">
<template slot-scope="scope">
<i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0"
style="font-size: 24px;color: green;"></i>
</template>
</el-table-column>
<el-table-column prop="isLock" label="锁住">
<template slot-scope="scope">
<div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
<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="nationId" label="民族">
<template slot-scope="scope">
<div>
{{ dddw(dict.nation, "nationId", scope.row.nationId, "displayName") }}
</div>
</template>
</el-table-column>
<el-table-column prop="idNo" label="身份证" width="150" />
<el-table-column prop="birthDate" label="出生日期" width="100">
<el-table-column prop="medicalTimes" label="体检次数" />
<el-table-column prop="isVip" label="是否VIP">
<template slot-scope="scope">
<div v-if="scope.row.birthDate">
{{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }}
</div>
<div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
<el-table-column prop="salesman" label="介绍人" />
<el-table-column prop="invoiceNo" label="发票号" />
<el-table-column prop="invoiceOrgName" label="发票抬头" />
<!--
<el-table-column prop="chargeId" label="介绍人" />
<el-table-column prop="chargeBackId" label="介绍人" />
-->
<el-table-column prop="email" label="邮箱" width="180" />
<el-table-column prop="idNo" label="身份证" width="150" />
<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="婚姻状况">
<template slot-scope="scope">
<div>
{{ 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">
{{ 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">
{{ dddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }}
</div>
</template>
</el-table-column>
<el-table-column prop="jobPost" label="职务" />
<el-table-column prop="jobTitle" label="职称" />
<el-table-column prop="salesman" label="介绍人" />
<el-table-column prop="isVip" label="是否VIP">
<template slot-scope="scope">
<div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
<el-table-column prop="creatorName" 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>
</template>
</el-table-column>
</el-table>
</div>
</div>
@ -184,24 +107,24 @@
<el-row>
<el-col :span="12">
<el-form-item label="折扣" prop="discount">
<el-input v-model="form.discount" />
<el-input v-model="form.discount" @input="discountToDetails" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="应收金额" prop="total">
<el-input v-model="form.total" />
<el-input v-model="form.total" @input="totalToDetails" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="预收金额" prop="preTotal">
<el-input v-model="form.preTotal" />
<el-input v-model="form.preTotal" @input="findBalance"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="找零" prop="balance">
<el-input v-model="form.balance" />
<el-input v-model="form.balance" disabled/>
</el-form-item>
</el-col>
</el-row>
@ -222,9 +145,9 @@
<el-input type="number" v-model="scope.row.chargeMoney" size="small" @input="inputMoney" />
</template>
</el-table-column>
<el-table-column prop="cardBillId" label="会员卡">
<el-table-column prop="cardRegisterId" label="会员卡">
<template slot-scope="scope">
<el-select v-model="scope.row.cardBillId" placeholder="请选择" size="small" filterable clearable
<el-select v-model="scope.row.cardRegisterId" placeholder="请选择" size="small" filterable clearable
:disabled="scope.row.payModeId == '05' ? false : true">
<el-option v-for="item in cardRegister" :key="item.id" :label="item.idNo" :value="item.id" />
</el-select>
@ -248,11 +171,7 @@
@input="changeDiscount(scope.row)" />
</template>
</el-table-column>
<el-table-column label="数量" prop="amount" width="50">
<template slot-scope="scope">
<el-input type="number" v-model="scope.row.amount" size="small" />
</template>
</el-table-column>
<el-table-column label="数量" prop="amount" width="50" align="center"/>
<el-table-column label="实收价格" prop="chargePrice" width="80">
<template slot-scope="scope">
<el-input type="number" v-model="scope.row.chargePrice"
@ -276,7 +195,7 @@
<el-table-column prop="creatorName" label="登记人" align="center" />
<el-table-column prop="creationTime" label="登记日期" width="90" align="center">
<template slot-scope="scope">
<div>{{ moment(scope.row.creationTime, 'yyyy-MM-DD') }}</div>
<div v-if="scope.row.creationTime">{{ moment(scope.row.creationTime).format('yyyy-MM-DD') }}</div>
</template>
</el-table-column>
</el-table>
@ -285,13 +204,16 @@
</div>
<div class="btnDivClass">
<div class="btnListClass">
<el-button type="primary" class="btnClass" @click="charge" :disabled="query.chargeFlag == 'N' ? false:true">收费</el-button>
<el-button type="primary" class="btnClass" @click="charge"
:disabled="query.chargeFlag == 'N' ? false : true">收费</el-button>
</div>
<div class="btnListClass">
<el-button type="danger" class="btnClass" @click="chargeBack" :disabled="query.chargeFlag == 'Y' ? false:true">退费</el-button>
<el-button type="danger" class="btnClass" @click="chargeBack"
:disabled="query.chargeFlag == 'Y' ? false : true">退费</el-button>
</div>
<div class="btnListClass">
<el-button type="success" class="btnClass" @click="chargePrint('0007', false, form.id)" :disabled="query.chargeFlag == 'B' ? true:false">打印</el-button>
<el-button type="success" class="btnClass" @click="chargePrint('0007', false, form.id)"
:disabled="query.chargeFlag == 'B' ? true : false">打印</el-button>
</div>
</div>
</div>
@ -315,13 +237,14 @@ export default {
data() {
return {
query: { chargeFlag: 'N' },//
patientList: [],//
form: {
id: null,
patientRegisterId: null,
invoiceNo: '',
invoiceOrgName: '',
chargeFlag: '1',
discount: 0,
chargeFlag: '0',
discount: 100,
total: 0, //
preTotal: 0, //
balance: 0, //
@ -374,11 +297,13 @@ export default {
};
},
created() { },
created() {
this.dictInit();
},
//
mounted() {
this.dictInit();
this.Query();
},
computed: {
@ -392,11 +317,51 @@ export default {
//
Query() {
let url = '', body = {};
console.log('query', this.query);
switch (this.query.chargeFlag) {
case 'Y':
//
url = '/api/app/patientregister/getpatientregisterchargelist';
break;
case 'B':
//退
url = '/api/app/patientregister/getpatientregisterchargebacklist';
break;
default:
//
url = '/api/app/patientregister/getpatientregisternotchargedlist'
break;
}
postapi(url, body).then(res => {
if (res.code != - 1) {
this.patientList = res.data.items;
}
});
},
//
rowClick(row) {
if(this.query.chargeFlag == 'B'){
this.form.chargeFlag = '1';
}else{
this.form.chargeFlag = '0';
}
if (row.chargeId) {
this.form.id = row.chargeId;
this.form.invoiceNo = row.invoiceNo;
this.form.invoiceOrgName = row.patientName;
} else {
this.form.id = null;
this.form.invoiceNo = '';
this.form.invoiceOrgName = row.patientName;
}
this.getAsbItemsForFee(row.patientRegisterId, row.chargeId);
},
@ -404,18 +369,22 @@ export default {
async getAsbItemsForFee(patientRegisterId, chargeId) {
//
this.asbItemsForFee = [];
if (this.query.chargeFlag = 'N') {
if (this.query.chargeFlag == 'N') {
getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${patientRegisterId}`)
.then(res => {
if (res.code == 1) {
this.asbItemsForFee = res.data;
this.asbItemsForFee.forEach(e => {
e.chargePriceOri = e.chargePrice;
e.standTotal = e.amount * e.standardPrice;
e.total = e.amount * e.chargePrice;
return e
if(e.isCharge == 'N'){
e.chargePriceOri = e.chargePrice;
e.discount = Math.round(10000 * e.chargePrice / e.standardPrice) / 100;
e.standTotal = e.amount * e.standardPrice;
e.total = e.amount * e.chargePrice;
return e;
}
});
this.toCharge(patientRegisterId, chargeId);
//
this.toCharge(patientRegisterId);
}
});
} else {
@ -430,18 +399,10 @@ export default {
},
//
toCharge() {
toCharge(patientRegisterId) {
//
this.selectedData = this.asbItemsForFee;
this.selectedData = [...this.asbItemsForFee];
this.$nextTick(function () {
// let rows = []
// for (let m = 0; m < this.selectedData.length; m++) {
// for (let n = 0; n < this.tableData.length; n++) {
// if (this.selectedData[m].id === this.tableData[n].id) {
// rows.push(this.tableData[n])
// }
// }
// }
this.selectedData.forEach(row => {
this.$refs['asbItemsForFeeTable'].toggleRowSelection(row)
})
@ -451,61 +412,68 @@ export default {
//
sumTotal() {
let total = Number(0), totalOri = Number(0);
let total = 0, totalOri = 0;
this.selectedData.forEach(e => {
totalOri += Number(e.amount * e.chargePriceOri); //
total += Number(e.amount * e.chargePrice); //
totalOri += Math.round(e.amount * e.chargePriceOri * 100) / 100; //
total += Math.round(e.amount * e.chargePrice * 100) / 100; //
//console.log(total, e.chargePrice, e.amount)
});
this.form.total = total;
this.form.preTotal = total;
if (totalOri == 0) {
this.form.discount = 100;
} else {
this.form.discount = Math.round(total / totalOri, 2);
this.form.discount = Math.round(10000 * total / totalOri) / 100;
}
},
//
discountToDetails() {
let discount = this.form.discount;
let totalOri = Number(0), totalCompute = Number(0), totalPlan = Number(0);
let totalOri = 0, totalCompute = 0, totalPlan = 0;
let lfind = -1;
this.selectedData.forEach(e => {
totalOri += Number(e.amount * e.chargePriceOri); //
lfind = arrayExistObj(this.asbItemsForFee, 'id', e.id)
if (lfind > -1 && e.chargePriceOri != 0) {
this.asbItemsForFee[lfind].discount = discount;
this.asbItemsForFee[lfind].chargePrice = Math.round(e.chargePriceOri * discount, 2);
totalCompute += Number(this.asbItemsForFee[lfind].chargePrice * e.amount);
e.chargePrice = Math.round(e.chargePriceOri * discount) / 100;
e.discount = Math.round(10000 * e.chargePrice / e.standardPrice) / 100;
totalCompute += Math.round(e.chargePrice * e.amount * 100) / 100;
}
});
totalPlan = Math.round(totalOri * discount, 2);
totalPlan = Math.round(totalOri * discount) / 100;
this.form.total = totalPlan;
// ()
this.form.preTotal = totalPlan;
//
this.handleBalance(totalPlan, totalCompute);
},
//
//
totalToDetails() {
let discount = 0;
let totalOri = Number(0), totalCompute = Number(0), totalPlan = Number(this.form.total);
let discount = 100;
let totalOri = 0, totalCompute = 0, totalPlan = Number(this.form.total);
let lfind = -1;
this.selectedData.forEach(e => {
totalOri += Number(e.amount * e.chargePriceOri); //
totalOri += Math.round(100 * e.amount * e.chargePriceOri) / 100; //
});
discount = Math.round(totalPlan / totalOri, 2);
if(totalOri != 0){
discount = Math.round(10000 * totalPlan / totalOri) / 100;
this.form.discount = discount;
}
//
this.selectedData.forEach(e => {
lfind = arrayExistObj(this.asbItemsForFee, 'id', e.id);
if (lfind > -1) {
this.asbItemsForFee[lfind].chargePrice = Math.round(this.asbItemsForFee[lfind].chargePrice * discount, 2);
totalCompute += this.asbItemsForFee[lfind].chargePrice * e.amount;
e.chargePrice = Math.round(e.chargePriceOri * discount) / 100;
e.discount = Math.round(10000 * e.chargePrice / e.standardPrice) / 100;
totalCompute += Math.round(100 * e.chargePrice * e.amount) / 100;
}
});
// ()
this.form.preTotal = totalPlan;
//
this.handleBalance(totalPlan, totalCompute);
},
@ -523,6 +491,11 @@ export default {
}
},
//
findBalance(){
this.form.balance = this.form.preTotal - this.form.total;
},
//
inputMoney() {
let total = Number(0);
@ -541,49 +514,59 @@ export default {
//
changeDiscount(row) {
let total = this.form.total;
let totalDetailsOri = row.amount * row.chargePrice;
let totalDetailsCur = Number(0);
let totalDetailsOri = Math.round(100 * row.amount * row.chargePrice) / 100;
let totalDetailsCur = 0;
row.chargePrice = Math.round(row.discount * row.chargePriceOri, 2);
row.chargePrice = Math.round(row.discount * row.standardPrice) / 100;
let lfind = arrayExistObj(this.selectedData, 'id', row.id);
if (lfind > -1) {
totalDetailsCur = row.amount * row.chargePrice;
totalDetailsCur = Math.round(100 * row.amount * row.chargePrice) / 100;
this.form.total = total + totalDetailsCur - totalDetailsOri;
}
this.sumTotal();
},
//
changePrice(row) {
if (row.chargePriceOri != 0) {
row.discount = Math.round(row.chargePrice / row.chargePriceOri, 2);
}
row.chargePrice = Math.round(row.discount * row.chargePriceOri, 2);
let lfind = arrayExistObj(this.selectedData, 'id', row.id);
if (lfind > -1) {
this.selectedData[lfind].discount = row.discount;
this.selectedData[lfind].chargePrice = row.chargePrice;
row.discount = Math.round(10000 * row.chargePrice / row.standardPrice) / 100;
}
this.sumTotal();
},
//
charge() {
let total = Number(0);
let body={};
let total = 0;
let msg = '';
let form = {};
let chargePays = [];
let chargeAsbitem = [];
let asbitems = [];
if(this.form.id){
this.$message.warning("已收费,不可重复操作!");
return;
}
this.$refs['form'].validate((valid,fields) => {
if (!valid) {
msg = fields[Object.keys(fields)[0]][0].message;
return;
}
});
if (msg) {
this.$message.warning(msg);
return;
}
this.chargePays.forEach(e => {
total += Number(e.chargeMoney);
if (e.payModeId == '05') {
if (!e.cardBillId) msg = '请先择会员卡号';
if (e.payModeId == '05' && e.chargeMoney) {
//console.log(e.payModeId,e.chargeMoney,e.cardRegisterId);
if (!e.cardRegisterId) msg = '请先择会员卡号';
} else {
e.cardBillId = null;
e.cardRegisterId = null;
}
return e;
});
@ -592,33 +575,26 @@ export default {
this.$message.warning(msg);
return;
}
if (total != this.form.total) {
this.$message.warning("收费方式合计金额与收费总金额不符");
return;
}
this.$refs[form].validate((valid) => {
if (!valid) {
this.$message.warning("数据未通过校验!");
return;
}
});
this.chargePays.forEach(e => {
if (e.chargeMoney) {
chargePays.push(e);
chargePays.push({
payModeId: e.payModeId,
chargeMoney: e.chargeMoney,
cardRegisterId: e.cardRegisterId,
});
}
});
form = {
patientRegisterId: this.form.patientRegisterId,
invoiceNo: this.form.invoiceNo,
invoiceOrgName: this.form.invoiceOrgName,
chargeFlag: this.form.chargeFlag,
};
this.selectedData.forEach(e => {
chargeAsbitem.push({
asbitems.push({
asbitemId: e.asbitemId,
chargePrice: e.chargePrice,
amount: e.amount,
@ -626,6 +602,42 @@ export default {
});
});
body = {
patientRegisterId:this.form.patientRegisterId,
invoiceNo:this.form.invoiceNo,
invoiceOrgName:this.form.invoiceOrgName,
chargePays,
asbitems,
};
// {
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "invoiceNo": "string",
// "invoiceOrgName": "string",
// "chargePays": [
// {
// "payModeId": "string",
// "chargeMoney": 0,
// "cardRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
// }
// ],
// "asbitems": [
// {
// "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "chargePrice": 0,
// "amount": 0,
// "registerAsbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
// }
// ]
// }
//console.log('body',body);
postapi('/api/app/registerasbitem/registerasbitemcharge',body).then(res =>{
if(res.code != -1){
this.$message.success("操作成功!");
this.form.id = "操作成功!"; //
this.Query();
}
});
},
//退
@ -633,14 +645,26 @@ export default {
let chargeId = this.form.id;
let msg = '';
let chargeBackPays = [];
let total = 0;
let body = {};
if(!chargeId){
this.$message.warning("请选择待退费的记录!");
return;
}
if(this.form.chargeFlag == '1'){
this.$message.warning("已退费,不可重复操作!");
return;
}
this.chargePays.forEach(e => {
total += Number(e.chargeMoney);
if (e.payModeId == '05') {
if (!e.cardBillId) msg = '请先择会员卡号';
if (e.payModeId == '05' && e.chargeMoney) {
if (!e.cardRegisterId) msg = '请先择会员卡号';
} else {
e.cardBillId = null;
e.cardRegisterId = null;
}
return e;
});
@ -656,7 +680,32 @@ export default {
this.chargePays.forEach(e => {
if (e.chargeMoney) {
chargeBackPays.push(e);
chargeBackPays.push({
payModeId: e.payModeId,
backMoeny: e.chargeMoney,
cardRegisterId: e.cardRegisterId,
});
}
});
// {
// "chargeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "chargeBackPays": [
// {
// "payModeId": "string",
// "backMoeny": 0,
// "cardRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
// }
// ]
// }
body ={
chargeId,chargeBackPays
}
postapi('/api/app/registerasbitem/registerasbitemchargeback',body).then(res =>{
if(res.code != -1){
this.$message.success("操作成功!");
this.form.chargeFlag = '1'; //退
this.Query();
}
});

472
src/views/report/report.vue

@ -1,418 +1,166 @@
<template>
<div>
<el-card>
<div style="display: flex">
<div :style="'display: block; width:' + (window.pageWidth - 120 - 70) + 'px;'">
<div style="display: flex; flex-wrap: wrap; height:80px;">
<div class="query">
<el-select v-model="query.dateType" placeholder="请选择" filterable clearable size="small" style="width: 100px">
<el-option label="登记日期" value="createDate" />
<el-option label="有效日期" value="expiryDate" />
</el-select>
<el-date-picker v-model="query.dateRange" type="daterange" align="right" unlink-panels range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" size="small"
style="width: 240px">
</el-date-picker>
<div style="display: flex;">
<div :style="'display: block; width:' + (window.pageWidth - 120 - 70) + 'px;'">
<PatientRegisterQueryNobtn orgEnable="Y"/>
<div style="display: flex;">
<div :style="'width:' + (window.pageWidth - 120 - 70)*3/4 + 'px;'">
<PatientRegisterListNobtn />
</div>
<div class="query">
<span>卡类别</span>
<el-select v-model="query.cardTypeId" placeholder="请选择" filterable clearable size="small" style="width: 100px">
<el-option v-for="item in dict.cardType" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</div>
<div class="query">
<span>卡号</span>
<el-input placeholder="卡号" v-model="query.cardNo" size="small" clearable style="width: 150px" />
</div>
<div class="query">
<span>卡主姓名</span>
<el-input placeholder="卡主姓名" v-model="query.customerName" size="small" clearable style="width: 100px" />
</div>
<div class="query">
<span>身份证号</span>
<el-input placeholder="身份证号" v-model="query.idNo" size="small" clearable style="width: 200px" />
</div>
<div class="query">
<span>手机号</span>
<el-input placeholder="手机号" v-model="query.mobileTelephone" size="small" clearable style="width: 150px" />
<div :style="'margin-left: 2px;width:' + (window.pageWidth - 120 - 70 - 8)/4 + 'px;'">
<RegisterCheckStatus />
</div>
</div>
<el-table :data="dataList" border width="100%" :height="window.pageHeight < 600 ? 370 : window.pageHeight - 230"
row-key="id" size="small" highlight-current-row ref="dataList" @selection-change="handleSelectionChange"
@row-click="rowClick">
<el-table-column prop="cardTypeId" label="卡类别" width="100">
<template slot-scope="scope">
<div>{{ dddw(dict.cardType, "id", scope.row.cardTypeId, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="cardNo" label="会员卡号" width="150" />
<el-table-column prop="discount" label="折扣率" width="80" />
<el-table-column prop="expiryDate" label="有效期限" width="120">
<template slot-scope="scope">
<div v-if="scope.row.expiryDate">
{{ moment(scope.row.expiryDate).format("yyyy-MM-DD") }}
</div>
</template>
</el-table-column>
<el-table-column prop="customerName" label="卡主姓名" width="80" />
<el-table-column prop="idNo" label="卡主身份证号" width="200" />
<el-table-column prop="telephone" label="卡主电话" width="150" />
<el-table-column prop="mobileTelephone" label="卡主手机号" width="150" />
<el-table-column prop="cardFlag" label="启用" width="80">
<template slot-scope="scope">
<div>{{ scope.row.cardFlag == '0' ? '否' : '是' }}</div>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="200" />
<el-table-column prop="creatorId" label="创建人员" width="100" />
<el-table-column prop="creationTime" label="创建日期" width="150">
<template slot-scope="scope">
<div v-if="scope.row.creationTime">
{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}
</div>
</template>
</el-table-column>
<el-table-column prop="lastModifierId" label="修改人员" width="100" />
<el-table-column prop="lastModificationTime" label="修改日期" width="150">
<template slot-scope="scope">
<div v-if="scope.row.lastModificationTime">
{{ moment(scope.row.lastModificationTime).format("yyyy-MM-DD") }}
</div>
</template>
</el-table-column>
</el-table>
<SumAsbItemStatus />
</div>
<div style=" margin-left: 10px;width:110px;">
<div class="listBtn">
<el-button class="btnClass" @click="btnQuery">查询</el-button>
</div>
<div class="listBtn">
<el-button type="success" class="btnClass" @click="add">新增</el-button>
</div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="edit">编辑</el-button>
</div>
<div class="listBtn">
<el-button type="danger" class="btnClass" @click="edit">删除</el-button>
</div>
<BtnReport />
</div>
</div>
</el-card>
<el-dialog :title="form.id ? '编辑' : '新增'" :visible.sync="dialogVisible" width="800px" :close-on-click-modal="false">
<el-form ref="form" :model="form" label-width="100px" :rules="rules" size="small">
<el-row>
<el-col :span="8">
<el-form-item label="卡类别" prop="cardTypeId">
<el-select v-model="form.cardTypeId" placeholder="请选择" filterable>
<el-option v-for="item in dict.cardType" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="会员卡号" prop="cardNo">
<el-input v-model="form.cardNo" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="折扣率" prop="discount">
<el-input type="number" v-model="form.discount" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="有效期限" prop="expiryDate">
<el-input type="date" v-model="form.expiryDate" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="卡主姓名" prop="customerName">
<el-input v-model="form.customerName" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="卡主身份证" prop="idNo">
<el-input v-model="form.idNo" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="卡主电话" prop="telephone">
<el-input type="tel" v-model="form.telephone" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="卡主手机号" prop="mobileTelephone">
<el-input type="tel" v-model="form.mobileTelephone" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="启用" prop="cardFlag">
<el-radio v-model="form.cardFlag" label="1"></el-radio>
<el-radio v-model="form.cardFlag" label="0"></el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="创建人员" label-width="80px">
<el-input v-model="form.creatorId" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建时间" label-width="80px">
<el-input :value="form.creationTime ? moment(form.creationTime).format('yyyy-MM-DD') : ''"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="修改人员" label-width="80px">
<el-input v-model="form.lastModifierId" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="修改时间" label-width="80px">
<el-input :value="form.lastModificationTime
? moment(form.lastModificationTime).format('yyyy-MM-DD') : ''" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="onSubmit('form')">确定</el-button>
<el-button @click="dialogVisible = false">关闭</el-button>
</div>
</el-dialog>
</el-card>
</div>
</template>
<script>
import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc";
import { tcdate,dddw, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc";
import PatientRegisterQueryNobtn from "../../components/report/PatientRegisterQueryNobtn.vue";
import PatientRegisterListNobtn from "../../components/report/PatientRegisterListNobtn.vue";
import RegisterCheckStatus from "../../components/report/RegisterCheckStatus.vue";
import SumAsbItemStatus from "../../components/sumDoctorCheck/SumAsbItemStatus.vue";
import BtnReport from "../../components/report/BtnReport.vue";
export default {
components: {
PatientRegisterQueryNobtn,
PatientRegisterListNobtn,
RegisterCheckStatus,
SumAsbItemStatus,
BtnReport,
},
data() {
return {
query: {
dateType:'createDate',
dateType:'createDate',
}, //
dataList: [], //
multipleSelection: [], //
dialogVisible: false,
form: {
id: null,
cardTypeId: null,
cardNo: '',
discount: 100,
expiryDate: null,
customerName: '',
idNo: '',
telephone: '',
mobileTelephone: '',
cardFlag: '0',
remark: '',
},
formInit: {},
rules: {
cardTypeId: [
{ required: true, message: "请填写卡类别", trigger: "blur" },
],
cardNo: [
{ required: true, message: "请填写卡号", trigger: "blur" },
],
discount: [
{ required: true, message: "请填写卡折扣", trigger: "blur" },
],
expiryDate: [
{ required: true, message: "请填写卡有效期", trigger: "blur" },
],
customerName: [
{ required: true, message: "请填写卡主姓名", trigger: "blur" },
],
idNo: [
{ required: true, message: "请填写卡主身份证", trigger: "blur" },
],
mobileTelephone: [
{ required: true, message: "请填写卡主身份证", trigger: "blur" },
],
cardFlag: [
{ required: true, message: "请填写卡启用状态", trigger: "blur" },
]
},
curChoosedRow: {}, //
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
};
},
created() {
this.formInit = { ...this.form };
this.dictInit();
},
//
mounted() { },
computed: {
...mapState(["window", "dict"]),
...mapState(["window", "dict","patientRegister"]),
},
methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
dddw, moment,
handleSelectionChange(val) {
this.multipleSelection = val;
},
rowClick(row) {
this.curChoosedRow = row;
},
add() {
this.form = { ...this.formInit };
this.dialogVisible = true;
},
edit() {
if (!this.curChoosedRow.id) {
this.$message.warning("请先选择要操作的数据!");
return;
}
this.form = { ...this.curChoosedRow };
this.dialogVisible = true;
},
del() {
let lfind = -1;
if (!this.curChoosedRow.id) {
this.$message.warning("请先选择要操作的数据!");
return;
}
//
lfind = arrayExistObj(this.dataList, 'id', this.curChoosedRow.id);
if (lfind > - 1) this.dataList.splice(lfind, 1);
this.curChoosedRow.id = null;
},
//
dictInit() {
//
getapi("/api/app/sex").then((res) => {
if (res.code == 1) {
this.dict.sex = res.data;
}
});
//
signByPatientRegisterNo() {
let val = this.form.patientRegisterNo
console.log(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
getapi(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
.then((res) => {
if (res.code != -1) {
if (res.data) {
this.signCore([res.data.id])
this.form.patientRegisterNo = ''
}
//
getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
(res) => {
if (res.code == 1) {
this.dict.organization = res.data;
}
});
},
//
onSubmit(formName) {
this.$refs[formName].validate((valid, fields) => {
if (!valid) {
//console.log('fields',fields,Object.keys(fields));
this.$message.error(fields[Object.keys(fields)[0]][0].message);
return;
}
//
if (this.form.id) {
);
} else {
//
//
getapi("/api/app/customer-org/by-code-all").then((res) => {
if (res.code == 1) {
this.patientRegister.customerOrgTreeAll = res.data;
tcdate(this.patientRegister.customerOrgTreeAll);
}
});
},
//
btnQuery() {
let body = {}
//
getapi("/api/app/medical-type/in-filter").then((res) => {
if (res.code == 1) {
this.dict.medicalType = res.data.items;
}
});
console.log(`this.patientRegister.query`, this.patientRegister.query)
if (this.patientRegister.query.customerOrgFlag) {
if (this.patientRegister.query.CustomerOrgParentId) {
body.customerOrgId = this.patientRegister.query.CustomerOrgParentId
} else {
if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId
//
getapi("/api/app/personnel-type/in-filter").then((res) => {
if (res.code == 1) {
this.dict.personnelType = res.data.items;
}
}
});
if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex
//
getapi("/api/app/marital-statuses").then((res) => {
if (res.code == 1) {
this.dict.maritalStatus = res.data.items;
}
});
if (this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName
//
getapi("/api/app/sex-hormone-term/in-filter").then((res) => {
if (res.code == 1) {
this.dict.sexHormoneTerm = res.data.items;
}
});
if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag
//
getapi("/api/app/nation/in-filter").then((res) => {
if (res.code == 1) {
this.dict.nation = res.data.items;
}
});
//StartDate EndDate
if (this.patientRegister.query.dateRange) {
body.startDate = moment(new Date(this.patientRegister.query.dateRange[0])).format("yyyy-MM-DD")
body.endDate = moment(new Date(this.patientRegister.query.dateRange[1])).format("yyyy-MM-DD")
}
//
getapi("/api/app/birth-place/in-filter").then((res) => {
if (res.code == 1) {
this.dict.birthPlace = res.data.items;
}
});
//
getapi("/api/app/medical-package/in-filter").then((res) => {
if (res.code == 1) {
this.dict.medicalPackage = res.data.items;
}
});
if (this.patientRegister.query.idCardNo) body = { idNo: this.patientRegister.query.idCardNo }
//
getapi("/api/app/customer-org-group").then((res) => {
if (res.code == 1) {
this.dict.customerOrgGroupAll = res.data.items;
}
});
if (this.patientRegister.query.patientNo) body = { patientNo: this.patientRegister.query.patientNo }
//
getapi("/api/app/pay-mode").then((res) => {
if (res.code == 1) {
this.dict.payMode = res.data;
}
});
if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo }
//
getapi("/api/app/item-type/by-code-all").then((res) => {
if (res.code == 1) {
this.dict.itemTypeTree = res.data;
tcdate(this.dict.itemTypeTree);
}
});
getapi("/api/app/asbitem/in-filter?Filter").then((res) => {
if (res.code == 1) {
this.dict.asbItemAll = res.data.items;
}
});
console.log('/api/app/patientregister/getlistinfilter', body)
postapi('/api/app/patientregister/getlistinfilter', body)
.then((res) => {
this.dataList = res.data;
});
console.log("dict", this.dict);
},
},

Loading…
Cancel
Save