From 3de9eb34a21123f0e67ae356f2cb98a7802827c8 Mon Sep 17 00:00:00 2001
From: xiebin <123456>
Date: Mon, 01 Aug 2022 15:20:02 +0800
Subject: [PATCH] 地块详情添加农资使用记录

---
 src/views/farm/farmingrecord.vue  |    1 +
 src/views/farmplant/farmplant.vue |   16 +++++++++++++---
 src/views/land/LandDetail.vue     |    6 ++++++
 src/api/farm/farmingrecord.js     |   13 ++++++++++++-
 src/views/recovery/recovery.vue   |   10 ++++++++++
 5 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/src/api/farm/farmingrecord.js b/src/api/farm/farmingrecord.js
index f237073..514ae53 100644
--- a/src/api/farm/farmingrecord.js
+++ b/src/api/farm/farmingrecord.js
@@ -11,6 +11,17 @@
         }
     })
 }
+export const getListByNz = (current, size, params) => {
+  return request({
+    url: '/api/farmingRecord/pageNz',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
 export const remove = (ids) => {
     return request({
         url: '/api/farmingRecord/remove',
@@ -66,4 +77,4 @@
             deptId
         }
     })
-}
\ No newline at end of file
+}
diff --git a/src/views/farm/farmingrecord.vue b/src/views/farm/farmingrecord.vue
index 58878f5..74b29e8 100644
--- a/src/views/farm/farmingrecord.vue
+++ b/src/views/farm/farmingrecord.vue
@@ -67,6 +67,7 @@
                 editBtn: true,
                 delBtn: true,
                 viewBtn: true,
+                header:false,
                 menuWidth: 200,
                 menuAlign: "center",
                 align: "center",
diff --git a/src/views/farmplant/farmplant.vue b/src/views/farmplant/farmplant.vue
index 764d915..9da890a 100644
--- a/src/views/farmplant/farmplant.vue
+++ b/src/views/farmplant/farmplant.vue
@@ -42,7 +42,7 @@
         <detection v-if="detectionVisible" ref="detection"></detection>
     </basic-container>
 </template>
- 
+
 <script>
 import { getDetail, getList, update, remove, save } from "@/api/farmplant/farmplant"
 import { getStrainList } from "@/api/farmplant/strain"
@@ -71,12 +71,14 @@
             },
             selectionList: [],
             landList: [],
+            landId: 0,
             option: {
                 tip: false,
                 height: 520,
                 editBtn: true,
                 delBtn: true,
                 viewBtn: true,
+                header:false,
                 menuWidth: 280,
                 menuAlign: "center",
                 align: "center",
@@ -183,6 +185,9 @@
                             value: "id"
                         },
                         labelWidth: 110,
+                        change: (val) => {
+                          this.landId = val.value
+                        },
                         rules: [
                             {
                                 required: true,
@@ -683,6 +688,11 @@
             this.onLoad(this.page, this.query)
         },
         onLoad (page, params = {}) {
+            var datas = this.$route.query.id
+            params.landId = datas
+            if (this.landId) {
+              params['landId'] = this.landId
+            }
             params['tenantId'] = this.userInfo.tenant_id
             params['deptId'] = this.userInfo.dept_id
             this.loading = true
@@ -708,6 +718,6 @@
     },
 };
 </script>
- 
+
 <style>
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/land/LandDetail.vue b/src/views/land/LandDetail.vue
index 66c0cd8..13ce2df 100644
--- a/src/views/land/LandDetail.vue
+++ b/src/views/land/LandDetail.vue
@@ -34,6 +34,10 @@
                     <el-tab-pane label="采收记录" name="tab3">
                         <recovery></recovery>
                     </el-tab-pane>
+                    <!-- 农资记录 -->
+                    <el-tab-pane label="农资使用记录" name="tab4">
+                      <stockUseInfo></stockUseInfo>
+                    </el-tab-pane>
                 </el-tabs>
             </div>
         </div>
@@ -60,6 +64,7 @@
 import farmplant from "@/views/farmplant/farmplant.vue"
 import farming from "@/views/farm/farmingrecord.vue"
 import recovery from "@/views/recovery/recovery.vue"
+import stockUseInfo from "@/views/farm/stockUseInfo.vue"
 import getMapDataInThere from "./getMapDataInThere.vue"
 import { remove, update } from "@/api/land/land"
 
@@ -68,6 +73,7 @@
         farmplant,
         farming,
         recovery,
+        stockUseInfo,
         getMapDataInThere
     },
     data () {
diff --git a/src/views/recovery/recovery.vue b/src/views/recovery/recovery.vue
index 8f86b36..6b59b0a 100644
--- a/src/views/recovery/recovery.vue
+++ b/src/views/recovery/recovery.vue
@@ -57,6 +57,7 @@
             },
             selectionList: [],
             landList: [],
+            landId:0,
             option: {
                 tip: false,
                 height: 520,
@@ -64,6 +65,7 @@
                 delBtn: true,
                 viewBtn: false,
                 addBtn: false,
+                header:false,
                 menuWidth: 200,
                 menuAlign: "center",
                 align: "center",
@@ -110,6 +112,9 @@
                         props: {
                             label: "landName",
                             value: "id"
+                        },
+                        change: (val) => {
+                          this.landId = val.value
                         },
                         rules: [
                             {
@@ -427,6 +432,11 @@
             this.onLoad(this.page, this.query)
         },
         onLoad (page, params = {}) {
+            var datas = this.$route.query.id
+            params.landId = datas
+            if (this.landId) {
+              params['landId'] = this.landId
+            }
             params['tenantId'] = this.userInfo.tenant_id
             params['deptId'] = this.userInfo.dept_id
             this.loading = true

--
Gitblit v1.9.3