|
@@ -62,6 +62,7 @@ Component(
|
|
|
medicCardsList: [],
|
|
|
isAuthSuccess: false,
|
|
|
editForm: getDefaultForm(),
|
|
|
+ modalOpened: false,
|
|
|
genders: [
|
|
|
{
|
|
|
label: "男",
|
|
@@ -82,6 +83,12 @@ Component(
|
|
|
name: "港澳台身份证",
|
|
|
},
|
|
|
],
|
|
|
+ buttons: [
|
|
|
+ {
|
|
|
+ text: "确定",
|
|
|
+ extClass: "buttonBold",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
|
|
|
didMount() {
|
|
@@ -216,6 +223,19 @@ Component(
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ async onButtonClick() {
|
|
|
+ this.setData({
|
|
|
+ modalOpened: false,
|
|
|
+ });
|
|
|
+ const { editForm } = this.data;
|
|
|
+ const form = this.restForm(editForm);
|
|
|
+ /* 不是编辑的情况,才需要选择就诊卡 */
|
|
|
+ if (!editForm.id && !this.isEditCard()) {
|
|
|
+ form.bindCardNum = await this.onCheckCard(form);
|
|
|
+ }
|
|
|
+ await this.onSubmit(this.initData(form));
|
|
|
+ },
|
|
|
+
|
|
|
/* 一键清除 */
|
|
|
clearInput(value, key) {
|
|
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -344,18 +364,12 @@ Component(
|
|
|
async patientSave() {
|
|
|
const { editForm, isAuthSuccess } = this.data;
|
|
|
/* 如果不是本人,校验字段 */
|
|
|
-
|
|
|
if (!isAuthSuccess) {
|
|
|
if (!this.vailForm(editForm)) return;
|
|
|
}
|
|
|
- /* 获取非脱敏的字段 */
|
|
|
-
|
|
|
- const form = this.restForm(editForm);
|
|
|
- /* 不是编辑的情况,才需要选择就诊卡 */
|
|
|
- if (!editForm.id && !this.isEditCard()) {
|
|
|
- form.bindCardNum = await this.onCheckCard(form);
|
|
|
- }
|
|
|
- await this.onSubmit(this.initData(form));
|
|
|
+ this.setData({
|
|
|
+ modalOpened: true,
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
/* 提交 */
|