From 0c116b0f5624786bd06990b86c467be25e2411fd Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期一, 26 一月 2026 17:51:38 +0800
Subject: [PATCH] feat: BOM导入模板下载,导入导出接口添加菜单权限
---
src/views/equipmentManagement/calibration/index.vue | 49 +++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/src/views/equipmentManagement/calibration/index.vue b/src/views/equipmentManagement/calibration/index.vue
index affce9d..e3eaef6 100644
--- a/src/views/equipmentManagement/calibration/index.vue
+++ b/src/views/equipmentManagement/calibration/index.vue
@@ -34,6 +34,7 @@
<el-button type="primary" @click="handleQuery" style="margin-left: 10px"
>鎼滅储</el-button
>
+ <el-button @click="handleReset" style="margin-left: 10px">閲嶇疆</el-button>
</div>
<div>
<el-button @click="handleOut">瀵煎嚭</el-button>
@@ -56,11 +57,11 @@
</template>
<script setup>
-import {onMounted, ref} from "vue";
-import {ElMessageBox} from "element-plus";
+import {onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick} from "vue";
+import {ElMessageBox, ElMessage} from "element-plus";
import useUserStore from "@/store/modules/user.js";
import CalibrationDia from "@/views/equipmentManagement/measurementEquipment/components/calibrationDia.vue";
-import {ledgerRecordListPage} from "@/api/equipmentManagement/calibration.js";
+import {ledgerRecordListPage, ledgerRecordDelete} from "@/api/equipmentManagement/calibration.js";
const { proxy } = getCurrentInstance();
const userStore = useUserStore()
@@ -134,6 +135,7 @@
{
dataType: "action",
label: "鎿嶄綔",
+ width: 140,
align: "center",
fixed: 'right',
operation: [
@@ -142,7 +144,17 @@
type: "text",
clickFun: (row) => {
openCalibrationDia("edit", row);
- }
+ },
+ },
+ {
+ name: "鍒犻櫎",
+ type: "text",
+ style: {
+ color: "#F56C6C"
+ },
+ clickFun: (row) => {
+ handleDelete(row);
+ },
},
],
},
@@ -168,6 +180,15 @@
page.current = 1;
getList();
};
+
+// 閲嶇疆鎼滅储鏉′欢
+const handleReset = () => {
+ searchForm.value.recordDate = "";
+ searchForm.value.entryDate = "";
+ searchForm.value.code = "";
+ page.current = 1;
+ getList();
+};
const pagination = (obj) => {
page.current = obj.page;
page.size = obj.limit;
@@ -191,6 +212,26 @@
})
}
+// 鍒犻櫎璁板綍
+const handleDelete = (row) => {
+ ElMessageBox.confirm(`纭鍒犻櫎璁¢噺鍣ㄥ叿缂栧彿涓�"${row.code}"鐨勬瀹氳褰曞悧锛焋, "鍒犻櫎纭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ ledgerRecordDelete([row.id]).then(() => {
+ ElMessage.success("鍒犻櫎鎴愬姛");
+ getList();
+ }).catch(() => {
+ ElMessage.error("鍒犻櫎澶辫触");
+ });
+ })
+ .catch(() => {
+ proxy.$modal.msg("宸插彇娑堝垹闄�");
+ });
+};
+
// 瀵煎嚭
const handleOut = () => {
ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
--
Gitblit v1.9.3