From c313a253b1fcdc75b6be5db575fc2b29fb407021 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期三, 15 四月 2026 20:05:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 admin/src/views/business/driverList.vue |  155 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 155 insertions(+), 0 deletions(-)

diff --git a/admin/src/views/business/driverList.vue b/admin/src/views/business/driverList.vue
new file mode 100644
index 0000000..4ae814c
--- /dev/null
+++ b/admin/src/views/business/driverList.vue
@@ -0,0 +1,155 @@
+<template>
+  <TableLayout :permissions="['business:driverInfo:query']">
+    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
+      <el-form-item label="鍙告満淇℃伅" prop="keyword">
+        <el-input v-model="searchForm.keyword" clearable placeholder="璇疯緭鍏ュ徃鏈哄鍚�/鎵嬫満鍙�" @keypress.enter.native="search"></el-input>
+      </el-form-item>
+      <el-form-item label="杞︾墝鍙�" prop="carNo">
+        <el-input v-model="searchForm.carNo" clearable placeholder="璇疯緭鍏ヨ溅鐗屽彿" @keypress.enter.native="search"></el-input>
+      </el-form-item>
+      <el-form-item label="鐘舵��" prop="status">
+        <el-select v-model="searchForm.status" clearable placeholder="璇烽�夋嫨鐘舵��" @change="search">
+          <el-option label="绂佺敤" :value="1"></el-option>
+          <el-option label="鍚敤" :value="0"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="鎬у埆" prop="sex">
+        <el-select v-model="searchForm.sex" clearable placeholder="璇烽�夋嫨鎬у埆" @change="search">
+          <el-option label="鐢�" :value="1"></el-option>
+          <el-option label="濂�" :value="2"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="鍒涘缓鏃堕棿" prop="createTime">
+        <el-date-picker type="daterange" v-model="searchForm.createTime" clearable value-format="yyyy-MM-dd"
+                        range-separator="-" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" @change="handleDateChange" />
+      </el-form-item>
+      <section>
+        <el-button type="primary" @click="search">鎼滅储</el-button>
+        <el-button @click="reset">閲嶇疆</el-button>
+        <el-button :loading="isWorking.export" @click="exportExcel">瀵煎嚭</el-button>
+      </section>
+    </el-form>
+    <template v-slot:table-wrap>
+      <el-table
+        :height="tableHeightNew"
+        v-loading="isWorking.search"
+        :data="tableData.list"
+        stripe
+      >
+        <el-table-column prop="name" label="鍙告満濮撳悕" min-width="100px"></el-table-column>
+        <el-table-column label="鎬у埆" min-width="60px">
+          <template slot-scope="{row}">{{ row.gender === 1 ? '鐢�' : row.gender === 2 ? '濂�' : '-' }}</template>
+        </el-table-column>
+        <el-table-column prop="telephone" label="娉ㄥ唽鎵嬫満鍙�" min-width="120px"></el-table-column>
+        <el-table-column prop="idcard" label="韬唤璇佸彿" min-width="160px"></el-table-column>
+        <el-table-column label="璐︽埛浣欓" min-width="100px">
+          <template slot-scope="{row}">楼{{ (row.memberAmount / 100).toFixed(2) }}</template>
+        </el-table-column>
+        <el-table-column prop="carCode" label="杞︾墝鍙�" min-width="100px"></el-table-column>
+        <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" min-width="160px"></el-table-column>
+        <el-table-column label="鐘舵��" min-width="80px">
+          <template slot-scope="{row}">
+            <el-switch
+              @change="handleStatusChange($event, row)"
+              v-model="row.status"
+              active-color="#13ce66"
+              inactive-color="#ff4949"
+              :active-value="0"
+              :inactive-value="1"
+            ></el-switch>
+          </template>
+        </el-table-column>
+        <el-table-column label="鎿嶄綔" min-width="100" fixed="right">
+          <template slot-scope="{row}">
+            <el-button type="text" @click="handleDetail(row)">璇︽儏</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        @size-change="handleSizeChange"
+        @current-change="handlePageChange"
+        :pagination="tableData.pagination"
+      ></pagination>
+    </template>
+    <OperaDriverDetail ref="operaDriverDetail" />
+  </TableLayout>
+</template>
+
+<script>
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import Pagination from '@/components/common/Pagination'
+import OperaDriverDetail from '@/components/business/OperaDriverDetail'
+import { updateStatus, exportExcel } from '@/api/business/driver'
+
+export default {
+  name: 'DriverList',
+  extends: BaseTable,
+  components: { TableLayout, Pagination, OperaDriverDetail },
+  data () {
+    return {
+      searchForm: {
+        keyword: '',
+        carNo: '',
+        status: '',
+        sex: '',
+        createTime: '',
+        startTime: '',
+        endTime: '',
+        auditStatus: 1
+      }
+    }
+  },
+  created () {
+    this.config({
+      api: '/business/driver',
+      'field.id': 'id'
+    })
+    this.search()
+  },
+  methods: {
+    handleDateChange (val) {
+      this.searchForm.startTime = val ? val[0] : ''
+      this.searchForm.endTime = val ? val[1] : ''
+      this.search()
+    },
+    reset () {
+      this.searchForm = {
+        keyword: '',
+        carNo: '',
+        status: '',
+        sex: '',
+        createTime: '',
+        startTime: '',
+        endTime: ''
+      }
+      this.search()
+    },
+    handleDetail (row) {
+      this.$refs.operaDriverDetail.open('鍙告満璇︽儏', row)
+    },
+    handleStatusChange (val, row) {
+      updateStatus({ id: row.id, status: val }).then(res => {
+        this.$tip.apiSuccess(res || '淇敼鎴愬姛')
+      }).catch(e => {
+        row.status = val === 1 ? 0 : 1
+        this.$tip.apiFailed(e)
+      })
+    },
+    handleExport () {
+      this.isWorking.export = true
+      exportExcel(this.getTableParams())
+        .then(res => {
+          this.download(res)
+          this.$tip.apiSuccess('瀵煎嚭鎴愬姛')
+        })
+        .catch(e => {
+          this.$tip.apiFailed(e)
+        })
+        .finally(() => {
+          this.isWorking.export = false
+        })
+    }
+  }
+}
+</script>

--
Gitblit v1.9.3