Browse Source

巡更时间问题

Shannon_mu 3 years ago
parent
commit
168a78e72b

+ 111 - 0
operationSupport/src/views/businessManagement/rentalAndSale/details.vue

@@ -0,0 +1,111 @@
+<template>
+    <div class="">
+        <div class="search">
+            <el-input placeholder="输入房间号" class="search-input" clearable v-model="mixins_query.roomNumber"></el-input>
+            <el-select v-model="mixins_query.salesStatus" 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" class="search-btn" @click="mixins_search" icon="el-icon-search">查询 </el-button>
+
+            <div class="search-icon">
+                <el-button type="primary" @click="$parent.isLook = !$parent.isLook">返回</el-button>
+            </div>
+        </div>
+        <div class="roles-wrap">
+            <zz-table
+                :cols="cols"
+                :settings="{ showIndex: true, stripe: true }"
+                :loading="mixins_onQuery"
+                :data="mixins_list"
+                :pageset="mixins_pageset"
+                @page-change="pageChange"
+                @selection-change="selectionChange"
+            >
+            </zz-table>
+        </div>
+    </div>
+</template>
+
+<script>
+import list from '@utils/list.js';
+import lookDetails from './details.vue';
+export default {
+    mixins: [list],
+    props: ['prData'],
+    components: {
+        lookDetails
+    },
+    data() {
+        return {
+            isLook: false,
+            thisObj: {},
+            communityArr: [],
+            cols: [
+                {
+                    label: '房屋名称',
+                    prop: 'buildingName'
+                },
+                {
+                    label: '建筑面积(㎡)',
+                    prop: 'unitNumber'
+                },
+                {
+                    label: '租售状态',
+                    prop: 'floorsNumber'
+                },
+                {
+                    label: '客户/业主名称',
+                    prop: 'houseNumber'
+                },
+                {
+                    label: '到期时间',
+                    slot: 'SaleNums'
+                }
+            ],
+            mixins_post: 'post'
+        };
+    },
+    created() {
+        this.getorgTree();
+        this.mixins_dataUrl = '/sc-community/rentalSales/detail';
+        this.mixins_query = {
+            communityId: this.prData.communityId,
+            buildingName: this.prData.buildingName
+        };
+
+        this.mixins_search();
+    },
+    mounted() {},
+    methods: {
+        lookDetail(row) {
+            this.thisObj = row;
+            this.isLook = !this.isLook;
+        },
+        getorgTree() {
+            this.$http
+                .get('/sc-community/assets/community/list')
+                .then((data) => {
+                    this.communityArr = data.data;
+                    this.$store.commit('setAreaSelect', data.data);
+                })
+
+                .catch(function () {});
+        },
+        rwNumber(row, fh) {
+            let SoldNumer = row.houseNumber - row.unSaleNums;
+
+            let Sold = 0;
+            if (SoldNumer !== 0) {
+                Sold = SoldNumer / row.houseNumber;
+            }
+            if (!!fh) {
+                return Math.floor(Sold * 100) + '%';
+            } else {
+                return SoldNumer;
+            }
+        }
+    }
+};
+</script>

+ 50 - 26
operationSupport/src/views/businessManagement/rentalAndSale/index.vue

@@ -1,40 +1,56 @@
 <template>
     <div class="main">
-        <div class="search">
-            <el-input placeholder="输入楼栋名称" class="search-input" clearable v-model="mixins_query.buildingName"></el-input>
-            <el-select v-model="mixins_query.communityId" placeholder="请选择所属社区" clearable>
-                <el-option v-for="(item, index) in communityArr" :key="index" :label="item.communityName" :value="item.id"></el-option>
-            </el-select>
-            <el-button type="primary" class="search-btn" @click="mixins_search" icon="el-icon-search">查询 </el-button>
-        </div>
-        <div class="roles-wrap">
-            <zz-table
-                :cols="cols"
-                :settings="{ showIndex: true, stripe: true }"
-                :loading="mixins_onQuery"
-                :data="mixins_list"
-                :pageset="mixins_pageset"
-                @page-change="pageChange"
-                @selection-change="selectionChange"
-            >
-                <template slot-scope="scope" slot="SaleNums">
-                    {{ rwNumber(scope.row) }}
-                </template>
-                <template slot-scope="scope" slot="rate">
-                    {{ rwNumber(scope.row, '%') }}
-                </template>
-            </zz-table>
-        </div>
+        <template v-if="!isLook">
+            <div class="search">
+                <el-input placeholder="输入楼栋名称" class="search-input" clearable v-model="mixins_query.buildingName"></el-input>
+                <el-select v-model="mixins_query.communityId" placeholder="请选择所属社区" clearable>
+                    <el-option v-for="(item, index) in communityArr" :key="index" :label="item.communityName" :value="item.id"></el-option>
+                </el-select>
+                <el-button type="primary" class="search-btn" @click="mixins_search" icon="el-icon-search">查询 </el-button>
+            </div>
+            <div class="roles-wrap">
+                <zz-table
+                    :cols="cols"
+                    :settings="{ showIndex: true, stripe: true }"
+                    :loading="mixins_onQuery"
+                    :data="mixins_list"
+                    :pageset="mixins_pageset"
+                    @page-change="pageChange"
+                    @selection-change="selectionChange"
+                >
+                    <template slot-scope="scope" slot="SaleNums">
+                        {{ rwNumber(scope.row) }}
+                    </template>
+                    <template slot-scope="scope" slot="rate">
+                        {{ rwNumber(scope.row, '%') }}
+                    </template>
+                    <template slot-scope="scope" slot="opt">
+                        <div class="opt">
+                            <el-tooltip effect="light" placement="bottom" content="查看">
+                                <i class="zoniot_font zoniot-icon-xiangqing" @click="lookDetail(scope.row)"></i>
+                            </el-tooltip>
+                        </div>
+                    </template>
+                </zz-table>
+            </div>
+        </template>
+        <look-details v-else :prData="thisObj"></look-details>
     </div>
 </template>
 
 <script>
 import list from '@utils/list.js';
+import lookDetails from './details.vue';
 export default {
     mixins: [list],
     name: 'advertisingManagement',
+    components: {
+        lookDetails
+    },
     data() {
         return {
+            isLook: false,
+            thisObj: {},
             communityArr: [],
             cols: [
                 {
@@ -68,6 +84,10 @@ export default {
                 {
                     label: '租售率',
                     slot: 'rate'
+                },
+                {
+                    label: '操作',
+                    slot: 'opt'
                 }
             ],
             mixins_post: 'post'
@@ -80,6 +100,10 @@ export default {
     },
     mounted() {},
     methods: {
+        lookDetail(row) {
+            this.thisObj = row;
+            this.isLook = !this.isLook;
+        },
         getorgTree() {
             this.$http
                 .get('/sc-community/assets/community/list')
@@ -98,7 +122,7 @@ export default {
                 Sold = SoldNumer / row.houseNumber;
             }
             if (!!fh) {
-                return Math.floor(Sold * 100)  + '%';
+                return Math.floor(Sold * 100) + '%';
             } else {
                 return SoldNumer;
             }

+ 20 - 7
operationSupport/src/views/patrolManagement/popups/scheduling.vue

@@ -23,12 +23,10 @@
                 <div class="schedulingUser">
                     <template v-for="(item, index) in calendarData">
                         <div :key="index" v-if="data.day == item.partrolDate">
-                            <template v-for="itx in item.rosterUserDtos">
-                                <div :key="itx" class="listTime">
-                                    <span>{{ itx.partrolTime }}</span>
-                                    <span>{{ itx.partolName }}</span>
-                                </div>
-                            </template>
+                            <div :key="itx" class="listTime" v-for="itx in item.rosterUserDtos">
+                                <span>{{ itx.partrolTime }}</span>
+                                <span>{{ itx.partolName }}</span>
+                            </div>
                             <template v-if="date.getTime() <= $moment(thisObj.endDate).valueOf() && thisTimeFF(data, item.rosterUserDtos)">
                                 <!-- 每周那几天 -->
                                 <span v-if="thisObj.periodType == 1">
@@ -49,7 +47,7 @@
                     <template
                         v-if="
                             date.getTime() <= $moment(thisObj.endDate).valueOf() &&
-                            date.getTime() >= $moment(new Date()).valueOf() &&
+                            thisTimeNull(data, thisObj.timePeriod) &&
                             !trueArr.includes(data.day)
                         "
                     >
@@ -232,6 +230,21 @@ export default {
             }
             return indU;
         },
+        thisTimeNull(s, item) {
+            let thisDate = this.$moment(new Date());
+            let sur = false;
+            if (!!item) {
+                let timePot = item.split('-');
+                timePot.map((its) => {
+                    if (this.$moment(`${s.day} ${its}:00`).valueOf() > thisDate.valueOf()) {
+                        sur = true;
+                        return sur;
+                    }
+                });
+            }
+
+            return sur;
+        },
         thisTimeFF(s, arr) {
             let thisDate = this.$moment(new Date());
             let sur = false;