From a8c03746e6bd8ac1d46dc48c1b10bceff543664f Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 10 十二月 2024 20:16:12 +0800
Subject: [PATCH] ll
---
admin/src/views/vehicle/cars.vue | 67 ++++++++++++++++++++++++++++-----
1 files changed, 57 insertions(+), 10 deletions(-)
diff --git a/admin/src/views/vehicle/cars.vue b/admin/src/views/vehicle/cars.vue
index 058289a..efd2bd9 100644
--- a/admin/src/views/vehicle/cars.vue
+++ b/admin/src/views/vehicle/cars.vue
@@ -9,10 +9,14 @@
<el-input v-model="searchForm.memberName" clearable placeholder="杞︿富淇℃伅"
@keypress.enter.native="search"></el-input>
</el-form-item>
- <!-- <el-form-item label="" prop="cateName" title="杞﹁締鍒嗙被鍚嶇О">
- <el-input v-model="searchForm.cateName" clearable placeholder="杞﹁締鍒嗙被鍚嶇О"
- @keypress.enter.native="search"></el-input>
- </el-form-item> -->
+ <el-form-item label="" prop="catePName" title="鍒嗙被鍚嶇О">
+ <el-cascader v-model="searchForm.cateIds" @change="changeSel" placeholder="璇烽�夋嫨鍒嗙被" clearable :options="cateList" :props="{
+ label: 'name',
+ value: 'id',
+ children: 'childCategoryList',
+ checkStrictly: true
+ }"></el-cascader>
+ </el-form-item>
<el-form-item label="" prop="companyName" title="杞︿富缁勭粐鍚嶇О">
<el-input v-model="searchForm.companyName" clearable placeholder="杞︿富缁勭粐鍚嶇О"
@keypress.enter.native="search"></el-input>
@@ -37,9 +41,14 @@
</el-form>
<!-- 琛ㄦ牸鍜屽垎椤� -->
<template v-slot:table-wrap>
- <ul class="toolbar" v-permissions="['business:cars:create', 'business:parkBook:create']">
+ <ul class="toolbar"
+ v-permissions="['business:cars:create', 'business:cars:exportExcel', 'business:parkBook:create']">
<li><el-button type="primary" @click="handleEdit" icon="el-icon-plus"
v-permissions="['business:cars:create']">鏂板缓</el-button></li>
+ <li><el-button type="primary" @click="$refs.OperaCarsImportWindowRef.open('浜哄憳瀵煎叆', searchForm.companyType)" v-permissions="['business:cars:create']">杞﹁締瀵煎叆</el-button>
+ </li>
+ <li><el-button type="primary" @click="exportExcel" v-permissions="['business:cars:exportExcel']">瀵煎嚭</el-button>
+ </li>
<li><el-button type="primary" @click="startEmpowerBatch" icon="el-icon-plus"
v-permissions="['business:parkbook:create']">涓嬪彂鎺堟潈</el-button></li>
</ul>
@@ -48,7 +57,8 @@
<el-table-column prop="code" label="杞︾墝鍙�" min-width="100px"></el-table-column>
<el-table-column prop="memberName" label="杞︿富濮撳悕" min-width="100px"></el-table-column>
<el-table-column prop="memberPhone" label="杞︿富鎵嬫満鍙�" min-width="100px"></el-table-column>
- <el-table-column prop="cateName" label="杞﹁締鍒嗙被" min-width="160px"></el-table-column>
+ <el-table-column prop="catePName" label="涓�绾у垎绫�" min-width="120px"></el-table-column>
+ <el-table-column prop="cateName" label="浜岀骇鍒嗙被" min-width="120px"></el-table-column>
<el-table-column prop="companyName" label="杞︿富缁勭粐" min-width="200px"></el-table-column>
<el-table-column label="鏄惁鎺堟潈" align="center" min-width="100px">
<template slot-scope="{row}">
@@ -63,7 +73,7 @@
<span
:style="(item.hkStatus == 0 ? 'color:#2080f7' : (item.hkStatus == 1 ? 'color:green' : (item.hkStatus == 2 ? 'color:red' : '')))">銆恵{
item.hkStatus ==
- 0 ? '绛夊緟涓嬪彂' : (item.hkStatus == 1 ? '涓嬪彂鎴愬姛' : (item.hkStatus == 2 ?'涓嬪彂澶辫触':''))}}銆� </span>{{
+ 0 ? '绛夊緟涓嬪彂' : (item.hkStatus == 1 ? '涓嬪彂鎴愬姛' : (item.hkStatus == 2 ? '涓嬪彂澶辫触' : '')) }}銆� </span>{{
item.parksName }}
</span>
</div>
@@ -111,6 +121,7 @@
</template>
<!-- 鏂板缓/淇敼 -->
<OperaCarAuthWindow ref="operaCarAuthWindow" @success="handlePageChange" />
+ <OperaCarsImportWindow ref="OperaCarsImportWindowRef" @success="handlePageChange" />
<OperaCarsWindow v-if="isShowEdit" ref="operaCarsWindow" @close="isShowEdit = false" @success="handlePageChange" />
</TableLayout>
</template>
@@ -121,10 +132,12 @@
import Pagination from '@/components/common/Pagination'
import OperaCarsWindow from '@/components/business/OperaCarsWindow'
import OperaCarAuthWindow from '@/components/business/OperaCarAuthWindow'
+import OperaCarsImportWindow from './components/OperaCarsImportWindow'
+import { fetchList } from '@/api/business/category.js'
export default {
name: 'Cars',
extends: BaseTable,
- components: { TableLayout, Pagination, OperaCarsWindow, OperaCarAuthWindow },
+ components: { TableLayout, Pagination, OperaCarsWindow, OperaCarAuthWindow,OperaCarsImportWindow },
data() {
return {
// 鎼滅储
@@ -132,10 +145,16 @@
code: '',
memberName: '',
companyName: '',
+ cateIds: [],
+ catePId: '',
+ cateId: '',
type: null,
- authStatus: null
+ authStatus: null,
+ ids: ''
},
- isShowEdit: false
+ isShowEdit: false,
+ cateList: [],
+ selIdsList: []
}
},
created() {
@@ -146,8 +165,36 @@
'field.main': 'id'
})
this.search()
+ this.getCate()
},
methods: {
+ // handleSelectionChange(e) {
+ // this.searchForm.ids = e.map(i => i.id).join(',')
+ // },
+ changeSel(e) {
+ console.log(e)
+ if (e && e.length == 1) {
+ this.$set(this.searchForm, 'catePId', e[0])
+ this.$set(this.searchForm, 'cateId', '')
+ } else if (e && e.length == 2) {
+ this.$set(this.searchForm, 'catePId', e[0])
+ this.$set(this.searchForm, 'cateId', e[1])
+ } else {
+ this.$set(this.searchForm, 'catePId', '')
+ this.$set(this.searchForm, 'cateId', '')
+ }
+ this.search()
+ },
+ getCate() {
+ fetchList({
+ model: {},
+ capacity: 1000,
+ page: 1,
+ }).then(res => {
+ this.cateList = res.records || []
+
+ })
+ },
handleEdit(row) {
this.isShowEdit = true
let str = row && row.id ? '缂栬緫杞﹁締' : '鏂板缓杞﹁締'
--
Gitblit v1.9.3