Ver Fonte

fix(s4): prevent delivery pages from blanking

Wrap S4 delivery pages with a single root node so route transitions can render reliably, and bump Web to 2.4.149.

Co-authored-by: Cursor <cursoragent@cursor.com>
skygu há 1 mês atrás
pai
commit
41233b2365

+ 1 - 1
Web/package.json

@@ -1,7 +1,7 @@
 {
 	"name": "admin.net",
 	"type": "module",
-	"version": "2.4.148",
+	"version": "2.4.149",
 	"packageManager": "pnpm@10.32.1",
 	"lastBuildTime": "2026.03.15",
 	"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",

+ 5 - 3
Web/src/views/aidop/s4/delivery/supplierDeliveryManagementList.vue

@@ -1,6 +1,7 @@
 <template>
-	<AidopDemoShell :title="pageTitle" subtitle="供应商交货管理">
-		<el-form :inline="true" :model="query" class="mb12" @submit.prevent>
+	<div class="s4-delivery-page">
+		<AidopDemoShell :title="pageTitle" subtitle="供应商交货管理">
+			<el-form :inline="true" :model="query" class="mb12" @submit.prevent>
 			<el-form-item label="采购单号"><el-input v-model="query.cgdd" clearable style="width: 150px" /></el-form-item>
 			<el-form-item label="交货单号"><el-input v-model="query.dsNum" clearable style="width: 150px" /></el-form-item>
 			<el-form-item label="物料编码"><el-input v-model="query.wlbm" clearable style="width: 150px" /></el-form-item>
@@ -102,7 +103,8 @@
 			<el-button @click="replyDialog.visible = false">取消</el-button>
 			<el-button type="primary" @click="confirmReplyDueDate">确认</el-button>
 		</template>
-	</el-dialog>
+		</el-dialog>
+	</div>
 </template>
 
 <script setup lang="ts" name="aidopS4SupplierDeliveryManagementList">

+ 13 - 7
Web/src/views/aidop/s4/delivery/supplierShipmentList.vue

@@ -1,5 +1,6 @@
 <template>
-	<AidopDemoShell :title="pageTitle" subtitle="供应商发货单">
+	<div class="s4-shipment-page">
+		<AidopDemoShell :title="pageTitle" subtitle="供应商发货单">
 		<el-form :inline="true" :model="query" class="mb12" @submit.prevent>
 			<el-form-item label="发货日期">
 				<el-date-picker v-model="query.jhshrqFrom" type="date" value-format="YYYY-MM-DD" style="width: 150px" />
@@ -77,7 +78,10 @@
 				@size-change="loadList"
 			/>
 		</div>
-	</AidopDemoShell>
+		</AidopDemoShell>
+
+		<printDialog ref="printDialogRef" :title="'打印送货标签'" />
+	</div>
 </template>
 
 <script setup lang="ts" name="aidopS4SupplierShipmentList">
@@ -96,7 +100,7 @@ import { formatDate } from '/@/utils/formatTime';
 const route = useRoute();
 const router = useRouter();
 const pageTitle = computed(() => (route.meta?.title as string) || '供应商发货单');
-const printDialogRef = ref();
+const printDialogRef = ref<{ showDialog: (...args: any[]) => void } | null>(null);
 const PRINT_LABEL_TEMPLATE_NAME = '送货标签';
 
 const query = reactive({
@@ -223,7 +227,12 @@ async function onPrintLabel(row: SupplierShipmentRow) {
 		...(items[0] ?? {}),
 	};
 
-	printDialogRef.value.showDialog(new hiprint.PrintTemplate({ template }), printData, template.panels[0].width);
+	const dialog = printDialogRef.value;
+	if (!dialog?.showDialog) {
+		ElMessage.error('打印预览组件加载失败');
+		return;
+	}
+	dialog.showDialog(new hiprint.PrintTemplate({ template }), printData, template.panels[0].width);
 }
 
 function onExport() {
@@ -251,6 +260,3 @@ onMounted(loadList);
 .pager { margin-top: 12px; display: flex; justify-content: flex-end; }
 :deep(.row-deleted .el-table__cell) { background: #ffe7e7 !important; }
 </style>
-
-<printDialog ref="printDialogRef" :title="'打印送货标签'" />
-