diff --git a/src/components/report/PatientRegisterQueryNobtn.vue b/src/components/report/PatientRegisterQueryNobtn.vue
index 0c74027..d967c2c 100644
--- a/src/components/report/PatientRegisterQueryNobtn.vue
+++ b/src/components/report/PatientRegisterQueryNobtn.vue
@@ -30,8 +30,7 @@
性别:
-
-
+
@@ -40,11 +39,14 @@
style="width: 180px" />
+ 体检单位/次数:
+ :show-all-levels="false" clearable size="small" @change="changeCustomerOrgId">
- 单位作为查询条件
+
+
+
状态:
@@ -111,7 +113,11 @@ export default {
...mapState(["window", "dict", "patientRegister", "customerOrg"]),
},
methods: {
-
+
+ changeCustomerOrgId(v){
+ console.log(v)
+ },
+
},
};
diff --git a/src/views/charge/charge.vue b/src/views/charge/charge.vue
index 7084701..df9514d 100644
--- a/src/views/charge/charge.vue
+++ b/src/views/charge/charge.vue
@@ -23,7 +23,7 @@
未收费
已收费
已退费
-
+
@@ -119,12 +119,12 @@
-
+
-
+
@@ -171,7 +171,7 @@
@input="changeDiscount(scope.row)" />
-
+
-
+
-
-
-
+ {{ dddw(dict.payType, "id", scope.row.payTypeFlag, "displayName") }}
@@ -297,7 +295,7 @@ export default {
};
},
- created() {
+ created() {
this.dictInit();
},
@@ -346,9 +344,9 @@ export default {
//人员列表点击
rowClick(row) {
- if(this.query.chargeFlag == 'B'){
+ if (this.query.chargeFlag == 'B') {
this.form.chargeFlag = '1';
- }else{
+ } else {
this.form.chargeFlag = '0';
}
@@ -359,10 +357,21 @@ export default {
} else {
this.form.id = null;
this.form.invoiceNo = '';
- this.form.invoiceOrgName = row.patientName;
+ this.form.invoiceOrgName = row.patientName;
}
+ this.getCardRegister(row.idNo);
this.getAsbItemsForFee(row.patientRegisterId, row.chargeId);
+
+ if (this.query.chargeFlag == 'Y') {
+ this.getChargePayByChargeId(row.chargeId);
+ this.getChargeAsbByChargeid(row.chargeId);
+ } else if (this.query.chargeFlag == 'B') {
+ this.getChargeBackPayByChargeBackId(row.chargeBackId);
+ this.getChargeAsbByChargeid(row.chargeId);
+ }
+
+
},
//获取项目列表
@@ -374,15 +383,18 @@ export default {
.then(res => {
if (res.code == 1) {
this.asbItemsForFee = res.data;
- this.asbItemsForFee.forEach(e => {
- if(e.isCharge == 'N'){
- e.chargePriceOri = e.chargePrice;
- e.discount = Math.round(10000 * e.chargePrice / e.standardPrice) / 100;
- e.standTotal = e.amount * e.standardPrice;
- e.total = e.amount * e.chargePrice;
- return e;
+
+ for (let i = this.asbItemsForFee.length - 1; i >= 0; i--) {
+ if (this.asbItemsForFee[i].isCharge == 'Y') {
+ this.asbItemsForFee.splice(i, 1);
+ continue;
}
- });
+ this.asbItemsForFee[i].chargePriceOri = this.asbItemsForFee[i].chargePrice;
+ this.asbItemsForFee[i].discount = Math.round(10000 * this.asbItemsForFee[i].chargePrice / this.asbItemsForFee[i].standardPrice) / 100;
+ this.asbItemsForFee[i].standTotal = this.asbItemsForFee[i].amount * this.asbItemsForFee[i].standardPrice;
+ this.asbItemsForFee[i].total = this.asbItemsForFee[i].amount * this.asbItemsForFee[i].chargePrice;
+ }
+
//勾选已收费项目
this.toCharge(patientRegisterId);
}
@@ -398,6 +410,88 @@ export default {
}
},
+
+ // "chargeId": "3a0d5685-b3a0-0186-0dd4-3b3ac0d2d08c",
+ // "asbitemId": "3a0c657d-4e73-9bab-68da-56ab2f088bb1",
+ // "asbitemName": "身高体重",
+ // "asbitemPrice": 17,
+ // "chargePrice": 18,
+ // "amount": 1,
+ // "registerAsbitemId": "3a0c6589-9b27-68d1-32f6-51082031d11c",
+ // "creatorName": "admin",
+ // "lastModifierName": null,
+ // "lastModificationTime": null,
+ // "lastModifierId": null,
+ // "creationTime": "2023-08-30T10:49:48.753174",
+ // "creatorId": "3a0c4180-107c-0c89-b25b-0bd34666dcec",
+ // "id": "3a0d5685-b3bb-8dc2-0d14-56af1ddd11f9"
+
+ // 获取个人充值卡
+ getCardRegister(idNo) {
+ let body = { cardModeId: '0', idNo };
+ this.cardRegister = [];
+ getapi(`/api/app/cardregister/getcardregisterlist`, body).then(res => {
+ if (res.code != - 1) {
+ this.cardRegister = res.data;
+ }
+ });
+ },
+
+
+ //获取收费单包含的组合项目
+ getChargeAsbByChargeid(ChargeId) {
+ this.asbItemsForFee = [];
+ getapi(`/api/app/chargeasbitem/getchargeasbiteminchargeid?ChargeId=${ChargeId}`).then(res => {
+ if (res.code != - 1) {
+ res.data.forEach(e => {
+ this.asbItemsForFee.push({
+ asbitemName: e.asbitemName,
+ standardPrice: e.asbitemPrice,
+ chargePrice: e.chargePrice,
+ chargePriceOri: e.chargePrice,
+ amount: e.amount,
+ discount: Math.round(10000 * e.chargePrice / e.asbitemPrice) / 100,
+ payTypeFlag: e.payTypeFlag,
+ checkCompleteFlag: e.checkCompleteFlag,
+ creatorName: e.creatorName,
+ creationTime: e.creationTime,
+ });
+ });
+ }
+ });
+ },
+
+ //获取收费方式明细
+ getChargePayByChargeId(ChargeId) {
+ let lfind = -1;
+ getapi(`/api/app/chargepay/getchargepayinchargeid?ChargeId=${ChargeId}`).then(res => {
+ if (res.code != - 1) {
+ res.data.forEach(e => {
+ lfind = arrayExistObj(this.chargePays, 'payModeId', e.payModeId);
+ if (lfind > - 1) {
+ this.chargePays[lfind].chargeMoney = e.chargeMoney;
+ this.chargePays[lfind].cardRegisterId = e.cardBillId;
+ }
+ });
+ }
+ });
+ },
+ //获取退费方式明细
+ getChargeBackPayByChargeBackId(ChargeBackId) {
+ let lfind = -1;
+ getapi(`/api/app/chargebackpay/getchargebackpayinchargebackid?ChargeBackId=${ChargeBackId}`).then(res => {
+ if (res.code != - 1) {
+ res.data.forEach(e => {
+ lfind = arrayExistObj(this.chargePays, 'payModeId', e.payModeId);
+ if (lfind > - 1) {
+ this.chargePays[lfind].chargeMoney = e.backMoeny;
+ this.chargePays[lfind].cardRegisterId = e.cardBillId;
+ }
+ });
+ }
+ });
+ },
+
//待收费数据分析
toCharge(patientRegisterId) {
//默认全部选中
@@ -459,10 +553,10 @@ export default {
totalOri += Math.round(100 * e.amount * e.chargePriceOri) / 100; //原始实收价格
});
- if(totalOri != 0){
+ if (totalOri != 0) {
discount = Math.round(10000 * totalPlan / totalOri) / 100;
this.form.discount = discount;
- }
+ }
//
this.selectedData.forEach(e => {
lfind = arrayExistObj(this.asbItemsForFee, 'id', e.id);
@@ -492,7 +586,7 @@ export default {
},
//输入预收金额,计算找零
- findBalance(){
+ findBalance() {
this.form.balance = this.form.preTotal - this.form.total;
},
@@ -537,18 +631,18 @@ export default {
//收费
charge() {
- let body={};
+ let body = {};
let total = 0;
let msg = '';
let chargePays = [];
let asbitems = [];
- if(this.form.id){
+ if (this.form.id) {
this.$message.warning("已收费,不可重复操作!");
return;
}
- this.$refs['form'].validate((valid,fields) => {
+ this.$refs['form'].validate((valid, fields) => {
if (!valid) {
msg = fields[Object.keys(fields)[0]][0].message;
return;
@@ -581,7 +675,7 @@ export default {
return;
}
-
+
this.chargePays.forEach(e => {
if (e.chargeMoney) {
@@ -603,11 +697,11 @@ export default {
});
body = {
- patientRegisterId:this.form.patientRegisterId,
- invoiceNo:this.form.invoiceNo,
- invoiceOrgName:this.form.invoiceOrgName,
+ patientRegisterId: this.form.patientRegisterId,
+ invoiceNo: this.form.invoiceNo,
+ invoiceOrgName: this.form.invoiceOrgName,
chargePays,
- asbitems,
+ asbitems,
};
// {
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
@@ -630,8 +724,8 @@ export default {
// ]
// }
//console.log('body',body);
- postapi('/api/app/registerasbitem/registerasbitemcharge',body).then(res =>{
- if(res.code != -1){
+ postapi('/api/app/registerasbitem/registerasbitemcharge', body).then(res => {
+ if (res.code != -1) {
this.$message.success("操作成功!");
this.form.id = "操作成功!"; //防止重复提交收费
this.Query();
@@ -648,12 +742,12 @@ export default {
let total = 0;
let body = {};
- if(!chargeId){
+ if (!chargeId) {
this.$message.warning("请选择待退费的记录!");
return;
}
- if(this.form.chargeFlag == '1'){
+ if (this.form.chargeFlag == '1') {
this.$message.warning("已退费,不可重复操作!");
return;
}
@@ -687,7 +781,7 @@ export default {
});
}
});
-
+
// {
// "chargeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "chargeBackPays": [
@@ -698,11 +792,11 @@ export default {
// }
// ]
// }
- body ={
- chargeId,chargeBackPays
+ body = {
+ chargeId, chargeBackPays
}
- postapi('/api/app/registerasbitem/registerasbitemchargeback',body).then(res =>{
- if(res.code != -1){
+ postapi('/api/app/registerasbitem/registerasbitemchargeback', body).then(res => {
+ if (res.code != -1) {
this.$message.success("操作成功!");
this.form.chargeFlag = '1'; //防止重复提交退费
this.Query();
@@ -758,7 +852,6 @@ export default {
}
},
-
//数据初始化
dictInit() {
@@ -882,6 +975,7 @@ export default {
console.log("dict", this.dict);
},
+
},
//监听事件()