Browse Source

charge

master
pengjun 4 weeks ago
parent
commit
1aa2d1c898
  1. 3
      src/components/customerOrg/customerOrgEdit.vue
  2. 6
      src/components/doctorCheck/CheckPicture.vue
  3. 9
      src/components/patientRegister/PatientRegisterEdit.vue
  4. 9
      src/components/patientRegister/PatientRegisterList.vue
  5. 4
      src/components/patientRegister/patientRegisterQuery.vue
  6. 260
      src/views/charge/charge.vue

3
src/components/customerOrg/customerOrgEdit.vue

@ -249,7 +249,8 @@ export default {
lastModifierName: "", lastModifierName: "",
lastModificationTime: null, lastModificationTime: null,
salesPerson: "", salesPerson: "",
salesPersonPhone: ""
salesPersonPhone: "",
medicalTypeId:''
}, // }, //
formInit: {}, formInit: {},
rules: { rules: {

6
src/components/doctorCheck/CheckPicture.vue

@ -362,17 +362,17 @@ export default {
let image = curImag.pictureFilename.indexOf('http') > -1 let image = curImag.pictureFilename.indexOf('http') > -1
? curImag.pictureFilename ? curImag.pictureFilename
: (this.sysConfig.pacsApi || this.sysConfig.apiurl) + curImag.pictureFilename; : (this.sysConfig.pacsApi || this.sysConfig.apiurl) + curImag.pictureFilename;
srcList.push(image)
srcList.push(image + `?r=${Math.random()}`)
let lfind = arrayExistObj(oriList, 'id', curImag.id) let lfind = arrayExistObj(oriList, 'id', curImag.id)
if (lfind > -1) { if (lfind > -1) {
for (let i = lfind + 1; i < oriList.length; i++) { for (let i = lfind + 1; i < oriList.length; i++) {
let e = oriList[i]; let e = oriList[i];
image = this.imageFilePlus(e.pictureFilename)
image = this.imageFilePlus(e.pictureFilename + `?r=${Math.random()}`)
srcList.push(image) srcList.push(image)
} }
for (let index = 0; index < lfind; index++) { for (let index = 0; index < lfind; index++) {
let e = oriList[index]; let e = oriList[index];
image = this.imageFilePlus(e.pictureFilename)
image = this.imageFilePlus(e.pictureFilename + `?r=${Math.random()}`)
srcList.push(image) srcList.push(image)
} }
} }

9
src/components/patientRegister/PatientRegisterEdit.vue

@ -1397,6 +1397,13 @@ export default {
}) })
}, },
// ID
getMedicalTypeByOrg(orgId){
return new Promise((resolve, reject) => {
postapi('/api/app/Customerorg/GetMedicalTypeIdByCustomerOrgId')
})
},
handleFormData() { handleFormData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// //
@ -1477,7 +1484,7 @@ export default {
// //
if (customerOrgParentId == this.dict.personOrgId) { if (customerOrgParentId == this.dict.personOrgId) {
this.patientRegister.customerOrgGroup = [] this.patientRegister.customerOrgGroup = []
}
}
if (this.form.customerOrgParentId == this.dict.personOrgId) { if (this.form.customerOrgParentId == this.dict.personOrgId) {
this.changeMedicalPackageId() this.changeMedicalPackageId()

9
src/components/patientRegister/PatientRegisterList.vue

@ -429,7 +429,7 @@
<!--云胶片二维码--> <!--云胶片二维码-->
<el-dialog :visible.sync="qrCode.winDisplay" title="云胶片二维码" width="400px" style="text-align:center"> <el-dialog :visible.sync="qrCode.winDisplay" title="云胶片二维码" width="400px" style="text-align:center">
<!--<canvas ref="canvas"></canvas>--> <!--<canvas ref="canvas"></canvas>-->
<img width="100%" :src="qrCode.url">
<img width="100%" :src="qrCode.personUrl">
<div style="font-size: 16px;">{{ qrCode.barcodeNo + ' ' + qrCode.patientName }}</div> <div style="font-size: 16px;">{{ qrCode.barcodeNo + ' ' + qrCode.patientName }}</div>
</el-dialog> </el-dialog>
@ -673,7 +673,8 @@ export default {
merge_lis_pacs_label: "0", //0 01 merge_lis_pacs_label: "0", //0 01
qrCode: { qrCode: {
winDisplay: false, // winDisplay: false, //
url: 'https://ccjktj.cn:5081/', //
url: 'https://ccjktj.cn:5081/', //
personUrl:'', //
barcodeNo: '条码号', barcodeNo: '条码号',
patientName: '姓 名' patientName: '姓 名'
}, },
@ -2368,7 +2369,7 @@ export default {
//let canvas = this.$refs.canvas; //let canvas = this.$refs.canvas;
let url = `${this.qrCode.url}?reportparam=条码号&mrn=条码号` //`https://ccjktj.cn:5081/?reportparam=条码号&mrn=条码号` let url = `${this.qrCode.url}?reportparam=条码号&mrn=条码号` //`https://ccjktj.cn:5081/?reportparam=条码号&mrn=条码号`
if (row?.patientRegisterNo) { if (row?.patientRegisterNo) {
url = `${this.qrCode.url}?reportparam=${row.checkRequestNo}&mrn=${row.checkRequestNo}`
url = `${this.qrCode.url}?reportparam=${row.patientRegisterNo}&mrn=${row.patientRegisterNo}`
this.qrCode.barcodeNo = row.patientRegisterNo this.qrCode.barcodeNo = row.patientRegisterNo
} }
if (row?.patientName) { if (row?.patientName) {
@ -2395,7 +2396,7 @@ export default {
QRCode.toDataURL(url, { errorCorrectionLevel: 'H' }) QRCode.toDataURL(url, { errorCorrectionLevel: 'H' })
.then(res => { .then(res => {
console.log(res) console.log(res)
this.qrCode.url = res
this.qrCode.personUrl = res
this.qrCode.winDisplay = true this.qrCode.winDisplay = true
}) })
.catch(err => { .catch(err => {

4
src/components/patientRegister/patientRegisterQuery.vue

@ -68,11 +68,15 @@
<el-tooltip class="item" effect="dark" content="单位作为查询条件" placement="top"> <el-tooltip class="item" effect="dark" content="单位作为查询条件" placement="top">
<el-checkbox v-model="patientRegister.query.customerOrgFlag"></el-checkbox> <el-checkbox v-model="patientRegister.query.customerOrgFlag"></el-checkbox>
</el-tooltip> </el-tooltip>
<el-input placeholder="请选择单位" v-model="patientRegister.query.customerOrgName" size="small" disabled
style="width: 120px" />
<!--
<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 :disabled="orgEnable == 'Y' ? false : true" size="small"
style="width:120px;"> style="width:120px;">
</el-cascader> </el-cascader>
-->
</div> </div>
<div v-show="dispTimes" class="query"> <div v-show="dispTimes" class="query">
<span class="spanClass">次数</span> <span class="spanClass">次数</span>

260
src/views/charge/charge.vue

@ -13,28 +13,44 @@
<div style="height: 60px;padding: 10px;border-radius: 8px;background-color: #fff;margin-bottom: 10px;"> <div style="height: 60px;padding: 10px;border-radius: 8px;background-color: #fff;margin-bottom: 10px;">
<div style="display:flex;"> <div style="display:flex;">
<div> <div>
<span>登记日期</span>
<span>{{ dateTypeName }}日期</span>
<el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small" <el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small"
style="width:90px;" :picker-options="pickerOptions" /> style="width:90px;" :picker-options="pickerOptions" />
<span style="margin: 0 3px;"></span> <span style="margin: 0 3px;"></span>
<el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small" <el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small"
style="width:90px;" :picker-options="pickerOptions" /> style="width:90px;" :picker-options="pickerOptions" />
</div> </div>
<div style="margin-left:10px;">
<el-button type="primary" class="commonbutton" @click="Query" size="small"
style="width:95px;">查询</el-button>
<div>
<span class="query">条码号</span>
<el-input ref="tmh" placeholder="条码号" v-model="query.patientRegisterNo" size="small"
style="width: 120px;" clearable />
</div>
<div>
<span class="query">档案号</span>
<el-input placeholder="档案号" v-model="query.patientNo" size="small" style="width: 90px;" clearable />
</div> </div>
</div> </div>
<div style="display:flex;">
<el-radio-group v-model="query.chargeFlag" @input="Query" size="mini" style="margin-top:8px;">
<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:20px;">
<span>发票号</span>
<el-input placeholder="发票/收据号" v-model="query.invoiceNo" size="small"
style="margin-left: 3px; width: 100px;" clearable @change="Query('invoiceNo')" />
<div style="display:flex;justify-content: space-between;">
<div style="display:flex;">
<div>
<span>姓名</span>
<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 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 />
</div>
</div>
<div>
<el-button type="primary" class="commonbutton" @click="btnQuery" size="small"
style="width:60px;">查询</el-button>
</div> </div>
</div> </div>
</div> </div>
@ -45,7 +61,22 @@
<!-- <!--
<el-table-column prop="patientRegisterId" label="体检记录ID" /> <el-table-column prop="patientRegisterId" label="体检记录ID" />
--> -->
<el-table-column prop="customerOrgParentName" label="单位" width="180">
<el-table-column type="index" label="序号" width="40" align="center" />
<el-table-column v-if="query.chargeFlag == 'Y'" label="收费时间" prop="chargeTime" width="140"
align="center" />
<el-table-column v-if="query.chargeFlag == 'Y'" label="收费人" prop="chargeName" width="80"
align="center" />
<el-table-column v-if="query.chargeFlag == 'Y'" label="收费金额" prop="chargeMoney" width="80"
align="center" />
<el-table-column v-if="query.chargeFlag == 'B'" label="退费时间" prop="chargeBackTime" width="140"
align="center" />
<el-table-column v-if="query.chargeFlag == 'B'" label="退费人" prop="chargeBackName" width="80"
align="center" />
<el-table-column v-if="query.chargeFlag == 'B'" label="退费金额" prop="chargeBackMoney" width="80"
align="center" />
<el-table-column prop="customerOrgParentName" label="单位" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName :
scope.row.customerOrgName }} scope.row.customerOrgName }}
@ -53,12 +84,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="patientName" label="姓名" /> <el-table-column prop="patientName" label="姓名" />
<el-table-column prop="sexId" label="性别" />
<el-table-column prop="age" label="年龄" />
<el-table-column prop="patientRegisterNo" label="条码号" width="150" />
<el-table-column prop="patientNo" label="档案号" />
<el-table-column prop="medicalTimes" label="体检次数" />
<el-table-column prop="isVip" label="是否VIP">
<el-table-column prop="sexId" label="性别" width="40" align="center" />
<el-table-column prop="age" label="年龄" width="40" align="center" />
<el-table-column prop="patientRegisterNo" label="条码号" width="120" align="center" />
<el-table-column prop="patientNo" label="档案号" width="80" align="center" />
<el-table-column prop="medicalTimes" label="体检次数" width="80" align="center" />
<el-table-column prop="isVip" label="VIP" width="30" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div> <div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
</template> </template>
@ -78,25 +109,26 @@
</el-table> </el-table>
</div> </div>
</div> </div>
<!-- 收费操作 --> <!-- 收费操作 -->
<div :style="`display: block;margin-left:10px;width: ${Math.floor(bodyWidth * 2 / 5)}px;`"> <div :style="`display: block;margin-left:10px;width: ${Math.floor(bodyWidth * 2 / 5)}px;`">
<!-- 查询信息 -->
<!-- 人员信息 -->
<div style="height: 40px; background-color: #fff;border-radius: 8px;margin-bottom: 10px;"> <div style="height: 40px; background-color: #fff;border-radius: 8px;margin-bottom: 10px;">
<div style="display: flex; flex-wrap: wrap;height:40px; width: 100%;align-items: center;"> <div style="display: flex; flex-wrap: wrap;height:40px; width: 100%;align-items: center;">
<div class="query"> <div class="query">
<span>条码号</span> <span>条码号</span>
<el-input placeholder="条码号" v-model="query.patientRegisterNo" size="small"
style="margin-left: 3px; width: 120px;" clearable @change="Query('patientRegisterNo')" />
<el-input v-model="info.patientRegisterNo" size="small"
style="margin-left: 3px; width: 120px;" disabled />
</div> </div>
<div class="query"> <div class="query">
<span>档案号</span> <span>档案号</span>
<el-input placeholder="档案号" v-model="query.patientNo" size="small"
style="margin-left: 3px; width: 80px;" clearable @change="Query('patientNo')" />
<el-input v-model="info.patientNo" size="small"
style="margin-left: 3px; width: 90px;" disabled />
</div> </div>
<div class="query"> <div class="query">
<span>姓名</span> <span>姓名</span>
<el-input placeholder="姓名" v-model="query.patientName" size="small"
style="margin-left: 3px; width: 70px;" disabled @change="Query" />
<el-input v-model="info.patientName" size="small"
style="margin-left: 3px; width: 80px;" disabled />
</div> </div>
</div> </div>
</div> </div>
@ -333,7 +365,7 @@
import moment from 'moment'; import moment from 'moment';
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate, dddw, arrayExistObj,arrayExistObjPos, deepCopy } from "../../utlis/proFunc";
import { tcdate, dddw, arrayExistObj, arrayExistObjPos, deepCopy } from "../../utlis/proFunc";
import PatientRegisterQuery from "../../components/patientRegister/patientRegisterQuery.vue"; import PatientRegisterQuery from "../../components/patientRegister/patientRegisterQuery.vue";
import PatientRegisterRefuseList from "../../components/patientRegister/PatientRegisterRefuseList.vue"; import PatientRegisterRefuseList from "../../components/patientRegister/PatientRegisterRefuseList.vue";
@ -359,6 +391,13 @@ export default {
invoiceNo: '', invoiceNo: '',
patientName: '', patientName: '',
},// },//
info:{
patientRegisterNo: '',
patientNo: '',
patientName:''
},
patientList: [],// patientList: [],//
formInit: {}, formInit: {},
form: { form: {
@ -444,19 +483,37 @@ export default {
// //
mounted() { mounted() {
//this.enterToQuery()
if (this.patientRegisterNo) {
this.Query('patientRegisterNo');
} else {
this.Query();
this.enterToQuery()
if (this.patientRegisterNo){
this.query.patientRegisterNo = this.patientRegisterNo
this.query.chargeFlag = 'N'
} }
this.btnQuery();
}, },
computed: { computed: {
...mapState(["pickerOptions", "window", "dict", "dataTransOpts", "patientRegister", "customerOrg"]), ...mapState(["pickerOptions", "window", "dict", "dataTransOpts", "patientRegister", "customerOrg"]),
dateTypeName() {
let ret = '登记'
switch (this.query.chargeFlag) {
case 'N':
break;
case 'Y':
ret = '收费'
break;
case 'B':
ret = '退费'
break;
default:
break;
}
return ret
},
tableListHeight() { tableListHeight() {
let tempH = this.window.pageHeight < 600 ? 600 : this.window.pageHeight let tempH = this.window.pageHeight < 600 ? 600 : this.window.pageHeight
return tempH - 175 - 30 - 35 return tempH - 175 - 30 - 35
@ -474,8 +531,8 @@ export default {
dddw, moment, dddw, moment,
// //
Query(type) {
let url = '', ltype = type, body = {};
btnQuery() {
let url = '', body = {};
// { // {
@ -488,36 +545,28 @@ export default {
// "startDate": "string", // "startDate": "string",
// "endDate": "string", // "endDate": "string",
// "maxResultCount": 0 // "maxResultCount": 0
// }
if (this.patientRegisterNo) {
this.query.patientRegisterNo = this.patientRegisterNo
ltype = 'patientRegisterNo'
}
// }
console.log('query', ltype, this.query, this.patientRegisterNo);
//console.log('query', this.query);
if (ltype == 'patientRegisterNo') {
if (!this.query.patientRegisterNo) return;
if(this.query.patientRegisterNo){
body = { patientRegisterNo: this.query.patientRegisterNo }; body = { patientRegisterNo: this.query.patientRegisterNo };
} else if (ltype == 'patientNo') {
if (!this.query.patientNo) return;
}else if(this.query.patientNo){
body = { patientNo: this.query.patientNo }; body = { patientNo: this.query.patientNo };
} else if (ltype == 'invoiceNo' && this.query.chargeFlag != 'N') {
if (!this.query.invoiceNo) return;
}else if(this.query.invoiceNo && this.query.chargeFlag != 'N'){
body = { invoiceNo: this.query.invoiceNo }; body = { invoiceNo: this.query.invoiceNo };
} else {
}else{
if (this.query.startDate && this.query.endDate) { if (this.query.startDate && this.query.endDate) {
body.startDate = moment(this.query.startDate).format("yyyy-MM-DD") body.startDate = moment(this.query.startDate).format("yyyy-MM-DD")
body.endDate = moment(this.query.endDate).format("yyyy-MM-DD")
body.endDate = moment(this.query.endDate).format("yyyy-MM-DD")
if (body.startDate > body.endDate) { if (body.startDate > body.endDate) {
this.$message.warning("起始日期不能大于截止日期,数据校验不通过!") this.$message.warning("起始日期不能大于截止日期,数据校验不通过!")
return return
} }
if(this.query.patientName) body.patientName = this.query.patientName
} }
} }
switch (this.query.chargeFlag) { switch (this.query.chargeFlag) {
case 'Y': case 'Y':
// //
@ -533,6 +582,14 @@ export default {
break; break;
} }
//
this.info.patientName = ''
this.info.patientNo = ''
this.info.patientRegisterNo = ''
this.form = Object.assign({}, this.formInit)
this.chargePays = []
this.asbItemsForFee = []
// const loading = this.$loading({ // const loading = this.$loading({
// lock: true, // lock: true,
// text: 'Loading', // text: 'Loading',
@ -570,9 +627,10 @@ export default {
// //
rowClick(row) { rowClick(row) {
this.query.patientRegisterNo = row.patientRegisterNo;
this.query.patientName = row.patientName;
this.query.patientNo = row.patientNo;
this.info.patientRegisterNo = row.patientRegisterNo;
this.info.patientName = row.patientName;
this.info.patientNo = row.patientNo;
this.chargePays = deepCopy(this.chargePaysInit); this.chargePays = deepCopy(this.chargePaysInit);
//console.log(this.chargePays, this.chargePaysInit); //console.log(this.chargePays, this.chargePaysInit);
@ -593,10 +651,8 @@ export default {
this.form.invoiceOrgName = row.patientName; this.form.invoiceOrgName = row.patientName;
} }
//
this.getCardRegister(row.idNo);
// ()
//this.getCardRegister(row.idNo);
switch (this.query.chargeFlag) { switch (this.query.chargeFlag) {
case 'N': case 'N':
@ -624,7 +680,7 @@ export default {
this.asbItemsForFee = res.data; this.asbItemsForFee = res.data;
for (let i = this.asbItemsForFee.length - 1; i >= 0; i--) { for (let i = this.asbItemsForFee.length - 1; i >= 0; i--) {
if (this.asbItemsForFee[i].isCharge == 'Y' || this.asbItemsForFee[i].payTypeFlag !== '0' ) {
if (this.asbItemsForFee[i].isCharge == 'Y' || this.asbItemsForFee[i].payTypeFlag !== '0') {
this.asbItemsForFee.splice(i, 1); this.asbItemsForFee.splice(i, 1);
continue; continue;
} }
@ -671,8 +727,8 @@ export default {
}, },
// //
brushCard(index){
this.chargePays[index].cardNo = ''
brushCard(index) {
this.chargePays[index].cardNo = ''
this.chargePays[index].cardRegisterId = '' this.chargePays[index].cardRegisterId = ''
this.chargePays[index].chargeMoney = 0 this.chargePays[index].chargeMoney = 0
@ -683,7 +739,7 @@ export default {
this.inputMoney() this.inputMoney()
}, },
// //
getCardId(index) { getCardId(index) {
@ -723,29 +779,29 @@ export default {
// //
btnOkCard() { btnOkCard() {
// //
let lfind = arrayExistObj(this.chargePays,'cardRegisterId',this.cardChoosed.id)
if(lfind > -1){
this.$message.warning({showClose:true,message:'单次收费不允重复同一张卡!'})
let lfind = arrayExistObj(this.chargePays, 'cardRegisterId', this.cardChoosed.id)
if (lfind > -1) {
this.$message.warning({ showClose: true, message: '单次收费不允重复同一张卡!' })
return return
} }
// //
let diffDiscount = false // let diffDiscount = false //
let preDiscount = 100 let preDiscount = 100
let curDiscount = this.cardChoosed.discount||100
let curDiscount = this.cardChoosed.discount || 100
this.chargePays.forEach(e => { this.chargePays.forEach(e => {
if(e.payModeId == '05' && e.discount){
if(Number(e.discount) !== Number(curDiscount)){
if (e.payModeId == '05' && e.discount) {
if (Number(e.discount) !== Number(curDiscount)) {
preDiscount = e.discount preDiscount = e.discount
diffDiscount = true diffDiscount = true
} }
} }
}); });
// //
if(diffDiscount){
this.$message.warning({showClose:true,message:`当前所选卡折扣 ${curDiscount} 与 上次所选卡折扣 ${preDiscount} 不同,不可执行此操作`})
if (diffDiscount) {
this.$message.warning({ showClose: true, message: `当前所选卡折扣 ${curDiscount} 与 上次所选卡折扣 ${preDiscount} 不同,不可执行此操作` })
return return
} }
this.chargePays[this.cardSeq].cardNo = this.cardChoosed.cardNo + ' 余:' + this.cardChoosed.cardBalance + ' 折:' + curDiscount this.chargePays[this.cardSeq].cardNo = this.cardChoosed.cardNo + ' 余:' + this.cardChoosed.cardBalance + ' 折:' + curDiscount
this.chargePays[this.cardSeq].discount = curDiscount this.chargePays[this.cardSeq].discount = curDiscount
this.chargePays[this.cardSeq].cardBalance = this.cardChoosed.cardBalance this.chargePays[this.cardSeq].cardBalance = this.cardChoosed.cardBalance
@ -794,10 +850,10 @@ export default {
getapi(`/api/app/chargepay/getchargepayinchargeid?ChargeId=${ChargeId}`).then(res => { getapi(`/api/app/chargepay/getchargepayinchargeid?ChargeId=${ChargeId}`).then(res => {
if (res.code != - 1) { if (res.code != - 1) {
res.data.forEach(e => { res.data.forEach(e => {
if(curPayModeId != e.payModeId) lfind = -1
if (curPayModeId != e.payModeId) lfind = -1
lfind++ lfind++
console.log('lfind',lfind)
lfind = arrayExistObjPos(this.chargePays, 'payModeId', e.payModeId,lfind);
console.log('lfind', lfind)
lfind = arrayExistObjPos(this.chargePays, 'payModeId', e.payModeId, lfind);
if (lfind > - 1) { if (lfind > - 1) {
this.chargePays[lfind].chargeMoney = e.chargeMoney; this.chargePays[lfind].chargeMoney = e.chargeMoney;
this.chargePays[lfind].cardRegisterId = e.cardRegisterId; this.chargePays[lfind].cardRegisterId = e.cardRegisterId;
@ -815,10 +871,10 @@ export default {
getapi(`/api/app/chargebackpay/getchargebackpayinchargebackid?ChargeBackId=${ChargeBackId}`).then(res => { getapi(`/api/app/chargebackpay/getchargebackpayinchargebackid?ChargeBackId=${ChargeBackId}`).then(res => {
if (res.code != - 1) { if (res.code != - 1) {
res.data.forEach(e => { res.data.forEach(e => {
if(curPayModeId != e.payModeId) lfind = -1
if (curPayModeId != e.payModeId) lfind = -1
lfind++ lfind++
console.log('lfind',lfind)
lfind = arrayExistObjPos(this.chargePays, 'payModeId', e.payModeId,lfind);
console.log('lfind', lfind)
lfind = arrayExistObjPos(this.chargePays, 'payModeId', e.payModeId, lfind);
if (lfind > - 1) { if (lfind > - 1) {
this.chargePays[lfind].chargeMoney = e.backMoeny; this.chargePays[lfind].chargeMoney = e.backMoeny;
this.chargePays[lfind].cardRegisterId = e.cardRegisterId; this.chargePays[lfind].cardRegisterId = e.cardRegisterId;
@ -952,14 +1008,14 @@ export default {
unCashTotal += Number(e.chargeMoney); unCashTotal += Number(e.chargeMoney);
} }
if(e.payModeId == '05'){
if(Number(e.cardBalance) < Number(e.chargeMoney)){
if (e.payModeId == '05') {
if (Number(e.cardBalance) < Number(e.chargeMoney)) {
err = `会员卡【${e.cardNo}】 余额不足` err = `会员卡【${e.cardNo}】 余额不足`
} }
} }
}); });
if(err){
this.$message.warning({showClose:true,message:err})
if (err) {
this.$message.warning({ showClose: true, message: err })
return return
} }
this.form.preTotal = cashTotal + unCashTotal this.form.preTotal = cashTotal + unCashTotal
@ -1033,7 +1089,7 @@ export default {
if (e.payModeId == '05' && e.chargeMoney) { if (e.payModeId == '05' && e.chargeMoney) {
//console.log(e.payModeId,e.chargeMoney,e.cardRegisterId); //console.log(e.payModeId,e.chargeMoney,e.cardRegisterId);
if (!e.cardRegisterId) msg = dddw(this.dict.payMode, "id", e.payModeId, "displayName") + '付费,必需选择会员卡号'; if (!e.cardRegisterId) msg = dddw(this.dict.payMode, "id", e.payModeId, "displayName") + '付费,必需选择会员卡号';
if(Number(e.cardBalance) < Number(e.chargeMoney)) msg = `会员卡【${e.cardNo}】 余额不足`
if (Number(e.cardBalance) < Number(e.chargeMoney)) msg = `会员卡【${e.cardNo}】 余额不足`
} else { } else {
e.cardRegisterId = null; e.cardRegisterId = null;
} }
@ -1055,7 +1111,7 @@ export default {
this.$message.warning("收费方式合计收款不可小于应收金额!"); this.$message.warning("收费方式合计收款不可小于应收金额!");
return; return;
} }
this.chargePays.forEach(e => { this.chargePays.forEach(e => {
if (e.chargeMoney) { if (e.chargeMoney) {
if (e.payModeId == '01') { if (e.payModeId == '01') {
@ -1114,22 +1170,22 @@ export default {
//console.log('body',body); //console.log('body',body);
postapi('/api/app/registerasbitem/registerasbitemcharge', body).then(res => { postapi('/api/app/registerasbitem/registerasbitemcharge', body).then(res => {
if (res.code != -1) { if (res.code != -1) {
this.form.id = res.data.chargeId; // this.form.id = res.data.chargeId; //
//
this.$confirm("操作成功, 是否打印发票?", "提示", { this.$confirm("操作成功, 是否打印发票?", "提示", {
confirmButtonText: "是", confirmButtonText: "是",
cancelButtonText: "否", cancelButtonText: "否",
type: "warning", type: "warning",
}).then(() => { }).then(() => {
this.chargePrint('0007', false, res.data.chargeId)
this.chargePrint('0007', false, res.data.chargeId)
setTimeout(() => { setTimeout(() => {
this.Query();
this.btnQuery();
}, 1000) }, 1000)
}).catch((err) => { }).catch((err) => {
if (err == "cancel") { if (err == "cancel") {
//this.$message.info(""); //this.$message.info("");
this.Query();
this.btnQuery();
} }
}); });
} }
@ -1207,7 +1263,7 @@ export default {
if (res.code != -1) { if (res.code != -1) {
console.log("操作成功!"); console.log("操作成功!");
this.form.chargeFlag = '1'; //退 this.form.chargeFlag = '1'; //退
this.Query();
this.btnQuery();
} }
}); });
@ -1448,13 +1504,13 @@ export default {
// //
this.chargePaysInit = []; this.chargePaysInit = [];
this.dict.payMode.forEach(e => { this.dict.payMode.forEach(e => {
if(e.id == '05'){
if (e.id == '05') {
for (let index = 0; index < this.charge_normal_card; index++) { for (let index = 0; index < this.charge_normal_card; index++) {
this.chargePaysInit.push({ chargeId: null, payModeId: e.id, chargeMoney: 0, cardBillId: null, cardRegisterId: '', cardNo: '' })
this.chargePaysInit.push({ chargeId: null, payModeId: e.id, chargeMoney: 0, cardBillId: null, cardRegisterId: '', cardNo: '' })
} }
}else{
} else {
this.chargePaysInit.push({ chargeId: null, payModeId: e.id, chargeMoney: 0, cardBillId: null, cardRegisterId: '', cardNo: '' }) this.chargePaysInit.push({ chargeId: null, payModeId: e.id, chargeMoney: 0, cardBillId: null, cardRegisterId: '', cardNo: '' })
}
}
}); });
this.chargePays = deepCopy(this.chargePaysInit); this.chargePays = deepCopy(this.chargePaysInit);
} }
@ -1486,9 +1542,15 @@ export default {
console.log(input.getAttribute('placeholder'), input.value) console.log(input.getAttribute('placeholder'), input.value)
let placeholder = input.getAttribute('placeholder') let placeholder = input.getAttribute('placeholder')
switch (placeholder) { switch (placeholder) {
case '条码号':
case '档案号':
case '发票/收据号':
if (input.value) this.btnQuery()
input.select()
break;
case '卡号': case '卡号':
if (input.value) this.btnQueryCard() if (input.value) this.btnQueryCard()
//input.select()
input.select()
break; break;
} }
} }
@ -1515,13 +1577,15 @@ export default {
//() //()
watch: { watch: {
//
"dataTransOpts.refresh.charge.S": { "dataTransOpts.refresh.charge.S": {
//immediate: true, // //immediate: true, //
// // deep: true, // // // deep: true, //
handler(newVal, oldVal) { handler(newVal, oldVal) {
console.log(`watch: 收费 newVal: ${newVal}, oldVal: ${oldVal}, 人员条码号: `, this.patientRegisterNo)
console.log(`watch: 收费 newVal: ${newVal}, oldVal: ${oldVal}, 人员条码号: `, this.patientRegisterNo)
this.query.patientRegisterNo = this.patientRegisterNo this.query.patientRegisterNo = this.patientRegisterNo
this.Query("patientRegisterNo")
this.query.chargeFlag = 'N'
this.btnQuery()
} }
}, },
}, },

Loading…
Cancel
Save