From fcef237a3a7bcfc04a1bb5ae0d9cfc79b5c79c93 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 29 八月 2026 15:10:01 +0800
Subject: [PATCH] 天津_建诚恒商贸 1.备件管理-新增独立备件出库功能入口,支持直接完成备件领用出库操作。 2.设备保养-支持按日期分组折叠展示,分组条目可展开查看明细;单条明细行末尾增加【保养完成】操作按钮,可单独办结单条保养任务;折叠汇总状态下,新增【一键保养完成】批量操作按钮,快速办结当前分组全部保养项。 3.设备巡检-按日期分组折叠展示,分组支持展开查看明细;每条巡检明细后增设【巡检完成】按钮,支持单独办结单条巡检记录;分组折叠未展开状态下,提供【一键巡检完成】批量操作,统一办结该分组下所有巡检任务。 4.增值税对比-优化数据展示逻辑,列表展示各订单增值税明细;页面右侧新增柱状可视化图表,直观对比进销项增值税数据。 5.管理驾驶舱-指标修改:将顶部「销售产品数」调整为「销售订单数」;时间筛选:页面左上角新增日期范围下拉筛选控件,所有统计指标标注当前筛选时段;
---
src/views/productionManagement/processRoute/index.vue | 88 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 88 insertions(+), 0 deletions(-)
diff --git a/src/views/productionManagement/processRoute/index.vue b/src/views/productionManagement/processRoute/index.vue
index 3a8acc5..1ef5b9d 100644
--- a/src/views/productionManagement/processRoute/index.vue
+++ b/src/views/productionManagement/processRoute/index.vue
@@ -48,6 +48,10 @@
v-model:visible="isShowItemModal"
:record="record"
@completed="getList" />
+ <FileList v-if="fileDialogVisible"
+ v-model:visible="fileDialogVisible"
+ :record-type="'technology_routing'"
+ :record-id="currentProcessRouteId" />
</div>
</template>
@@ -57,7 +61,12 @@
import EditProcess from "@/views/productionManagement/processRoute/Edit.vue";
import RouteItemForm from "@/views/productionManagement/processRoute/ItemsForm.vue";
import { listPage, del } from "@/api/productionManagement/processRoute.js";
+ const FileList = defineAsyncComponent(() =>
+ import("@/components/Dialog/FileList.vue")
+ );
+
import { useRouter } from "vue-router";
+ import { ElMessage, ElMessageBox } from "element-plus";
const router = useRouter();
const data = reactive({
@@ -108,6 +117,13 @@
showItemModal(row);
},
},
+ {
+ name: "闄勪欢",
+ type: "text",
+ clickFun: row => {
+ openFileDialog(row);
+ },
+ },
],
},
]);
@@ -123,7 +139,78 @@
size: 100,
total: 0,
});
+
+ // 闄勪欢鐩稿叧
+ const fileDialogVisible = ref(false);
+ const fileListDialogRef = ref(null);
+ const currentProcessRouteId = ref(null);
+ const filePage = reactive({
+ current: 1,
+ size: 1000,
+ total: 0,
+ });
+
const { proxy } = getCurrentInstance();
+
+ // 闄勪欢锛氭煡璇�
+ const fetchProcessRouteFiles = async processRouteId => {
+ const params = {
+ current: filePage.current,
+ size: filePage.size,
+ processRouteId,
+ };
+ const res = await listProcessRouteFiles(params);
+ const records = res?.data?.records || [];
+ filePage.total = res?.data?.total || records.length;
+ const mapped = records.map(item => ({
+ id: item.id,
+ name: item.fileName || item.name,
+ url: item.fileUrl || item.url,
+ raw: item,
+ }));
+ fileListDialogRef.value?.setList(mapped);
+ };
+
+ // 鎵撳紑闄勪欢寮圭獥
+ const openFileDialog = async row => {
+ currentProcessRouteId.value = row.id;
+ fileDialogVisible.value = true;
+ await fetchProcessRouteFiles(row.id);
+ };
+
+ // 鍒锋柊闄勪欢鍒楄〃
+ const refreshFileList = async () => {
+ if (!currentProcessRouteId.value) return;
+ await fetchProcessRouteFiles(currentProcessRouteId.value);
+ };
+
+ // 涓婁紶闄勪欢
+ const handleAttachmentUpload = async filePayload => {
+ if (!currentProcessRouteId.value) return;
+ const payload = {
+ fileName: filePayload?.fileName || filePayload?.name,
+ fileUrl: filePayload?.fileUrl || filePayload?.url,
+ processRouteId: currentProcessRouteId.value,
+ };
+ await addProcessRouteFile(payload);
+ ElMessage.success("鏂囦欢涓婁紶鎴愬姛");
+ await refreshFileList();
+ };
+
+ // 鍒犻櫎闄勪欢
+ const handleAttachmentDelete = async row => {
+ if (!row?.id) return false;
+ try {
+ await ElMessageBox.confirm("纭鍒犻櫎璇ラ檮浠讹紵", "鎻愮ず", {
+ type: "warning",
+ });
+ } catch {
+ return false;
+ }
+ await delProcessRouteFile([row.id]);
+ ElMessage.success("鍒犻櫎鎴愬姛");
+ await refreshFileList();
+ };
// 鏌ヨ鍒楄〃
/** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -177,6 +264,7 @@
productName: row.productName || "",
model: row.model || "",
bomNo: row.bomNo || "",
+ bomId: row.bomId || "",
description: row.description || "",
type: "route",
},
--
Gitblit v1.9.3