- {{ ldddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }}
+ {{ scope.row.medicalPackageName }}
-
@@ -140,6 +128,7 @@ 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 { savePeoplePhoto } from "../../utlis/proApi";
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
import Camera from "../../components/patientRegister/Camera.vue";
@@ -151,20 +140,53 @@ export default {
},
data() {
return {
- dataList: [], //列表数据
+ tableData: [], //列表数据
multipleSelection: [], //选中的数据列表
- selectedRow:{}, // 单行选中的行
+ tableDataCurrentRow:{}, // 单行选中的行
dialogVisible: false,
- patientRegisterNo: ''
-
+ patientRegisterNo: '',
+
+ LocalConfig: {
+ normal: {
+ maxResultCount: 100, //分页时单页记录数
+ },
+ },
+ loadOpts: {
+ totalCount: 0,
+ skipCount: 0,
+ maxResultCount: 100,
+ },
+ loadOptsInit: {},
+ lazyLoading:false
};
},
- created() { },
+ created() {
+ try {
+ let LocalConfig = JSON.parse(window.localStorage.getItem("LocalConfig") || null)
+ if (LocalConfig?.normal?.maxResultCount){
+ this.LocalConfig.normal.maxResultCount = LocalConfig.normal.maxResultCount
+ }
+
+ } catch (error) {
+ console.log('window.localStorage.getItem("LocalConfig")', error);
+ }
+
+ // console.log('this.LocalConfig',this.LocalConfig)
+ this.loadOpts.maxResultCount = Number(
+ this.LocalConfig.normal.maxResultCount || 100
+ );
+
+ this.loadOptsInit = Object.assign({}, this.loadOpts);
+ },
//挂载完成
- mounted() { },
+ mounted() {
+ this.$nextTick(() => {
+ this.scrollFull()
+ })
+ },
computed: {
...mapState(["window", "dict", "patientRegister", "customerOrg"]),
},
@@ -176,7 +198,7 @@ export default {
},
rowClick(row){
- this.selectedRow = row
+ this.tableDataCurrentRow = row
},
// 回收表提交
@@ -191,9 +213,9 @@ export default {
e.isRecoverGuide = 'Y'
});
}else{
- let lfind = arrayExistObj(this.dataList,'id',body[0].id)
+ let lfind = arrayExistObj(this.tableData,'id',body[0].id)
if(lfind > -1){
- this.dataList[lfind].isRecoverGuide = 'Y'
+ this.tableData[lfind].isRecoverGuide = 'Y'
}
}
}
@@ -206,7 +228,7 @@ export default {
let selectedRds = []
selectedRds = selectedRds.concat(this.multipleSelection)
if(selectedRds.length == 0){
- if(this.selectedRow.id) selectedRds.push(this.selectedRow)
+ if(this.tableDataCurrentRow.id) selectedRds.push(this.tableDataCurrentRow)
}
if (selectedRds.length == 0) {
this.$message.warning({ showClose: true, message: "请勾选择或选中体检人员,再进行此操作" });
@@ -254,53 +276,252 @@ export default {
lmoment(date, forMat) {
return moment(new Date(date)).format(forMat);
},
+
//查询
- query() {
- let body = {}
+ async Query() {
+ // 查询时,清掉明细数据 (滚动时不清)
+ this.tableDataCurrentRow = {}; // 清除选择
+ if (
+ !(
+ this.patientRegister.query.isSeries == "Y" &&
+ this.patientRegister.query.patientRegisterNo
+ )
+ ) {
+ this.tableData = [];
+ }
+
+
+ this.loadOpts = Object.assign(this.loadOpts, this.loadOptsInit);
+ await this.getPrList();
+ },
- console.log(`this.patientRegister.query`, this.patientRegister.query)
+ //数据量多时,滚动加载
+ async load() {
+ this.loadOpts.skipCount++;
+ await this.getPrList();
+ },
+
+ // 获取列表数据
+ async getPrList() {
+ if (
+ this.loadOpts.skipCount != 0 &&
+ this.loadOpts.skipCount * this.loadOpts.maxResultCount >=
+ this.loadOpts.totalCount
+ )
+ return;
+ // console.log('getPrList', this.loadOpts)
+
+ let body = {
+ skipCount: this.loadOpts.skipCount,
+ maxResultCount: this.loadOpts.maxResultCount,
+ };
+
+ // 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.CustomerOrgParentId) {
+ // body.customerOrgId = this.patientRegister.query.CustomerOrgParentId;
+ // } else {
+ // if (this.patientRegister.query.customerOrgId)
+ // body.customerOrgId = this.patientRegister.query.customerOrgId;
+ // }
+ if (this.patientRegister.query.customerOrgId)
+ body.customerOrgId = this.patientRegister.query.customerOrgId;
+
+ // 获取单位体检次数与分组
+ try {
+ if (
+ this.patientRegister.query.customerOrgId &&
+ this.patientRegister.query.customerOrgId != this.dict.personOrgId &&
+ this.patientRegister.query.customerOrgRegister.id
+ ) {
+ body.customerOrgRegisterId =
+ this.patientRegister.query.customerOrgRegister.id;
+ body.customerOrgGroupIds =
+ this.patientRegister.query.customerOrgGroupIds;
+ }
+ } catch (error) {
+ console.error(error)
}
}
- if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex
+ 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.medicalTypeIds &&
+ this.patientRegister.query.medicalTypeIds.length > 0
+ )
+ body.medicalTypeIds = this.patientRegister.query.medicalTypeIds;
+
+ if (
+ this.patientRegister.query.completeFlags &&
+ this.patientRegister.query.completeFlags.length > 0
+ )
+ body.completeFlags = this.patientRegister.query.completeFlags;
- if (this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName
+ if (
+ this.patientRegister.query.personnelTypeIds &&
+ this.patientRegister.query.personnelTypeIds.length > 0
+ )
+ body.personnelTypeIds = this.patientRegister.query.personnelTypeIds;
- if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag
+ if (this.patientRegister.query.isRecoverGuide)
+ body.isRecoverGuide = this.patientRegister.query.isRecoverGuide;
//StartDate EndDate
- if (this.patientRegister.query.startDate && this.patientRegister.query.endDate) {
- body.startDate = moment(this.patientRegister.query.startDate).format("yyyy-MM-DD")
- body.endDate = moment(this.patientRegister.query.endDate).format("yyyy-MM-DD")
+ if (
+ this.patientRegister.query.startDate &&
+ this.patientRegister.query.endDate
+ ) {
+ body.dateType = this.patientRegister.query.dateType;
+ body.startDate = moment(this.patientRegister.query.startDate).format(
+ "yyyy-MM-DD"
+ );
+ body.endDate = moment(this.patientRegister.query.endDate).format(
+ "yyyy-MM-DD"
+ );
if (body.startDate > body.endDate) {
- this.$message.warning({ showClose: true, message: "起始日期不能大于截止日期,数据校验不通过!" })
- return
+ this.$message.warning({
+ showClose: true,
+ message: "起始日期不能大于截止日期,数据校验不通过!",
+ });
+ return;
}
}
+ if (this.patientRegister.query.phone)
+ body.phone = this.patientRegister.query.phone;
+
+ if (this.patientRegister.query.idCardNo) {
+ body.idNo = this.patientRegister.query.idCardNo;
+
+ try {
+ let sysParmId = "patient_register_query_idno";
+ let sysParam = await postapi(
+ "/api/app/SysParmValue/GetSysParmValueBySysParmId",
+ { sysParmId }
+ );
+ // console.log('sysParam', sysParam)
+ if (sysParam.data != "N") {
+ body = {
+ idNo: this.patientRegister.query.idCardNo,
+ skipCount: this.loadOpts.skipCount,
+ maxResultCount: this.loadOpts.maxResultCount,
+ };
+ }
+ } catch (error) {
+ console.log(error);
+ }
+ }
- 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)
+ if (this.patientRegister.query.patientNo)
+ body = {
+ patientNo: this.patientRegister.query.patientNo,
+ skipCount: this.loadOpts.skipCount,
+ maxResultCount: this.loadOpts.maxResultCount,
+ };
+
+ if (this.patientRegister.query.patientRegisterNo)
+ body = {
+ patientRegisterNo: this.patientRegister.query.patientRegisterNo,
+ skipCount: this.loadOpts.skipCount,
+ maxResultCount: this.loadOpts.maxResultCount,
+ };
+
+ // console.log("/api/app/patientregister/getlistinfilter", body);
+ let upPhoto = "patient_register_read_idno_upPhoto"; // 是否读身份证查询更新照片
+ let upPhotoParam = await postapi(
+ "/api/app/SysParmValue/GetSysParmValueBySysParmId",
+ { sysParmId: upPhoto }
+ );
+ let photo = this.patientRegister.photo;
+ this.patientRegister.photo = "";
+
+ postapi("/api/app/patientregister/getlistinfilter", body).then(
+ async (res) => {
+ if (res.code > -1) {
+ // 刷新最大记录数
+ this.loadOpts.totalCount = res.data.totalCount;
+ let curLoad = res.data.items;
+
+ // let oldCount = 0
+ // 处理:
+ // 1、分组/套餐 排序混乱的问题
+ // 2、扫身份证查询时,无照片自动更新照片(参数控制)
+ curLoad.forEach((e) => {
+ // 1、分组/套餐 排序混乱的问题
+ if (e.customerOrgId == this.dict.personOrgId) {
+ e.groupPack = e.medicalPackageId;
+ } else {
+ e.groupPack = e.customerOrgGroupId;
+ }
- postapi('/api/app/patientregister/getlistinfilter', body)
- .then((res) => {
- if (res.code != - 1) {
- this.dataList = res.data.items;
+ // 2、扫身份证查询时,无照片自动更新照片(参数控制)
+ if (upPhotoParam != "N" && photo) {
+ if (!e.photo) {
+ savePeoplePhoto(e.id, photo);
+ }
+ }
+ });
+
+ // 不是连续扫码时,需要判断是否分页查询(连续扫码不清原来的数据)
+ console.log(
+ "this.patientRegister.query",
+ this.patientRegister.query.isSeries,
+ this.patientRegister.query.patientRegisterNo
+ );
+ if (
+ !(
+ this.patientRegister.query.isSeries == "Y" &&
+ this.patientRegister.query.patientRegisterNo
+ )
+ ) {
+ if (body.skipCount == 0) {
+ //查询
+ this.tableData = [];
+ }
+ }
+
+ this.tableData = this.tableData.concat(curLoad);
+ // else {
+ // // 懒加载 ,原数据集不用清空
+ // oldCount = this.tableData.length
+ // }
+ // curLoad.forEach((e, index) => {
+ // this.tableData.push(Object.assign({ index: Number(oldCount) + Number(index), choosed: false }, e))
+ // })
+
}
- })
+ }
+ );
+ },
+
+
+ //滚动加载数据
+ scrollFull() {
+ let obj = this.$refs['dataList'].bodyWrapper
+ console.log('obj', obj)
+
+ obj.addEventListener('scroll', async () => {
+ // console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight);
+ if (obj.scrollTop + obj.clientHeight + 20 > obj.scrollHeight && !this.lazyLoading) {
+ // 获取到的不是全部数据 当滚动到底部
+ console.log('scrollTop', obj.scrollTop, 'clientHeight', obj.clientHeight, 'scrollHeight', obj.scrollHeight);
+ if (Number(this.loadOpts.skipCount) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) {
+ this.lazyLoading = false
+ } else {
+ this.lazyLoading = true
+ this.load()
+ // this.dom.scrollTop = this.dom.scrollTop - 100
+ }
+ }
+ })
},
+
},
//监听事件
@@ -309,7 +530,7 @@ export default {
"patientRegister.query.times"(newVal, oldVal) {
if (newVal != oldVal) {
//alert('触发查询事件')
- this.query();
+ this.Query();
}
},
diff --git a/src/components/patientRegister/patientRegisterQuery.vue b/src/components/patientRegister/patientRegisterQuery.vue
index 0665481..c5a0d03 100644
--- a/src/components/patientRegister/patientRegisterQuery.vue
+++ b/src/components/patientRegister/patientRegisterQuery.vue
@@ -108,6 +108,21 @@
+
+ 人员类别
+
+
+
+
+
+ 表回收
+
+
+
+
+
@@ -218,6 +233,14 @@ export default {
this.dict.medicalType = res.data;
}
});
+
+ //人员类别
+ getapi("/api/app/personnel-type/in-filter").then((res) => {
+ if (res.code > -1) {
+ this.dict.personnelType = res.data;
+ }
+ });
+
},
diff --git a/src/store/index.js b/src/store/index.js
index 17ea07c..2c66884 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -221,6 +221,8 @@ export default new Vuex.Store({
medicalTypeIds: [],
completeFlags: [],
medicalConclusionId:[],
+ personnelTypeIds:[],
+ isRecoverGuide:''
}, //查询条件
customerOrgGroup: [], //分组(针对单位)
patientRegisterAbs: [], //人员已选组合项目
diff --git a/src/views/customerOrg/patientRegister.vue b/src/views/customerOrg/patientRegister.vue
index c48cec9..a808158 100644
--- a/src/views/customerOrg/patientRegister.vue
+++ b/src/views/customerOrg/patientRegister.vue
@@ -107,8 +107,7 @@ export default {
this.dict.medicalType = res.data;
}
});
-
- /*
+
//人员类别
getapi("/api/app/personnel-type/in-filter").then((res) => {
if (res.code == 1) {
@@ -116,6 +115,7 @@ export default {
}
});
+ /*
//婚姻状况
getapi("/api/app/MaritalStatus/GetMaritalStatusList").then((res) => {
if (res.code == 1) {
diff --git a/src/views/customerOrg/patientRegisterRecover.vue b/src/views/customerOrg/patientRegisterRecover.vue
index 87b645d..39155e2 100644
--- a/src/views/customerOrg/patientRegisterRecover.vue
+++ b/src/views/customerOrg/patientRegisterRecover.vue
@@ -80,28 +80,29 @@ export default {
}
});
- //性别(查询)
- getapi("/api/app/for-sex").then((res) => {
- if (res.code == 1) {
- this.dict.forSex = res.data;
- }
- });
+ // //性别(查询)
+ // getapi("/api/app/for-sex").then((res) => {
+ // if (res.code == 1) {
+ // this.dict.forSex = res.data;
+ // }
+ // });
//体检中心
- getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
- (res) => {
- if (res.code == 1) {
- this.dict.organization = res.data;
- }
- }
- );
+ // getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
+ // (res) => {
+ // if (res.code == 1) {
+ // this.dict.organization = res.data;
+ // }
+ // }
+ // );
+
+ // //体检单位
+ // getapi("/api/app/customer-org/in-filter").then((res) => {
+ // if (res.code == 1) {
+ // this.dict.customerOrg = res.data;
+ // }
+ // });
- //体检单位
- getapi("/api/app/customer-org/in-filter").then((res) => {
- if (res.code == 1) {
- this.dict.customerOrg = res.data;
- }
- });
//体检类别
getapi("/api/app/medical-type/in-filter").then((res) => {
@@ -117,6 +118,7 @@ export default {
}
});
+ /*
//婚姻状况
getapi("/api/app/MaritalStatus/GetMaritalStatusList").then((res) => {
if (res.code == 1) {
@@ -181,7 +183,7 @@ export default {
this.dict.asbItemAll = res.data;
}
});
-
+ */
console.log("dict", this.dict);
},
},
diff --git a/src/views/fee-settings/cardRegister.vue b/src/views/fee-settings/cardRegister.vue
index fc4c296..dfc7df5 100644
--- a/src/views/fee-settings/cardRegister.vue
+++ b/src/views/fee-settings/cardRegister.vue
@@ -872,14 +872,14 @@ export default {
//滚动加载数据
//滚动加载数据
scrollFull() {
- this.dom = this.$refs['info'].bodyWrapper
- console.log('this.dom', this.dom)
+ let obj = this.$refs['info'].bodyWrapper
+ console.log('obj', obj)
- this.dom.addEventListener('scroll', async () => {
+ obj.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) {
+ if (obj.scrollTop + obj.clientHeight + 20 > obj.scrollHeight && !this.lazyLoading) {
// 获取到的不是全部数据 当滚动到底部
- console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight);
+ console.log('scrollTop', obj.scrollTop, 'clientHeight', obj.clientHeight, 'scrollHeight', obj.scrollHeight);
if (Number(this.loadOpts.skipCount) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) {
this.lazyLoading = false
} else {