From cdc07125ba95ae1af12aec59ec14bde8b944527d Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Mon, 10 Jul 2023 18:49:15 +0800 Subject: [PATCH] rydj --- .../patientRegister/PatientRegisterItem.vue | 151 +++++++++++++++--- src/utlis/mm.js | 2 +- 2 files changed, 133 insertions(+), 20 deletions(-) diff --git a/src/components/patientRegister/PatientRegisterItem.vue b/src/components/patientRegister/PatientRegisterItem.vue index 94947ae..c0a83ae 100644 --- a/src/components/patientRegister/PatientRegisterItem.vue +++ b/src/components/patientRegister/PatientRegisterItem.vue @@ -18,15 +18,15 @@
- 添加 + 添加
- 移除 + 移除
- 保存 + 保存
@@ -73,7 +73,7 @@ export default { //patientRegisterAbs:[], //体检人员所选组合项目 放vuex patientRegisterAbsChoosed: [], //勾选的 体检人员所选组合项目 - patientRegisterAbsDel: [], //体检人员 待删除的组合项目 + //patientRegisterAbsDel: [], //体检人员 待删除的组合项目 patientRegisterAbsRd: { id: null, //更新不需传 @@ -82,7 +82,7 @@ export default { patientRegisterId: null, //string($uuid) 登记流水号 standardPrice: 0, //number($double) 标准价格 chargePrice: 0, // number($double) 实收价格 - payTypeFlag: "0000", // string 支付方式,比如是自费、免费、单位支付 + payTypeFlag: "0", // string 支付方式,比如是自费、免费、单位支付 0自费、2免费、1单位支付 isCharge: "N", // string 是否已收费 //lisRequestId: null, // string($uuid)LIS申请ID amount: 1, // integer($int32) 数量 @@ -97,31 +97,143 @@ export default { mounted() { }, methods: { - //...mapActions(['getMedicalPackageAsb','getMedicalPackageAsb']), + ...mapActions(['getCustomerOrgGroup','getMedicalPackageAsb', 'getPatientRegisterAbs']), + //保存按钮 onSubmit(val) { - }, - //移除按钮 - addselecteditems() { }, - //右侧勾选按钮 - selecteditems(val) { }, - // 添加按钮 - removedata() { }, - - // 左侧未选 + }, + + //未选组合项目 勾选情况 handleSelectionChange(val) { // this.selecteddata = val; this.asbItemChoosed = val; - console.log(this.asbItemChoosed); + //console.log(this.asbItemChoosed); + }, + + // 添加组合项目 + ///api/app/register-asbitem/many/3fa85f64-5717-4562-b3fc-2c963f66afa6' + addAbs() { + let body = [] + let checked = true + if(this.asbItemChoosed.length < 1){ + alert("请选择要添加的组合项目") + return + } + + //性别、年龄判断 + // "displayName": "身高体重", + // "shortName": "哈f哈", + // "forSexId": "F", + // "itemTypeId": "3a0b16de-75b9-c910-c61b-844709a88940", + // "price": 0, + //console.log('this.asbItemChoosed.length',this.asbItemChoosed.length) + for(let i = 0;i { + console.log("medicalPackageAsb", res); + if (res.code == 1) { + //未选项目中移除,已选项中添加 + this.getPatientRegisterAbs(this.patientRegisterForm.id) + //刷新显示 未选组合项目 + this.getAsbItemByItemType() + + this.$message.success("操作成功"); + } + }) + .catch((err) => { + this.$message({type: "error",message: `操作失败,原因:${err}`}); + }); + + }, + + //人员已选组合项目 勾选情况 + selecteditems(val) { + this.patientRegisterAbsChoosed = val + }, + + //删除 人员已选中的组合项目 + delAbs(){ + let body = [] + let checked = true + if(this.patientRegisterAbsChoosed.length < 1){ + alert("请选择要移除的组合项目") + return + } + + for(let i = 0;i { + console.log("medicalPackageAsb", res); + if (res.code == 1) { + //未选项目中移除,已选项中添加 + this.getPatientRegisterAbs(this.patientRegisterForm.id) + //刷新显示 未选组合项目 + this.getAsbItemByItemType() + + this.$message.success("操作成功"); + } + }) + .catch((err) => { + this.$message({type: "error",message: `操作失败,原因:${err}`}); + }); + + }, //项目类别过滤 组合项目 getAsbItemByItemType() { - //console.log('getAsbItemByItemType',typeof v) + //console.log('getAsbItemByItemType',typeof this.itemTypeIds,this.itemTypeIds) let lv = ""; if (typeof this.itemTypeIds === "object") { - lv = this.itemTypeIds[itemTypeIds.length - 1]; + lv = this.itemTypeIds[this.itemTypeIds.length - 1]; } if (lv) { @@ -134,11 +246,12 @@ export default { arrayReduce(this.dict.asbItem,[...this.patientRegister.patientRegisterAbs],"id=asbitemId"); }, + //体检登记的组合项目创建 registerAsbitem(body) { console.log("registerAsbitem"); postapi( - `api/app/register-asbitem?CustomerOrgId=${this.patientRegisterForm.customerOrgId}`, + `/api/app/register-asbitem?CustomerOrgId=${this.patientRegisterForm.customerOrgId}`, body ).then((res) => { console.log("medicalPackageAsb", res); diff --git a/src/utlis/mm.js b/src/utlis/mm.js index 28fe7d6..7ea7d0c 100644 --- a/src/utlis/mm.js +++ b/src/utlis/mm.js @@ -1,3 +1,3 @@ export default { - apiurl: "http://192.168.1.108:9529", + apiurl: "http://ver.wh613.com:9529", };