Browse Source

备件领用加多牧场查询

Shan9312 2 weeks ago
parent
commit
9b2f3a0296
2 changed files with 25 additions and 8 deletions
  1. 6 5
      .env.development
  2. 19 3
      src/views/custom/receive/index.vue

+ 6 - 5
.env.development

@@ -5,14 +5,15 @@ ENV = 'development'
 # VUE_APP_BASE_API = '/dev-api'
 # 线上正式地址
 #  VUE_APP_BASE_API = 'http://eam.modernfarming.cn:8000/'
-#  白少后台本地
-# 白少后台本地
-# VUE_APP_BASE_API = 'http://192.168.1.56:8082/'
+
+
 
 
 # 线上测试
-# VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
-VUE_APP_BASE_API = 'http://192.168.1.233:8082/'
+VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
+
+# 白少后台本地
+# VUE_APP_BASE_API = 'http://192.168.1.233:8082/'
 
 # VUE_APP_BASE_API = 'http://36.155.144.182:18090/'
 

+ 19 - 3
src/views/custom/receive/index.vue

@@ -802,6 +802,18 @@ export default {
 
     changeAll() {
       console.log(this.radioAll)
+       // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
+      if (this.getdataListParm.parammaps.pastureArr && this.getdataListParm.parammaps.pastureArr.length > 0) {
+        const arr = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids = arr.map((child) => { return child.id })
+        console.log(arr,ids,'999999')
+        this.getdataListParm.parammaps.pastureId = ids.toString();
+      }
+      console.log(this.getdataListParm.parammaps,'this.getdataListParm.parammaps')
       if (this.radioAll === '全部') {
         this.getdataListParm.name = 'getBigpartapplyList'
         this.getdataListParm.offset = 1
@@ -810,7 +822,9 @@ export default {
           applyCode: '', applyType: '', statue: '', departmentId: '', inputDatetime: '', startTime: '', stopTime: '', menu: 'Receive',
           loginId: Cookies.get('employeid'),
           logindeptId: Cookies.get('departmentid'),
-          loginpastureId: Cookies.get('pastureid')
+          loginpastureId: Cookies.get('pastureid'),
+          pastureId: this.getdataListParm.parammaps.pastureId || Cookies.get('pastureid'),
+          pastureArr :this.getdataListParm.parammaps.pastureArr,
         }
         this.get_table_data()
       } else if (this.radioAll === '待处理') {
@@ -818,6 +832,7 @@ export default {
         this.getdataListParm.offset = 1
         this.getdataListParm.parammaps = {
           pastureName: this.getdataListParm.parammaps.pastureName,
+          pastureArr :this.getdataListParm.parammaps.pastureArr,
           applyCode: this.getdataListParm.parammaps.applyCode,
           applyType: this.getdataListParm.parammaps.applyType,
           statue: this.getdataListParm.parammaps.statue,
@@ -830,7 +845,7 @@ export default {
           logindeptId: Cookies.get('departmentid'),
           loginpastureId: Cookies.get('pastureid'),
           empId: Cookies.get('employeid'),
-          pastureId: Cookies.get('pastureid'),
+          pastureId:this.getdataListParm.parammaps.pastureId ||  Cookies.get('pastureid'),
           deptId: Cookies.get('departmentid')
         }
         this.get_table_data()
@@ -839,6 +854,7 @@ export default {
         this.getdataListParm.offset = 1
         this.getdataListParm.parammaps = {
           pastureName: this.getdataListParm.parammaps.pastureName,
+          pastureArr :this.getdataListParm.parammaps.pastureArr,
           applyCode: this.getdataListParm.parammaps.applyCode,
           applyType: this.getdataListParm.parammaps.applyType,
           statue: this.getdataListParm.parammaps.statue,
@@ -851,7 +867,7 @@ export default {
           logindeptId: Cookies.get('departmentid'),
           loginpastureId: Cookies.get('pastureid'),
           empId: Cookies.get('employeid'),
-          pastureId: Cookies.get('pastureid'),
+          pastureId:this.getdataListParm.parammaps.pastureId ||  Cookies.get('pastureid'),
           deptId: Cookies.get('departmentid')
         }
         this.get_table_data()