renkang
2025-02-07 a80fcaaf130286f215a35aa62450421b480b4d5a
admin/src/views/project/components/houseDetails.vue
@@ -6,10 +6,10 @@
        width="100%">
        <div class="right">
            <div class="right_head">
                <span>{{info.roomNum}}</span>
                <el-tag type="success" v-if="info.leaseStatus === 0">待租赁</el-tag>
                <el-tag type="success" v-if="info.leaseStatus === 1">已租赁</el-tag>
                <el-tag type="success" v-if="info.leaseStatus === 2">未开启租赁</el-tag>
                <span class="right_head_title">{{info.roomNum}}</span>
                <el-tag type="info" v-if="info.leaseStatus == 0">待租赁</el-tag>
                <el-tag type="success" v-if="info.leaseStatus == 1">已租赁</el-tag>
                <el-tag type="info" v-if="info.leaseStatus == 2">未开启租赁</el-tag>
            </div>
            <div class="right_cate">
                <el-tabs v-model="activeName" @tab-click="handleClick">
@@ -85,8 +85,13 @@
                                            </template>
                                        </el-table-column>
                                        <el-table-column
                                            prop="renterName"
                                            label="客户名称">
                                            <template slot-scope="{row}">
                                                <div style="display: flex; align-items: center;">
                                                    {{row.renterName}}
                                                    <el-tag type="success" v-if="row.status === 1">当前租户</el-tag>
                                                </div>
                                            </template>
                                        </el-table-column>
                                        <el-table-column
                                            prop="startDate"
@@ -177,14 +182,15 @@
                                                    value: 'id',
                                                    children: 'childCategoryList'
                                                }" />
                                            <el-select v-model="form.status" style="width: 150px; margin-right: 15px;" placeholder="工单状态">
                                                <el-option label="启用" :value="0"></el-option>
                                                <el-option label="禁用" :value="1"></el-option>
                                            <el-select v-model="form.dealStatus" style="width: 150px; margin-right: 15px;" placeholder="工单状态">
                                                <el-option label="待指派" :value="0"></el-option>
                                                <el-option label="已指派" :value="1"></el-option>
                                                <el-option label="已处理" :value="2"></el-option>
                                            </el-select>
                                            <el-button type="primary" @click="getFetchList">查询</el-button>
                                            <el-button @click="clear">清空</el-button>
                                        </div>
                                        <el-button type="primary" @click="$refs.operaYwWorkorderWindow.open('新建工单')">新增工单</el-button>
                                        <el-button type="primary" @click="addWorkOrder">新增工单</el-button>
                                    </div>
                                    <el-table
                                        :data="tableData"
@@ -322,80 +328,6 @@
                            </el-card>
                        </div>
                    </el-tab-pane>
                    <el-tab-pane label="资产信息" name="fourth">
                        <div class="xm">
                            <el-card>
                                <div slot="header" class="clearfix">
                                    <span>资产清单</span>
                                </div>
                                <div class="xm_table">
                                    <div class="xm_table_search">
                                        <div class="xm_table_search_left">
                                            <el-input v-model="form.code" placeholder="请输入资产名称/编码" style="width: 200px; margin-right: 15px;"></el-input>
                                            <el-select v-model="value" style="width: 200px; margin-right: 15px;" placeholder="资产分类">
                                                <el-option
                                                    v-for="item in options"
                                                    :key="item.value"
                                                    :label="item.label"
                                                    :value="item.value">
                                                </el-option>
                                            </el-select>
                                            <el-button type="primary" @click="getPropertyLists">查询</el-button>
                                            <el-button @click="clear">清空</el-button>
                                        </div>
                                        <el-button type="primary" @click="$refs.newMaterial.open('新建物料')">新增</el-button>
                                    </div>
                                    <el-table
                                        :data="tableData"
                                        border
                                        v-loading="loading"
                                        style="width: 100%">
                                        <el-table-column
                                            prop="code"
                                            label="资产编码">
                                        </el-table-column>
                                        <el-table-column
                                            prop="name"
                                            label="资产名称">
                                        </el-table-column>
                                        <el-table-column
                                            prop="qrcode"
                                            label="条码">
                                        </el-table-column>
                                        <el-table-column
                                            prop="brand"
                                            label="品牌">
                                        </el-table-column>
                                        <el-table-column
                                            prop="attr"
                                            label="规格型号">
                                        </el-table-column>
                                        <el-table-column
                                            prop="unitName"
                                            label="单位">
                                        </el-table-column>
                                        <el-table-column
                                            label="库存数量">
                                            <template v-slot="scope">
                                                <span>{{ scope.row.maxStock }} ~ {{ scope.row.minStock }}</span>
                                            </template>
                                        </el-table-column>
                                    </el-table>
                                    <div class="xm_table_f">
                                        <el-pagination
                                            @size-change="handleSizeChange"
                                            @current-change="handleCurrentChange"
                                            :current-page="page"
                                            :page-sizes="[10, 20, 30, 40]"
                                            :page-size="pageTotal"
                                            layout="total, sizes, prev, pager, next, jumper"
                                            :total="total">
                                        </el-pagination>
                                    </div>
                                </div>
                            </el-card>
                        </div>
                    </el-tab-pane>
                </el-tabs>
            </div>
        </div>
@@ -448,7 +380,8 @@
          areaIds: [],
          cateId: '',
          status: '',
          name: ''
          name: '',
          dealStatus: ''
        },
        cateList: [],
        categaryList: [],
@@ -460,6 +393,7 @@
    methods: {
      open (title, id) {
        this.title = title
        this.activeName = 'houseinfo'
        this.houseId = id
        detailById(id)
          .then(res => {
@@ -470,7 +404,10 @@
      handleEdit(row) {
        this.showEdit1 = true
        this.$nextTick(() => {
          this.$refs.EditRef.param.projectId = this.info.projectId
          this.$refs.EditRef.param.rooms = [this.info.projectId, this.info.buildingId, this.info.floor, this.info.id]
          this.$refs.EditRef.isShowModal = true
          this.$refs.EditRef.changeProject()
        })
      },
      handleDetail(row) {
@@ -479,6 +416,13 @@
          this.$refs.DetailRef.visible = true
          this.$refs.DetailRef.id = row.id
          this.$refs.DetailRef.getDetail()
        })
      },
      addWorkOrder() {
        this.$refs.operaYwWorkorderWindow.open('新建工单', {
          rooms: [this.info.projectId, this.info.buildingId, this.info.floor, this.info.id],
          areaType: 0,
          content: ''
        })
      },
      // 获取设备状态
@@ -562,6 +506,7 @@
        this.form.status = ''
        this.form.areaIds = []
        this.form.cateId = ''
        this.form.dealStatus = ''
        this.form.name = ''
        if (this.propsName === 'project') {
          this.getTenantContract()
@@ -607,7 +552,7 @@
          capacity: this.pageTotal,
          page: this.page,
          model: {
            roomIds: [this.houseId],
            roomId: this.houseId,
            code: this.form.code
          }
        }).then(res => {
@@ -739,6 +684,7 @@
        this.form.cateId = ''
        this.form.status = ''
        this.form.name = ''
        this.form.dealStatus = ''
        this.propsName = tab._props.name
        if (tab._props.name === 'project') {
          this.getTenantContract()
@@ -791,7 +737,7 @@
            width: 100%;
            padding: 20px;
            box-sizing: border-box;
            span {
            .right_head_title {
                font-size: 16px;
                font-weight: bold;
                color: black;