jiangping
2025-06-06 a2299a6d4a6f99e9c11132138f5d3e9ec68f03ea
admin/src/views/contract/components/contractDetail.vue
@@ -16,7 +16,11 @@
          <el-tag type="info" v-if="info.status === 3">退租结算中</el-tag>
          <el-tag type="info" v-if="info.status === 4">已退租</el-tag>
        </div>
        <el-button plain type="danger" v-if="[0, 1, 2].includes(info.status)" @click="refund">退租</el-button>
        <div>
          <el-button type="primary" @click="$refs.pendingBills.open('待处理账单', id)" v-if="info.status === 3">查看待处理账单</el-button>
          <el-button @click="$refs.terminationAgreement.open('退租协议', id)" v-if="[3,4].includes(info.status)">查看退租协议</el-button>
          <el-button plain type="danger" v-if="[0, 1, 2].includes(info.status)" @click="refund">退租</el-button>
        </div>
      </div>
      <div class="remark" v-if="info">{{info.remark}}</div>
      <div class="remark" v-if="info && info.status === 3">{{info.btRemark}}</div>
@@ -42,7 +46,7 @@
          <div class="val">{{ info.creatorName }}</div>
        </div>
        <div class="item">
          <div class="la">合同租赁数</div>
          <div class="la">合同租赁面积</div>
          <div class="val">{{ info.totalArea }}㎡</div>
        </div>
        <div class="item">
@@ -77,12 +81,12 @@
          <el-table-column prop="buildingName" label="楼宇名称" show-overflow-tooltip />
          <el-table-column prop="" label="楼层/房号" show-overflow-tooltip>
            <template slot-scope="{row}">
              {{row.floorName}}/{{row.code}}
              {{row.floorName}}/{{row.roomNum}}
            </template>
          </el-table-column>
          <el-table-column prop="area" label="面积" show-overflow-tooltip>
            <template slot-scope="{row}">
              {{row.area}}㎡
              {{row.rentArea}}㎡
            </template>
          </el-table-column>
        </el-table>
@@ -113,12 +117,17 @@
        </div>
        <div class="item">
          <div class="la">免租期</div>
          <div class="val">{{ info.zlFreeStartDate }} ~ {{ info.zlFreeEndDate }}</div>
          <div class="val" v-if="info.zlFreeStartDate && info.zlFreeEndDate">
            {{ info.zlFreeStartDate }} ~ {{ info.zlFreeEndDate }}
          </div>
          <div class="val" v-else>
            -
          </div>
        </div>
      </div>
      <el-table :data="info.zlDetailList" stripe style="margin-bottom: 20px;" v-if="info.type === 2 || info.type === 0">
        <el-table-column prop="startDate" label="开始日期" min-width="100" show-overflow-tooltip />
        <el-table-column prop="endDate" label="结束日期" min-width="100" show-overflow-tooltip />
        <el-table-column prop="startDate" label="开始日期" :key="Date.now()" min-width="100" show-overflow-tooltip />
        <el-table-column prop="endDate" label="结束日期" :key="Date.now()" min-width="100" show-overflow-tooltip />
        <el-table-column label="合同单价" min-width="100" show-overflow-tooltip>
          <template slot-scope="{row}">
            {{row.price}} {{returnUnit(row.circleType)}}
@@ -126,7 +135,9 @@
        </el-table-column>
        <el-table-column label="付款提前天数" min-width="100" show-overflow-tooltip>
          <template slot-scope="{row}">
            {{row.advanceDays}}天
            <template v-if="row.advanceDays">
              {{row.advanceDays}}天
            </template>
          </template>
        </el-table-column>
      </el-table>
@@ -149,8 +160,8 @@
        </div>
      </div>
      <el-table :data="info.wyDetailList" stripe style="margin-bottom: 20px;" v-if="info.type === 1 || info.type === 0">
        <el-table-column prop="startDate" label="开始日期" min-width="100" show-overflow-tooltip />
        <el-table-column prop="endDate" label="结束日期" min-width="100" show-overflow-tooltip />
        <el-table-column prop="startDate" label="开始日期" :key="Date.now()" min-width="100" show-overflow-tooltip />
        <el-table-column prop="endDate" label="结束日期" :key="Date.now()" min-width="100" show-overflow-tooltip />
        <el-table-column label="合同单价" min-width="100" show-overflow-tooltip>
          <template slot-scope="{row}">
            {{row.price}} {{returnUnit(row.circleType)}}
@@ -185,6 +196,13 @@
        border
        v-loading="loading"
        style="width: 100%">
        <el-table-column
          width="150"
          label="账单编号">
          <template slot-scope="{row}">
            <el-button type="text" @click="openBill(row.id)">{{row.code}}</el-button>
          </template>
        </el-table-column>
        <el-table-column
          label="费用类型">
          <template slot-scope="{row}">
@@ -228,7 +246,7 @@
          label="账单来源">
          <template slot-scope="{row}">
            <span v-if="row.type === 0">合同账单</span>
            <span v-if="row.type === 1">自建账单</span>
            <span v-else>自建账单</span>
          </template>
        </el-table-column>
        <el-table-column
@@ -312,6 +330,12 @@
    </div>
    <!--  退租  -->
    <TerminateLease ref="terminateLease" @success="getData" />
    <!--  待处理账单  -->
    <PendingBills ref="pendingBills" />
    <!--  退租协议  -->
    <TerminationAgreement ref="terminationAgreement" />
    <!--  账单详情  -->
    <BullDetail ref="bullDetail" />
  </GlobalWindow>
</template>
@@ -319,12 +343,18 @@
import GlobalWindow from '@/components/common/GlobalWindow'
import BaseOpera from '@/components/base/BaseOpera'
import TerminateLease from './terminateLease'
import PendingBills from './pendingBills'
import TerminationAgreement from './terminationAgreement'
import BullDetail from '../../finance/components/bullDetail'
import { getById } from '@/api/contract'
import { fetchList } from '@/api/bill'
export default {
  components: {
    GlobalWindow,
    TerminateLease
    TerminateLease,
    PendingBills,
    TerminationAgreement,
    BullDetail
  },
  extends: BaseOpera,
  data() {
@@ -338,7 +368,7 @@
      page: 1,
      total: 0,
      tableData: [],
      loading: false
    }
  },
@@ -355,6 +385,9 @@
    },
    xiazai (url) {
      window.open(url)
    },
    openBill(id) {
      this.$refs.bullDetail.open('账单详情', id)
    },
    returnUnit (type) {
      switch (type) {
@@ -402,7 +435,6 @@
      })
    },
    changeType (e) {
      console.log(e)
      this.type = e
      this.page = 1
      this.pageSize = 10