From 80ef3a1fb42f37cde2e9753317e118c50379b095 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 10 九月 2026 16:35:44 +0800
Subject: [PATCH] 天津-潜宇塑胶 1.设备、生产、BOM、质量、产品、仓储物流模块需求更改
---
src/views/productionManagement/productStructure/index.vue | 70 ++++++++++++++++++++++++++++++++++
1 files changed, 69 insertions(+), 1 deletions(-)
diff --git a/src/views/productionManagement/productStructure/index.vue b/src/views/productionManagement/productStructure/index.vue
index 269f098..d99fb48 100644
--- a/src/views/productionManagement/productStructure/index.vue
+++ b/src/views/productionManagement/productStructure/index.vue
@@ -63,6 +63,9 @@
<StructureEdit v-if="showEdit"
v-model:show-model="showEdit"
:record="currentRow" />
+ <!-- 榻愬鍒嗘瀽寮圭獥 -->
+ <KitCheckDialog v-model:show-model="kitCheckVisible"
+ :bom="kitCheckRow" />
<!-- 鏂板/缂栬緫寮圭獥 -->
<el-dialog v-model="dialogVisible"
:title="operationType === 'add' ? '鏂板BOM' : '缂栬緫BOM'"
@@ -138,11 +141,13 @@
batchDelete,
exportBom,
downloadTemplate,
+ changeStatus,
} from "@/api/productionManagement/productBom.js";
import { useRouter } from "vue-router";
import { ElMessageBox } from "element-plus";
import ProductSelectDialog from "@/views/basicData/product/ProductSelectDialog.vue";
import ImportDialog from "@/components/Dialog/ImportDialog.vue";
+ import KitCheckDialog from "@/views/productionManagement/productStructure/KitCheckDialog.vue";
const router = useRouter();
const { proxy } = getCurrentInstance();
@@ -175,6 +180,14 @@
width: 100,
},
{
+ label: "鐘舵��",
+ prop: "status",
+ dataType: "tag",
+ width: 90,
+ formatData: v => (v == 1 ? "鍚敤" : "鍋滅敤"),
+ formatType: v => (v == 1 ? "success" : "info"),
+ },
+ {
label: "澶囨敞",
prop: "remark",
minWidth: 160,
@@ -184,7 +197,7 @@
label: "鎿嶄綔",
align: "center",
fixed: "right",
- width: 250,
+ width: 330,
operation: [
{
name: "澶嶅埗",
@@ -198,6 +211,31 @@
type: "text",
clickFun: row => {
handleEdit(row);
+ },
+ },
+ {
+ name: "榻愬鍒嗘瀽",
+ type: "text",
+ clickFun: row => {
+ handleKitCheck(row);
+ },
+ },
+ {
+ name: "鍚敤",
+ type: "text",
+ color: "#67C23A",
+ showHide: row => row.status != 1,
+ clickFun: row => {
+ handleChangeStatus(row, 1);
+ },
+ },
+ {
+ name: "鍋滅敤",
+ type: "text",
+ color: "#909399",
+ showHide: row => row.status == 1,
+ clickFun: row => {
+ handleChangeStatus(row, 0);
},
},
{
@@ -215,6 +253,8 @@
const tableData = ref([]);
const tableLoading = ref(false);
const showEdit = ref(false);
+ const kitCheckVisible = ref(false);
+ const kitCheckRow = ref({});
const selectedRows = ref([]);
const currentRow = ref({});
const dialogVisible = ref(false);
@@ -345,6 +385,34 @@
.catch(() => {});
};
+ // 鍚敤/鍋滅敤
+ const handleChangeStatus = (row, status) => {
+ const tip =
+ status == 1
+ ? "纭鍚敤璇OM鐗堟湰锛熷悓浜у搧瑙勬牸鐨勫叾浠栧惎鐢ㄧ増鏈皢鑷姩鍋滅敤銆�"
+ : "纭鍋滅敤璇OM鐗堟湰锛�";
+ ElMessageBox.confirm(tip, "鎻愮ず", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ changeStatus({ id: row.id, status })
+ .then(() => {
+ proxy.$modal.msgSuccess(status == 1 ? "鍚敤鎴愬姛" : "鍋滅敤鎴愬姛");
+ getList();
+ })
+ .catch(() => {});
+ })
+ .catch(() => {});
+ };
+
+ // 榻愬鍒嗘瀽
+ const handleKitCheck = row => {
+ kitCheckRow.value = row;
+ kitCheckVisible.value = true;
+ };
+
// 缂栬緫
const handleEdit = row => {
operationType.value = "edit";
--
Gitblit v1.9.3