From 624faa46fb237709a40db1567e3b708ec24c4222 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 12 六月 2025 17:30:41 +0800
Subject: [PATCH] 1.巡检管理页面开发

---
 src/views/inspectionManagement/index.vue |  158 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 157 insertions(+), 1 deletions(-)

diff --git a/src/views/inspectionManagement/index.vue b/src/views/inspectionManagement/index.vue
index 458acb2..e3eaff1 100644
--- a/src/views/inspectionManagement/index.vue
+++ b/src/views/inspectionManagement/index.vue
@@ -1,11 +1,167 @@
 <template>
   <div class="app-container">
-  
+    <el-form :inline="true" :model="queryParams" class="search-form">
+      <el-form-item label="渚涘簲鍟嗗悕绉�">
+        <el-input
+            v-model="queryParams.supplierName"
+            placeholder="璇疯緭鍏�"
+            clearable
+            :style="{ width: '100%' }"
+        />
+      </el-form-item>
+      <el-form-item label="鐓ょ">
+        <el-input
+            v-model="queryParams.coal"
+            placeholder="璇疯緭鍏�"
+            clearable
+            :style="{ width: '100%' }"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" @click="handleQuery">鏌ヨ</el-button>
+        <el-button @click="resetQuery">閲嶇疆</el-button>
+      </el-form-item>
+    </el-form>
+    <el-card>
+      <!-- 鏍囩椤� -->
+      <el-tabs
+          v-model="activeTab"
+          class="info-tabs"
+          @tab-click="handleTabClick"
+      >
+        <el-tab-pane
+            v-for="tab in tabs"
+            :key="tab.name"
+            :label="tab.label"
+            :name="tab.name"
+        />
+      </el-tabs>
+      <!-- 鎿嶄綔鎸夐挳鍖� -->
+      <el-space>
+        <el-button type="primary" :icon="Plus" @click="handleAdd">鏂板缓</el-button>
+        <el-button type="danger" :icon="Delete" @click="handleDelete">鍒犻櫎</el-button>
+        <el-button type="info" plain :icon="Download">瀵煎嚭</el-button>
+      </el-space>
+      <div>
+        <div>
+          <ETable :loading="tableLoading"
+                  :table-data="tableData"
+                  :columns="columns"
+                  @selection-change="handleSelectionChange"
+                  :show-selection="true"
+                  :border="true"
+                  :maxHeight="480"
+                  @edit="handleAdd"></ETable>
+        </div>
+        <pagination
+            v-if="total>0"
+            :page-num="pageNum"
+            :page-size="pageSize"
+            :total="total"
+            @pagination="handleQuery"
+            :layout="'total, prev, pager, next, jumper'"
+        />
+      </div>
+    </el-card>
   </div>
 </template>
 
 <script setup>
+import {Download, Delete, Plus} from "@element-plus/icons-vue";
+import {onMounted, ref} from "vue";
+import Pagination from "@/components/Pagination/index.vue";
+import ETable from "@/components/Table/ETable.vue";
 
+// 鏌ヨ鍙傛暟
+const queryParams = reactive({
+  supplierName: "",
+  coal: "",
+})
+// 褰撳墠鏍囩
+const activeTab = ref("task");
+const tabName = ref("qrCode");
+// 鏍囩椤垫暟鎹�
+const tabs = reactive([
+  { name: "task", label: "浠诲姟涓嬪彂" },
+  { name: "qrCode", label: "浜岀淮鐮佺鐞�" },
+]);
+// 琛ㄦ牸
+const selectedRows = ref([]);
+const tableData = ref([]);
+const tableLoading = ref(false);
+const total = ref(0);
+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: "registrant", label: "鐧昏浜�", minWidth: 100 },
+  { prop: "registrationDate", label: "鐧昏鏃ユ湡", minWidth: 100 },
+]);
+
+onMounted(() => {
+  handleTabClick({ props: { name: "task" } });
+});
+// 鏍囩椤电偣鍑�
+const handleTabClick = (tab) => {
+  tabName.value = tab.props.name;
+  tableData.value = [];
+  getList();
+};
+// 鐐瑰嚮鏌ヨ
+const handleQuery = () => {
+  pageNum.value = 1
+  pageSize.value = 10
+  getList()
+}
+const getList = () => {
+  // tableLoading.value = true;
+  
+};
+// 閲嶇疆鏌ヨ
+const resetQuery = () => {
+  Object.keys(queryParams).forEach((key) => {
+    if (key !== "pageNum" && key !== "pageSize") {
+      queryParams[key] = "";
+    }
+  });
+  handleQuery();
+};
+
+// 鏂板銆佺紪杈�
+const handleAdd = (row) => {
+
+};
+// 鍒犻櫎浠诲姟
+const handleDelete = () => {
+  if (selectedRows.value.length === 0) {
+    proxy.$modal.msgWarning("璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁");
+    return;
+  }
+  const deleteIds = selectedRows.value.map(item => item.id);
+  proxy.$modal.confirm('鏄惁纭鍒犻櫎鎵�閫夋暟鎹」锛�').then(function() {
+    return delSalesRecord(deleteIds)
+  }).then(() => {
+    handleQuery()
+    proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛")
+  }).catch(() => {})
+};
+// 閫夋嫨琛�
+const handleSelectionChange = (selection) => {
+  selectedRows.value = selection;
+};
 </script>
 
 <style scoped>

--
Gitblit v1.9.3