diff --git a/src/assets/css/global_button.css b/src/assets/css/global_button.css new file mode 100644 index 0000000..1685bda --- /dev/null +++ b/src/assets/css/global_button.css @@ -0,0 +1,24 @@ +.el-button { + background: #FFF; + border: 1px solid #0B663D !important; /*原始 默认值 1px solid #DCDFE6; */ + color: #0B663D !important; /*原始 默认值 #606266 */ + font-weight: 700; /*原始 默认值 500 */ + font-family: 'Microsoft YaHei'; /*原始 默认值 Arial */ + padding: 10px 5px; /*原始 默认值 500 */ + min-width: 60px; + /* + display: inline-block; + line-height: 1; + white-space: nowrap; + cursor: pointer; + -webkit-appearance: none; + text-align: center; + box-sizing: border-box; + outline: 0; + margin: 0; + transition: .1s; + font-size: 14px; + border-radius: 4px; + */ + } + \ No newline at end of file diff --git a/src/components/customerOrg/customerOrgGroupList.vue b/src/components/customerOrg/customerOrgGroupList.vue new file mode 100644 index 0000000..2105deb --- /dev/null +++ b/src/components/customerOrg/customerOrgGroupList.vue @@ -0,0 +1,483 @@ + + + \ No newline at end of file diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index d9d772a..262d2ef 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -714,8 +714,11 @@ export default { ], //一般uuid字段为空时,需设置为null值 rules: { + customerOrgId:[ + { required: true, message: "请填写单位", trigger: "blur" }, + ], patientName: [ - { required: true, message: "请输入姓名", trigger: "blur" }, + { required: true, message: "请填写姓名", trigger: "blur" }, ], organizationUnitId: [ { required: true, message: "请填写体检中心", trigger: "blur" }, @@ -1051,91 +1054,98 @@ export default { //提交 btnSubmit(formName, msgTip) { - this.$refs[formName].validate((valid) => { - if (valid) { - //赋值 - let body = deepCopy(this.form); - - if (this.form.birthDate) { - body.birthDate = moment(this.form.birthDate).format("yyyy-MM-DD") + this.$refs[formName].validate((valid,fields) => { + if(!valid){ + this.$message.warning(fields[Object.keys(fields)[0]][0].message); + return false + } + if(this.form.customerOrgId != this.dict.personOrgId){ + if(!this.form.customerOrgRegisterId){ + this.$message.warning("请填写单位体检次数!"); + return false } + } + + //赋值 + let body = deepCopy(this.form); + if (this.form.birthDate) { + body.birthDate = moment(this.form.birthDate).format("yyyy-MM-DD") + } - delete body.id; - delete body.patientRegisterNo; - delete body.medicalTimes; - delete body.completeFlag; - delete body.isMedicalStart; - delete body.patientNo; - delete body.creatorId; - delete body.creationTime; - delete body.lastModificationTime; - delete body.lastModifierId; - delete body.isVipBox; - delete body.isNameHideBox; - delete body.isPhoneFollowBox; - delete body.isLockBox; - delete body.photo; - - setNull(body, this.defaultNull); - - //日期转换 日期控件增加格式 - // console.log("body.birthDate", body.birthDate); - // if (body.birthDate) { - // body.birthDate = moment(new Date(body.birthDate)).format( - // "yyyy-MM-DD" - // ); - // } - - if (this.form.id.length < 1) { - //id为空则新增 - console.log(`/api/patientregister/createreturninfo`, body); - postapi(`/api/patientregister/createreturninfo`, body).then( - (res) => { - if (res.code == 1) { - //console.log('res',res) - if (msgTip) this.$message.success("创健 操作成功"); - //一般读身份证照片时,会出现这种情况 - if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(res.data.id, this.patientRegister.photo); - - objCopy(res.data, this.form); - // this.patientRegister.prList.push(res.data); //列表添加记录 - 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.saveTimes++; - } - } - ); - } else { - //id不为空则编辑 api/patientregister/updatepatientregister - console.log(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body); - postapi(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body).then((res) => { + + delete body.id; + delete body.patientRegisterNo; + delete body.medicalTimes; + delete body.completeFlag; + delete body.isMedicalStart; + delete body.patientNo; + delete body.creatorId; + delete body.creationTime; + delete body.lastModificationTime; + delete body.lastModifierId; + delete body.isVipBox; + delete body.isNameHideBox; + delete body.isPhoneFollowBox; + delete body.isLockBox; + delete body.photo; + + setNull(body, this.defaultNull); + + //日期转换 日期控件增加格式 + // console.log("body.birthDate", body.birthDate); + // if (body.birthDate) { + // body.birthDate = moment(new Date(body.birthDate)).format( + // "yyyy-MM-DD" + // ); + // } + + if (this.form.id.length < 1) { + //id为空则新增 + console.log(`/api/patientregister/createreturninfo`, body); + postapi(`/api/patientregister/createreturninfo`, body).then( + (res) => { if (res.code == 1) { - if (msgTip) this.$message.success("更新 操作成功"); + //console.log('res',res) + if (msgTip) this.$message.success("创健 操作成功"); //一般读身份证照片时,会出现这种情况 - if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(this.form.id, this.patientRegister.photo); - //this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新) - let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id) - if(lfind > - 1) objCopy(this.form,this.patientRegister.prList[lfind]) + if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(res.data.id, this.patientRegister.photo); + objCopy(res.data, this.form); + // this.patientRegister.prList.push(res.data); //列表添加记录 + this.patientRegister.patientRegisterId = res.data.id; + this.patientRegister.patientRegisterRd = res.data; - //this.patientRegister.saveTimes++; //更新保存时,无需触发组合项目保存 + //this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新) + this.patientRegister.prList.push(res.data) + + //触发已选组合项目保存 + this.patientRegister.patientRegisterAbs.forEach(e => { + e.patientRegisterId = res.data.id; + return e; + }); + this.patientRegister.saveTimes++; } - }); - } + } + ); } else { - alert("未通过数据校验"); - return false; + //id不为空则编辑 api/patientregister/updatepatientregister + console.log(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body); + postapi(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body).then((res) => { + if (res.code == 1) { + if (msgTip) this.$message.success("更新 操作成功"); + //一般读身份证照片时,会出现这种情况 + if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(this.form.id, this.patientRegister.photo); + //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++; //更新保存时,无需触发组合项目保存 + } + }); } + }); }, diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index d5824e0..b8242d2 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -2,7 +2,7 @@
@@ -11,8 +11,8 @@ border :height=" window.pageHeight < 600 - ? 172 - : Math.floor(((window.pageHeight - 342) * 2) / 3) + ? 202 + : Math.floor(((window.pageHeight - 302) * 2) / 3) " highlight-current-row @row-click="rowClick" @@ -858,11 +858,10 @@ export default { this.patientRegister.query.times++; this.patientRegister.patientRegisterId = ""; }) - .catch(() => { - this.$message({ - type: "info", - message: "已取消删除", - }); + .catch((err) => { + if (err == "cancel") { + this.$message.info("已取消删除"); + } }); }, diff --git a/src/components/patientRegister/customerOrgTreeAll.vue b/src/components/patientRegister/customerOrgTreeAll.vue index 97bdbfe..e14e47d 100644 --- a/src/components/patientRegister/customerOrgTreeAll.vue +++ b/src/components/patientRegister/customerOrgTreeAll.vue @@ -1,9 +1,14 @@ -