- 查找: 条码号
+ 查找: 条码号
- 档案号
+ 档案号
- 姓名
+ 姓名
- 手机号
+ 手机号
@@ -623,7 +623,7 @@ import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import mm from "../../utlis/mm";
-import { objCopy, setNull, dddw, parseID, birthdayToAge, deepCopy, arrayFilter, parsIcCardtoLocal, photoParse, savePeoplePhoto } from "../../utlis/proFunc";
+import { objCopy, setNull, dddw, parseID, birthdayToAge, deepCopy, arrayFilter, parsIcCardtoLocal, photoParse, savePeoplePhoto, arrayExistObj } from "../../utlis/proFunc";
import Camera from "./Camera.vue";
import PatientRegisterItem from "./PatientRegisterItem.vue";
import LisRequest from "./LisRequest.vue";
@@ -913,13 +913,13 @@ export default {
//分组改变时触发
changeCustomerOrgGroupId() {
this.patientRegister.customerOrgGroupChange++;
- if (this.form.id) this.Onsubmit('form', false);
+ if (this.form.id) this.btnSubmit('form', false);
},
//套餐改变时触发
changeMedicalPackageId() {
this.patientRegister.medicalPackageChange++;
- if (this.form.id) this.Onsubmit('form', false);
+ if (this.form.id) this.btnSubmit('form', false);
},
//根据姓名,身份证号 查询档案信息,用于判断人员多次体检
@@ -1045,7 +1045,7 @@ export default {
},
//提交
- Onsubmit(formName, msgTip) {
+ btnSubmit(formName, msgTip) {
this.$refs[formName].validate((valid) => {
if (valid) {
//赋值
@@ -1095,14 +1095,17 @@ export default {
objCopy(res.data, this.form);
// this.patientRegister.prList.push(res.data); //列表添加记录
- this.patientRegister.patientRegisterId = res.data.id;
+ this.patientRegister.patientRegisterId = res.data.id;
+ this.patientRegister.patientRegisterRd = res.data;
+
+ //this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新)
+ this.patientRegister.prList.push(res.data)
+
+ //触发已选组合项目保存
this.patientRegister.patientRegisterAbs.forEach(e => {
e.patientRegisterId = res.data.id;
return e;
});
- this.patientRegister.patientRegisterRd = res.data;
-
- this.patientRegister.query.times++;
this.patientRegister.saveTimes++;
}
}
@@ -1115,7 +1118,11 @@ export default {
if (msgTip) this.$message.success("更新 操作成功");
//一般读身份证照片时,会出现这种情况
if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(this.form.id, this.patientRegister.photo);
- this.patientRegister.query.times++;
+ //this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新)
+ let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
+ if(lfind > - 1) objCopy(this.form,this.patientRegister.prList[lfind])
+
+
//this.patientRegister.saveTimes++; //更新保存时,无需触发组合项目保存
}
});
@@ -1485,4 +1492,7 @@ export default {
.query {
margin-left: 10px;
}
+.querySpan {
+ margin-right: 2px;
+}
diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue
index a9fa2c3..b5e9bbc 100644
--- a/src/components/patientRegister/PatientRegisterList.vue
+++ b/src/components/patientRegister/PatientRegisterList.vue
@@ -896,7 +896,7 @@ export default {
//查询
async Query() {
this.patientRegister.prList = [];
- let body = {};
+ let body = {maxResultCount:500};
console.log(`this.patientRegister.query`, this.patientRegister.query);
if (this.patientRegister.query.customerOrgFlag) {
diff --git a/src/store/index.js b/src/store/index.js
index 606749f..1c3bbc4 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -29,6 +29,7 @@ export default new Vuex.Store({
},
customerOrg: {
//体检单位设置
+ oprStatus:'',//空,add,edit 三种状态
customerOrgTree: [], //体检单位列表
defaultExpandedKeys:[], //当前选中树的节点
treeCurrentNodekey:'', //当前选中树的节点
diff --git a/src/utlis/proFunc.js b/src/utlis/proFunc.js
index d41563e..7202ca1 100644
--- a/src/utlis/proFunc.js
+++ b/src/utlis/proFunc.js
@@ -15,13 +15,13 @@ function tcdate(date) {
};
exports.tcdate = tcdate;
-//json 对像赋值 只从 from 对象 赋值 to 中有的 key 项 add by pengjun
-function objCopy(from, to) {
- if (from && to) {
- let keys = Object.keys(to);
+//json 对像赋值 只从 provide/提供 对象 赋值到 receive/接收 中有的 key 项 add by pengjun receive provide
+function objCopy(provide, receive) {
+ if (provide && receive) {
+ let keys = Object.keys(receive);
for (let key in keys) {
- if (from[keys[key]] !== undefined) {
- to[keys[key]] = from[keys[key]];
+ if (provide[keys[key]] !== undefined) {
+ receive[keys[key]] = provide[keys[key]];
}
}
}