dev
This commit is contained in:
parent
e4b42268e5
commit
c183c42525
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
|
||||
import insutypes from "@/assets/config/directory/insutypes.json";
|
||||
import {getKey} from "@/utils/discrotyUtil.ts";
|
||||
import {onMounted, onUnmounted, ref} from "vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,167 @@
|
|||
<template>
|
||||
<Mask :is-show="show" :width=500 :height="500">
|
||||
<div class="container-wrapper">
|
||||
<CloseBtn @click="show = false"></CloseBtn>
|
||||
<div class="header">
|
||||
个人现金部分
|
||||
</div>
|
||||
<div class="container">
|
||||
<div>
|
||||
总金额:{{socialPayInfo.setlinfo.medfee_sumamt}}<br>
|
||||
基金支付金额:{{socialPayInfo.setlinfo.fund_pay_sumamt}}<br>
|
||||
个人医保支付金额:{{socialPayInfo.setlinfo.acct_pay}}<br>
|
||||
个人现金支付金额:{{socialPayInfo.setlinfo.psn_cash_pay}}<br>
|
||||
</div>
|
||||
<div class="price-type" v-if="socialPayInfo.setlinfo.psn_cash_pay>0">
|
||||
<div
|
||||
class="price-type-item"
|
||||
:class="['btn',payType==item.type?'active':'']"
|
||||
v-for="(item,index) in priceBtnListNoSocial"
|
||||
@click="changePriceType(item.type)"
|
||||
>
|
||||
<div class="image" :style="{'background-color':item.color}">
|
||||
<img style="width: 16px;height: 16px;" :src="item.img" alt=""/>
|
||||
</div>
|
||||
<span>{{item.name}}</span>
|
||||
</div>
|
||||
<el-input v-model="cash" placeholder="请输入收到现金的数量"></el-input>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<el-button type="primary" @click="completeSettlement">完成订单</el-button>
|
||||
<el-button @click="cecalOrder">取消订单</el-button>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</Mask>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
import Mask from "@/components/Mask.vue";
|
||||
import {nextTick, ref} from "vue";
|
||||
import {priceBtnListNoSocial} from "@/assets/config/constants.ts";
|
||||
import CloseBtn from "@/components/CloseBtn.vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
|
||||
const socialPayInfo = ref<any>(null)
|
||||
|
||||
const payType = ref(null)
|
||||
const changePriceType = (type: any) => {
|
||||
payType.value = type;
|
||||
}
|
||||
const orderInfo = ref<any>(null)
|
||||
const show = ref(false)
|
||||
const open = (payInfo:any,order:any)=>{
|
||||
show.value = true
|
||||
socialPayInfo.value = payInfo;
|
||||
orderInfo.value = order;
|
||||
}
|
||||
|
||||
const cash = ref<number>(0)
|
||||
const emit = defineEmits(["orderCompleted","orderCancel"])
|
||||
const completeSettlement = ()=>{
|
||||
if (cash.value != socialPayInfo.value.setlinfo.psn_cash_pay){
|
||||
ElMessage({
|
||||
message: '现金支付金额与实际收款金额不一致',
|
||||
type: 'warning',
|
||||
})
|
||||
return
|
||||
}
|
||||
debugger
|
||||
const params = {
|
||||
mdtrtCertType: socialPayInfo.value.mdtrtCertType,
|
||||
mdtrtCertNo: socialPayInfo.value.mdtrtCertNo,
|
||||
insutype: orderInfo.value.insutype,
|
||||
changeOrderCode:orderInfo.value.code,
|
||||
}
|
||||
|
||||
post("charge/socialRealPay",{...params}).then((res:any)=>{
|
||||
show.value = false;
|
||||
emit('orderCompleted')
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const cecalOrder = ()=>{
|
||||
ElMessageBox.confirm(
|
||||
`取消后不能恢复,是否确定取消当前订单?`,
|
||||
'Warning',
|
||||
{
|
||||
confirmButtonText: '确认取消',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
).then(() => {
|
||||
post("retail/cancelOrder",{orderId:orderInfo.value.orderId}).then((res:any)=>{
|
||||
show.value = false;
|
||||
emit('orderCancel')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
defineExpose({open})
|
||||
|
||||
const psnPaymentRef = ref();
|
||||
const openPsnPayment = (payInfo:any,orderInfo:any)=>{
|
||||
nextTick(()=>{
|
||||
psnPaymentRef.value.open(payInfo,orderInfo);
|
||||
})
|
||||
|
||||
}
|
||||
const orderCompleted = ()=>{
|
||||
show.value = false;
|
||||
}
|
||||
const orderCanceled = ()=>{
|
||||
show.value = false;
|
||||
}
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.price-type {
|
||||
display: flex;
|
||||
margin-top: 20px;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
.btn {
|
||||
height: 45px;
|
||||
width: 95px;
|
||||
font-size: 14px;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
background: #efecec;
|
||||
margin-bottom: 10px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
.image{
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 3px;
|
||||
border-radius: 23px;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
//color: #fff;
|
||||
//background-color: #409EFF;
|
||||
border: 1px solid #409EFF;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #fff;
|
||||
background-color: #409EFF;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
@ -34,6 +34,7 @@
|
|||
</template>
|
||||
</el-card>
|
||||
</Mask>
|
||||
<PersonalPayment ref="psnPaymentRef" @orderCompleted="orderCompleted" @orderCancel="orderCanceled"></PersonalPayment>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
|
@ -45,6 +46,7 @@ import Mask from "@/components/Mask.vue";
|
|||
import CardPay from "@/components/charge/CardPay.vue";
|
||||
import {medTypeJson, priceBtnList} from "@/assets/config/constants.ts"
|
||||
import {useWsStore} from "@/stores/wsStore.ts";
|
||||
import PersonalPayment from "@/components/charge/PersonalPayment.vue";
|
||||
const wsStore = useWsStore();
|
||||
const socialCard =defineModel<any>();
|
||||
const prop=defineProps({
|
||||
|
|
@ -80,7 +82,6 @@ const completeSettlement = ()=>{
|
|||
console.log('医保结算',socialCard.value)
|
||||
socialSettlement();
|
||||
}else {
|
||||
debugger
|
||||
//其他结算
|
||||
post('charge/completeOrder',{id:retailOrder.value.id,payType:payType.value}).then((res:any)=>{
|
||||
orderCompleted()
|
||||
|
|
@ -88,6 +89,8 @@ const completeSettlement = ()=>{
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
const orderCompleted = ()=>{
|
||||
show.value = false;
|
||||
emit('orderComplete',printReceipt.value)
|
||||
|
|
@ -112,17 +115,18 @@ const socialSettlement = ()=>{
|
|||
const params = {
|
||||
mdtrtCertType: socialCard.value.mdtrtCertType,
|
||||
mdtrtCertNo: socialCard.value.mdtrtCertNo,
|
||||
psnNo: socialCard.value.data.baseinfo.psn_no,
|
||||
orderId:retailOrder.value.id,
|
||||
insutype: socialCard.value.payInfo.selfpay_prop_type,
|
||||
payType: payType.value,
|
||||
curBalc:getBalcByInsutype(socialCard.value.payInfo.selfpay_prop_type)
|
||||
changeOrderCode:retailOrder.value.code,
|
||||
}
|
||||
post("charge/uploadCostDetails",{changeOrderCode:retailOrder.value.code}).then((res:any)=>{
|
||||
//预结算
|
||||
post("retail/socialPrePay",{orderInfo:params}).then((res:any)=>{
|
||||
openPsnPayment(res,params)
|
||||
post("charge/socialPrePay",{...params}).then((res:any)=>{
|
||||
openPsnPayment(res,params)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
const psnPaymentRef = ref();
|
||||
const openPsnPayment = (payInfo:any,orderInfo:any)=>{
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ const delDraft = () => {
|
|||
const settlementRef = ref()
|
||||
const saveAndCharge = () => {
|
||||
post('charge/save', {data:formData.value}).then((res: any) => {
|
||||
formData.value.id = res
|
||||
formData.value.code = res
|
||||
nextTick(()=>{
|
||||
settlementRef.value?.init(formData.value)
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue