This commit is contained in:
ChenQiuYu 2025-05-13 15:31:13 +08:00
parent cbcec95d0c
commit c5cdd9af01
5 changed files with 91 additions and 79 deletions

View File

@ -1,10 +1,6 @@
<template> <template>
<Mask :top="50" :height="650" :width="900" :is-show="show"> <Mask :top="50" :height="650" :width="900" :is-show="show" title="追溯码采集" @close="show = false" :show-footer="true">
<CloseBtn @click="show = false"></CloseBtn>
<el-card> <el-card>
<template #header>
<div class="header">追溯码采集</div>
</template>
<div class="detail"> <div class="detail">
<el-input placeholder="请输入追溯码" v-model="inputIdCode" clearable @keydown.enter="openAssociationIdCode()"> <el-input placeholder="请输入追溯码" v-model="inputIdCode" clearable @keydown.enter="openAssociationIdCode()">
<template #prefix> <template #prefix>
@ -44,13 +40,13 @@
</div> </div>
</div> </div>
</el-card>
<template #footer> <template #footer>
<div class="bottom-btn"> <div class="bottom-btn">
<el-button @click="saveRetail()" type="primary">确定</el-button> <el-button @click="saveRetail()" type="primary">确定</el-button>
<el-button @click="show = false">关闭</el-button> <el-button @click="show = false">关闭</el-button>
</div> </div>
</template> </template>
</el-card>
<AssociationIdCode <AssociationIdCode
ref="associationIdCodeRef" ref="associationIdCodeRef"
@addIdCode="cleanInputIdCode" @addIdCode="cleanInputIdCode"
@ -58,7 +54,7 @@
</Mask> </Mask>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import Mask from "@/components/Mask.vue"; import Mask from "@/components/common/Mask.vue";
import CloseBtn from "@/components/CloseBtn.vue"; import CloseBtn from "@/components/CloseBtn.vue";
import {nextTick, ref} from "vue"; import {nextTick, ref} from "vue";
import IdCodeListShow from "@/components/charge/IdCodeListShow.vue"; import IdCodeListShow from "@/components/charge/IdCodeListShow.vue";

View File

@ -1,16 +1,12 @@
<template> <template>
<Mask :is-show="show" :width=500 :height="500"> <Mask :is-show="show" :width=500 :height="500" title="个人现金部分" @close="show=false" :show-footer="true">
<div class="container-wrapper"> <div class="container-wrapper">
<CloseBtn @click="show = false"></CloseBtn>
<div class="header">
个人现金部分
</div>
<div class="container"> <div class="container">
<div> <div>
总金额{{socialPayInfo.setlinfo.medfee_sumamt}}<br> 总金额{{ socialPayInfo.setlinfo.medfee_sumamt }}<br>
基金支付金额{{socialPayInfo.setlinfo.fund_pay_sumamt}}<br> 基金支付金额{{ socialPayInfo.setlinfo.fund_pay_sumamt }}<br>
个人医保支付金额{{socialPayInfo.setlinfo.acct_pay}}<br> 个人医保支付金额{{ socialPayInfo.setlinfo.acct_pay }}<br>
个人现金支付金额{{socialPayInfo.setlinfo.psn_cash_pay}}<br> 个人现金支付金额{{ socialPayInfo.setlinfo.psn_cash_pay }}<br>
</div> </div>
<div class="price-type" v-if="socialPayInfo.setlinfo.psn_cash_pay>0"> <div class="price-type" v-if="socialPayInfo.setlinfo.psn_cash_pay>0">
<div <div
@ -22,23 +18,25 @@
<div class="image" :style="{'background-color':item.color}"> <div class="image" :style="{'background-color':item.color}">
<img style="width: 16px;height: 16px;" :src="item.img" alt=""/> <img style="width: 16px;height: 16px;" :src="item.img" alt=""/>
</div> </div>
<span>{{item.name}}</span> <span>{{ item.name }}</span>
</div> </div>
<el-input v-model="cash" placeholder="请输入收到现金的数量"></el-input> <el-input v-model="cash" placeholder="请输入收到现金的数量"></el-input>
</div> </div>
</div> </div>
<el-button type="primary" @click="completeSettlement">完成订单</el-button>
<el-button @click="cecalOrder">取消订单</el-button>
</div> </div>
<template #footer>
</Mask> <div class="bottom">
<el-button type="primary" @click="completeSettlement">完成订单</el-button>
<el-button @click="cecalOrder">取消订单</el-button>
</div>
</template>
</Mask>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import Mask from "@/components/Mask.vue"; import Mask from "@/components/common/Mask.vue";
import {nextTick, ref} from "vue"; import {nextTick, ref} from "vue";
import {priceBtnListNoSocial} from "@/assets/config/constants.ts"; import {priceBtnListNoSocial} from "@/assets/config/constants.ts";
import CloseBtn from "@/components/CloseBtn.vue"; import CloseBtn from "@/components/CloseBtn.vue";
@ -53,16 +51,16 @@ const changePriceType = (type: any) => {
} }
const orderInfo = ref<any>(null) const orderInfo = ref<any>(null)
const show = ref(false) const show = ref(false)
const open = (payInfo:any,order:any)=>{ const open = (payInfo: any, order: any) => {
show.value = true show.value = true
socialPayInfo.value = payInfo; socialPayInfo.value = payInfo;
orderInfo.value = order; orderInfo.value = order;
} }
const cash = ref<number>(0) const cash = ref<number>(0)
const emit = defineEmits(["orderCompleted","orderCancel"]) const emit = defineEmits(["orderCompleted", "orderCancel"])
const completeSettlement = ()=>{ const completeSettlement = () => {
if (cash.value != socialPayInfo.value.setlinfo.psn_cash_pay){ if (cash.value != socialPayInfo.value.setlinfo.psn_cash_pay) {
ElMessage({ ElMessage({
message: '现金支付金额与实际收款金额不一致', message: '现金支付金额与实际收款金额不一致',
type: 'warning', type: 'warning',
@ -73,19 +71,16 @@ const completeSettlement = ()=>{
mdtrtCertType: orderInfo.value.mdtrtCertType, mdtrtCertType: orderInfo.value.mdtrtCertType,
mdtrtCertNo: orderInfo.value.mdtrtCertNo, mdtrtCertNo: orderInfo.value.mdtrtCertNo,
insutype: orderInfo.value.insutype, insutype: orderInfo.value.insutype,
changeOrderCode:orderInfo.value.changeOrderCode, changeOrderCode: orderInfo.value.changeOrderCode,
} }
post("charge/socialRealPay", {...params}).then((res: any) => {
post("charge/socialRealPay",{...params}).then((res:any)=>{
show.value = false; show.value = false;
emit('orderCompleted') emit('orderCompleted')
}) })
} }
const cecalOrder = () => {
const cecalOrder = ()=>{
ElMessageBox.confirm( ElMessageBox.confirm(
`取消后不能恢复,是否确定取消当前订单?`, `取消后不能恢复,是否确定取消当前订单?`,
'Warning', 'Warning',
@ -95,7 +90,7 @@ const cecalOrder = ()=>{
type: 'warning', type: 'warning',
} }
).then(() => { ).then(() => {
post("retail/cancelOrder",{orderId:orderInfo.value.orderId}).then((res:any)=>{ post("retail/cancelOrder", {orderId: orderInfo.value.orderId}).then((res: any) => {
show.value = false; show.value = false;
emit('orderCancel') emit('orderCancel')
}) })
@ -106,16 +101,16 @@ const cecalOrder = ()=>{
defineExpose({open}) defineExpose({open})
const psnPaymentRef = ref(); const psnPaymentRef = ref();
const openPsnPayment = (payInfo:any,orderInfo:any)=>{ const openPsnPayment = (payInfo: any, orderInfo: any) => {
nextTick(()=>{ nextTick(() => {
psnPaymentRef.value.open(payInfo,orderInfo); psnPaymentRef.value.open(payInfo, orderInfo);
}) })
} }
const orderCompleted = ()=>{ const orderCompleted = () => {
show.value = false; show.value = false;
} }
const orderCanceled = ()=>{ const orderCanceled = () => {
show.value = false; show.value = false;
} }
@ -127,6 +122,7 @@ const orderCanceled = ()=>{
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
.btn { .btn {
height: 45px; height: 45px;
width: 95px; width: 95px;
@ -139,7 +135,8 @@ const orderCanceled = ()=>{
align-items: center; align-items: center;
padding: 10px; padding: 10px;
cursor: pointer; cursor: pointer;
.image{
.image {
width: 16px; width: 16px;
height: 16px; height: 16px;
margin-right: 3px; margin-right: 3px;
@ -163,4 +160,11 @@ const orderCanceled = ()=>{
} }
} }
.bottom{
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 24px;
}
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<Mask :width="696" :height="409" title="收费" :is-show="show" @close="show = false" :show-footer="true"> <Mask :width="696" :height="409" title="收费" :is-show="show" @close="close" :show-footer="true">
<template #default> <template #default>
<div class="content"> <div class="content">
<div class="btns"> <div class="btns">
@ -66,26 +66,30 @@ const socialCard = ref<any>({
data: null, data: null,
mdtrtCertType: null, mdtrtCertType: null,
mdtrtCertNo: null, mdtrtCertNo: null,
payInfo: { payInfo: {}
}
}); });
const show = ref(false) const show = ref(false)
const printReceipt = ref(false); const printReceipt = ref(false);
const payType = ref(null); const payType = ref(null);
const retailOrder = ref<any>(null); const retailOrder = ref<any>(null);
const close = () => {
show.value = false;
payType.value = null;
selectedIndex.value = null
}
const init = async (code: any, psnNo: any) => { const init = async (code: any, psnNo: any) => {
retailOrder.value = await post("charge/getByCode", {code: code}); retailOrder.value = await post("charge/getByCode", {code: code});
if (psnNo != null){ if (psnNo != null) {
let result:any= await post("social/person/getSocialInfoByPsnNo", {psnNo: psnNo}); let result: any = await post("social/person/getSocialInfoByPsnNo", {psnNo: psnNo});
if (result) {
socialCard.value.data = result; socialCard.value.data = result;
socialCard.value.mdtrtCertType = result.mdtrtCertType; socialCard.value.mdtrtCertType = result.mdtrtCertType;
socialCard.value.mdtrtCertNo = result.mdtrtCertNo; socialCard.value.mdtrtCertNo = result.mdtrtCertNo;
socialCard.value.payInfo.selfpay_prop_type = result.insuinfo[0].insutype; socialCard.value.payInfo.selfpay_prop_type = result.insuinfo[0].insutype;
} }
}
show.value = true; show.value = true;
} }
defineExpose({init}) defineExpose({init})
const changePriceType = (type: any, index: any) => { const changePriceType = (type: any, index: any) => {
@ -98,6 +102,7 @@ const completeSettlement = () => {
return; return;
} }
if (payType.value == null) { if (payType.value == null) {
ElMessage.warning("请选择支付方式")
return return
} }
if (payType.value == 1) { if (payType.value == 1) {
@ -135,6 +140,10 @@ const getBalcByInsutype = (type: any) => {
} }
const socialSettlement = () => { const socialSettlement = () => {
if (socialCard.value.data == null) {
ElMessage.warning("请刷卡")
return;
}
const params = { const params = {
mdtrtCertType: socialCard.value.mdtrtCertType, mdtrtCertType: socialCard.value.mdtrtCertType,
mdtrtCertNo: socialCard.value.mdtrtCertNo, mdtrtCertNo: socialCard.value.mdtrtCertNo,

View File

@ -111,21 +111,20 @@
<el-table-column label="生产日期" width="140"> <el-table-column label="生产日期" width="140">
<template #default="scope"> <template #default="scope">
<el-date-picker <el-date-picker
:editable="false"
v-model="scope.row.productionDate" v-model="scope.row.productionDate"
type="date" type="date"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
placeholder="生产日期" placeholder="生产日期"
size="small" size="small"
@change="checkProductionDate(scope.row)" @change="checkProductionDate(scope.row)"
style="width: 100px;"/> style="width: 100px;"
@input="inputProductionDate(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="有效日期" width="140"> <el-table-column label="有效日期" width="140">
<template #default="scope"> <template #default="scope">
<el-date-picker <el-date-picker
:editable="false"
v-model="scope.row.expiryDate" v-model="scope.row.expiryDate"
type="date" type="date"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@ -215,7 +214,12 @@ const checkProductionDate = (row: any) => {
} }
return true; return true;
}; };
const inputProductionDate= (row: any) => {
console.log(row)
if (row.productionDate && row.expiryDate) {
checkExpiryDate(row);
}
}
const checkExpiryDate = (row: any) => { const checkExpiryDate = (row: any) => {
if (!row.expiryDate) { if (!row.expiryDate) {
ElMessage.error('有效期不能为空'); ElMessage.error('有效期不能为空');

View File

@ -112,7 +112,6 @@ const delDraft = () => {
} }
const settlementRef = ref() const settlementRef = ref()
const charge = () => { const charge = () => {
if (checkTraceCode(formData.value.goodsDetail)) { if (checkTraceCode(formData.value.goodsDetail)) {
// //
saveAndCharge() saveAndCharge()