From ed0f7c772ab2d967a6a39eb169f682e4e77c5a00 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期五, 14 八月 2026 23:20:45 +0800
Subject: [PATCH] fix: bom结构耗料比例调整为8位小数

---
 src/views/customerService/afterSalesHandling/index.vue |  357 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 357 insertions(+), 0 deletions(-)

diff --git a/src/views/customerService/afterSalesHandling/index.vue b/src/views/customerService/afterSalesHandling/index.vue
new file mode 100644
index 0000000..a42337d
--- /dev/null
+++ b/src/views/customerService/afterSalesHandling/index.vue
@@ -0,0 +1,357 @@
+<template>
+	<div class="app-container">
+		<div class="search-wrapper mb20">
+      <el-form
+          :model="searchForm"
+          class="demo-form-inline"
+      >
+        <el-row :gutter="20">
+          <el-col :span="4">
+            <el-form-item>
+              <el-input
+                  v-model="searchForm.afterSalesServiceNo"
+                  placeholder="璇疯緭鍏ュ伐鍗曠紪鍙�"
+                  clearable
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="4">
+            <el-form-item>
+              <el-select
+                  v-model="searchForm.status"
+                  placeholder="璇烽�夋嫨宸ュ崟鐘舵��"
+                  clearable
+              >
+                <el-option
+                    v-for="dict in workOrderStatusOptions"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="4">
+            <el-form-item>
+              <el-select
+                  v-model="searchForm.urgency"
+                  placeholder="璇烽�夋嫨绱ф�ョ▼搴�"
+                  clearable
+              >
+                <el-option
+                    v-for="dict in degreeOfUrgencyOptions"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+           <el-col :span="4">
+            <el-form-item>
+              <el-select
+                  v-model="searchForm.serviceType"
+                  placeholder="璇烽�夋嫨鍞悗绫诲瀷"
+                  clearable
+              >
+                <el-option
+                    v-for="dict in classificationOptions"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+            <el-col :span="4">
+              <el-form-item>
+                <el-input
+                    v-model="searchForm.orderNo"
+                    placeholder="璇疯緭鍏ラ攢鍞崟鍙�"
+                    clearable
+                />
+              </el-form-item>
+            </el-col>
+          
+          
+
+          <!-- 鎸夐挳 -->
+          <el-col :span="4">
+            <el-form-item>
+              <el-button type="primary" @click="handleQuery">
+                鎼滅储
+              </el-button>
+              <el-button @click="handleReset">
+                閲嶇疆
+              </el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+		<div class="table_list">
+			<PIMTable
+				rowKey="id"
+				:column="tableColumn"
+				:tableData="tableData"
+				:page="page"
+				:isSelection="true"
+				@selection-change="handleSelectionChange"
+				:tableLoading="tableLoading"
+				@pagination="pagination"
+			></PIMTable>
+		</div>
+		<form-dia ref="formDia" @close="handleQuery"></form-dia>
+    <FileList v-if="fileDialogVisible"  v-model:visible="fileDialogVisible" record-type="after_sales_service" :record-id="recordId"  />
+  </div>
+</template>
+
+<script setup>
+import {onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick, defineAsyncComponent} from "vue";
+import FormDia from "@/views/customerService/afterSalesHandling/components/formDia.vue";
+import { ElMessageBox } from "element-plus";
+import {
+	afterSalesServiceListPage,
+} from "@/api/customerService/index.js";
+const { proxy } = getCurrentInstance();
+const FileList = defineAsyncComponent(() => import("@/components/Dialog/FileList.vue"));
+
+const data = reactive({
+	searchForm: {
+		feedbackDate: "",
+		disDate: "",
+	},
+});
+const { searchForm } = toRefs(data);
+/* 
+post_sale_waiting_list 鏂板鐨勫敭鍚庡垎绫�
+degree_of_urgency 鏂板鐨勭揣鎬ョ▼搴�
+work_order_status 涓婚〉鐨勫伐鍗曠姸鎬�
+*/
+const { post_sale_waiting_list, degree_of_urgency, work_order_status } = proxy.useDict(
+  "post_sale_waiting_list",
+  "degree_of_urgency",
+  "work_order_status",
+);
+
+const classificationOptions = computed(() => post_sale_waiting_list?.value || []);
+const degreeOfUrgencyOptions = computed(() => degree_of_urgency?.value || []);
+const workOrderStatusOptions = computed(() => work_order_status?.value || []);
+
+const tableColumn = ref([
+	{
+    label: "宸ュ崟缂栧彿",
+    prop:"afterSalesServiceNo",
+    width: 150,
+    align: "center"
+  },
+  {
+    label: "閿�鍞崟鍙�",
+    prop:"salesContractNo",
+    width: 150,
+    align: "center"
+  },
+  {
+    label: "澶勭悊鐘舵��",
+    prop: "status",
+    dataType: "tag",
+    
+    formatData: (params) => {
+      if (params === 1) {
+        return "寰呭鐞�";
+      } else if (params === 2) {
+        return "宸插鐞�";
+      } else {
+        return null;
+      }
+    },
+    formatType: (params) => {
+      if (params === 1) {
+        return "danger";
+      } else if (params === 2) {
+        return "success";
+      } else {
+        return null;
+      }
+    },
+    align: "center"
+  },
+  {
+    label: "鍙嶉鏃ユ湡",
+    prop: "feedbackDate",
+    width: 150,
+    align: "center"
+  },
+  {
+    label: "鐧昏浜�",
+    prop: "checkNickName",
+    align: "center"
+  },
+  {
+    label: "绱ф�ョ▼搴�",
+    prop: "urgency",
+    // 鏍规嵁degreeOfUrgencyOptions瀛楀吀鍘昏嚜鍔ㄥ尮閰�
+    formatData: (params) => {
+      if (params) {
+        const item = degreeOfUrgencyOptions.value.find(item => item.value === params);
+        return item?.label || params;
+      }
+      return null;
+    },
+    align: "center"
+  },
+  {
+    label: "鍞悗绫诲瀷",
+    prop: "serviceType",
+    // 鏍规嵁classificationOptions瀛楀吀鍘昏嚜鍔ㄥ尮閰�
+    formatData: (params) => {
+      if (params) {
+        const item = classificationOptions.value.find(item => item.value === params);
+        return item?.label || params;
+      }
+      return null;
+    },
+    align: "center"
+  },
+	{
+    label: "闂鎻忚堪",
+    prop: "proDesc",
+    width:300,
+  },
+  {
+    label: "澶勭悊缁撴灉",
+    prop: "disRes",
+    width:300,
+  },
+  {
+    label: "鍏宠仈閮ㄩ棬",
+    prop: "deptName",
+    width: 200,
+    align: "center"
+  },
+	{
+		dataType: "action",
+		label: "鎿嶄綔",
+		align: "center",
+		fixed: 'right',
+		width: 240,
+		operation: [
+			{
+				name: "澶勭悊",
+				type: "text",
+				clickFun: (row) => {
+					openForm("approve", row);
+				},
+				disabled: (row) => {
+					return row.status !== 1
+				}
+			},
+			{
+				name: "鏌ョ湅",
+				type: "text",
+				clickFun: (row) => {
+					openForm("view", row);
+				},
+			},
+			// TODO 涓哄啓鎶ュ憡娣诲姞鐨�
+			{
+				name: "闄勪欢",
+				type: "text",
+				clickFun: (row) => {
+					openFilesFormDia(row);
+				},
+			},
+		],
+	},
+]);
+const tableData = ref([]);
+const tableLoading = ref(false);
+const page = reactive({
+	current: 1,
+	size: 100,
+	total: 0,
+});
+const selectedRows = ref([]);
+
+// 琛ㄦ牸閫夋嫨鏁版嵁
+const handleSelectionChange = (selection) => {
+	selectedRows.value = selection;
+};
+const formDia = ref()
+const fileListRef = ref(null)
+const fileListDialogVisible = ref(false)
+const currentFileRow = ref(null)
+
+// 閲嶇疆
+const handleReset = () => {
+  Object.keys(searchForm.value).forEach(key => {
+    searchForm.value[key] = ""
+  })
+}
+
+
+// 鎵撳紑闄勪欢寮圭獥
+const recordId =ref(0)
+const fileDialogVisible = ref(false)
+
+// 鎵撳紑闄勪欢寮规
+const openFilesFormDia = async (row) => {
+  recordId.value = row.id
+  fileDialogVisible.value = true
+}
+
+// 鏌ヨ鍒楄〃
+/** 鎼滅储鎸夐挳鎿嶄綔 */
+const handleQuery = () => {
+	page.current = 1;
+	getList();
+};
+const pagination = (obj) => {
+	page.current = obj.page;
+	page.size = obj.limit;
+	getList();
+};
+const getList = () => {
+	tableLoading.value = true;
+	afterSalesServiceListPage({ ...searchForm.value, ...page }).then((res) => {
+		tableLoading.value = false;
+		tableData.value = res.data.records;
+		page.total = res.data.total;
+	});
+};
+
+// 鎵撳紑寮规
+const openForm = (type, row) => {
+	nextTick(() => {
+		formDia.value?.openDialog(type, row)
+	})
+};
+
+// 瀵煎嚭
+const handleOut = () => {
+	ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+		confirmButtonText: "纭",
+		cancelButtonText: "鍙栨秷",
+		type: "warning",
+	})
+		.then(() => {
+			proxy.download("/afterSalesService/exportTwo", {}, "鍞悗澶勭悊.xlsx");
+		})
+		.catch(() => {
+			proxy.$modal.msg("宸插彇娑�");
+		});
+};
+
+onMounted(() => {
+	getList();
+});
+</script>
+
+<style scoped>
+.search-wrapper {
+  background: white;
+  padding: 1rem 1rem 0 1rem;
+  border: 8px;
+  border-radius: 16px;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3