From b7f74340de27a3427d8afb8750724b788c8a780c Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期四, 06 二月 2025 18:17:19 +0800
Subject: [PATCH] 改bug
---
admin/src/views/contract/contractList.vue | 126 ++++++++++++++++++++++-------------------
1 files changed, 67 insertions(+), 59 deletions(-)
diff --git a/admin/src/views/contract/contractList.vue b/admin/src/views/contract/contractList.vue
index 1309081..baeffdf 100644
--- a/admin/src/views/contract/contractList.vue
+++ b/admin/src/views/contract/contractList.vue
@@ -2,31 +2,43 @@
<div class="main_app">
<QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear">
<template #btns>
- <el-button>瀵煎嚭</el-button>
+<!-- <el-button @click="exportData">瀵煎嚭</el-button>-->
</template>
</QueryForm>
<div class="mt10">
- <el-button @click="handleEdit()" icon="el-icon-plus" type="primary">鏂板缓</el-button>
+ <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="" label="瀹㈡埛鍚嶇О" min-width="100" show-overflow-tooltip />
- <el-table-column prop="" label="寮�濮嬫棩鏈�" min-width="100" show-overflow-tooltip />
- <el-table-column prop="" label="缁撴潫鏃ユ湡" min-width="100" show-overflow-tooltip />
- <el-table-column prop="" label="绉熻祦鍗曚环" min-width="100" show-overflow-tooltip />
- <el-table-column prop="" label="绉熻祦闈㈢Н" min-width="100" show-overflow-tooltip />
- <el-table-column prop="" label="绛捐鏃�" min-width="100" show-overflow-tooltip />
- <el-table-column prop="" label="鍚堝悓缂栧彿" min-width="100" show-overflow-tooltip />
-
- <el-table-column prop="" label="鍚堝悓鐘舵��" min-width="100" show-overflow-tooltip>
- <template v-slot="scope">
- <span class="primaryColor">寰呮墽琛�</span>
- <span class="green">姝e父鎵ц涓�</span>
- <span class="gary">宸查��绉�</span>
+ <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 prop="" label="鎿嶄綔" min-width="100" show-overflow-tooltip>
+ <el-table-column label="鎿嶄綔" min-width="90" fixed="right" show-overflow-tooltip>
<template v-slot="scope">
- <span class="primaryColor cu" @click="handleDetail(scope.row)">鏌ョ湅璇︽儏</span>
+ <span class="primaryColor cu" @click="handleDetail(scope.row.id)">鏌ョ湅璇︽儏</span>
</template>
</el-table-column>
</el-table>
@@ -34,7 +46,7 @@
<Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" />
</div>
<ContractDetail ref="ContractDetailRef" />
- <ContractEdit ref="ContractEditRef" v-if="showEdit" />
+ <ContractEdit ref="ContractEditRef" @success="getList(1)" />
</div>
</template>
@@ -43,10 +55,11 @@
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)
-import { platformLogPage, getPlatformGroupList } from '@/api'
+
export default {
components: {
Pagination,
@@ -54,9 +67,8 @@
ContractEdit,
ContractDetail
},
- data() {
+ data () {
return {
- showEdit: false,
loading: false,
pagination: {
pageSize: 10,
@@ -69,79 +81,75 @@
queryFormConfig: {
formItems: [
{
- filed: 'name',
+ filed: 'renterName',
type: 'input',
- label: '鍚堝悓鍚嶇О'
+ 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',
- placeholder: '搴斿紑濮嬫椂闂�'
+ label: '鍚堝悓鏃ユ湡',
+ placeholder: '鍚堝悓鏃ユ湡'
}
],
online: true
}
}
},
- created() {
- // this.getList()
- // this.getGroupList()
+ created () {
+ this.getList()
},
methods: {
- handleEdit(row) {
- this.showEdit = true
- this.$nextTick(() => {
- this.$refs.ContractEditRef.showModal = true
- })
- if(row && row.id){
-
- }else{
-
- }
+ handleDetail (id) {
+ this.$refs.ContractDetailRef.open('鍚堝悓璇︽儏', id)
},
- handleDetail(row) {
- this.$refs.ContractDetailRef.visible = true
- this.$refs.ContractDetailRef.getDetail(row.id)
- },
-
- getList(page) {
+ getList (page) {
const { pagination, filters } = this
this.loading = true
- platformLogPage({
+ fetchList({
model: {
- ...filters,
- queryStatus: '6,7,8',
- beginWorkDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null,
- beginWorkDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null,
+ ...filters
},
sorts: [{ direction: 'DESC', property: 'param1' }],
capacity: pagination.pageSize,
- page: page || pagination.page,
+ page: page || pagination.page
}).then(res => {
this.loading = false
this.list = res.records || []
- this.list.forEach(item => {
- item.inTypeTemp = item.inType == 0 ? '鏁存墭鐩�' : '浠剁儫'
- item.taskOrigin = 'WMS鑾峰彇'
- item.workTime = dayjs.duration(item.param3, 'seconds').format('H鏃秏鍒唖绉�')
- })
this.pagination.total = res.total || 0
}, () => {
this.loading = false
})
},
- clear() {
+ clear () {
this.filters = {}
this.pagination.pageSize = 10
this.pagination.page = 1
this.getList()
},
- handleSizeChange(capacity) {
+ handleSizeChange (capacity) {
this.pagination.pageSize = capacity
+ },
+ exportData () {
+
}
}
}
</script>
-
-<style>
-</>
--
Gitblit v1.9.3