From a2299a6d4a6f99e9c11132138f5d3e9ec68f03ea Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 06 六月 2025 19:19:34 +0800
Subject: [PATCH] 开发更新

---
 admin/src/views/contract/contractList.vue |  155 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 155 insertions(+), 0 deletions(-)

diff --git a/admin/src/views/contract/contractList.vue b/admin/src/views/contract/contractList.vue
index e69de29..baeffdf 100644
--- a/admin/src/views/contract/contractList.vue
+++ b/admin/src/views/contract/contractList.vue
@@ -0,0 +1,155 @@
+<template>
+  <div class="main_app">
+    <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear">
+      <template #btns>
+<!--        <el-button @click="exportData">瀵煎嚭</el-button>-->
+      </template>
+    </QueryForm>
+    <div class="mt10">
+      <el-button @click="$refs.ContractEditRef.open('鍒涘缓鍚堝悓')" icon="el-icon-plus" type="primary">鏂板缓</el-button>
+    </div>
+    <el-table v-loading="loading" :data="list" stripe>
+      <el-table-column prop="renterName" label="瀹㈡埛鍚嶇О" min-width="100" show-overflow-tooltip />
+      <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="zlFirstPrice" label="绉熻祦鍗曚环" min-width="100" show-overflow-tooltip>
+            <template slot-scope="{row}">
+                <div style="display: flex; align-items: center;">
+                    <span>{{row.zlFirstPrice || row.wyFirstPrice}}</span>
+                    <span>{{row.zlFirstCircleStr || row.wyFirstCircleStr}}</span>
+                </div>
+            </template>
+        </el-table-column>
+        <el-table-column label="绉熻祦闈㈢Н" min-width="100" show-overflow-tooltip>
+            <template slot-scope="{row}">
+                {{row.totalArea}}銕�
+            </template>
+        </el-table-column>
+      <el-table-column prop="signDate" label="绛捐鏃�" min-width="100" show-overflow-tooltip />
+      <el-table-column prop="code" label="鍚堝悓缂栧彿" min-width="100" show-overflow-tooltip />
+      <el-table-column label="鍚堝悓鐘舵��" min-width="90" fixed="right" show-overflow-tooltip>
+        <template slot-scope="{row}">
+          <span class="primaryColor" v-if="row.status === 0">寰呮墽琛�</span>
+          <span class="green" v-if="row.status === 1">姝e父鎵ц涓�</span>
+          <span class="gary" v-if="row.status === 2">宸插埌鏈�</span>
+          <span class="gary" v-if="row.status === 3">閫�绉熺粨绠椾腑</span>
+          <span class="gary" v-if="row.status === 4">宸查��绉�</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="鎿嶄綔" min-width="90" fixed="right" show-overflow-tooltip>
+        <template v-slot="scope">
+          <span class="primaryColor cu" @click="handleDetail(scope.row.id)">鏌ョ湅璇︽儏</span>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="mt20">
+      <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" />
+    </div>
+    <ContractDetail ref="ContractDetailRef" />
+    <ContractEdit ref="ContractEditRef" @success="getList(1)" />
+  </div>
+</template>
+
+<script>
+import Pagination from '@/components/common/Pagination'
+import QueryForm from '@/components/common/QueryForm'
+import ContractDetail from './components/contractDetail'
+import ContractEdit from './components/contractEdit.vue'
+import { fetchList } from '@/api/contract'
+import dayjs from 'dayjs'
+import duration from 'dayjs/plugin/duration'
+dayjs.extend(duration)
+
+export default {
+  components: {
+    Pagination,
+    QueryForm,
+    ContractEdit,
+    ContractDetail
+  },
+  data () {
+    return {
+      loading: false,
+      pagination: {
+        pageSize: 10,
+        page: 1,
+        total: 0
+      },
+      filters: {},
+      list: [],
+      total: 0,
+      queryFormConfig: {
+        formItems: [
+          {
+            filed: 'renterName',
+            type: 'input',
+            label: '瀹㈡埛鍚嶇О'
+          },
+          {
+            filed: 'code',
+            type: 'input',
+            label: '鍚堝悓缂栧彿'
+          },
+          {
+            filed: 'status',
+            type: 'select',
+            label: '鍚堝悓鐘舵��',
+            options: [
+              { value: 0, label: '寰呮墽琛�' },
+              { value: 1, label: '姝e父鎵ц涓�' },
+              { value: 2, label: '宸插埌鏈�' },
+              { value: 3, label: '閫�绉熺粨绠椾腑' },
+              { value: 4, label: '宸查��绉�' },
+            ]
+          },
+          {
+            filed: 'selDate',
+            type: 'datetimerange',
+            label: '鍚堝悓鏃ユ湡',
+            placeholder: '鍚堝悓鏃ユ湡'
+          }
+        ],
+        online: true
+      }
+    }
+  },
+  created () {
+    this.getList()
+  },
+  methods: {
+    handleDetail (id) {
+      this.$refs.ContractDetailRef.open('鍚堝悓璇︽儏', id)
+    },
+    getList (page) {
+      const { pagination, filters } = this
+      this.loading = true
+      fetchList({
+        model: {
+          ...filters
+        },
+        sorts: [{ direction: 'DESC', property: 'param1' }],
+        capacity: pagination.pageSize,
+        page: page || pagination.page
+      }).then(res => {
+        this.loading = false
+        this.list = res.records || []
+        this.pagination.total = res.total || 0
+      }, () => {
+        this.loading = false
+      })
+    },
+    clear () {
+      this.filters = {}
+      this.pagination.pageSize = 10
+      this.pagination.page = 1
+      this.getList()
+    },
+    handleSizeChange (capacity) {
+      this.pagination.pageSize = capacity
+    },
+    exportData () {
+    
+    }
+  }
+}
+</script>

--
Gitblit v1.9.3