From 2323c93baf009d2f60acaec545622611673203cb Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期三, 18 六月 2025 16:48:13 +0800 Subject: [PATCH] 1.巡检上传页面开发、联调 --- src/views/inspectionManagement/index.vue | 50 ++++++++++++++++++++++++++++++-------------------- 1 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/views/inspectionManagement/index.vue b/src/views/inspectionManagement/index.vue index e3eaff1..bb313fd 100644 --- a/src/views/inspectionManagement/index.vue +++ b/src/views/inspectionManagement/index.vue @@ -63,15 +63,23 @@ /> </div> </el-card> + <form-dia ref="formDia" @closeDia="handleQuery"></form-dia> + <qr-code-dia ref="qrCodeDia" @closeDia="handleQuery"></qr-code-dia> </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"; +const formDia = ref() +const qrCodeDia = ref() // 鏌ヨ鍙傛暟 const queryParams = reactive({ supplierName: "", @@ -79,7 +87,7 @@ }) // 褰撳墠鏍囩 const activeTab = ref("task"); -const tabName = ref("qrCode"); +const tabName = ref("task"); // 鏍囩椤垫暟鎹� const tabs = reactive([ { name: "task", label: "浠诲姟涓嬪彂" }, @@ -93,22 +101,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 +125,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,7 +145,14 @@ // 鏂板銆佺紪杈� 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 handleDelete = () => { @@ -152,7 +162,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