From ffc421d4676db1424d571d8b45dd9c86b84e3bda Mon Sep 17 00:00:00 2001 From: zhang_12370 <z2864490065@outlook.com> Date: 星期二, 24 六月 2025 13:56:55 +0800 Subject: [PATCH] 在上传是 过滤掉pnpm配置文件 --- src/views/inspectionManagement/index.vue | 65 ++++++++++++++++++++++---------- 1 files changed, 44 insertions(+), 21 deletions(-) diff --git a/src/views/inspectionManagement/index.vue b/src/views/inspectionManagement/index.vue index e3eaff1..64bc036 100644 --- a/src/views/inspectionManagement/index.vue +++ b/src/views/inspectionManagement/index.vue @@ -51,7 +51,11 @@ :show-selection="true" :border="true" :maxHeight="480" - @edit="handleAdd"></ETable> + operationsWidth="130" + :operations="['edit', 'viewFile']" + @edit="handleAdd" + @viewFile="viewFile" + ></ETable> </div> <pagination v-if="total>0" @@ -63,15 +67,26 @@ /> </div> </el-card> + <form-dia ref="formDia" @closeDia="handleQuery"></form-dia> + <qr-code-dia ref="qrCodeDia" @closeDia="handleQuery"></qr-code-dia> + <view-files ref="viewFiles"></view-files> </div> </template> <script setup> import {Download, Delete, Plus} from "@element-plus/icons-vue"; import {onMounted, ref} from "vue"; +const { proxy } = getCurrentInstance() import Pagination from "@/components/Pagination/index.vue"; import ETable from "@/components/Table/ETable.vue"; +import FormDia from "@/views/inspectionManagement/components/formDia.vue"; +import QrCodeDia from "@/views/inspectionManagement/components/qrCodeDia.vue"; +import {delInspectionTask, inspectionTaskList} from "@/api/inspectionManagement/index.js"; +import ViewFiles from "@/views/inspectionManagement/components/viewFiles.vue"; +const formDia = ref() +const qrCodeDia = ref() +const viewFiles = ref() // 鏌ヨ鍙傛暟 const queryParams = reactive({ supplierName: "", @@ -79,7 +94,7 @@ }) // 褰撳墠鏍囩 const activeTab = ref("task"); -const tabName = ref("qrCode"); +const tabName = ref("task"); // 鏍囩椤垫暟鎹� const tabs = reactive([ { name: "task", label: "浠诲姟涓嬪彂" }, @@ -93,22 +108,12 @@ const pageNum = ref(1); const pageSize = ref(10); const columns = ref([ - { prop: "saleDate", label: "閿�鍞棩鏈�", minWidth: 160 }, - { prop: "customer", label: "瀹㈡埛", minWidth: 120 }, - { prop: "coal", label: "鐓ょ", minWidth: 150 }, - { prop: "unit", label: "鍗曚綅", minWidth: 150 }, - { prop: "priceIncludingTax", label: "鍗曚环(鍚◣)", minWidth: 150 }, - { prop: "inventoryQuantity", label: "搴撳瓨鏁伴噺", minWidth: 120 }, - { prop: "saleQuantity", label: "閿�鍞暟閲�", minWidth: 120 }, - { prop: "salePrice", label: "閿�鍞崟浠�(鍚◣)", minWidth: 150 }, - { prop: "totalAmount", label: "閿�鍞�讳环(鍚◣)", minWidth: 120 }, - { prop: "freight", label: "杩愯垂", minWidth: 90 }, - { prop: "taxCoal", label: "璐攢鐓ょ◣鐜�(%)", minWidth: 120 }, - { prop: "taxTrans", label: "杩愯緭绋庣巼(%)", minWidth: 120 }, - { prop: "grossProfit", label: "姣涘埄娑�", minWidth: 90 }, - { prop: "netProfit", label: "鍑�鍒╂鼎", minWidth: 90 }, + { prop: "taskName", label: "宸℃浠诲姟鍚嶇О", minWidth: 160 }, + { prop: "port", label: "鍦扮偣", minWidth: 120 }, + { prop: "remarks", label: "澶囨敞", minWidth: 150 }, + { prop: "inspector", label: "鎵ц宸℃浜�", minWidth: 150 }, { prop: "registrant", label: "鐧昏浜�", minWidth: 100 }, - { prop: "registrationDate", label: "鐧昏鏃ユ湡", minWidth: 100 }, + { prop: "createTime", label: "鐧昏鏃ユ湡", minWidth: 100 }, ]); onMounted(() => { @@ -127,8 +132,13 @@ getList() } const getList = () => { - // tableLoading.value = true; - + tableLoading.value = true; + inspectionTaskList({...queryParams, size: pageSize.value, current: pageNum.value}).then(res => { + console.log(res) + tableLoading.value = false; + tableData.value = res.data.records; + total.value = res.data.total; + }) }; // 閲嶇疆鏌ヨ const resetQuery = () => { @@ -142,8 +152,21 @@ // 鏂板銆佺紪杈� const handleAdd = (row) => { - + const type = row === undefined ? 'add' : 'edit' + nextTick(() => { + if (tabName.value === "task") { + formDia.value?.openDialog(type, row) + } else { + qrCodeDia.value?.openDialog(type, row) + } + }) }; +// 鏌ョ湅闄勪欢 +const viewFile = (row) => { + nextTick(() => { + viewFiles.value?.openDialog(row) + }) +} // 鍒犻櫎浠诲姟 const handleDelete = () => { if (selectedRows.value.length === 0) { @@ -152,7 +175,7 @@ } const deleteIds = selectedRows.value.map(item => item.id); proxy.$modal.confirm('鏄惁纭鍒犻櫎鎵�閫夋暟鎹」锛�').then(function() { - return delSalesRecord(deleteIds) + return delInspectionTask(deleteIds) }).then(() => { handleQuery() proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛") -- Gitblit v1.9.3