Browse Source

charge

master
pengjun 2 years ago
parent
commit
b73e7ee3e7
  1. 14
      src/components/report/PatientRegisterQueryNobtn.vue
  2. 120
      src/views/charge/charge.vue

14
src/components/report/PatientRegisterQueryNobtn.vue

@ -30,8 +30,7 @@
<div class="query"> <div class="query">
<span>性别</span> <span>性别</span>
<el-select v-model="patientRegister.query.sex" placeholder="请选择" style="width: 80px" size="small"> <el-select v-model="patientRegister.query.sex" placeholder="请选择" style="width: 80px" size="small">
<el-option v-for="item in dict.forSex" :key="item.id" :label="item.displayName" :value="item.id">
</el-option>
<el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id"/>
</el-select> </el-select>
</div> </div>
<div class="query"> <div class="query">
@ -40,11 +39,14 @@
style="width: 180px" /> style="width: 180px" />
</div> </div>
<div class="query"> <div class="query">
<span>体检单位/次数</span>
<el-cascader v-model="patientRegister.query.customerOrgId" :options="patientRegister.customerOrgTreeAll" <el-cascader v-model="patientRegister.query.customerOrgId" :options="patientRegister.customerOrgTreeAll"
:props="{checkStrictly: true,expandTrigger: 'hover',...customerOrg.treeprops,}" placeholder="请选择单位" :props="{checkStrictly: true,expandTrigger: 'hover',...customerOrg.treeprops,}" placeholder="请选择单位"
:show-all-levels="false" clearable :disabled="orgEnable == 'Y' ? false : true" size="small">
:show-all-levels="false" clearable size="small" @change="changeCustomerOrgId">
</el-cascader> </el-cascader>
<el-checkbox v-model="patientRegister.query.customerOrgFlag">单位作为查询条件</el-checkbox>
<el-select v-model="patientRegister.query.sex" placeholder="次数" style="width: 80px" size="small">
<el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id"/>
</el-select>
</div> </div>
<div class="query"> <div class="query">
<span>状态</span> <span>状态</span>
@ -112,6 +114,10 @@ export default {
}, },
methods: { methods: {
changeCustomerOrgId(v){
console.log(v)
},
}, },
}; };
</script> </script>

120
src/views/charge/charge.vue

@ -180,11 +180,9 @@
</el-table-column> </el-table-column>
<el-table-column prop="total" label="金额" width="70" v-if="false" /> <el-table-column prop="total" label="金额" width="70" v-if="false" />
<el-table-column prop="standardPrice" label="标准金额" width="80" v-if="false" /> <el-table-column prop="standardPrice" label="标准金额" width="80" v-if="false" />
<el-table-column label="支付方式" prop="payTypeFlag" width="100">
<el-table-column label="支付方式" prop="payTypeFlag" width="100" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.payTypeFlag" size="small">
<el-option v-for="item in dict.payType" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
<div>{{ dddw(dict.payType, "id", scope.row.payTypeFlag, "displayName") }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="checkCompleteFlag" label="状态" align="center"> <el-table-column prop="checkCompleteFlag" label="状态" align="center">
@ -361,8 +359,19 @@ export default {
this.form.invoiceNo = ''; this.form.invoiceNo = '';
this.form.invoiceOrgName = row.patientName; this.form.invoiceOrgName = row.patientName;
} }
this.getCardRegister(row.idNo);
this.getAsbItemsForFee(row.patientRegisterId, row.chargeId); 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 => { .then(res => {
if (res.code == 1) { if (res.code == 1) {
this.asbItemsForFee = res.data; 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); 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) { toCharge(patientRegisterId) {
// //
@ -758,7 +852,6 @@ export default {
} }
}, },
// //
dictInit() { dictInit() {
@ -882,6 +975,7 @@ export default {
console.log("dict", this.dict); console.log("dict", this.dict);
}, },
}, },
//() //()

Loading…
Cancel
Save