From 5a85dcab83e969d6b21c599b512a15117e9b8651 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 04 七月 2024 08:54:30 +0800
Subject: [PATCH] ''
---
admin/src/views/operation/serviceCar/apprRecord.vue | 81 ++++++++++++++++++++++++++++------------
1 files changed, 56 insertions(+), 25 deletions(-)
diff --git a/admin/src/views/operation/serviceCar/apprRecord.vue b/admin/src/views/operation/serviceCar/apprRecord.vue
index 34fab76..85828a2 100644
--- a/admin/src/views/operation/serviceCar/apprRecord.vue
+++ b/admin/src/views/operation/serviceCar/apprRecord.vue
@@ -17,7 +17,7 @@
<el-option label="瀹℃牳涓�" value="1"></el-option>
<el-option label="瀹℃壒閫氳繃" value="2"></el-option>
<el-option label="瀹℃壒涓嶉�氳繃" value="3"></el-option>
- <el-option label="宸插彇娑�" value="4"></el-option>
+ <el-option label="宸叉挙閿�" value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item label="鐩殑鍦扮被鍨�" prop="type">
@@ -34,6 +34,7 @@
type="datetimerange"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
+ :default-time="['00:00:00', '23:59:59']"
range-separator="鑷�"
start-placeholder="寮�濮嬫棩鏈�"
end-placeholder="缁撴潫鏃ユ湡">
@@ -51,8 +52,9 @@
</el-form>
<!-- 琛ㄦ牸鍜屽垎椤� -->
<template v-slot:table-wrap>
- <ul class="toolbar" v-permissions="['business:empower:create', 'business:empower:delete']">
- <!--<li><el-button type="primary" v-permissions="['business:empower:exportExcel']" @click="exportExcel">瀵煎嚭</el-button></li> -->
+ <ul class="toolbar" v-permissions="['business:carusebook:create','business:carusebook:exportExcel']">
+ <li><el-button type="primary" @click="handleEdit" icon="el-icon-plus" v-permissions="['business:carusebook:create']">鏂板缓</el-button></li>
+ <li><el-button type="primary" @click="handleEx" v-permissions="['business:carusebook:exportExcel']">瀵煎嚭</el-button></li>
</ul>
<el-table
v-loading="isWorking.search"
@@ -81,10 +83,10 @@
<el-table-column label="鐘舵��" min-width="100px">
<template slot-scope="{row}">
<span class="status-blue" v-if="row.status === 0">鐢宠涓�</span>
- <span class="status-blue" v-if="row.status === 1">寰呭鎵�</span>
+ <span class="status-blue" v-if="row.status === 1">瀹℃牳涓�</span>
<span class="status-green" v-if="row.status === 2">瀹℃壒閫氳繃</span>
<span class="status-red" v-if="row.status === 3">瀹℃壒涓嶉�氳繃</span>
- <span class="status-red" v-if="row.status === 4">宸插彇娑�</span>
+ <span class="status-red" v-if="row.status === 4">宸叉挙閿�</span>
</template>
</el-table-column>
@@ -92,12 +94,13 @@
<el-table-column prop="editDate" label="鎿嶄綔鏃堕棿" min-width="150px"></el-table-column>
<el-table-column
label="鎿嶄綔"
- min-width="100"
+ min-width="140"
align="center"
fixed="right"
>
<template slot-scope="{row}">
<el-button type="text" icon="el-icon-edit" @click="$refs.OperaDetailsWindow.open('鍏姟杞︾敵璇疯鎯�',row)" >鏌ョ湅璇︽儏</el-button>
+ <el-button v-if="(row.status === 1 || row.status === 2) && new Date().getTime() < new Date(row.startTime).getTime()" type="text" icon="el-icon-delete" @click="rowRevokeClick(row)" >鎾ら攢</el-button>
</template>
</el-table-column>
</el-table>
@@ -109,6 +112,7 @@
</pagination>
</template>
<OperaCarUseBookWindow ref="OperaDetailsWindow" @success="handlePageChange"/>
+ <OperaCarUseBookParamWindow ref="OperaParamWindow" @success="search"/>
</TableLayout>
</template>
@@ -117,12 +121,14 @@
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaCarUseBookWindow from '@/components/business/OperaCarUseBookWindow'
+import OperaCarUseBookParamWindow from '@/components/operation/OperCarUseBookParamWindow.vue'
import { timeForMat } from '@/utils/util'
import { allList } from '@/api/business/hiddenDangerParam'
+import { carUseBookRecordEx, revokeById } from '@/api/business/carUseBook'
export default {
name: 'Empower',
extends: BaseTable,
- components: { TableLayout, Pagination ,OperaCarUseBookWindow},
+ components: { TableLayout, Pagination, OperaCarUseBookWindow, OperaCarUseBookParamWindow },
data () {
return {
// 鎼滅储
@@ -132,7 +138,8 @@
queryStartTime: '',
queryEndTime: '',
type: null,
- status:null
+ status: null,
+ radio: 0
},
cateList: [],
areaList: [],
@@ -151,6 +158,27 @@
this.loadParams()
},
methods: {
+ rowRevokeClick (row) {
+ revokeById(row.id)
+ },
+ handleEx () {
+ this.$dialog.exportConfirm('纭瀵煎嚭鍚楋紵')
+ .then(() => {
+ this.exLoading = true
+ carUseBookRecordEx({
+ model: this.searchForm
+ })
+ .then(response => {
+ this.download(response)
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.exLoading = false
+ })
+ })
+ },
changeRadio (e) {
this.searchForm.radio = e
if (e === '0') {
@@ -168,26 +196,29 @@
}
this.search()
},
+ handleEdit () {
+ this.$refs.OperaParamWindow.open()
+ },
loadParams () {
allList({
})
- .then(res => {
- if (res != null && res.length) {
- res.forEach(item => {
- if (item && item.type != null && item.type === 0) {
- this.areaList.push(item)
- }
- if (item && item.type != null && item.type === 1) {
- this.cateList.push(item)
- }
- })
- }
- })
- .catch(e => {
- // this.$tip.apiFailed(e)
- })
- .finally(() => {
- })
+ .then(res => {
+ if (res != null && res.length) {
+ res.forEach(item => {
+ if (item && item.type != null && item.type === 0) {
+ this.areaList.push(item)
+ }
+ if (item && item.type != null && item.type === 1) {
+ this.cateList.push(item)
+ }
+ })
+ }
+ })
+ .catch(e => {
+ // this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ })
},
seleTime (e) {
this.searchForm.queryStartTime = e[0]
--
Gitblit v1.9.3