From 84b7e68f71e414e575518b3c34bf722782cc507d Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期二, 07 一月 2025 17:27:20 +0800
Subject: [PATCH] feat: 修改月租车页面
---
src/components/page/ticket/index.vue | 39 +++++++++++++++++++++++++--------------
1 files changed, 25 insertions(+), 14 deletions(-)
diff --git a/src/components/page/ticket/index.vue b/src/components/page/ticket/index.vue
index e271490..fc44d61 100644
--- a/src/components/page/ticket/index.vue
+++ b/src/components/page/ticket/index.vue
@@ -60,18 +60,17 @@
</template>
</el-table-column>
<el-table-column
+ prop="createTime"
+ header-align="center"
+ align="center"
+ label="澶勭綒鏃堕棿">
+ </el-table-column>
+ <el-table-column
prop="carType"
width="90px"
header-align="center"
align="center"
label="杞﹁締绫诲瀷">
- </el-table-column>
- <el-table-column
- prop="color"
- width="90px"
- header-align="center"
- align="center"
- label="杞﹁締棰滆壊">
</el-table-column>
<el-table-column
prop="address"
@@ -86,7 +85,6 @@
align="center"
label="搴旂即閲戦">
</el-table-column>
-
<el-table-column
prop="payStatus"
width="100px"
@@ -120,15 +118,17 @@
label="澶囨敞">
</el-table-column>
<el-table-column
+ width="300px"
fixed="right"
header-align="center"
align="center"
label="鎿嶄綔">
<template slot-scope="scope">
- <el-button type="text" size="small" icon="el-icon-view" @click="addOrUpdateHandle(scope.row.id)">澶勫喅涔�</el-button>
- <el-button type="text" size="small" icon="el-icon-view" @click="addOrUpdateHandle2(scope.row)">閫佽揪鍥炶瘉</el-button>
+ <el-button type="text" size="small" icon="el-icon-document" @click="addOrUpdateHandle(scope.row.id)">澶勫喅涔�</el-button>
+ <el-button type="text" size="small" icon="el-icon-document-checked" @click="addOrUpdateHandle2(scope.row)">閫佽揪鍥炶瘉</el-button>
<el-button type="text" size="small" icon="el-icon-view" @click="pictureHandle(scope.row)">鍥惧儚璇佹嵁</el-button>
- <el-button type="text" size="small" icon="el-pay6zhifu" @click="jiaofeiHandle(scope.row.id)">鐜板満缂磋垂</el-button>
+ <el-button v-if="items==2" type="text" size="small" icon="el-icon-delete" @click="onDelete(scope.row.id)">鎾ら攢</el-button>
+<!-- <el-button type="text" size="small" icon="el-pay6zhifu" @click="jiaofeiHandle(scope.row.id)">鐜板満缂磋垂</el-button>-->
</template>
</el-table-column>
</el-table>
@@ -148,6 +148,7 @@
import TableForm from './ticket-form'
import TableForm2 from './ticket-form2'
import pictureForm from './picture-form'
+ import {mapState} from 'vuex'
export default {
data () {
return {
@@ -186,7 +187,9 @@
this.tableHeight = window.innerHeight - 255
},
computed: {
-
+ ...mapState({
+ items:'roles'
+ }),
},
methods: {
// 鑾峰彇鏁版嵁鍒楄〃
@@ -232,11 +235,12 @@
},
// 鏂板 / 淇敼
addOrUpdateHandle2 (row) {
- if(row.personName != null){
+ if(row.personName != null && row.personName != ''){
this.addOrUpdateVisible2 = true
this.$nextTick(() => {
- this.$refs.addOrUpdate2.init(id)
+ this.$refs.addOrUpdate2.init(row.id)
})
+
}else {
this.$message.error("澶勫喅涔﹁繕鏈~鍐欙紒")
}
@@ -252,6 +256,13 @@
}
})
},
+ //鍒犻櫎
+ onDelete(id) {
+ this.$byutil.deleteData(this,this.$systemconfig.basePath+'/ffzf/ticket/delete',{id:id}, res => {
+ this.$message({message: '鎾ら攢鎴愬姛', type: 'success'});
+ this.getDataList();
+ })
+ },
}
}
</script>
--
Gitblit v1.9.1