From 57e98ac3f59e9ca12d3fdbc6f89c9c0b1f86be4d Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期四, 05 二月 2026 00:49:10 +0800
Subject: [PATCH] feat:增加发票申请

---
 ruoyi-ui/src/views/task/general/index.vue |   88 ++++++++++++++++++++++++++++++++------------
 1 files changed, 64 insertions(+), 24 deletions(-)

diff --git a/ruoyi-ui/src/views/task/general/index.vue b/ruoyi-ui/src/views/task/general/index.vue
index 8988020..3c41b95 100644
--- a/ruoyi-ui/src/views/task/general/index.vue
+++ b/ruoyi-ui/src/views/task/general/index.vue
@@ -29,6 +29,30 @@
           />
         </el-select>
       </el-form-item>
+      <el-form-item label="鍒嗗叕鍙�" prop="deptId">
+        <el-select
+          v-model="queryParams.deptId"
+          placeholder="璇烽�夋嫨鍒嗗叕鍙�"
+          clearable
+          filterable
+          style="width: 200px"
+        >
+          <el-option
+            v-for="dept in branchList"
+            :key="dept.deptId"
+            :label="dept.deptName"
+            :value="dept.deptId"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="杞︾墝鍙�" prop="vehicleNo">
+        <el-input
+          v-model="queryParams.vehicleNo"
+          placeholder="璇疯緭鍏ヨ溅鐗屽彿"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item label="璁″垝寮�濮嬫椂闂�">
         <el-date-picker
           v-model="dateRange"
@@ -94,48 +118,46 @@
 
     <el-table v-loading="loading" :data="taskList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="浠诲姟缂栧彿" align="center" prop="taskCode">
+      <el-table-column label="浠诲姟缂栧彿" align="center" prop="showTaskCode" min-width="120">
         <template slot-scope="scope">
           <el-button
             type="text"
             @click="handleView(scope.row)"
             v-hasPermi="['task:general:query']"
-          >{{ scope.row.taskCode }}</el-button>
+            style="font-family: 'Courier New', monospace; font-size: 13px;"
+          >{{ scope.row.showTaskCode }}</el-button>
         </template>
       </el-table-column>
       <el-table-column label="浠诲姟绫诲瀷" align="center" prop="taskType" width="120">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_task_type" :value="scope.row.taskType"/>
-          <el-tag v-if="scope.row.taskType === 'EMERGENCY_TRANSFER'" type="danger" size="mini" style="margin-left: 5px;">
-            <i class="el-icon-warning"></i>
-          </el-tag>
+          
         </template>
       </el-table-column>
+   
       <el-table-column label="浠诲姟鐘舵��" align="center" prop="taskStatus">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_task_status" :value="scope.row.taskStatus"/>
         </template>
       </el-table-column>
-      <el-table-column label="鍑哄彂鍦板潃" align="center" prop="departureAddress" show-overflow-tooltip />
-      <el-table-column label="鐩殑鍦板潃" align="center" prop="destinationAddress" show-overflow-tooltip />
+      <el-table-column label="杞︾墝鍙�" align="center" prop="vehicleNo" width="120">
+        <template slot-scope="scope">
+          <span v-if="scope.row.vehicleNo">{{ scope.row.vehicleNo }}</span>
+          <span v-else style="color: #C0C4CC;">--</span>
+        </template>
+      </el-table-column>
+      
+      <!-- <el-table-column label="鐩殑鍦板潃" align="center" prop="destinationAddress" show-overflow-tooltip /> -->
       <el-table-column label="棰勮鍏噷鏁�" align="center" prop="estimatedDistance" width="120">
         <template slot-scope="scope">
           <span v-if="scope.row.estimatedDistance">{{ scope.row.estimatedDistance }} km</span>
           <span v-else style="color: #C0C4CC;">--</span>
         </template>
       </el-table-column>
-      <el-table-column label="璁″垝寮�濮嬫椂闂�" align="center" prop="plannedStartTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.plannedStartTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="璁″垝缁撴潫鏃堕棿" align="center" prop="plannedEndTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.plannedEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
-        </template>
-      </el-table-column>
+ 
+     
       <el-table-column label="鍒涘缓浜�" align="center" prop="creatorName" />
-      <el-table-column label="鎵ц浜�" align="center" prop="assigneeName" />
+      
       <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@@ -150,27 +172,27 @@
             @click="handleView(scope.row)"
             v-hasPermi="['task:general:query']"
           >鏌ョ湅</el-button>
-          <el-button
+          <!-- <el-button
             size="mini"
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['task:general:edit']"
-          >淇敼</el-button>
-          <el-button
+          >淇敼</el-button> -->
+          <!-- <el-button
             size="mini"
             type="text"
             icon="el-icon-user"
             @click="handleAssign(scope.row)"
             v-hasPermi="['task:general:assign']"
-          >鍒嗛厤</el-button>
-          <el-button
+          >鍒嗛厤</el-button> -->
+          <!-- <el-button
             size="mini"
             type="text"
             icon="el-icon-refresh"
             @click="handleStatusChange(scope.row)"
             v-hasPermi="['task:general:status']"
-          >鐘舵��</el-button>
+          >鐘舵��</el-button> -->
           <el-button
             size="mini"
             type="text"
@@ -380,6 +402,7 @@
 <script>
 import { listTask, getTask, delTask, addTask, updateTask, assignTask, changeTaskStatus } from "@/api/task";
 import { listUser } from "@/api/system/user";
+import { listBranchByOa } from "@/api/system/dept";
 
 export default {
   name: "Task",
@@ -400,6 +423,8 @@
       total: 0,
       // 浠诲姟绠$悊琛ㄦ牸鏁版嵁
       taskList: [],
+      // 鏄惁鏈夋�ユ晳杞繍浠诲姟锛堢敤浜庢帶鍒跺悓姝ョ姸鎬佸垪鏄剧ず锛�
+      hasEmergencyTask: false,
       // 寮瑰嚭灞傛爣棰�
       title: "",
       // 鏄惁鏄剧ず寮瑰嚭灞�
@@ -417,6 +442,8 @@
         taskCode: null,
         taskType: null,
         taskStatus: null,
+        deptId: null,
+        vehicleNo: null,
         plannedStartTimeBegin: null,
         plannedStartTimeEnd: null,
       },
@@ -428,6 +455,8 @@
       statusForm: {},
       // 鐢ㄦ埛鍒楄〃
       userList: [],
+      // 鍒嗗叕鍙稿垪琛�
+      branchList: [],
       // 琛ㄥ崟鏍¢獙
       rules: {
         taskType: [
@@ -460,6 +489,7 @@
   created() {
     this.getList();
     this.getUserList();
+    this.getBranchList();
   },
   methods: {
     /** 鏌ヨ浠诲姟绠$悊鍒楄〃 */
@@ -472,6 +502,8 @@
       listTask(this.queryParams).then(response => {
         this.taskList = response.rows;
         this.total = response.total;
+        // 妫�鏌ユ槸鍚︽湁鎬ユ晳杞繍浠诲姟锛岀敤浜庢帶鍒跺悓姝ョ姸鎬佺浉鍏冲垪鐨勬樉绀�
+        this.hasEmergencyTask = this.taskList.some(task => task.taskType === 'EMERGENCY_TRANSFER');
         this.loading = false;
       });
     },
@@ -481,6 +513,14 @@
         this.userList = response.rows;
       });
     },
+    /** 鏌ヨ鍒嗗叕鍙稿垪琛� */
+    getBranchList() {
+      listBranchByOa().then(response => {
+        this.branchList = response.data || [];
+      }).catch(() => {
+        this.branchList = [];
+      });
+    },
     // 鍙栨秷鎸夐挳
     cancel() {
       this.open = false;

--
Gitblit v1.9.1