From 43dd708784177ea36f450a90680e99f0969f0f8c Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期六, 08 二月 2025 17:43:50 +0800
Subject: [PATCH] 改bug
---
admin/src/views/contract/components/terminateLease.vue | 42 +++++++++++++++++++++++++++++++-----------
1 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/admin/src/views/contract/components/terminateLease.vue b/admin/src/views/contract/components/terminateLease.vue
index 751ac20..5520b8a 100644
--- a/admin/src/views/contract/components/terminateLease.vue
+++ b/admin/src/views/contract/components/terminateLease.vue
@@ -27,6 +27,7 @@
<el-date-picker
v-model="form.btDate"
type="date"
+ :picker-options="pickerOptions"
@change="changeBtDate"
value-format="yyyy-MM-dd"
placeholder="璇烽�夋嫨">
@@ -56,19 +57,19 @@
<el-table-column prop="projectName" label="椤圭洰鍚嶇О" show-overflow-tooltip />
<el-table-column label="鎴挎簮鍚嶇О" show-overflow-tooltip>
<template slot-scope="{row}">
- {{row.buildingName}}/{{row.code}}
+ {{row.buildingName}}/{{row.roomNum}}
</template>
</el-table-column>
<el-table-column label="绉熻祦闈㈢Н(銕�)" show-overflow-tooltip>
<template slot-scope="{row}">
- {{row.area}}銕�
+ {{row.rentArea}}銕�
</template>
</el-table-column>
</el-table>
</div>
</div>
<div class="title">
- <span>閫�绉熶俊鎭�</span>
+ <span>璐﹀崟缁撶畻</span>
<div style="display: flex; align-items: center;">
<el-button type="primary" @click="addZD">娣诲姞鏀舵</el-button>
<el-button type="primary" @click="addFK">娣诲姞浠樻</el-button>
@@ -86,12 +87,19 @@
<el-table-column
width="100"
label="璐圭敤绫诲瀷">
- <template slot-scope="{row}">
- <span v-if="row.costType === 0">绉熻祦璐�</span>
- <span v-if="row.costType === 1">鐗╀笟璐�</span>
- <span v-if="row.costType === 4">姘寸數璐�</span>
- <span v-if="row.costType === 5">鏉傞」璐�</span>
- <span v-if="row.costType === 6">鍏朵粬</span>
+ <template slot-scope="scope">
+ <div style="display: flex; align-items: center;">
+ <span v-if="scope.row.costType === 0">绉熻祦璐�</span>
+ <span v-if="scope.row.costType === 1">鐗╀笟璐�</span>
+ <span v-if="scope.row.costType === 4">姘寸數璐�</span>
+ <span v-if="scope.row.costType === 5">鏉傞」璐�</span>
+ <span v-if="scope.row.costType === 6">鍏朵粬</span>
+ <i class="el-icon-delete"
+ style="color: red; margin-left: 10px; font-size: 18px; cursor: pointer;"
+ @click="deleRow(scope.$index)"
+ v-if="scope.row.isDele">
+ </i>
+ </div>
</template>
</el-table-column>
<el-table-column
@@ -243,7 +251,7 @@
},
list: [],
-
+ pickerOptions: {},
agentList: [],
receivable: '',
@@ -256,6 +264,14 @@
open (title, info) {
this.title = title
this.info = info
+ this.pickerOptions = {
+ disabledDate(time) {
+ // 濡傛灉娌℃湁鍚庨潰鐨� -8.64e7 灏辨槸涓嶅彲浠ラ�夋嫨浠婂ぉ鐨�
+ const beginDate = new Date(info.startDate).getTime() - 8.64e7
+ const endDate = new Date(info.endDate).getTime()
+ return beginDate > time.getTime() || endDate < time.getTime()
+ }
+ }
this.form.id = info.id
this.form.btSignDate = this.getDay()
this.form.btUserId = this.userInfo.id
@@ -269,6 +285,10 @@
this.getUser()
this.changeBtDate(this.form.btDate)
this.visible = true
+ },
+ deleRow(index) {
+ this.info.terminateList.splice(index, 1)
+ this.countData()
},
getDayTime () {
const today = new Date();
@@ -359,9 +379,9 @@
})
},
getObjS (obj) {
- console.log(obj)
obj.startDate = obj.startDate.substring(0, 10)
obj.endDate = obj.endDate.substring(0, 10)
+ obj.isDele = true
this.info.terminateList.push(obj)
this.countData()
},
--
Gitblit v1.9.3