jiangping
2025-06-06 a2299a6d4a6f99e9c11132138f5d3e9ec68f03ea
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()
      },