|
|
|
@ -37,15 +37,16 @@ |
|
|
|
<el-input placeholder="姓名" v-model="query.patientName" size="small" style="width: 100px;" |
|
|
|
clearable /> |
|
|
|
</div> |
|
|
|
<el-radio-group v-model="query.chargeFlag" @input="btnQuery" size="mini" style="margin-top:8px;margin-left: 21px;"> |
|
|
|
<el-radio-group v-model="query.chargeFlag" @input="btnQuery" size="mini" |
|
|
|
style="margin-top:8px;margin-left: 21px;"> |
|
|
|
<el-radio label="N">未收费</el-radio> |
|
|
|
<el-radio label="Y">已收费</el-radio> |
|
|
|
<el-radio label="B">已退费</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
<div v-if="query.chargeFlag != 'N'" style="margin-left:21px;"> |
|
|
|
<span>发票号</span> |
|
|
|
<el-input placeholder="发票/收据号" v-model="query.invoiceNo" size="small" |
|
|
|
style="width: 90px;" clearable /> |
|
|
|
<el-input placeholder="发票/收据号" v-model="query.invoiceNo" size="small" style="width: 90px;" |
|
|
|
clearable /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
@ -117,18 +118,16 @@ |
|
|
|
<div style="display: flex; flex-wrap: wrap;height:40px; width: 100%;align-items: center;"> |
|
|
|
<div class="query"> |
|
|
|
<span>条码号</span> |
|
|
|
<el-input v-model="info.patientRegisterNo" size="small" |
|
|
|
style="margin-left: 3px; width: 120px;" disabled /> |
|
|
|
<el-input v-model="info.patientRegisterNo" size="small" style="margin-left: 3px; width: 120px;" |
|
|
|
disabled /> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>档案号</span> |
|
|
|
<el-input v-model="info.patientNo" size="small" |
|
|
|
style="margin-left: 3px; width: 90px;" disabled /> |
|
|
|
<el-input v-model="info.patientNo" size="small" style="margin-left: 3px; width: 90px;" disabled /> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>姓名</span> |
|
|
|
<el-input v-model="info.patientName" size="small" |
|
|
|
style="margin-left: 3px; width: 80px;" disabled /> |
|
|
|
<el-input v-model="info.patientName" size="small" style="margin-left: 3px; width: 80px;" disabled /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -747,6 +746,7 @@ export default { |
|
|
|
this.cardSeq = index |
|
|
|
this.cardDatas = [] //清除原来的卡列表数据 |
|
|
|
this.queryCard.value = '' |
|
|
|
this.cardChoosed = {} |
|
|
|
this.winDialog.queryCard = true // 显示选卡页面 |
|
|
|
}, |
|
|
|
|
|
|
|
@ -778,6 +778,10 @@ export default { |
|
|
|
|
|
|
|
// 确定选中卡记录 |
|
|
|
btnOkCard() { |
|
|
|
if(!this.cardChoosed.id){ |
|
|
|
this.$message.warning({showClose:true,message:'请选择会员卡'}) |
|
|
|
return |
|
|
|
} |
|
|
|
// 单次收费不允重复同一张卡 |
|
|
|
let lfind = arrayExistObj(this.chargePays, 'cardRegisterId', this.cardChoosed.id) |
|
|
|
if (lfind > -1) { |
|
|
|
@ -971,7 +975,7 @@ export default { |
|
|
|
}); |
|
|
|
//this.form.preTotal = totalPlan; |
|
|
|
//明细和与总金额不符处理 |
|
|
|
this.handleBalance(totalPlan, totalCompute); |
|
|
|
this.handleBalance(totalPlan, Math.round(100 * totalCompute) / 100); |
|
|
|
|
|
|
|
this.findBalance() |
|
|
|
}, |
|
|
|
@ -979,11 +983,20 @@ export default { |
|
|
|
// 明细合计金额与总金额不一致时,处理 |
|
|
|
handleBalance(totalPlan, totalCompute) { |
|
|
|
if (totalPlan != totalCompute) { |
|
|
|
for (let i = this.selectedData.length - 1; i = 0; i--) { |
|
|
|
lfind = lfind = arrayExistObj(this.asbItemsForFee, 'id', this.selectedData[i].id); |
|
|
|
if (lfind > -1 && this.selectedData[i].amount == 1) { |
|
|
|
this.asbItemsForFee[lfind].chargePrice = this.asbItemsForFee[lfind].chargePrice + totalPlan - totalCompute; |
|
|
|
this.selectedData[i].chargePrice = this.asbItemsForFee[lfind].chargePrice; |
|
|
|
//console.log('明细合计金额与总金额不一致时', totalPlan, totalCompute, this.selectedData) |
|
|
|
for (let i = this.selectedData.length - 1; i >= 0; i--) { |
|
|
|
// lfind = arrayExistObj(this.asbItemsForFee, 'id', this.selectedData[i].id); |
|
|
|
// if (lfind > -1 && this.selectedData[i].amount == 1) { |
|
|
|
// this.asbItemsForFee[lfind].chargePrice = this.asbItemsForFee[lfind].chargePrice + totalPlan - totalCompute; |
|
|
|
// this.selectedData[i].chargePrice = this.asbItemsForFee[lfind].chargePrice; |
|
|
|
// break; |
|
|
|
// } |
|
|
|
//console.log('this.selectedData[i].amount', this.selectedData[i].amount) |
|
|
|
if (this.selectedData[i].amount == 1) { |
|
|
|
let chargePrice = this.selectedData[i].chargePrice |
|
|
|
this.selectedData[i].chargePrice = Math.round((Number(chargePrice) + Number(totalPlan) - totalCompute)*100)/100 ; |
|
|
|
this.selectedData[i].discount = Math.round(this.selectedData[i].chargePrice * 10000/this.selectedData[i].standardPrice)/100 |
|
|
|
//console.log('平衡金额 行数,前,后:', i, chargePrice, this.selectedData[i].chargePrice) |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1111,7 +1124,7 @@ export default { |
|
|
|
this.$message.warning("收费方式合计收款不可小于应收金额!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
let chargeMoney = 0 |
|
|
|
this.chargePays.forEach(e => { |
|
|
|
if (e.chargeMoney) { |
|
|
|
if (e.payModeId == '01') { |
|
|
|
@ -1128,9 +1141,12 @@ export default { |
|
|
|
cardRegisterId: e.cardRegisterId, |
|
|
|
}); |
|
|
|
} |
|
|
|
chargeMoney += e.chargeMoney |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
let detailsTotal = 0 |
|
|
|
|
|
|
|
this.selectedData.forEach(e => { |
|
|
|
asbitems.push({ |
|
|
|
asbitemId: e.asbitemId, |
|
|
|
@ -1138,8 +1154,15 @@ export default { |
|
|
|
amount: e.amount, |
|
|
|
registerAsbitemId: e.id, |
|
|
|
}); |
|
|
|
detailsTotal += Math.round(100 * e.amount * e.chargePrice) / 100 |
|
|
|
}); |
|
|
|
|
|
|
|
if (Math.round(chargeMoney * 100) / 100 !== Math.round(detailsTotal * 100) / 100) { |
|
|
|
this.$message.warning({ showClose: true, message: `明细合计 ${Math.round(detailsTotal * 100) / 100} 与 总金额 ${Math.round(chargeMoney * 100) / 100} 不一致` }) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
body = { |
|
|
|
patientRegisterId: this.form.patientRegisterId, |
|
|
|
invoiceNo: this.form.invoiceNo, |
|
|
|
|