Browse Source

增加项目

master
pengjun 2 years ago
parent
commit
d5f7d08d4a
  1. 34
      src/components/patientRegister/PatientRegisterEdit.vue
  2. 86
      src/components/patientRegister/PatientRegisterEditItemBatch.vue
  3. 4
      src/components/patientRegister/PatientRegisterList.vue

34
src/components/patientRegister/PatientRegisterEdit.vue

@ -1632,30 +1632,42 @@ export default {
return
}
try {
let res = await proApi.getPrAsb(this.form.id)
if (res.code == -1) {
this.$message.warning(`操作失败,原因:${res.message}`)
return
}
} catch (error) {
this.$message.warning(`操作失败,原因:${error}`)
let chargeMoney = Number(0)
//,021
this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
if (e.payTypeFlag == '0' && e.isCharge == 'N') chargeMoney += Number(e.total)
});
if (chargeMoney == 0) {
this.$message.warning({ showClose: true, message: '没有可收费的记录!' })
return
}
this.dialogWin.charge = true
// try {
// let res = await proApi.getPrAsb(this.form.id)
// if (res.code == -1) {
// this.$message.warning(`${res.message}`)
// return
// }
// } catch (error) {
// this.$message.warning(`${error}`)
// return
// }
//
this.chargePatientRegisterNo = patientRegisterNo
setTimeout(() => {
this.dataTransOpts.refresh.charge.S++
}, 20)
}, 10)
this.dialogWin.charge = true
},
//
closeDialogCharge() {
// this.prAsbOpraOpts.prAsbQuery++
this.dataTransOpts.refresh.register_check_asbitem.M++
this.dataTransOpts.refresh.register_check_asbitem.D++
},
//

86
src/components/patientRegister/PatientRegisterEditItemBatch.vue

@ -55,13 +55,16 @@
<el-button class="commonbutton" type="danger" @click="asbitemDel(0)" style="width: 100px">删除全部</el-button>
</div>
<div style="margin-top: 5px">
<el-button class="commonbutton" type="primary" @click="changePayTypeFlag('0')" style="width: 100px">全个人支付</el-button>
<el-button class="commonbutton" type="primary" @click="changePayTypeFlag('0')"
style="width: 100px">全个人支付</el-button>
</div>
<div style="margin-top: 5px">
<el-button class="commonbutton" type="primary" @click="changePayTypeFlag('1')" style="width: 100px">全单位支付</el-button>
<el-button class="commonbutton" type="primary" @click="changePayTypeFlag('1')"
style="width: 100px">全单位支付</el-button>
</div>
<div style="margin-top: 5px">
<el-button class="commonbutton" type="primary" @click="changePayTypeFlag('2')" style="width: 100px">全赠送</el-button>
<el-button class="commonbutton" type="primary" @click="changePayTypeFlag('2')"
style="width: 100px">全赠送</el-button>
</div>
</div>
</div>
@ -112,7 +115,7 @@ export default {
asbitemsTemp: [], //
asbitemCurr: {}, //()
},
asbitemBatchInit:{},
asbitemBatchInit: {},
asbItemQuick: [], //
quickAsb: [], //
@ -258,8 +261,7 @@ export default {
//()
async asbitemBatchHandle() {
let msg = "",
body = {};
let msg = "", body = {};
if (this.asbitemBatch.asbitemsTemp.length == 0) {
this.$message.warning("没有选择组合项目,不可执行此操作!");
return;
@ -275,36 +277,63 @@ export default {
return;
}
let createRegisterAsbitemDtos = deepCopy(
let registerCheckAsbitems = deepCopy(
this.asbitemBatch.asbitemsTemp
);
createRegisterAsbitemDtos.forEach((e) => {
delete e.asbitemName;
return e;
});
// createRegisterAsbitemDtos.forEach((e) => {
// delete e.asbitemName;
// return e;
// });
this.elProgress.display = true;
this.elProgress.percentage = 0;
let isContinue = true //
for (let i = 0; i < this.multipleSelection.length; i++) {
createRegisterAsbitemDtos.forEach((e) => {
e.patientRegisterId = this.multipleSelection[i].id;
return e;
});
if (!isContinue) break;
// createRegisterAsbitemDtos.forEach((e) => {
// e.patientRegisterId = this.multipleSelection[i].id;
// return e;
// });
// body = {
// medicalCenterId: this.multipleSelection[i].medicalCenterId,
// createRegisterAsbitemDtos,
// }; //
body = {
medicalCenterId: this.multipleSelection[i].medicalCenterId,
createRegisterAsbitemDtos,
};
patientRegisterId: this.multipleSelection[i].id,
registerCheckAsbitems
}
try {
await postapi(
"/api/app/registerasbitem/createregisterasbitemincustomerorgmany",
body
);
// /api/app/registerasbitem/createregisterasbitemincustomerorgmany
let res = await postapi("/api/PatientRegister/BatchAddAsbitems", body);
if (res.code == -1) {
try {
await this.$confirm(`人员 ${this.multipleSelection[i].patientName} 增加项目失败, 是否继续操作其他人员?`, "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning",
})
} catch (error) {
console.log("批量增加项目错误,原因:", error);
console.log(error) //
isContinue = false;
}
this.elProgress.percentage = Math.floor(
((i + 1) * 100) / this.multipleSelection.length
);
}
} catch (err) {
try {
await this.$confirm(`人员 ${this.multipleSelection[i].patientName} 增加项目失败, 是否继续操作其他人员?`, "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning",
})
} catch (error) {
console.log(error) //
isContinue = false;
}
}
this.elProgress.percentage = Math.floor(((i + 1) * 100) / this.multipleSelection.length);
}
} else {
// {
@ -342,8 +371,9 @@ export default {
}
}
console.log("操作成功!");
this.dialogWin.PatientRegisterEditItemBatch = false;
this.elProgress.display = false;
//
this.patientRegister.query.times++
},
@ -369,7 +399,7 @@ export default {
// deep: true, //
handler(newVal, oldVal) {
console.log(`watch: 刷新在用组合项目 newVal: ${newVal} oldVal:${oldVal}`)
if(newVal != oldVal) this.dictInit()
if (newVal != oldVal) this.dictInit()
}
},
},

4
src/components/patientRegister/PatientRegisterList.vue

@ -976,8 +976,8 @@ export default {
this.$message.info("请选择要操作的记录!");
return;
}
this.dialogWin.PatientRegisterEditGroupBatch = true;
this.dataTransOpts.plus.PatientRegisterEditGroupBatch++
this.dialogWin.PatientRegisterEditGroupBatch = true;
},
@ -1000,8 +1000,8 @@ export default {
return
}
this.dataTransOpts.plus.PatientRegisterEditItemBatch++ //
this.dialogWin.PatientRegisterEditItemBatch = true;
this.dataTransOpts.plus.PatientRegisterEditItemBatch++
},

Loading…
Cancel
Save