From 55690b8a91083f81158b1619bafe6f248f93265f Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期四, 05 三月 2026 16:22:39 +0800
Subject: [PATCH] fix: 批量删除危险物料管控记录时却只能删除一个
---
src/views/customerService/afterSalesHandling/index.vue | 293 +++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 199 insertions(+), 94 deletions(-)
diff --git a/src/views/customerService/afterSalesHandling/index.vue b/src/views/customerService/afterSalesHandling/index.vue
index dd07ddb..d95e327 100644
--- a/src/views/customerService/afterSalesHandling/index.vue
+++ b/src/views/customerService/afterSalesHandling/index.vue
@@ -1,38 +1,94 @@
<template>
<div class="app-container">
- <div class="search_form">
- <div>
- <span class="search_title">鍙嶉鏃ユ湡锛�</span>
- <el-date-picker
- v-model="searchForm.feedbackDate"
- value-format="YYYY-MM-DD"
- format="YYYY-MM-DD"
- type="date"
- placeholder="璇烽�夋嫨"
- clearable
- @change="handleQuery"
- />
- <span class="search_title ml10">澶勭悊鏃ユ湡锛�</span>
- <el-date-picker
- v-model="searchForm.disDate"
- value-format="YYYY-MM-DD"
- format="YYYY-MM-DD"
- type="date"
- placeholder="璇烽�夋嫨"
- clearable
- @change="handleQuery"
- />
- <span style = "margin-left: 10px;" class="search_title">澶勭悊鐘舵�侊細</span>
- <el-select v-model="searchForm.status" placeholder="璇烽�夋嫨鐘舵��" @change="handleQuery" style="width: 140px" clearable>
- <el-option label="寰呭鐞�" :value="1"></el-option>
- <el-option label="宸插鐞�" :value="2"></el-option>
- </el-select>
- <el-button type="primary" @click="handleQuery" style="margin-left: 10px"
- >鎼滅储</el-button
- >
- <el-button @click="handleOut" style="margin-left: 10px">瀵煎嚭</el-button>
- </div>
- </div>
+ <div class="search-wrapper">
+ <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"
@@ -81,69 +137,107 @@
},
});
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: "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;
- }
- },
- },
- {
- label: "鍙嶉鏃ユ湡",
- prop: "feedbackDate",
- width: 150,
- },
- {
- label: "鐧昏浜�",
- prop: "checkNickName",
- },
- {
- label: "瀹㈡埛鍚嶇О",
- prop: "customerName",
- width: 200,
- },
- {
- label: "闂鎻忚堪",
- prop: "proDesc",
- width:300
- },
- {
- label: "鍏宠仈閮ㄩ棬",
- prop: "deptName",
- width: 200,
- },
- {
- label: "澶勭悊浜�",
- prop: "disposeNickName",
- },
- {
- label: "澶勭悊缁撴灉",
- prop: "disRes",
- width: 200,
- },
- {
- label: "澶勭悊鏃ユ湡",
- prop: "disDate",
- width: 150,
- },
+ 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: "disRes",
+ width:300,
+ },
+ {
+ label: "鍏宠仈閮ㄩ棬",
+ prop: "deptName",
+ width: 200,
+ align: "center"
+ },
{
dataType: "action",
label: "鎿嶄綔",
@@ -197,6 +291,12 @@
const fileListDialogVisible = ref(false)
const currentFileRow = ref(null)
+// 閲嶇疆
+const handleReset = () => {
+ Object.keys(searchForm.value).forEach(key => {
+ searchForm.value[key] = ""
+ })
+}
// 鎵撳紑闄勪欢寮规
const openFilesFormDia = async (row) => {
@@ -386,5 +486,10 @@
</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