From 0527684883bc620febe0a1360f661cc2a7f16e00 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 29 十一月 2024 17:21:35 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/funingyunwei

---
 admin/src/views/contract/contractList.vue |  107 ++++++++++++++++++++++++++---------------------------
 1 files changed, 52 insertions(+), 55 deletions(-)

diff --git a/admin/src/views/contract/contractList.vue b/admin/src/views/contract/contractList.vue
index 1309081..ca11e0c 100644
--- a/admin/src/views/contract/contractList.vue
+++ b/admin/src/views/contract/contractList.vue
@@ -6,27 +6,28 @@
       </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 label="绉熻祦鍗曚环" min-width="100" show-overflow-tooltip></el-table-column>-->
+      <el-table-column prop="totalArea" label="绉熻祦闈㈢Н" min-width="100" show-overflow-tooltip />
+      <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 +35,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 +44,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 +56,8 @@
     ContractEdit,
     ContractDetail
   },
-  data() {
+  data () {
     return {
-      showEdit: false,
       loading: false,
       pagination: {
         pageSize: 10,
@@ -69,74 +70,70 @@
       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
     }
   }

--
Gitblit v1.9.3