fix(dms): 修复主管确认按钮显示逻辑并添加调试信息

- 在计算 confirmButtonShow 时添加了调试信息,输出相关字段的值和类型
- 修复了使用数字比较导致的按钮显示问题,改为字符串比较
-优化了代码结构,提高了可读性和可维护性
master
zangchenhao 3 weeks ago
parent 364575595a
commit c8f7196572

@ -273,11 +273,33 @@ const approvalButtonShow = computed(() => {
});
const confirmButtonShow = computed(() => {
//
console.log('主管确认按钮显示条件检查:', {
billsStatus: workOrder.value?.billsStatus,
billsStatusType: typeof workOrder.value?.billsStatus,
approveStatus: workOrder.value?.approveStatus,
approveStatusType: typeof workOrder.value?.approveStatus,
repairConfirm: workOrder.value?.repairConfirm,
repairConfirmType: typeof workOrder.value?.repairConfirm
});
//
// (2) && (2) && (0)
return workOrder.value?.billsStatus === '2' &&
workOrder.value?.approveStatus === '2' &&
workOrder.value?.repairConfirm === '0';
// 使
const billsStatusMatches = String(workOrder.value?.billsStatus) === '2';
const approveStatusMatches = String(workOrder.value?.approveStatus) === '2';
const repairConfirmMatches = String(workOrder.value?.repairConfirm) === '0';
const shouldShow = billsStatusMatches && approveStatusMatches && repairConfirmMatches;
console.log('主管确认按钮显示结果:', {
billsStatusMatches,
approveStatusMatches,
repairConfirmMatches,
shouldShow
});
return shouldShow;
});
//

Loading…
Cancel
Save