|
|
|
@ -75,7 +75,6 @@ |
|
|
|
<el-table-column prop="mobileTelephone" label="手机" width="100" /> |
|
|
|
<el-table-column prop="telephone" label="电话" width="100" /> |
|
|
|
<el-table-column prop="address" label="地址" width="300" /> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -178,10 +177,12 @@ |
|
|
|
<el-input v-model="scope.row.cardNo" size="small" disabled /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column v-if="query.chargeFlag == 'N'" width="30" align="center"> |
|
|
|
<el-table-column v-if="query.chargeFlag == 'N'" width="60" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<i class="el-icon-search" @click="getCardId(scope.$index)" v-if="scope.row.payModeId == '05'" |
|
|
|
style="font-size: 24px;color: blue;cursor:pointer;"></i> |
|
|
|
<i class="el-icon-s-open" @click="brushCard(scope.$index)" v-if="scope.row.payModeId == '05'" |
|
|
|
style="font-size: 24px;color: red;cursor:pointer;"></i> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -332,7 +333,7 @@ |
|
|
|
import moment from 'moment'; |
|
|
|
import { mapState, mapActions } from "vuex"; |
|
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
|
import { tcdate, dddw, arrayExistObj, deepCopy } from "../../utlis/proFunc"; |
|
|
|
import { tcdate, dddw, arrayExistObj,arrayExistObjPos, deepCopy } from "../../utlis/proFunc"; |
|
|
|
|
|
|
|
import PatientRegisterQuery from "../../components/patientRegister/patientRegisterQuery.vue"; |
|
|
|
import PatientRegisterRefuseList from "../../components/patientRegister/PatientRegisterRefuseList.vue"; |
|
|
|
@ -622,7 +623,7 @@ export default { |
|
|
|
this.asbItemsForFee = res.data; |
|
|
|
|
|
|
|
for (let i = this.asbItemsForFee.length - 1; i >= 0; i--) { |
|
|
|
if (this.asbItemsForFee[i].isCharge == 'Y' || this.asbItemsForFee[i].payTypeFlag == '1') { |
|
|
|
if (this.asbItemsForFee[i].isCharge == 'Y' || this.asbItemsForFee[i].payTypeFlag !== '0' ) { |
|
|
|
this.asbItemsForFee.splice(i, 1); |
|
|
|
continue; |
|
|
|
} |
|
|
|
@ -668,6 +669,21 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 清除选的卡 |
|
|
|
brushCard(index){ |
|
|
|
this.chargePays[index].cardNo = '' |
|
|
|
this.chargePays[index].cardRegisterId = '' |
|
|
|
this.chargePays[index].chargeMoney = 0 |
|
|
|
|
|
|
|
delete this.chargePays[index].discount |
|
|
|
delete this.chargePays[index].cardBalance |
|
|
|
|
|
|
|
// 刷新预收金额 及 找零 |
|
|
|
this.inputMoney() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 弹出卡号查询窗口 |
|
|
|
getCardId(index) { |
|
|
|
console.log('index', index) |
|
|
|
@ -705,10 +721,36 @@ export default { |
|
|
|
|
|
|
|
// 确定选中卡记录 |
|
|
|
btnOkCard() { |
|
|
|
this.chargePays[this.cardSeq].cardNo = this.cardChoosed.cardNo + ' 余:' + this.cardChoosed.cardBalance |
|
|
|
// 单次收费不允重复同一张卡 |
|
|
|
let lfind = arrayExistObj(this.chargePays,'cardRegisterId',this.cardChoosed.id) |
|
|
|
if(lfind > -1){ |
|
|
|
this.$message.warning({showClose:true,message:'单次收费不允重复同一张卡!'}) |
|
|
|
return |
|
|
|
} |
|
|
|
// 单次收费不允出现不同折扣的充值卡 |
|
|
|
let diffDiscount = false //默认相同折扣 |
|
|
|
let preDiscount = 100 |
|
|
|
let curDiscount = this.cardChoosed.discount||100 |
|
|
|
this.chargePays.forEach(e => { |
|
|
|
if(e.payModeId == '05' && e.discount){ |
|
|
|
if(Number(e.discount) !== Number(curDiscount)){ |
|
|
|
preDiscount = e.discount |
|
|
|
diffDiscount = true |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
// 多张卡时,出现不同折扣,则返回 |
|
|
|
if(diffDiscount){ |
|
|
|
this.$message.warning({showClose:true,message:`当前所选卡折扣 ${curDiscount} 与 上次所选卡折扣 ${preDiscount} 不同,不可执行此操作`}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.chargePays[this.cardSeq].cardNo = this.cardChoosed.cardNo + ' 余:' + this.cardChoosed.cardBalance + ' 折:' + curDiscount |
|
|
|
this.chargePays[this.cardSeq].discount = curDiscount |
|
|
|
this.chargePays[this.cardSeq].cardBalance = this.cardChoosed.cardBalance |
|
|
|
this.chargePays[this.cardSeq].cardRegisterId = this.cardChoosed.id |
|
|
|
// 将折扣带回,并触发 |
|
|
|
this.form.discount = this.cardChoosed.discount || 100 |
|
|
|
this.form.discount = curDiscount |
|
|
|
this.discountToDetails() |
|
|
|
|
|
|
|
this.winDialog.queryCard = false |
|
|
|
@ -746,16 +788,21 @@ export default { |
|
|
|
|
|
|
|
//获取收费方式明细 |
|
|
|
getChargePayByChargeId(ChargeId) { |
|
|
|
let curPayModeId = '' |
|
|
|
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(curPayModeId != e.payModeId) lfind = -1 |
|
|
|
lfind++ |
|
|
|
console.log('lfind',lfind) |
|
|
|
lfind = arrayExistObjPos(this.chargePays, 'payModeId', e.payModeId,lfind); |
|
|
|
if (lfind > - 1) { |
|
|
|
this.chargePays[lfind].chargeMoney = e.chargeMoney; |
|
|
|
this.chargePays[lfind].cardRegisterId = e.cardRegisterId; |
|
|
|
this.chargePays[lfind].cardNo = e.cardNo; |
|
|
|
} |
|
|
|
curPayModeId = e.payModeId |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
@ -888,6 +935,7 @@ export default { |
|
|
|
//输入收费方式金额 |
|
|
|
inputMoney() { |
|
|
|
// 现金 id = 01 |
|
|
|
let err = '' |
|
|
|
let cashTotal = Number(0), unCashTotal = Number(0); |
|
|
|
this.chargePays.forEach(e => { |
|
|
|
console.log('e', e) |
|
|
|
@ -896,7 +944,17 @@ export default { |
|
|
|
} else { |
|
|
|
unCashTotal += Number(e.chargeMoney); |
|
|
|
} |
|
|
|
|
|
|
|
if(e.payModeId == '05'){ |
|
|
|
if(Number(e.cardBalance) < Number(e.chargeMoney)){ |
|
|
|
err = `会员卡【${e.cardNo}】 余额不足` |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
if(err){ |
|
|
|
this.$message.warning({showClose:true,message:err}) |
|
|
|
return |
|
|
|
} |
|
|
|
this.form.preTotal = cashTotal + unCashTotal |
|
|
|
this.findBalance() |
|
|
|
if (unCashTotal > this.form.total) this.$message.warning(`数据校验失败:输入的非现金金额${unCashTotal}不能超过应收金额${this.form.total}!`); |
|
|
|
@ -968,11 +1026,13 @@ export default { |
|
|
|
if (e.payModeId == '05' && e.chargeMoney) { |
|
|
|
//console.log(e.payModeId,e.chargeMoney,e.cardRegisterId); |
|
|
|
if (!e.cardRegisterId) msg = dddw(this.dict.payMode, "id", e.payModeId, "displayName") + '付费,必需选择会员卡号'; |
|
|
|
if(Number(e.cardBalance) < Number(e.chargeMoney)) msg = `会员卡【${e.cardNo}】 余额不足` |
|
|
|
} else { |
|
|
|
e.cardRegisterId = null; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
/**/ |
|
|
|
if (msg) { |
|
|
|
this.$message.warning(msg); |
|
|
|
return; |
|
|
|
@ -989,7 +1049,6 @@ export default { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.chargePays.forEach(e => { |
|
|
|
if (e.chargeMoney) { |
|
|
|
if (e.payModeId == '01') { |
|
|
|
|