|
|
@ -23,7 +23,7 @@ |
|
|
<el-radio label="N">未收费</el-radio> |
|
|
<el-radio label="N">未收费</el-radio> |
|
|
<el-radio label="Y">已收费</el-radio> |
|
|
<el-radio label="Y">已收费</el-radio> |
|
|
<el-radio label="B">已退费</el-radio> |
|
|
<el-radio label="B">已退费</el-radio> |
|
|
</el-radio-group> |
|
|
|
|
|
|
|
|
</el-radio-group> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 列表 --> |
|
|
<!-- 列表 --> |
|
|
@ -119,12 +119,12 @@ |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="预收金额" prop="preTotal"> |
|
|
<el-form-item label="预收金额" prop="preTotal"> |
|
|
<el-input v-model="form.preTotal" @input="findBalance"/> |
|
|
|
|
|
|
|
|
<el-input v-model="form.preTotal" @input="findBalance" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="找零" prop="balance"> |
|
|
<el-form-item label="找零" prop="balance"> |
|
|
<el-input v-model="form.balance" disabled/> |
|
|
|
|
|
|
|
|
<el-input v-model="form.balance" disabled /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
@ -171,7 +171,7 @@ |
|
|
@input="changeDiscount(scope.row)" /> |
|
|
@input="changeDiscount(scope.row)" /> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="数量" prop="amount" width="50" align="center"/> |
|
|
|
|
|
|
|
|
<el-table-column label="数量" prop="amount" width="50" align="center" /> |
|
|
<el-table-column label="实收价格" prop="chargePrice" width="80"> |
|
|
<el-table-column label="实收价格" prop="chargePrice" width="80"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-input type="number" v-model="scope.row.chargePrice" |
|
|
<el-input type="number" v-model="scope.row.chargePrice" |
|
|
@ -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"> |
|
|
@ -297,7 +295,7 @@ export default { |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
created() { |
|
|
|
|
|
|
|
|
created() { |
|
|
this.dictInit(); |
|
|
this.dictInit(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -346,9 +344,9 @@ export default { |
|
|
|
|
|
|
|
|
//人员列表点击 |
|
|
//人员列表点击 |
|
|
rowClick(row) { |
|
|
rowClick(row) { |
|
|
if(this.query.chargeFlag == 'B'){ |
|
|
|
|
|
|
|
|
if (this.query.chargeFlag == 'B') { |
|
|
this.form.chargeFlag = '1'; |
|
|
this.form.chargeFlag = '1'; |
|
|
}else{ |
|
|
|
|
|
|
|
|
} else { |
|
|
this.form.chargeFlag = '0'; |
|
|
this.form.chargeFlag = '0'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -359,10 +357,21 @@ export default { |
|
|
} else { |
|
|
} else { |
|
|
this.form.id = null; |
|
|
this.form.id = null; |
|
|
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) { |
|
|
//默认全部选中 |
|
|
//默认全部选中 |
|
|
@ -459,10 +553,10 @@ export default { |
|
|
totalOri += Math.round(100 * e.amount * e.chargePriceOri) / 100; //原始实收价格 |
|
|
totalOri += Math.round(100 * e.amount * e.chargePriceOri) / 100; //原始实收价格 |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
if(totalOri != 0){ |
|
|
|
|
|
|
|
|
if (totalOri != 0) { |
|
|
discount = Math.round(10000 * totalPlan / totalOri) / 100; |
|
|
discount = Math.round(10000 * totalPlan / totalOri) / 100; |
|
|
this.form.discount = discount; |
|
|
this.form.discount = discount; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
// |
|
|
// |
|
|
this.selectedData.forEach(e => { |
|
|
this.selectedData.forEach(e => { |
|
|
lfind = arrayExistObj(this.asbItemsForFee, 'id', e.id); |
|
|
lfind = arrayExistObj(this.asbItemsForFee, 'id', e.id); |
|
|
@ -492,7 +586,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//输入预收金额,计算找零 |
|
|
//输入预收金额,计算找零 |
|
|
findBalance(){ |
|
|
|
|
|
|
|
|
findBalance() { |
|
|
this.form.balance = this.form.preTotal - this.form.total; |
|
|
this.form.balance = this.form.preTotal - this.form.total; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -537,18 +631,18 @@ export default { |
|
|
|
|
|
|
|
|
//收费 |
|
|
//收费 |
|
|
charge() { |
|
|
charge() { |
|
|
let body={}; |
|
|
|
|
|
|
|
|
let body = {}; |
|
|
let total = 0; |
|
|
let total = 0; |
|
|
let msg = ''; |
|
|
let msg = ''; |
|
|
let chargePays = []; |
|
|
let chargePays = []; |
|
|
let asbitems = []; |
|
|
let asbitems = []; |
|
|
|
|
|
|
|
|
if(this.form.id){ |
|
|
|
|
|
|
|
|
if (this.form.id) { |
|
|
this.$message.warning("已收费,不可重复操作!"); |
|
|
this.$message.warning("已收费,不可重复操作!"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.$refs['form'].validate((valid,fields) => { |
|
|
|
|
|
|
|
|
this.$refs['form'].validate((valid, fields) => { |
|
|
if (!valid) { |
|
|
if (!valid) { |
|
|
msg = fields[Object.keys(fields)[0]][0].message; |
|
|
msg = fields[Object.keys(fields)[0]][0].message; |
|
|
return; |
|
|
return; |
|
|
@ -581,7 +675,7 @@ export default { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.chargePays.forEach(e => { |
|
|
this.chargePays.forEach(e => { |
|
|
if (e.chargeMoney) { |
|
|
if (e.chargeMoney) { |
|
|
@ -603,11 +697,11 @@ export default { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
body = { |
|
|
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, |
|
|
chargePays, |
|
|
asbitems, |
|
|
|
|
|
|
|
|
asbitems, |
|
|
}; |
|
|
}; |
|
|
// { |
|
|
// { |
|
|
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
@ -630,8 +724,8 @@ export default { |
|
|
// ] |
|
|
// ] |
|
|
// } |
|
|
// } |
|
|
//console.log('body',body); |
|
|
//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.$message.success("操作成功!"); |
|
|
this.form.id = "操作成功!"; //防止重复提交收费 |
|
|
this.form.id = "操作成功!"; //防止重复提交收费 |
|
|
this.Query(); |
|
|
this.Query(); |
|
|
@ -648,12 +742,12 @@ export default { |
|
|
let total = 0; |
|
|
let total = 0; |
|
|
let body = {}; |
|
|
let body = {}; |
|
|
|
|
|
|
|
|
if(!chargeId){ |
|
|
|
|
|
|
|
|
if (!chargeId) { |
|
|
this.$message.warning("请选择待退费的记录!"); |
|
|
this.$message.warning("请选择待退费的记录!"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(this.form.chargeFlag == '1'){ |
|
|
|
|
|
|
|
|
if (this.form.chargeFlag == '1') { |
|
|
this.$message.warning("已退费,不可重复操作!"); |
|
|
this.$message.warning("已退费,不可重复操作!"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
@ -687,7 +781,7 @@ export default { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// { |
|
|
// { |
|
|
// "chargeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
// "chargeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
// "chargeBackPays": [ |
|
|
// "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.$message.success("操作成功!"); |
|
|
this.form.chargeFlag = '1'; //防止重复提交退费 |
|
|
this.form.chargeFlag = '1'; //防止重复提交退费 |
|
|
this.Query(); |
|
|
this.Query(); |
|
|
@ -758,7 +852,6 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//数据初始化 |
|
|
//数据初始化 |
|
|
dictInit() { |
|
|
dictInit() { |
|
|
|
|
|
|
|
|
@ -882,6 +975,7 @@ export default { |
|
|
|
|
|
|
|
|
console.log("dict", this.dict); |
|
|
console.log("dict", this.dict); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//监听事件() |
|
|
//监听事件() |
|
|
|