From 9f3fee423dd78a440e04757bfccb468bd1f3da7a Mon Sep 17 00:00:00 2001
From: rain <1679827795@qq.com>
Date: Sun, 20 Apr 2025 20:07:03 +0800
Subject: [PATCH] 修改loading状态和完善待处理的工单信息校验和优化页面显示

---
 src/views/tickets/ticket.vue |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index e090b8d..3e40861 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -500,6 +500,7 @@
         selection: true, // 添加多选功能
         index: true,     // 保留序号功能
         indexLabel: '序号',
+        indexWidth: 60,  
         menuWidth: 150,
         searchMenuSpan: 6,
         viewBtn: false,
@@ -520,7 +521,7 @@
             label: "工单内容",
             prop: "content",
             slot: true,
-            width: 233,
+            width: 212,
             overHidden: true
           },
           { label: "创建人", prop: "creator", width: 100 },
@@ -1619,7 +1620,7 @@
     },
     async approveAndDispatch() {
       if (this.dispatchLoading) return;
-      this.dispatchLoading = true;
+      // this.dispatchLoading = true;
       this.dispatchDialogVisible = true; // 打开派发对话框
     },
     hasProcessingBtnPermission() {
@@ -1639,6 +1640,26 @@
     },
     async submitDispatch() {
       if (this.dispatchLoading) return;
+      if (!this.currentDetail.orderName || !this.currentDetail.orderName.trim()) {
+        this.$message.warning('请填写工单名称');
+        return;
+      }
+      if (!this.currentDetail.type) {
+        this.$message.warning('请选择工单类型');
+        return;
+      }
+      if (!this.currentDetail.content || !this.currentDetail.content.trim()) {
+        this.$message.warning('请填写工单内容');
+        return;
+      }
+      if (!this.dispatchForm.department) {
+        this.$message.warning('请选择部门');
+        return;
+      }
+      if (!this.dispatchForm.handler) {
+        this.$message.warning('请选择处理人');
+        return;
+      }
       this.dispatchLoading = true;
       this.$refs.dispatchForm.validate(async (valid) => {
         if (valid) {

--
Gitblit v1.9.3