Browse Source

charge

master
pengjun 2 years ago
parent
commit
eb44ec69d8
  1. 2
      src/components/doctorCheck/RegisterCheckList.vue
  2. 1
      src/components/patientRegister/PatientRegisterEdit.vue
  3. 14
      src/components/patientRegister/PatientRegisterItem.vue
  4. 3
      src/components/patientRegister/PatientRegisterList.vue
  5. 69
      src/components/sumDoctorCheck/ButtonList.vue
  6. 379
      src/views/charge/charge.vue

2
src/components/doctorCheck/RegisterCheckList.vue

@ -85,7 +85,7 @@ export default {
}
};
</script>
<style>
<style scoped>
.el-table .warning-row {
background: rgb(240,125,125);
}

1
src/components/patientRegister/PatientRegisterEdit.vue

@ -717,6 +717,7 @@ export default {
let user = localStorage.getItem('user');
let toOutShell = {
ReportCode, token,
preViewCanPrint: 'N',
Parameters: [
{ Name: 'printer', Value: user },
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' },

14
src/components/patientRegister/PatientRegisterItem.vue

@ -75,7 +75,7 @@
<div class="mainareaBox">
<el-table :data="patientRegister.patientRegisterAbs"
:height="(window.pageHeight > 735 ? (window.pageHeight - 537) : 198)" width="100%" :summary-method="getSummaries"
show-summary @row-dblclick="removeAbs" @selection-change="selecteditems" size="small">
show-summary :row-class-name="tableRowClassName" @row-dblclick="removeAbs" @selection-change="selecteditems" size="small">
<!-- temporaryselection personnelUnit.nogroupselected-->
<el-table-column type="selection" align="center"/>
<el-table-column label="已选组合项目" width="120" prop="asbitemName" />
@ -188,6 +188,13 @@ export default {
lmoment(date, forMat) {
return moment(new Date(date)).format(forMat);
},
tableRowClassName(){
if (row.groupPackageId) {
return 'warning-row'; //
}
return '';
},
//
// [
// {
@ -833,11 +840,14 @@ export default {
padding-right: 1px;
}
::v-deep input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none !important;
margin: 0 !important;
}
.el-table .purple-row {
background: rgb(128, 0, 128);
}
</style>

3
src/components/patientRegister/PatientRegisterList.vue

@ -246,6 +246,7 @@ export default {
let user = localStorage.getItem('user');
let toOutShell = {
ReportCode, token,
preViewCanPrint:'N',
Parameters: [
{ Name: 'printer', Value: user },
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' },
@ -619,6 +620,7 @@ export default {
let user = localStorage.getItem('user');
let toOutShell = {
ReportCode, token,
preViewCanPrint:'N',
Parameters: [
{ Name: 'printer', Value: user },
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' },
@ -676,6 +678,7 @@ export default {
let user = localStorage.getItem('user');
let toOutShell = {
ReportCode, token,
preViewCanPrint:'Y',
Parameters: [
{ Name: 'printer', Value: user },
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' },

69
src/components/sumDoctorCheck/ButtonList.vue

@ -35,16 +35,16 @@
</div>
<!-- 人员档案列表 -->
<el-dialog title="人员档案列表" :visible.sync="sumDoctorCheck.sumDoctorCheckDialogVisible" width="1000px">
<PatientRegisterList win="sumDoctorCheck"/>
</el-dialog>
<PatientRegisterList win="sumDoctorCheck" />
</el-dialog>
</div>
</template>
<script>
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { arrayExistObj,parseID } from "../../utlis/proFunc";
import { arrayExistObj, parseID } from "../../utlis/proFunc";
import PatientRegisterList from "../doctorCheck/PatientRegisterList.vue";
export default {
@ -57,7 +57,7 @@ export default {
tableData: [
{
col: 'col',
details: [{id:1, name: '000' }, {id:2, name: '001' }]
details: [{ id: 1, name: '000' }, { id: 2, name: '001' }]
}
],
};
@ -75,8 +75,8 @@ export default {
},
methods: {
prList(){
this.sumDoctorCheck.sumDoctorCheckDialogVisible = true
prList() {
this.sumDoctorCheck.sumDoctorCheckDialogVisible = true
},
//to
toDoctorCheck() {
@ -246,10 +246,40 @@ export default {
alert(ret)
return
}
///3a0c990e-5756-2dc0-19d5-69a617fe4048
let ReportCode = '0005';
let token = localStorage.getItem('token');
let user = localStorage.getItem('user');
let toOutShell = {
ReportCode, token,
preViewCanPrint: this.sumDoctorCheck.sumPREdit.isAudit,
Parameters: [
{ Name: 'printer', Value: user },
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' },
{ Name: "peisReportFirstPage", Value: "pic/peisReportFirstPage.jpg" },
{ Name: "peisReportPageHeader", Value: "pic/peisReportPageHeader.jpg" },
{ Name: "peisReportPageFooter", Value: "pic/peisReportPageFooter.jpg" }
],
};
postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
.then((res) => {
if (res.code != -1) {
toOutShell.ReportTable = res.data;
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
return this.$peisAPI.printPre(JSON.stringify(toOutShell));
}
})
.catch(err => {
this.$message.warning(err);
});
},
//
addSuggtion(){
addSuggtion() {
let id = String(new Date().getTime())
let pojo = {
id,
@ -260,19 +290,19 @@ export default {
suggestionContent: '',
}
]
}
}
this.sumDoctorCheck.suggestionList.push(pojo);
},
//
reCheck() {
console.log("parseID('123456198007240000')",parseID('123456198007240000'))
console.log("parseID('123456198007240000')", parseID('123456198007240000'))
let ret = this.optGrant('reCheck')
if (ret) {
alert(ret)
return
}
},
//
@ -292,7 +322,7 @@ export default {
//summaryDate: this.sumDoctorCheck.sumPREdit.summaryDate,
completeFlag: '3'
}
console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
postapi(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
.then((res) => {
console.log("updateSumDoctorCheck", res.data);
@ -321,9 +351,9 @@ export default {
delete e.displayOrder;
})
body.push(item)
});
});
console.log(`/api/app/sumsummaryheader/createsumsummary`, body)
if(body.length < 1) return
if (body.length < 1) return
postapi(`/api/app/sumsummaryheader/createsumsummary`, body)
.then((res) => {
console.log("saveSummary", res.data);
@ -337,7 +367,7 @@ export default {
},
//
saveSuggestion() {
let body = []
@ -351,9 +381,9 @@ export default {
delete e.displayOrder;
})
body.push(item)
});
});
console.log(`/api/app/sumsuggestionheader/createsumsuggestion`, body)
if(body.length < 1) return
if (body.length < 1) return
postapi(`/api/app/sumsuggestionheader/createsumsuggestion`, body)
.then((res) => {
console.log("saveSuggestion", res.data);
@ -407,7 +437,8 @@ export default {
margin-left: 10px;
text-align: center;
}
.btnClass{
width:110px;
.btnClass {
width: 110px;
}
</style>

379
src/views/charge/charge.vue

@ -21,7 +21,7 @@
<div style="display:flex;margin-top:10px;">
<el-radio v-model="query.chargeFlag" label="N">未收费</el-radio>
<el-radio v-model="query.chargeFlag" label="Y">已收费</el-radio>
<el-radio v-model="query.chargeFlag" label="B">退费</el-radio>
<el-radio v-model="query.chargeFlag" label="B">退费</el-radio>
</div>
</div>
<!-- 列表 -->
@ -211,7 +211,7 @@
<div>
<div style="margin-top:5px;font-size:10px;">收费方式</div>
<el-table :data="chargePays" border highlight-current-row size="small"
:height="window.pageHeight > 600 ? (window.pageHeight - 230 - 146) / 2 : 112" >
:height="window.pageHeight > 600 ? (window.pageHeight - 230 - 146) / 2 : 112">
<el-table-column prop="payModeId" label="收费方式" width="180">
<template slot-scope="scope">
<div>{{ dddw(dict.payMode, "id", scope.row.payModeId, "displayName") }}</div>
@ -219,13 +219,13 @@
</el-table-column>
<el-table-column prop="chargeMoney" label="金额">
<template slot-scope="scope">
<el-input type="number" v-model="scope.row.chargeMoney" size="small" @input="inputMoney" />
</template>
<el-input type="number" v-model="scope.row.chargeMoney" size="small" @input="inputMoney" />
</template>
</el-table-column>
<el-table-column prop="cardBillId" label="会员卡">
<template slot-scope="scope">
<el-select v-model="scope.row.cardBillId" placeholder="请选择" size="small"
filterable clearable :disabled="scope.row.payModeId == '05' ? false:true" >
<el-select v-model="scope.row.cardBillId" placeholder="请选择" size="small" filterable clearable
:disabled="scope.row.payModeId == '05' ? false : true">
<el-option v-for="item in cardRegister" :key="item.id" :label="item.idNo" :value="item.id" />
</el-select>
</template>
@ -236,14 +236,16 @@
<div>
<div style="margin-top:5px; font-size:10px;">待收费项目</div>
<el-table :data="asbItemsForFee" border highlight-current-row
:height="window.pageHeight > 600 ? (window.pageHeight - 230 - 146) / 2 : 112"
size="small" @selection-change="handleSelectionChange">
:height="window.pageHeight > 600 ? (window.pageHeight - 230 - 146) / 2 : 112" size="small"
@selection-change="handleSelectionChange" ref="asbItemsForFeeTable">
<el-table-column type="selection" align="center" />
<el-table-column label="已选组合项目" width="120" prop="asbitemName" />
<el-table-column label="标准价格" prop="standardPrice" width="80" align="center" />
<el-table-column label="折扣" prop="discount" width="60">
<template slot-scope="scope">
<el-input type="number" v-model="scope.row.discount" size="small" @input="changeDiscount(scope.$index)"/>
<el-input type="number" v-model="scope.row.discount"
:disabled="scope.row.isCharge == 'Y' ? true : false" size="small"
@input="changeDiscount(scope.row)" />
</template>
</el-table-column>
<el-table-column label="数量" prop="amount" width="50">
@ -253,8 +255,8 @@
</el-table-column>
<el-table-column label="实收价格" prop="chargePrice" width="80">
<template slot-scope="scope">
<el-input type="number" v-model="patientRegister.patientRegisterAbs[scope.$index].chargePrice" size="small"
@input="changePrice(scope.$index)" />
<el-input type="number" v-model="scope.row.chargePrice"
:disabled="scope.row.isCharge == 'Y' ? true : false" size="small" @input="changePrice(scope.row)" />
</template>
</el-table-column>
<el-table-column prop="total" label="金额" width="70" v-if="false" />
@ -265,29 +267,31 @@
<el-option v-for="item in dict.payType" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="checkCompleteFlag" label="状态" align="center">
<template slot-scope="scope">
<div>{{ ldddw(dict.checkCompleteFlag, "id", scope.row.checkCompleteFlag, "displayName") }}</div>
<div>{{ dddw(dict.checkCompleteFlag, "id", scope.row.checkCompleteFlag, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="creatorName" label="登记人" align="center"/>
<el-table-column prop="creationTime" label="登记日期" width="90" align="center"/>
</el-table>
<template slot-scope="scope">
<div>{{ moment(scope.row.creationTime, 'yyyy-MM-DD') }}</div>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="creatorName" label="登记人" align="center" />
<el-table-column prop="creationTime" label="登记日期" width="90" align="center">
<template slot-scope="scope">
<div>{{ moment(scope.row.creationTime, 'yyyy-MM-DD') }}</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
<div class="btnDivClass">
<div class="btnListClass">
<el-button type="primary" class="btnClass">收费</el-button>
<el-button type="primary" class="btnClass" @click="charge" :disabled="query.chargeFlag == 'N' ? false:true">收费</el-button>
</div>
<div class="btnListClass">
<el-button type="danger" class="btnClass" @click="chargeBack" :disabled="query.chargeFlag == 'Y' ? false:true">退费</el-button>
</div>
<div class="btnListClass">
<el-button type="primary" class="btnClass">打印</el-button>
<el-button type="success" class="btnClass" @click="chargePrint('0007', false, form.id)" :disabled="query.chargeFlag == 'B' ? true:false">打印</el-button>
</div>
</div>
</div>
@ -298,7 +302,7 @@
import moment from 'moment';
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate, dddw } from "../../utlis/proFunc";
import { tcdate, dddw, arrayExistObj } from "../../utlis/proFunc";
import PatientRegisterQuery from "../../components/patientRegister/patientRegisterQuery.vue";
import PatientRegisterRefuseList from "../../components/patientRegister/PatientRegisterRefuseList.vue";
@ -311,7 +315,17 @@ export default {
data() {
return {
query: { chargeFlag: 'N' },//
form: {}, //
form: {
id: null,
patientRegisterId: null,
invoiceNo: '',
invoiceOrgName: '',
chargeFlag: '1',
discount: 0,
total: 0, //
preTotal: 0, //
balance: 0, //
}, //
rules: {
invoiceNo: [
{ required: true, message: "请填写发票/收据号", trigger: "blur" },
@ -354,9 +368,9 @@ export default {
},
chargePays: [], //
asbItemsForFee: [], //
cardRegister:[{id:'00000000-0000-0000-0000-000000000000',idNo:'0001'}], //
cardRegisterAll:[], //
selectedData: [], //
cardRegister: [{ id: '00000000-0000-0000-0000-000000000000', idNo: '0001' }], //
cardRegisterAll: [], //
};
},
@ -374,7 +388,7 @@ export default {
methods: {
...mapActions(["getCustomerOrgGroup"]),
dddw,moment,
dddw, moment,
//
Query() {
@ -382,30 +396,320 @@ export default {
},
//
rowClick(row){
rowClick(row) {
this.getAsbItemsForFee(row.patientRegisterId, row.chargeId);
},
//
async getAsbItemsForFee(patientRegisterId, chargeId) {
//
this.asbItemsForFee = [];
if (this.query.chargeFlag = 'N') {
getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${patientRegisterId}`)
.then(res => {
if (res.code == 1) {
this.asbItemsForFee = res.data;
this.asbItemsForFee.forEach(e => {
e.chargePriceOri = e.chargePrice;
e.standTotal = e.amount * e.standardPrice;
e.total = e.amount * e.chargePrice;
return e
});
this.toCharge(patientRegisterId, chargeId);
}
});
} else {
//
getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${chargeId}`)
.then(res => {
if (res.code == 1) {
this.asbItemsForFee = res.data;
}
});
}
},
//
inputMoney(){
//
toCharge() {
//
this.selectedData = this.asbItemsForFee;
this.$nextTick(function () {
// let rows = []
// for (let m = 0; m < this.selectedData.length; m++) {
// for (let n = 0; n < this.tableData.length; n++) {
// if (this.selectedData[m].id === this.tableData[n].id) {
// rows.push(this.tableData[n])
// }
// }
// }
this.selectedData.forEach(row => {
this.$refs['asbItemsForFeeTable'].toggleRowSelection(row)
})
});
this.form.patientRegisterId = patientRegisterId;
},
//
sumTotal() {
let total = Number(0), totalOri = Number(0);
this.selectedData.forEach(e => {
totalOri += Number(e.amount * e.chargePriceOri); //
total += Number(e.amount * e.chargePrice); //
});
this.form.total = total;
if (totalOri == 0) {
this.form.discount = 100;
} else {
this.form.discount = Math.round(total / totalOri, 2);
}
},
//
handleSelectionChange(){
//
discountToDetails() {
let discount = this.form.discount;
let totalOri = Number(0), totalCompute = Number(0), totalPlan = Number(0);
let lfind = -1;
this.selectedData.forEach(e => {
totalOri += Number(e.amount * e.chargePriceOri); //
lfind = arrayExistObj(this.asbItemsForFee, 'id', e.id)
if (lfind > -1 && e.chargePriceOri != 0) {
this.asbItemsForFee[lfind].discount = discount;
this.asbItemsForFee[lfind].chargePrice = Math.round(e.chargePriceOri * discount, 2);
totalCompute += Number(this.asbItemsForFee[lfind].chargePrice * e.amount);
}
});
totalPlan = Math.round(totalOri * discount, 2);
this.form.total = totalPlan;
// ()
this.handleBalance(totalPlan, totalCompute);
},
//
totalToDetails() {
let discount = 0;
let totalOri = Number(0), totalCompute = Number(0), totalPlan = Number(this.form.total);
let lfind = -1;
this.selectedData.forEach(e => {
totalOri += Number(e.amount * e.chargePriceOri); //
});
discount = Math.round(totalPlan / totalOri, 2);
//
this.selectedData.forEach(e => {
lfind = arrayExistObj(this.asbItemsForFee, 'id', e.id);
if (lfind > -1) {
this.asbItemsForFee[lfind].chargePrice = Math.round(this.asbItemsForFee[lfind].chargePrice * discount, 2);
totalCompute += this.asbItemsForFee[lfind].chargePrice * e.amount;
}
});
// ()
this.handleBalance(totalPlan, totalCompute);
},
//
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;
break;
}
}
}
},
//
inputMoney() {
let total = Number(0);
this.chargePays.forEach(e => {
total += Number(e.chargeMoney);
});
if (total > this.form.total) this.$message.warning("输入金额超过总金额");
},
//
handleSelectionChange(v) {
this.selectedData = v;
this.sumTotal();
},
//
changeDiscount(row){
changeDiscount(row) {
let total = this.form.total;
let totalDetailsOri = row.amount * row.chargePrice;
let totalDetailsCur = Number(0);
row.chargePrice = Math.round(row.discount * row.chargePriceOri, 2);
let lfind = arrayExistObj(this.selectedData, 'id', row.id);
if (lfind > -1) {
totalDetailsCur = row.amount * row.chargePrice;
this.form.total = total + totalDetailsCur - totalDetailsOri;
}
},
//
changePrice(row){
changePrice(row) {
if (row.chargePriceOri != 0) {
row.discount = Math.round(row.chargePrice / row.chargePriceOri, 2);
}
row.chargePrice = Math.round(row.discount * row.chargePriceOri, 2);
let lfind = arrayExistObj(this.selectedData, 'id', row.id);
if (lfind > -1) {
this.selectedData[lfind].discount = row.discount;
this.selectedData[lfind].chargePrice = row.chargePrice;
}
this.sumTotal();
},
//
charge() {
let total = Number(0);
let msg = '';
let form = {};
let chargePays = [];
let chargeAsbitem = [];
this.chargePays.forEach(e => {
total += Number(e.chargeMoney);
if (e.payModeId == '05') {
if (!e.cardBillId) msg = '请先择会员卡号';
} else {
e.cardBillId = null;
}
return e;
});
if (msg) {
this.$message.warning(msg);
return;
}
if (total != this.form.total) {
this.$message.warning("收费方式合计金额与收费总金额不符");
return;
}
this.$refs[form].validate((valid) => {
if (!valid) {
this.$message.warning("数据未通过校验!");
return;
}
});
this.chargePays.forEach(e => {
if (e.chargeMoney) {
chargePays.push(e);
}
});
form = {
patientRegisterId: this.form.patientRegisterId,
invoiceNo: this.form.invoiceNo,
invoiceOrgName: this.form.invoiceOrgName,
chargeFlag: this.form.chargeFlag,
};
this.selectedData.forEach(e => {
chargeAsbitem.push({
asbitemId: e.asbitemId,
chargePrice: e.chargePrice,
amount: e.amount,
registerAsbitemId: e.id,
});
});
},
//退
chargeBack() {
let chargeId = this.form.id;
let msg = '';
let chargeBackPays = [];
this.chargePays.forEach(e => {
total += Number(e.chargeMoney);
if (e.payModeId == '05') {
if (!e.cardBillId) msg = '请先择会员卡号';
} else {
e.cardBillId = null;
}
return e;
});
if (msg) {
this.$message.warning(msg);
return;
}
if (total != this.form.total) {
this.$message.warning("退费方式合计金额与退费总金额不符");
return;
}
this.chargePays.forEach(e => {
if (e.chargeMoney) {
chargeBackPays.push(e);
}
});
},
//
chargePrint(ReportCode, isPreview, chargeId) {
if (chargeId.length < 1) {
this.$message.info("人员信息尚未保存,不可执行此操作!");
return;
}
let token = localStorage.getItem('token');
let user = localStorage.getItem('user');
let toOutShell = {
ReportCode, token,
preViewCanPrint: 'Y',
Parameters: [
{ Name: 'printer', Value: user },
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' },
],
};
if (isPreview) {
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${chargeId}`)
.then((res) => {
if (res.code != -1) {
toOutShell.ReportTable = res.data;
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
return this.$peisAPI.printPre(JSON.stringify(toOutShell));
}
})
.catch(err => {
this.$message.warning(err);
});
} else {
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${chargeId}`)
.then((res) => {
if (res.code != -1) {
toOutShell.ReportTable = res.data;
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
return this.$peisAPI.print(JSON.stringify(toOutShell));
}
})
.catch(err => {
this.$message.warning(err);
});
}
},
//
dictInit() {
@ -551,6 +855,7 @@ export default {
padding-left: 5px;
padding-right: 15px;
}
::v-deep input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none !important;

Loading…
Cancel
Save