From 901cd45f087ffd434feda0070b174966cc37c8f3 Mon Sep 17 00:00:00 2001 From: 曹睿 <360930172@qq.com> Date: 星期一, 07 七月 2025 13:59:58 +0800 Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/product-inventory-management into dev --- src/views/qualityManagement/rawMaterialInspection/index.vue | 85 +++++++++++++++++++++++++----------------- 1 files changed, 51 insertions(+), 34 deletions(-) diff --git a/src/views/qualityManagement/rawMaterialInspection/index.vue b/src/views/qualityManagement/rawMaterialInspection/index.vue index 29e52df..9732bc9 100644 --- a/src/views/qualityManagement/rawMaterialInspection/index.vue +++ b/src/views/qualityManagement/rawMaterialInspection/index.vue @@ -2,11 +2,11 @@ <div class="app-container"> <div class="search_form"> <div> - <span class="search_title">濮撳悕锛�</span> + <span class="search_title">渚涘簲鍟嗭細</span> <el-input - v-model="searchForm.staffName" + v-model="searchForm.supplier" style="width: 240px" - placeholder="璇疯緭鍏ュ鍚嶆悳绱�" + placeholder="璇疯緭鍏ヤ緵搴斿晢鎼滅储" @change="handleQuery" clearable :prefix-icon="Search" @@ -34,76 +34,73 @@ :total="page.total" ></PIMTable> </div> - <form-dia ref="formDia" @close="handleQuery"></form-dia> + <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia> + <FormDia ref="formDia" @close="handleQuery"></FormDia> + <files-dia ref="filesDia" @close="handleQuery"></files-dia> </div> </template> <script setup> import { Search } from "@element-plus/icons-vue"; import {onMounted, ref} from "vue"; +import InspectionFormDia from "@/views/qualityManagement/rawMaterialInspection/components/inspectionFormDia.vue"; import FormDia from "@/views/qualityManagement/rawMaterialInspection/components/formDia.vue"; -import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js"; import {ElMessageBox} from "element-plus"; +import {qualityInspectDel, qualityInspectListPage} from "@/api/qualityManagement/rawMaterialInspection.js"; +import FilesDia from "@/views/qualityManagement/rawMaterialInspection/components/filesDia.vue"; const data = reactive({ searchForm: { - staffName: "", + supplier: "", }, }); const { searchForm } = toRefs(data); const tableColumn = ref([ { label: "妫�娴嬫棩鏈�", - prop: "staffNo", + prop: "checkTime", + width: 120 }, { label: "渚涘簲鍟�", - prop: "staffName", + prop: "supplier", + width: 230 }, { label: "妫�楠屽憳", - prop: "sex", + prop: "checkName", }, { label: "浜у搧鍚嶇О", - prop: "nativePlace", + prop: "productName", }, { label: "瑙勬牸鍨嬪彿", - prop: "nativePlace", + prop: "model", }, { label: "鍗曚綅", - prop: "nativePlace", + prop: "unit", }, { label: "鏁伴噺", - prop: "contractStartTime", + prop: "quantity", width: 120 }, { label: "妫�娴嬪崟浣�", - prop: "contractEndTime", + prop: "checkCompany", width: 120 }, { label: "妫�娴嬬粨鏋�", - prop: "staffState", + prop: "checkResult", dataType: "tag", - formatData: (params) => { - if (params == 0) { - return "绂昏亴"; - } else if (params == 1) { - return "鍦ㄨ亴"; - } else { - return null; - } - }, formatType: (params) => { - if (params == 0) { + if (params == '涓嶅悎鏍�') { return "danger"; - } else if (params == 1) { - return "primary"; + } else if (params == '鍚堟牸') { + return "success"; } else { return null; } @@ -114,20 +111,27 @@ label: "鎿嶄綔", align: "center", fixed: "right", - width: 160, + width: 190, operation: [ { - name: "鏂板妫�楠岃褰�", + name: "缂栬緫", type: "text", clickFun: (row) => { openForm("edit", row); }, }, { + name: "鏂板妫�楠岃褰�", + type: "text", + clickFun: (row) => { + openInspectionForm("edit", row); + }, + }, + { name: "闄勪欢", type: "text", clickFun: (row) => { - openForm("edit", row); + openFilesFormDia(row); }, }, ], @@ -142,6 +146,8 @@ total: 0 }); const formDia = ref() +const filesDia = ref() +const inspectionFormDia = ref() const { proxy } = getCurrentInstance() // 鏌ヨ鍒楄〃 @@ -157,11 +163,10 @@ }; const getList = () => { tableLoading.value = true; - staffJoinListPage({...page, ...searchForm.value, staffState: 0}).then(res => { + qualityInspectListPage({...page, ...searchForm.value, inspectType: 0}).then(res => { tableLoading.value = false; tableData.value = res.data.records page.total = res.data.total; - console.log(page) }).catch(err => { tableLoading.value = false; }) @@ -175,6 +180,18 @@ const openForm = (type, row) => { nextTick(() => { formDia.value?.openDialog(type, row) + }) +}; +// 鎵撳紑鏂板妫�楠屽脊妗� +const openInspectionForm = (type, row) => { + nextTick(() => { + inspectionFormDia.value?.openDialog(type, row) + }) +}; +// 鎵撳紑闄勪欢寮规 +const openFilesFormDia = (type, row) => { + nextTick(() => { + filesDia.value?.openDialog(type, row) }) }; @@ -193,7 +210,7 @@ type: "warning", }) .then(() => { - staffJoinDel(ids).then((res) => { + qualityInspectDel(ids).then((res) => { proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛"); getList(); }); @@ -210,7 +227,7 @@ type: "warning", }) .then(() => { - proxy.download("/staff/staffJoinLeaveRecord/export", {staffState: 0}, "浜哄憳绂昏亴.xlsx"); + proxy.download("/quality/qualityInspect/export", {inspectType: 0}, "鍘熸潗鏂欐楠�.xlsx"); }) .catch(() => { proxy.$modal.msg("宸插彇娑�"); -- Gitblit v1.9.3