From eb01ce23d3aee3e02a0c2701b64c5cb91e715976 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Fri, 4 Aug 2023 17:26:22 +0800 Subject: [PATCH] dj --- .../patientRegister/PatientRegisterEdit.vue | 334 +++++------------- .../patientRegister/PatientRegisterList.vue | 65 ++-- src/store/index.js | 3 +- src/views/customerOrg/customerOrg.vue | 3 +- src/views/customerOrg/patientRegister.vue | 8 +- 5 files changed, 127 insertions(+), 286 deletions(-) diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index 47d93e2..551c727 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -3,36 +3,21 @@
- + - + - + @@ -45,21 +30,13 @@ - + - + @@ -79,27 +56,15 @@ - + - - + + @@ -109,33 +74,17 @@ - - + + - - + + @@ -166,11 +115,7 @@ - + @@ -195,17 +140,8 @@ - - + + @@ -216,18 +152,9 @@ - - + + @@ -261,98 +188,51 @@ - - + + - - + + - - + + - - + + - - + + - + @@ -364,14 +244,10 @@ - + @@ -381,23 +257,16 @@ - + - +
加载中...
@@ -413,8 +282,7 @@ 保存
- 拍照 + 拍照
申请单 @@ -423,7 +291,7 @@ 打条码
- 打指引单 + 打指引单
复制新增 @@ -435,24 +303,9 @@
- - + + @@ -474,7 +327,7 @@ @@ -502,14 +355,8 @@ - + @@ -520,7 +367,7 @@ import { mapState } from "vuex"; import { getapi, postapi, putapi, deletapi } from "@/api/api"; import mm from "../../utlis/mm"; -import { objCopy, setNull, dddw,parseID,birthdayToAge } from "../../utlis/proFunc"; +import { objCopy, setNull, dddw, parseID, birthdayToAge } from "../../utlis/proFunc"; import Camera from "./Camera.vue"; import PatientRegisterItem from "./PatientRegisterItem.vue"; export default { @@ -528,6 +375,7 @@ export default { Camera, PatientRegisterItem, }, + props:['formInitData','editTimes'], data() { return { apiurl: mm.apiurl, @@ -540,7 +388,7 @@ export default { medicalPackageId: null, //套餐 patientName: "", //姓名 birthDate: "", //字符串 如:2012-01-29 - sexId: "9", //性别 默认未知U + sexId: "U", //性别 默认未知U age: null, //年龄 jobCardNo: "", //工卡号 medicalCardNo: "", //体检卡号 @@ -549,8 +397,7 @@ export default { personnelTypeId: null, //人员类别 jobPost: "", //职务 jobTitle: "", //职称 - photo: - "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg", //照片 + photo:"", //照片 salesman: "", //介绍人 sexHormoneTermId: null, //性激素期限 isNameHide: "N", //隐藏姓名 @@ -605,14 +452,11 @@ export default { }; }, - created() {}, + created() { }, //挂载完成 mounted() { - //表单赋值 - //console.log('mounted this.patientRegister.patientRegisterRd',this.patientRegister.patientRegisterRd) - objCopy(this.patientRegister.patientRegisterRd, this.form); - console.log("mounted this.form", this.form); + objCopy(this.formInitData, this.form); }, computed: { @@ -624,14 +468,14 @@ export default { }, //修改出生日期 - changeBirthDate(){ + changeBirthDate() { this.form.age = birthdayToAge(this.form.birthDate) }, //修改身份证,生成年龄、出生、性别 - changeIdNo(){ + changeIdNo() { let ret = parseID(this.form.idNo) - if(ret.age != -1){ + if (ret.age != -1) { this.form.birthDate = ret.birthday this.form.age = ret.age this.form.sexId = ret.sex @@ -796,28 +640,15 @@ export default { }, //监听事件 - watch: { - //新增触发 - "patientRegister.addTimes"(newVal, oldVal) { - //console.log('patientRegister.addTimes newVal:',newVal,' oldVal:',oldVal) - if (newVal != oldVal) { - //console.log('this.patientRegister.patientRegisterRdInit',this.patientRegister.patientRegisterRdInit) - objCopy(this.patientRegister.patientRegisterRdInit, this.form); - //console.log('this.form',this.form) - } - }, + watch: { - //编辑触发 - "patientRegister.patientRegisterRd.id"(newVal, oldVal) { - console.log( - "patientRegister.patientRegisterRd.id newVal:", - newVal, - " oldVal:", - oldVal - ); + //新增或编辑 + "editTimes"(newVal, oldVal) { + //console.log('editTimes newVal:',newVal,' oldVal:',oldVal) if (newVal != oldVal) { - console.log("newVal:", this.patientRegister.patientRegisterRd); - objCopy(this.patientRegister.patientRegisterRd, this.form); + console.log('this.editTimes',this.editTimes) + objCopy(this.formInitData, this.form); + //console.log('this.form',this.form) } }, @@ -836,11 +667,13 @@ export default { ::v-deep .el-form-item { margin-bottom: -15px; } + .btn { margin-left: 10px; } -.btnClass{ - width:110px; + +.btnClass { + width: 110px; } .photo { @@ -852,6 +685,7 @@ export default { width: 150px; height: 160px; } + ::v-deep .el-table--small .el-table__cell { padding: 0px 0; } diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index 7de1c79..0773146 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -1,9 +1,8 @@