From bbff46e35d4314b95af6f0019773bc23f0e25c4b Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Sat, 06 Jan 2024 18:17:40 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_web

---
 src/views/userHouse/hireInfoList.vue |  539 +++++++++++++++++++++++++++++++----------------------------
 1 files changed, 280 insertions(+), 259 deletions(-)

diff --git a/src/views/userHouse/hireInfoList.vue b/src/views/userHouse/hireInfoList.vue
index 5a2dc50..80d0043 100644
--- a/src/views/userHouse/hireInfoList.vue
+++ b/src/views/userHouse/hireInfoList.vue
@@ -7,35 +7,28 @@
                     @row-save="rowSave" :before-open="beforeOpen" :page.sync="page" @search-change="searchChange"
                     @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
                     @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+                    <template slot-scope="{row, size}" slot="auditStatus">
+                        <el-tag :size="size" :type="showConfirmFlag(row.auditStatus).type">
+                            {{ showConfirmFlag(row.auditStatus).text }}
+                        </el-tag>
+                    </template>
+
                     <template slot="menuLeft">
-                        <el-button type="danger" size="small" plain icon="el-icon-delete"
+                        <el-button type="danger" :size="size" plain icon="el-icon-delete"
                             v-if="permission.houseRental_delete" @click="handleDelete">删 除
                         </el-button>
                     </template>
 
-                    <template slot-scope="scope" slot="menu">
-                        <el-button type="text" icon="el-icon-circle-plus-outline" size="small"
-                            v-if="permission.househould_manager" @click="ManageTenants(scope.row)">管理租户
+                    <template slot-scope="{row, size}" slot="menu">
+                        <el-button :size="size" type="text" icon="el-icon-circle-plus-outline"
+                            v-if="permission.househould_manager" @click="ManageTenants(row)">管理租户
                         </el-button>
                         <!--  <el-button type="success" size="small" plain icon="el-icon-upload2" @click="handleImport">导入
             </el-button>
             <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
             </el-button> -->
                     </template>
-                    <template slot-scope="{row}" slot="tenantName">
-                        <el-tag>{{ row.tenantName }}</el-tag>
-                    </template>
-                    <template slot-scope="{row}" slot="roleName">
-                        <el-tag>{{ row.roleName }}</el-tag>
-                    </template>
-                    <template slot-scope="{row}" slot="deptName">
-                        <el-tag>{{ row.deptName }}</el-tag>
-                    </template>
-                    <template slot-scope="{row}" slot="userTypeName">
-                        <el-tag>{{ row.userTypeName }}</el-tag>
-                    </template>
                 </avue-crud>
-
 
                 <el-dialog title="租户管理" append-to-body :visible.sync="roleBox">
                     <avue-crud :option="houseHoldOption" :search.sync="search" :table-loading="loading" :data="houseHold"
@@ -50,7 +43,6 @@
                         <el-button type="primary" @click="submitRole">确 定</el-button>
                     </span>
                 </el-dialog>
-
 
                 <el-dialog title="用户数据导入" append-to-body :visible.sync="excelBox" width="555px">
                     <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
@@ -210,11 +202,15 @@
                 ]
             },
             option: {
+                labelWidth: 120,
+                searchLabelWidth: 96,
+                searchShow: true,
+                searchMenuSpan: 3,
+                menuWidth: 280,
+
                 height: 'auto',
                 calcHeight: 80,
                 tip: false,
-                searchShow: true,
-                searchMenuSpan: 6,
                 border: true,
                 index: true,
                 selection: true,
@@ -222,252 +218,257 @@
                 addBtn: true,
                 dialogType: 'drawer',
                 dialogClickModal: false,
-                menuWidth: 280,
-                column: [{
-                    label: "房屋",
-                    prop: "address",
-                    display: false
-                },
-                {
-                    label: "房屋",
-                    prop: "houseCode",
-                    hide: true,
-                    type: "table",
-                    children: {
-                        border: true,
-                        height: 400,
-                        searchShow: true,
-                        searchMenuSpan: 6,
-                        submitText: "确定",
-                        column: [
-                            {
-                                width: 220,
-                                overHidden: true,
-                                label: '小区名称',
-                                prop: "districtName",
-                                search: true,
-                                searchSpan: 4,
-                                rules: [{
-                                    required: true,
-                                    message: "请输入小区名称",
-                                    trigger: "blur",
-                                },],
-                            },
-                            {
-                                label: "地址",
-                                prop: "address",
-                                width: 180,
-                                display: false
-                            },
-                            {
-                                label: "手机",
-                                prop: "phone",
-                                rules: [{
-                                    required: true,
-                                    message: "请输入绑定手机",
-                                    trigger: "blur",
-                                },],
-                            },
+
+                column: [
+                    {
+                        label: "房屋",
+                        prop: "address",
+                        display: false
+                    },
+                    {
+                        label: "房屋",
+                        prop: "houseCode",
+                        hide: true,
+                        type: "table",
+                        children: {
+                            border: true,
+                            height: 400,
+                            searchShow: true,
+                            searchMenuSpan: 6,
+                            submitText: "确定",
+                            column: [
+                                {
+                                    width: 220,
+                                    overHidden: true,
+                                    label: '小区名称',
+                                    prop: "districtName",
+                                    search: true,
+                                    searchSpan: 4,
+                                    rules: [{
+                                        required: true,
+                                        message: "请输入小区名称",
+                                        trigger: "blur",
+                                    },],
+                                },
+                                {
+                                    label: "地址",
+                                    prop: "address",
+                                    width: 180,
+                                    display: false
+                                },
+                                {
+                                    label: "手机",
+                                    prop: "phone",
+                                    rules: [{
+                                        required: true,
+                                        message: "请输入绑定手机",
+                                        trigger: "blur",
+                                    },],
+                                },
+                            ],
+                        },
+                        page: {
+                            pageSize: 10,
+                            currentPage: 1,
+                            total: 0
+                        },
+                        formatter: (row) => {
+                            console.log(row, 888)
+                            if (!row.districtName) return ''
+                            return row.districtName + '-' + row.unit + row.building + row.room
+                        },
+                        onLoad: ({
+                            page,
+                            value,
+                            data
+                        }, callback) => {
+                            //首次加载去查询对应的值
+                            if (value) {
+                                getHouseDetail({
+                                    houseCode: value
+                                }).then(res => {
+                                    var resData = res.data.data
+                                    // 查询对应行数据
+                                    callback(resData)
+                                    return
+                                })
+                            }
+                            if (page) {
+                                this.loading = true
+                                getHouseList(page.currentPage, page.pageSize, Object.assign(data)).then(res => {
+                                    const resData = res.data.data
+                                    var total = resData.total
+                                    var data = resData.records
+                                    this.loading = false
+                                    this.selectionClear()
+                                    //分页查询信息
+                                    callback({
+                                        total: total,
+                                        data: data
+                                    })
+                                })
+                            }
+                        },
+                        props: {
+                            label: 'address',
+                            value: 'houseCode'
+                        }
+                    },
+                    {
+                        label: "关系",
+                        prop: "tenantRelationship",
+                        search: true,
+                        searchSpan: 3,
+                        searchLabelWidth: 66,
+                        width: 100,
+                        type: "select",
+                        dicData: [{
+                            label: "同一户",
+                            value: 1
+                        },
+                        {
+                            label: "不同一户",
+                            value: 2
+                        }
+                        ],
+                        rules: [{
+                            required: true,
+                            message: "请选择关系",
+                            trigger: "blur",
+                        },],
+                    },
+                    {
+                        label: "房屋状态",
+                        prop: "houseStatus",
+                        search: true,
+                        searchSpan: 4,
+                        width: 100,
+                        type: "select",
+                        dicData: [{
+                            label: "部分出租",
+                            value: 1
+                        },
+                        {
+                            label: "全部出租",
+                            value: 2
+                        }
+                        ],
+                        rules: [{
+                            required: true,
+                            message: "请选择房屋状态",
+                            trigger: "blur",
+                        },],
+                    },
+                    {
+                        label: "用途",
+                        prop: "rentalUse",
+                        type: "select",
+                        searchSpan: 3,
+                        searchLabelWidth: 66,
+                        search: true,
+                        dataType: "number",
+                        width: 100,
+                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=rentalUseType",
+                        props: {
+                            label: "dictValue",
+                            value: "dictKey",
+                        },
+                        rules: [{
+                            required: true,
+                            message: "请选择用途",
+                            trigger: "blur",
+                        },],
+                    },
+                    {
+                        width: 100,
+                        label: "租房时间",
+                        prop: "rentalTime",
+                        type: "date",
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd",
+                        rules: [{
+                            required: true,
+                            message: "请选择租房时间",
+                            trigger: "blur",
+                        },],
+                    },
+                    {
+                        label: "到期时间",
+                        prop: "dueTime",
+                        type: "date",
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd",
+                        width: 100,
+                        rules: [{
+                            required: true,
+                            message: "请选择到期时间",
+                            trigger: "blur",
+                        },],
+                    },
+
+                    {
+                        label: "租赁期限",
+                        prop: "dldType",
+                        width: 100,
+                        display: false,
+                        search: true,
+                        searchSpan: 4,
+                        type: "select",
+                        dicData: [{
+                            label: "长期",
+                            value: 1
+                        },
+                        {
+                            label: "中期",
+                            value: 2
+                        },
+                        {
+                            label: "短期",
+                            value: 3
+                        }
                         ],
                     },
-                    page: {
-                        pageSize: 10,
-                        currentPage: 1,
-                        total: 0
-                    },
-                    formatter: (row) => {
-                        console.log(row, 888)
-                        if (!row.districtName) return ''
-                        return row.districtName + '-' + row.unit + row.building + row.room
-                    },
-                    onLoad: ({
-                        page,
-                        value,
-                        data
-                    }, callback) => {
-                        //首次加载去查询对应的值
-                        if (value) {
-                            getHouseDetail({
-                                houseCode: value
-                            }).then(res => {
-                                var resData = res.data.data
-                                // 查询对应行数据
-                                callback(resData)
-                                return
-                            })
-                        }
-                        if (page) {
-                            this.loading = true
-                            getHouseList(page.currentPage, page.pageSize, Object.assign(data)).then(res => {
-                                const resData = res.data.data
-                                var total = resData.total
-                                var data = resData.records
-                                this.loading = false
-                                this.selectionClear()
-                                //分页查询信息
-                                callback({
-                                    total: total,
-                                    data: data
-                                })
-                            })
-                        }
-                    },
-                    props: {
-                        label: 'address',
-                        value: 'houseCode'
-                    }
-                },
-                {
-                    label: "关系",
-                    prop: "tenantRelationship",
-                    search: true,
-                    searchSpan: 4,
-                    width: 100,
-                    type: "select",
-                    dicData: [{
-                        label: "同一户",
-                        value: 1
+                    {
+                        width: 80,
+                        label: "审核状态",
+                        prop: "auditStatus",
+                        type: "select",
+                        search: true,
+                        searchSpan: 4,
+                        display: false,
+                        slot: true,
+                        dicData: [
+                            {
+                                label: "已确认",
+                                value: 1
+                            },
+                            {
+                                label: "待确认",
+                                value: 0
+                            }
+                        ],
                     },
                     {
-                        label: "不同一户",
-                        value: 2
-                    }
-                    ],
-                    rules: [{
-                        required: true,
-                        message: "请选择关系",
-                        trigger: "blur",
-                    },],
-                },
-                {
-                    label: "房屋状态",
-                    prop: "houseStatus",
-                    search: true,
-                    searchSpan: 4,
-                    width: 100,
-                    type: "select",
-                    dicData: [{
-                        label: "部分出租",
-                        value: 1
+                        width: 144,
+                        label: "创建时间",
+                        prop: "createTime",
+                        display: false,
                     },
                     {
-                        label: "全部出租",
-                        value: 2
-                    }
-                    ],
-                    rules: [{
-                        required: true,
-                        message: "请选择房屋状态",
-                        trigger: "blur",
-                    },],
-                },
-                {
-                    label: "用途",
-                    prop: "rentalUse",
-                    type: "select",
-                    search: true,
-                    searchSpan: 3,
-                    dataType: "number",
-                    width: 100,
-                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=rentalUseType",
-                    props: {
-                        label: "dictValue",
-                        value: "dictKey",
+                        label: "合同",
+                        prop: "fileUrls",
+                        // align:'center',
+                        width: 80,
+                        type: "upload",
+                        listType: "picture-img",
+                        action: "/api/blade-resource/oss/endpoint/put-file",
+                        propsHttp: {
+                            res: "data",
+                            url: "link",
+                        },
+                        hide: true,
+                        span: 24,
                     },
-                    rules: [{
-                        required: true,
-                        message: "请选择用途",
-                        trigger: "blur",
-                    },],
-                },
-                {
-                    label: "租房时间",
-                    prop: "rentalTime",
-                    type: "date",
-                    format: "yyyy-MM-dd",
-                    valueFormat: "yyyy-MM-dd",
-                    width: 100,
-                    rules: [{
-                        required: true,
-                        message: "请选择租房时间",
-                        trigger: "blur",
-                    },],
-                },
-                {
-                    label: "到期时间",
-                    prop: "dueTime",
-                    type: "date",
-                    format: "yyyy-MM-dd",
-                    valueFormat: "yyyy-MM-dd",
-                    width: 100,
-                    rules: [{
-                        required: true,
-                        message: "请选择到期时间",
-                        trigger: "blur",
-                    },],
-                },
-
-                {
-                    label: "租赁期限",
-                    prop: "dldType",
-                    width: 100,
-                    display: false,
-                    search: true,
-                    searchSpan: 3,
-                    type: "select",
-                    dicData: [{
-                        label: "长期",
-                        value: 1
-                    },
-                    {
-                        label: "中期",
-                        value: 2
-                    },
-                    {
-                        label: "短期",
-                        value: 3
-                    }
-                    ],
-                },
-                {
-                    label: "审核状态",
-                    prop: "auditStatus",
-                    type: "select",
-                    width: 80,
-                    search: true,
-                    searchSpan: 4,
-                    display: false,
-                    dicData: [{
-                        label: "已确认",
-                        value: 1
-                    },
-                    {
-                        label: "待确认",
-                        value: 0
-                    }
-                    ],
-                },
-                {
-                    label: "创建时间",
-                    prop: "createTime",
-                    display: false,
-                    width: 160,
-                },
-                {
-                    label: "合同",
-                    prop: "fileUrls",
-                    // align:'center',
-                    width: 80,
-                    type: "upload",
-                    listType: "picture-img",
-                    action: "/api/blade-resource/oss/endpoint/put-file",
-                    propsHttp: {
-                        res: "data",
-                        url: "link",
-                    },
-                    hide: true,
-                    span: 24,
-                },
                 ]
             },
             data: [],
@@ -531,6 +532,25 @@
                 viewBtn: this.vaildData(this.permission.houseRental_view, true),
                 delBtn: this.vaildData(this.permission.houseRental_delete, true),
                 editBtn: this.vaildData(this.permission.houseRental_edit, true)
+            }
+        },
+        showConfirmFlag () {
+            return (data) => {
+                let tags = {}
+
+                if (data == 0) {
+                    tags = {
+                        type: 'warning',
+                        text: '待处理'
+                    }
+                } else if (data == 1) {
+                    tags = {
+                        type: 'success',
+                        text: '已处理'
+                    }
+                }
+
+                return tags
             }
         }
     },
@@ -771,6 +791,7 @@
         },
         onLoad (page, params = {}) {
             this.loading = true
+
             getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                 const data = res.data.data
                 this.page.total = data.total

--
Gitblit v1.9.3