Explorar el Código

商铺合同tab

Shannon_mu hace 3 años
padre
commit
379be2e1b6

+ 59 - 9
operationSupport/src/views/assetManagement/shopManagement/details.vue

@@ -37,7 +37,23 @@
                 </zz-table>
             </div>
             <div class="content-item" v-show="tabsIndex === 3">
-                <zz-table :cols="cols1" :data="mixins_list" :pageset="mixins_pageset" :settings="{ stripe: true }"> </zz-table>
+                <zz-table
+                    :cols="cols1"
+                    :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="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>
         </div>
     </div>
@@ -292,34 +308,40 @@ export default {
             cols1: [
                 {
                     label: '合同名称',
-                    prop: 'communityName'
+                    prop: 'contractName'
                 },
                 {
                     label: '合同类型',
-                    prop: 'buildingName'
+                    prop: 'contractType',
+                    format(val) {
+                        if (val == 0) {
+                            return '租赁合同';
+                        }
+                    }
                 },
                 {
                     label: '签订时间',
-                    prop: 'buildingName'
+                    prop: 'signTime'
                 },
                 {
                     label: '到期时间',
-                    prop: 'buildingName'
+                    prop: 'endTime'
                 },
                 {
                     label: '租赁方',
-                    prop: 'buildingName'
+                    prop: 'userName'
                 },
                 {
                     label: '备注',
-                    prop: 'buildingName'
+                    prop: 'remark'
                 },
                 {
                     label: '操作',
                     slot: 'opt',
                     width: 150
                 }
-            ]
+            ],
+            mixins_post: 'post'
         };
     },
     filters: {
@@ -343,6 +365,7 @@ export default {
         this.id = this.$route.query.id;
         this.getDetails();
         this.getMember();
+        this.getContract();
     },
     methods: {
         toggleTab(index) {
@@ -379,7 +402,7 @@ export default {
             this.$http
                 .get('/sc-community/assets/house/find/house?houseId=' + this.id)
                 .then((res) => {
-                     if (!!res) {
+                    if (!!res) {
                         this.detailsData = res;
                         if (!!res.residentId) {
                             this.getHouse(res.residentId);
@@ -427,6 +450,33 @@ export default {
                 showConfirmButton: true,
                 title: '成员信息'
             });
+        },
+        getContract() {
+            this.mixins_query = {   
+                houseId: this.$route.query.id
+            };
+            this.mixins_dataUrl = '/sc-community/contract/page';
+
+            this.mixins_search();
+        },
+        lookDetail(row) {
+            new Promise((resolve) => {
+                this.$store.dispatch('addPopup', {
+                    url: '/businessManagement/contractManagement/stepPage/details.vue',
+                    width: '850px',
+                    height: '600px',
+                    props: {
+                        row,
+                        callback: resolve
+                    },
+                    title: '合同详情',
+                    hideStar: true,
+                    showCancelButton: true,
+                    showConfirmButton: true
+                });
+            }).then(() => {
+                this.mixins_search();
+            });
         }
     }
 };

+ 5 - 2
operationSupport/src/views/businessManagement/contractManagement/stepPage/details.vue

@@ -44,7 +44,11 @@
             <div class="blockCl">
                 <el-col :span="8">
                     <el-form-item label="合同附件:">
-                        <div @click="clickFlie(formData.fileName, formData.filePath)" class="lookfil" v-if="formData.customerType == 1">
+                        <div
+                            @click="clickFlie(formData.fileName, formData.filePath)"
+                            class="lookfil"
+                            v-if="formData.customerType == 1 && formData.filePath"
+                        >
                             <img src="@assets/img/icon_fujian@2x.png" alt="" />{{ formData.fileName }}
                         </div>
                         <span v-else>-</span>
@@ -179,7 +183,6 @@ export default {
                 .then(({ data, status, msg }) => {
                     if (0 === status) {
                         this.companyObj = data;
-                        console.log(data);
                     } else {
                         this.$message.error(msg);
                     }