From 444ba76f4cca8a9df3faf61ab33ec631aec7fbba Mon Sep 17 00:00:00 2001
From: chengxiangling <291105840@qq.com>
Date: 星期五, 16 五月 2025 16:59:12 +0800
Subject: [PATCH] 提交right-toolbar组件事件调用计划运行模块
---
src/views/basicData/bom/index.vue | 168 ++++++++++++++++++++++++++++++++-----------------------
1 files changed, 98 insertions(+), 70 deletions(-)
diff --git a/src/views/basicData/bom/index.vue b/src/views/basicData/bom/index.vue
index 1ece0d6..6769e3a 100644
--- a/src/views/basicData/bom/index.vue
+++ b/src/views/basicData/bom/index.vue
@@ -1,76 +1,76 @@
<template>
<div class="app-container">
- <el-row :gutter="20">
- <el-form
- :model="queryParams"
- ref="queryRef"
- :rules="rules"
- :inline="true"
- v-show="showSearch"
- :label-width="locale === 'zh' ? '90px' : '160px'"
- >
- <el-row :gutter="20">
- <el-col :span="9">
- <el-form-item :label="$t('plan.query.itemNumber')" prop="itemCode">
- <el-input
- style="width: 210px"
- v-model="queryParams.itemCode"
- :placeholder="`${$t('common.common.placeholder')}${$t(
- 'plan.query.itemNumber'
- )}`"
- clearable
- @keyup.enter="handleQuery"
- />
- </el-form-item>
- </el-col>
- <el-col :span="9">
- <el-form-item
- :label="$t('plan.table.applicableFactories')"
- prop="orgCode"
+ <el-form
+ :model="queryParams"
+ ref="queryRef"
+ :rules="rules"
+ :inline="true"
+ v-show="showSearch"
+ label-position="left"
+ >
+ <el-row :gutter="20">
+ <el-col :span="6">
+ <el-form-item :style="{ width: '100%' }" :label="$t('plan.query.itemNumber')" prop="itemCode">
+ <el-input
+ v-model="queryParams.itemCode"
+ :placeholder="`${$t('common.common.placeholder')}${$t(
+ 'plan.query.itemNumber'
+ )}`"
+ clearable
+ @keyup.enter="handleQuery"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item
+ :style="{ width: '100%' }"
+ :label="$t('plan.table.applicableFactories')"
+ prop="orgCode"
+ >
+ <el-select
+ clearable
+ v-model="queryParams.orgCode"
+ :placeholder="`${$t('common.common.placeholder')}${$t(
+ 'plan.table.applicableFactories'
+ )}`"
>
- <el-select
- clearable
- v-model="queryParams.orgCode"
- :style="{width: locale=='zh'?'160px':'250px'}"
- :placeholder="`${$t('common.common.placeholder')}${$t('plan.table.applicableFactories')}`"
+ <el-option
+ v-for="plant in plantList"
+ :key="plant.id"
+ :label="plant.plantName"
+ :value="plant.plantCode"
>
- <el-option
- v-for="plant in plantList"
- :key="plant.id"
- :label="plant.plantName"
- :value="plant.plantCode"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6" style="text-align: right">
- <el-form-item>
- <el-button type="primary" icon="Search" @click="handleQuery">{{
- $t("common.common.query")
- }}</el-button>
- <el-button icon="Refresh" @click="resetQuery">{{
- $t("common.common.reset")
- }}</el-button>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </el-row>
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <!-- <el-col :span="locale === 'zh' ? 11 : 6" style="text-align: right">
+ <el-form-item class="column-with-margin">
+ <el-button type="primary" icon="Search" @click="handleQuery">{{
+ $t("common.common.query")
+ }}</el-button>
+ <el-button icon="Refresh" @click="resetQuery">{{
+ $t("common.common.reset")
+ }}</el-button>
+ </el-form-item>
+ </el-col> -->
+ </el-row>
+ </el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Refresh"
+ :disabled="loadingRefresh"
@click="handleRefresh"
- v-hasPermi="['apsPartRouteStat:edit']"
+ v-hasPermi="['Aps:ApsBomHeader:refreshBomData']"
>{{ $t("common.common.update") }}</el-button
>
</el-col>
<right-toolbar
v-model:showSearch="showSearch"
- @queryTable="getList"
+ @refreshTable="getList"
></right-toolbar>
</el-row>
@@ -92,32 +92,46 @@
type="primary"
link
@click="handleCheckView(row)"
- v-hasPermi="['aps:calendar:update']"
- >鏌ョ湅</el-button
+ v-hasPermi="['Aps:apsBom:list']"
+ >{{$t("common.common.view")}}</el-button
>
</template>
</HxlhTable>
- <el-dialog :title="title" v-model="openDialog" width="900px" append-to-body>
+ <el-dialog
+ :title="$t('common.common.viewDetails')"
+ v-model="openDialog"
+ width="900px"
+ append-to-body
+ style="height: 400px; overflow: hidden"
+ >
<HxlhTable
style="width: 100%"
:columns="subGridOptions"
:data="subList"
:loading="loadingSub"
- :height="heightSub"
+ :height="'280px;'"
>
</HxlhTable>
+ <template #footer>
+ <span class="dialog-footer">
+ <el-button @click="openDialog = false">{{
+ $t("common.common.close")
+ }}</el-button>
+ </span>
+ </template>
</el-dialog>
</div>
</template>
-<script setup name="ApsPlatePlan">
+<script setup name="Bom">
import {
listApsBomHeaderList,
listApsBomLineList,
+ listApsBomRefreshBomDataList,
} from "@/api/basicData/bom/bom.js";
import { listAll_plant } from "@/api/basicData/plant";
import HxlhTable from "@/components/HxlhTable/index.vue";
-import { ElMessage } from "element-plus";
+// import { ElMessage } from "element-plus";
import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲
const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
@@ -132,9 +146,10 @@
const subList = ref([]);
const loading = ref(false);
const loadingSub = ref(false);
+const loadingRefresh = ref(false);
const showSearch = ref(true);
const total = ref(0);
-const height = ref(document.documentElement.clientHeight - 270 + "px;");
+const height = ref(document.documentElement.clientHeight - 210 + "px;");
const heightSub = ref(document.documentElement.clientHeight - 320 + "px;");
// 琛ㄦ牸閰嶇疆
const columns = ref([]);
@@ -145,7 +160,7 @@
pageNum: 1,
pageSize: 10,
itemCode: null,
- orgCode:""
+ orgCode: "",
},
rules: {},
});
@@ -175,7 +190,7 @@
// },
// { type: "checkbox", width: 60, align: "center" },
{
- title: "BOM_Header_ID",
+ title: "BOM ID",
field: "bomHeaderId",
},
{
@@ -212,7 +227,7 @@
},
},
{
- title: "鎿嶄綔",
+ title: t("common.common.operate"),
width: 100,
fixed: "right",
slots: { default: "buttons" },
@@ -221,13 +236,13 @@
];
subGridOptions.value = [
{
- title: "BOM_Line_ID",
+ title: t("plan.table.bomItemID"),
field: "bomLineId",
width: 150,
align: "center",
},
{
- title: "BOM_Header_ID",
+ title: "BOM ID",
field: "bomHeaderId",
width: 150,
align: "center",
@@ -287,7 +302,20 @@
},
{ immediate: true, deep: true }
);
-
+async function handleRefresh() {
+ loadingRefresh.value = true;
+ const res = await listApsBomRefreshBomDataList();
+ if (res.code == 200) {
+ ElMessage({
+ message: t("plan.message.update"),
+ type: "success",
+ });
+ loadingRefresh.value = false;
+ getList();
+ } else {
+ loadingRefresh.value = false;
+ }
+}
function changePageNo(currentPage) {
queryParams.value.pageNum = currentPage;
page.value.current = currentPage;
--
Gitblit v1.9.3