完成预付费收费功能
This commit is contained in:
parent
147b7d8896
commit
b4cfb9cb80
@ -140,7 +140,7 @@
|
|||||||
<el-form-item label="住院号" prop="hospitalId">
|
<el-form-item label="住院号" prop="hospitalId">
|
||||||
<el-autocomplete
|
<el-autocomplete
|
||||||
popper-class="my-autocomplete"
|
popper-class="my-autocomplete"
|
||||||
v-model="state"
|
v-model="formAddPrepayment.hospitalId"
|
||||||
:fetch-suggestions="querySearch"
|
:fetch-suggestions="querySearch"
|
||||||
placeholder="请输入住院号"
|
placeholder="请输入住院号"
|
||||||
@select="handleSelect">
|
@select="handleSelect">
|
||||||
@ -178,7 +178,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitformAddPrepayment">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -322,6 +322,7 @@
|
|||||||
"departName": item.departName,
|
"departName": item.departName,
|
||||||
"name": item.name,
|
"name": item.name,
|
||||||
"bedId": item.bedId,
|
"bedId": item.bedId,
|
||||||
|
"patientId": item.patientId,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -333,7 +334,10 @@
|
|||||||
// 处理自动查询列表选择的事件
|
// 处理自动查询列表选择的事件
|
||||||
handleSelect(item) {
|
handleSelect(item) {
|
||||||
this.formAddPrepayment.name = item.name;
|
this.formAddPrepayment.name = item.name;
|
||||||
console.log(item);
|
this.formAddPrepayment.patientId = item.patientId;
|
||||||
|
this.formAddPrepayment.bedId = item.bedId;
|
||||||
|
this.formAddPrepayment.departName = item.departName;
|
||||||
|
this.formAddPrepayment["hospitalId"] = item.value ;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 处理点击查询图标的事件
|
// 处理点击查询图标的事件
|
||||||
@ -367,9 +371,11 @@
|
|||||||
settlementId: null,
|
settlementId: null,
|
||||||
settlementFlag: null,
|
settlementFlag: null,
|
||||||
prepaid: 500,
|
prepaid: 500,
|
||||||
prepaidAt: new Date()
|
prepaidAt: new Date(),
|
||||||
|
hospitalId: null,
|
||||||
|
name: null,
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("formAddPrepayment");
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
@ -390,7 +396,6 @@
|
|||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.formAddPrepayment.pre
|
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加收费管理";
|
this.title = "添加收费管理";
|
||||||
},
|
},
|
||||||
@ -405,22 +410,24 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitformAddPrepayment() {
|
||||||
this.$refs["form"].validate(valid => {
|
let hospitalId = this.formAddPrepayment.hospitalId;
|
||||||
|
this.$refs["formAddPrepayment"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.formAddPrepayment.prepaymentId != null) {
|
if (!this.NoPrepayments.find(function(x) {
|
||||||
updatePrepayment(this.formAddPrepayment).then(response => {
|
return x.hospitalId === hospitalId;
|
||||||
this.msgSuccess("修改成功");
|
})) {
|
||||||
this.open = false;
|
this.msgError("未找到该住院号记录,请先添加!");
|
||||||
this.getList();
|
return ;
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addPrepayment(this.formAddPrepayment).then(response => {
|
|
||||||
this.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.formAddPrepayment.prepaidAt = null;
|
||||||
|
console.log("form -->", this.formAddPrepayment)
|
||||||
|
addPrepayment(this.formAddPrepayment).then(response => {
|
||||||
|
this.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user