病案新增打印份数数据

This commit is contained in:
sangchengzhi
2026-01-21 15:49:26 +08:00
parent 1c1a54206b
commit 3671751428
6 changed files with 390 additions and 30 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

View File

@@ -324,6 +324,9 @@ export const selectYbByPatientId = p => post('/sfs/selectYbByPatientId', p);
export const refundOrderOnline = p => post4('/Yb/refundOrderOnline', p);
//查询门诊缴费订单信息
export const selectOrderList = p => post('/sfs/selectOrderList', p);
//更新病案邮寄信息
export const apiUpdateBA = p => post('/bingan/apiUpdateBA', p);

View File

@@ -297,6 +297,10 @@
<span class="detail-label">领取方式</span>
<span class="detail-value">{{ deliveryType === '1' ? '到场自取' : '快递邮寄' }}</span>
</div>
<div class="detail-item">
<span class="detail-label">打印份数</span>
<span class="detail-value">{{ formData.copies }}</span>
</div>
<div class="detail-item">
<span class="detail-label">病人姓名</span>
<span class="detail-value">{{ formData.patientName }}</span>
@@ -421,6 +425,7 @@ export default {
recipientName: '',
recipientPhone: '',
recipientIdNumber: '',
copies: 1, // 打印份数默认1份
idFrontUrl: '',
idBackUrl: '',
recipientIdFrontUrl: '',
@@ -629,6 +634,9 @@ export default {
if (!this.deliveryType) {
errors.deliveryType = '请选择领取方式';
}
if (!this.formData.copies) {
errors.copies = '请选择打印份数';
}
break;
case 1:
@@ -795,6 +803,7 @@ export default {
formData.append('reName', this.formData.recipientName || '');
formData.append('reId', this.formData.recipientIdNumber || '');
formData.append('rePhone', this.formData.recipientPhone || '');
formData.append('copies', this.formData.copies);
const userId = localStorage.getItem("userid");
const token = localStorage.getItem("token");
@@ -867,6 +876,7 @@ export default {
recipientName: '',
recipientPhone: '',
recipientIdNumber: '',
copies: 1, // 打印份数默认1份
idFrontFile: null,
idBackFile: null,
recipientIdFrontFile: null,
@@ -1232,6 +1242,45 @@ export default {
color: #555;
}
.copies-options {
display: flex;
gap: 0.3rem;
margin-top: 0.2rem;
flex-wrap: wrap;
}
.copy-option {
display: flex;
align-items: center;
justify-content: center;
gap: 0.15rem;
cursor: pointer;
padding: 0.25rem 0.3rem;
border-radius: 0.05rem;
transition: all 0.2s;
border: 1px solid #ddd;
background-color: white;
}
.copy-option:hover {
background-color: #f5f5f5;
}
.copy-radio {
width: 0.32rem;
height: 0.32rem;
}
.copy-text {
font-size: 0.38rem;
color: #555;
}
.copy-option:has(.copy-radio:checked) {
border-color: #4299e1;
background-color: #f0f7ff;
}
.handling-option:has(.handling-radio:checked),
.delivery-option:has(.delivery-radio:checked) {
border-color: #4299e1;

View File

@@ -43,6 +43,10 @@
<span class="label">病案页数</span>
<span class="value">{{ item.pages || '等待病案室医生审核填写' }}</span>
</div>
<div class="info-row">
<span class="label">打印份数</span>
<span class="value">{{ item.copies || 1 }}</span>
</div>
<div class="info-row">
<span class="label">办理人</span>
@@ -74,7 +78,10 @@
<button class="cancel-btn" v-if="canCancelApplication(item)" @click="showCancelConfirm(item)">
取消/删除
</button>
<button class="copies-btn" v-if="item.amount !== null && item.status === 1 && item.send === 0"
@click="goToSetCopies(item)">
修改份数
</button>
<button class="pay-btn" v-if="item.amount !== null && item.status === 1 && item.send === 0"
@click="goToPayment(item)">
去缴费
@@ -111,11 +118,88 @@
</div>
</div>
</div>
<!-- 支付确认弹窗 -->
<div v-if="showPaymentConfirmDialog" class="dialog-overlay">
<div class="dialog">
<div class="dialog-header">
<h3>确认支付</h3>
</div>
<div class="dialog-content">
<p>当前费用为{{ currentItem.copies || 1 }}份的价格</p>
<p>如需修改打印份数请点击修改份数按钮调整后再缴费</p>
<p>确认按当前份数缴费吗</p>
</div>
<div class="dialog-footer">
<button class="dialog-btn cancel" @click="cancelPayment">
取消
</button>
<button class="dialog-btn confirm" @click="confirmPayment">
确认缴费
</button>
</div>
</div>
</div>
<!-- 修改份数弹窗 -->
<div v-if="showSetCopiesDialog" class="dialog-overlay">
<div class="dialog set-copies-dialog">
<div class="dialog-header">
<h3>修改打印份数</h3>
</div>
<div class="dialog-content">
<div class="copies-info">
<div class="info-item">
<span class="info-label">固定查询费</span>
<span class="info-value">¥10.00</span>
</div>
<div class="info-item">
<span class="info-label">页数</span>
<span class="info-value">{{ currentItem.pages || 0 }}</span>
</div>
<div class="info-item">
<span class="info-label">每页单价</span>
<span class="info-value">¥0.50/</span>
</div>
</div>
<div class="copies-selection">
<h4>选择打印份数</h4>
<div class="copies-controls">
<button class="copies-btn" @click="decreaseCopies">-</button>
<input type="number" v-model.number="selectedCopies" @input="onCopiesChange" min="1" class="copies-input">
<button class="copies-btn" @click="increaseCopies">+</button>
</div>
</div>
<div class="amount-calculation">
<div class="calculation-item">
<span class="calculation-label">金额计算</span>
<span class="calculation-value">
¥10.00 + ({{ currentItem.pages || 0 }} × ¥0.50/ × {{ selectedCopies }})
</span>
</div>
<div class="total-amount">
<span class="total-label">待支付金额</span>
<span class="total-value">¥{{ calculatedAmount.toFixed(2) }}</span>
</div>
</div>
</div>
<div class="dialog-footer">
<button class="dialog-btn cancel" @click="cancelSetCopies">
取消
</button>
<button class="dialog-btn confirm" @click="confirmSetCopies">
确认修改
</button>
</div>
</div>
</div>
</div>
</template>
<script>
import { apiGetBAList, apiDeleteApplication, apiBAPay, apiOpWxQuery } from "@/request/api.js";
import { apiGetBAList, apiDeleteApplication, apiBAPay, apiOpWxQuery,apiUpdateBA } from "@/request/api.js";
import { Toast } from "vant";
export default {
@@ -123,9 +207,13 @@ export default {
return {
applications: [],
showCancelDialog: false,
currentItem: null, // 存储当前要删除的item
isPaying: false, // 新增:标记是否正在支付中
showPaymentConfirmDialog: false, // 控制支付确认弹窗的显示
showSetCopiesDialog: false, // 控制修改份数弹窗的显示
currentItem: null, // 存储当前操作的item
isPaying: false, // 标记是否正在支付中
fetchTimer: null, // 定时器ID
selectedCopies: 1, // 当前选择的份数
calculatedAmount: 0, // 计算后的金额
};
},
@@ -204,26 +292,128 @@ export default {
this.currentItem = null;
});
},
goToSetCopies(item) {
console.log("修改份数", item);
// 保存当前要修改份数的item
this.currentItem = item;
// 初始化选择的份数为当前份数默认为1
this.selectedCopies = 1;
// 计算初始金额
this.calculateAmount();
// 显示修改份数弹窗
this.showSetCopiesDialog = true;
},
// 计算金额
calculateAmount() {
if (!this.currentItem) return;
console.log("计算金额",this.currentItem);
const fixedFee = 10; // 固定查询费10元
const pageFee = 0.5; // 每页0.5元
const pages = this.currentItem.pages || 0; // 页数
const copies = this.selectedCopies || 1; // 份数
// 计算总金额:固定查询费 + 页数x每页费用x份数
this.calculatedAmount = fixedFee + (pages * pageFee * copies);
},
// 增加份数
increaseCopies() {
this.selectedCopies++;
this.calculateAmount();
},
// 减少份数
decreaseCopies() {
if (this.selectedCopies > 1) {
this.selectedCopies--;
this.calculateAmount();
}
},
// 输入份数变化
onCopiesChange(event) {
let value = parseInt(event.target.value);
// 确保份数至少为1
if (isNaN(value) || value < 1) {
value = 1;
}
this.selectedCopies = value;
this.calculateAmount();
},
// 确认修改份数
confirmSetCopies() {
if (!this.currentItem) return;
console.log("更新当前item的选择份数",this.selectedCopies)
console.log("更新当前item的金额",this.calculatedAmount)
this.currentItem.amount = this.calculatedAmount;
this.currentItem.copies = this.selectedCopies;
let params = {
"id": this.currentItem.id,
"copies": this.selectedCopies,
"amount": this.calculatedAmount,
}
// console.log("更新当前item的选择份数",params)
apiUpdateBA(params).then(res => {
if (res.code === 200) {
// 关闭弹窗
this.showSetCopiesDialog = false;
// 提示用户修改成功
Toast.success(`份数已修改为${this.selectedCopies}份,金额已更新`);
this.fetchApplications(); // 重新获取列表数据
} else {
Toast(`修改失败:${res.message || '服务器异常'}`);
}
}).catch(err => {
console.error('修改接口调用失败:', err);
Toast('网络异常,修改失败,请稍后重试');
});
// this.currentItem.pages = this.currentItem.pages*this.selectedCopies;
},
// 取消修改份数
cancelSetCopies() {
// 关闭弹窗
this.showSetCopiesDialog = false;
},
goToPayment(item) {
// 防止重复点击:如果正在支付中,直接返回
if (this.isPaying) return;
// 保存当前要支付的item
this.currentItem = item;
// 显示支付确认弹窗
this.showPaymentConfirmDialog = true;
},
console.log("去支付", item);
this.isPaying = true; // 标记为支付中
// 显示加载中Toast
Toast.loading({
forbidClick: true, // 禁止背景点击
message: '处理中...',
duration: 0 // 不自动关闭
});
this.handleWechatPay(item);
// 确认支付
confirmPayment() {
// 防止重复点击:如果正在支付中,直接返回
if (this.isPaying) return;
console.log("去支付", this.currentItem);
this.isPaying = true; // 标记为支付中
// 显示加载中Toast
Toast.loading({
forbidClick: true, // 禁止背景点击
message: '处理中...',
duration: 0 // 不自动关闭
});
this.handleWechatPay(this.currentItem);
// 关闭弹窗
this.showPaymentConfirmDialog = false;
},
// 取消支付
cancelPayment() {
// 关闭弹窗
this.showPaymentConfirmDialog = false;
},
handleWechatPay(item) {
let params = {
id: item.id,
amount: item.amount,
pages: item.pages,
pages: item.pages*item.copies,
selectAmount: item.selectAmount,
userId: item.userId
}
@@ -494,6 +684,19 @@ export default {
background-color: #096dd9;
}
}
.copies-btn {
background-color: #fa8c16;
color: white;
border: none;
border-radius: 0.08rem;
padding: 0.15rem 0.35rem;
font-size: 0.35rem;
cursor: pointer;
transition: background-color 0.2s;
&:hover {
background-color: #d46b08;
}
}
.ship-btn {
background-color: #52c41a;
@@ -776,6 +979,99 @@ export default {
}
}
/* 修改份数弹窗样式 */
.set-copies-dialog {
width: 90%;
max-width: 500px;
}
.copies-info {
background-color: #f8f9fa;
padding: 0.3rem;
border-radius: 0.08rem;
margin-bottom: 0.4rem;
}
.info-item {
display: flex;
justify-content: space-between;
margin-bottom: 0.15rem;
font-size: 0.35rem;
}
.info-item:last-child {
margin-bottom: 0;
}
.info-label {
color: #666;
}
.info-value {
color: #333;
font-weight: 500;
}
.copies-selection {
margin-bottom: 0.4rem;
}
.copies-selection h4 {
margin-bottom: 0.2rem;
font-size: 0.38rem;
color: #333;
}
.copies-controls {
display: flex;
align-items: center;
justify-content: center;
gap: 0.2rem;
}
.copies-input {
width: 1.2rem;
height: 0.6rem;
text-align: center;
font-size: 0.38rem;
border: 1px solid #ddd;
border-radius: 0.08rem;
padding: 0;
box-sizing: border-box;
}
.amount-calculation {
background-color: #e6f7ff;
padding: 0.3rem;
border-radius: 0.08rem;
margin-bottom: 0.3rem;
}
.calculation-item {
margin-bottom: 0.15rem;
font-size: 0.35rem;
color: #333;
}
.total-amount {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 0.2rem;
border-top: 1px solid #bae7ff;
font-size: 0.4rem;
font-weight: 600;
}
.total-label {
color: #333;
}
.total-value {
color: #f5222d;
font-size: 0.45rem;
}
@keyframes fadeIn {
from {
opacity: 0;

View File

@@ -86,8 +86,8 @@
</ul>
</div>
<router-link to="/jkzd" class="gg_image">
<img src="../assets/健康体检.png"/>
<router-link to="/Zstj_yy" class="gg_image">
<img src="../assets/健康体检2.png"/>
</router-link>
<div class="in_box1">
<div class="bt">
@@ -133,6 +133,18 @@
<img src="../assets/in_box1_pic4.png" alt/>
<p>满意度评价</p>
</router-link>
<router-link to="Wjcx" class="service-item">
<img src="../assets/in_box1_pic5.png" alt/>
<p>物价查询</p>
</router-link>
<router-link to="Hospital_dh1" class="service-item">
<img src="../assets/in_box1_pic6.png" alt/>
<p>地图导航</p>
</router-link>
<router-link to="Yylb" class="service-item">
<img src="../assets/in_box1_pic7.png" alt/>
<p>挂号记录</p>
</router-link>
<!-- 其他服务项 -->
</div>
</div>

View File

@@ -39,17 +39,17 @@
<h2>3000</h2>
</div>
</div>
<div class="chargemoneybox2">
<!-- <div class="chargemoneybox2">
<div :class="this.chargemoney == 4000 ? 'box1' : 'box'" @click="clickmoney(4000)">
<h2>4000</h2>
</div>
<div :class="this.chargemoney == 5000 ? 'box1' : 'box'" @click="clickmoney(5000)">
<h2>5000</h2>
</div>
<!-- <div :class="this.chargemoney == 8000 ? 'box1' : 'box'" @click="clickmoney(8000)">
<div :class="this.chargemoney == 8000 ? 'box1' : 'box'" @click="clickmoney(8000)">
<h2>8000</h2>
</div> -->
</div>
</div>
</div> -->
</div>
<van-cell-group>
<van-field type="number" v-model="qtchargemoney" label="其他金额" class="qtchargemoneybt" placeholder="请输入金额"
@@ -162,7 +162,7 @@ export default {
patientIds: [], // 存储多个 PatientId
patientId: null, // 选中的 PatientId
showPatientSelector: false,
yjjxes :5000
yjjxes :3000//限额修改
};
},
created() {
@@ -233,13 +233,13 @@ return;
// });
}
if(this.patientId != "90134173"){
Toast({
message: '因医院原因,暂时不开放线上充值预交金功能,请到门诊缴费窗口充值!',
duration: 3000 // 设置显示时长为 3 秒
});
return;
}
// if(this.patientId != "90134173"){
// Toast({
// message: '因医院原因,暂时不开放线上充值预交金功能,请到门诊缴费窗口充值!',
// duration: 3000 // 设置显示时长为 3 秒
// });
// return;
// }
if(this.zyinfo.HOSDATE ){