Browse Source

牧场多选时 查看详情的牧场id改为当前查看id

Shan9312 1 week ago
parent
commit
74600c05d2

BIN
dist-现代-正式-20241112.zip


BIN
dist-现代牧业-正式-20241111.zip


File diff suppressed because it is too large
+ 0 - 0
dist/index.html


+ 1 - 1
src/permission.js

@@ -7,7 +7,7 @@ import { getToken, removeToken } from '@/utils/auth' // get token from cookie
 import Cookies from 'js-cookie'
 import getPageTitle from '@/utils/get-page-title'
 // 1为单点登录,其他不是
-Cookies.set('sso', 0)
+Cookies.set('sso', 1)
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
 
 const whiteList = ['/login'] // no redirect whitelist

+ 3 - 3
src/views/custom/outStock/index.vue

@@ -9,7 +9,7 @@
         <div class="el-icon-info" style="font-size: 30px;float: right;color: #409EFF;" @click="handleDescription" />
         <div class="filter-container">
           <el-select v-model="getdataListParm.parammaps.pastureArr" style="width: 220px;" placeholder="牧场" class="filter-item" multiple
-              collapse-tags  collapse-tags-tooltip  >
+              collapse-tags  filterable collapse-tags-tooltip  >
             <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
           </el-select>
           <el-input v-model="getdataListParm.parammaps.useForm" placeholder="出库单号" style="width: 200px;" class="filter-item" />
@@ -139,7 +139,7 @@
       <el-tab-pane label="出库记录" name="second">
         <div class="filter-container">
           <el-select v-model="getdataListParm2.parammaps.pastureArr" multiple
-              collapse-tags  collapse-tags-tooltip   style="width: 220px;" placeholder="牧场" class="filter-item">
+              collapse-tags  filterable collapse-tags-tooltip filterable  style="width: 220px;" placeholder="牧场" class="filter-item">
             <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
           </el-select>
           <el-input v-model="getdataListParm2.parammaps.useForm" placeholder="出库单号" style="width: 200px;" class="filter-item" />
@@ -149,7 +149,7 @@
             <el-option v-for="item in findAllProvider" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <el-select v-model="getdataListParm2.parammaps.departmentId" style="width: 220px;"  multiple
-        collapse-tags  collapse-tags-tooltip  placeholder="领用部门" class="filter-item" clearable>
+        collapse-tags  filterable collapse-tags-tooltip filterable  placeholder="领用部门" class="filter-item" clearable>
             <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <tree-select

+ 4 - 4
src/views/custom/purchase/index.vue

@@ -235,7 +235,7 @@
         <div class="DistributionManagement">
           <div class="filter-container">
             <el-select v-model="getdataListParm4.parammaps.pastureArr" style="width: 210px;" placeholder="牧场" class="filter-item"  multiple
-        collapse-tags collapse-tags-tooltip  >
+        collapse-tags  collapse-tags-tooltip filterable >
               <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
             </el-select>
             <el-input v-model="getdataListParm4.parammaps.matchCode" placeholder="配单号" clearable style="width: 200px;" class="filter-item" />
@@ -593,7 +593,7 @@
         <div class="purchaseOrderManagement">
           <div class="filter-container">
             <el-select v-model="getdataListParm2.parammaps.pastureArr" style="width: 210px;" placeholder="牧场" class="filter-item" multiple
-        collapse-tags collapse-tags-tooltip>
+        collapse-tags filterable collapse-tags-tooltip>
               <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
             </el-select>
             <el-input v-model="getdataListParm2.parammaps.buyeCode" placeholder="采购单号" clearable style="width: 200px;" class="filter-item" />
@@ -862,7 +862,7 @@
         <div class="procurementDetails">
           <div class="filter-container">
             <el-select v-model="getdataListParm3.parammaps.pastureArr" style="width: 210px;" placeholder="牧场" class="filter-item"  multiple
-        collapse-tags collapse-tags-tooltip >
+        collapse-tags filterable collapse-tags-tooltip >
               <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
             </el-select>
             <el-input v-model="getdataListParm3.parammaps.partCode" placeholder="备件编号" style="width: 200px;" class="filter-item" />
@@ -1003,7 +1003,7 @@
         <div class="procurementDetails">
           <div class="filter-container">
             <el-select v-model="getdataListParm5.parammaps.pastureArr" style="width: 220px;" placeholder="牧场" class="filter-item"  multiple
-        collapse-tags collapse-tags-tooltip >
+        collapse-tags filterable collapse-tags-tooltip >
               <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
             </el-select>
             <el-input v-model="getdataListParm5.parammaps.buyeCode" placeholder="采购单号" style="width: 140px;" class="filter-item" />

+ 1 - 1
src/views/custom/receive/index.vue

@@ -6,7 +6,7 @@
     </div>
     <div class="filter-container">
       <el-select v-model="getdataListParm.parammaps.pastureArr" style="width: 220px;" placeholder="牧场"  multiple
-        collapse-tags collapse-tags-tooltip  class="filter-item" @change="changePastureName">
+        collapse-tags filterable collapse-tags-tooltip  class="filter-item" @change="changePastureName">
         <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
       </el-select>
       <el-input v-model="getdataListParm.parammaps.applyCode" clearable placeholder="领用单号" style="width: 200px;" class="filter-item" />

+ 2 - 2
src/views/custom/storage/index.vue

@@ -8,7 +8,7 @@
       <el-tab-pane label="备件入库" name="first">
         <div class="filter-container">
           <el-select v-model="getdataListParm.parammaps.pastureArr" style="width: 220px;" placeholder="牧场"  multiple
-        collapse-tags  collapse-tags-tooltip  class="filter-item">
+        collapse-tags  filterable collapse-tags-tooltip  class="filter-item">
             <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
           </el-select>
           <el-input v-model="getdataListParm.parammaps.laidCode" placeholder="入库单号" style="width: 200px;" class="filter-item" />
@@ -134,7 +134,7 @@
       <el-tab-pane label="入库记录" name="second">
         <div class="filter-container">
           <el-select v-model="getdataListParm2.parammaps.pastureArr" style="width: 220px;"   multiple
-        collapse-tags  collapse-tags-tooltip  placeholder="牧场" class="filter-item">
+        collapse-tags  filterable collapse-tags-tooltip  placeholder="牧场" class="filter-item">
             <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
           </el-select>
           <el-input v-model="getdataListParm2.parammaps.laidCode" placeholder="入库单号" style="width: 200px;" class="filter-item" />

+ 35 - 14
src/views/custom/subscribe/index.vue

@@ -29,7 +29,7 @@
         placeholder="牧场"
         multiple
         collapse-tags
-        collapse-tags-tooltip
+        filterable collapse-tags-tooltip
         class="filter-item"
       >
         <el-option
@@ -2762,7 +2762,8 @@ export default {
           pagecount: 10,
           name: 'getIdleSpareParts',
           parammaps: {
-            partName: ''
+            partName: '',
+            pastureArr:[],
           }
         }
       },
@@ -2959,10 +2960,10 @@ export default {
         this.getdataListParm.parammaps.loginpastureId
       this.pending.getdataListParm.parammaps.empId =
         this.getdataListParm.parammaps.empId
-      this.pending.getdataListParm.parammaps.pastureId =
-        Cookies.get('pastureid')
-      this.pending.getdataListParm.parammaps.deptId =
-        Cookies.get('departmentid')
+      this.pending.getdataListParm.parammaps.pastureId = this.getdataListParm.parammaps.pastureId ||  Cookies.get('pastureid')
+
+      this.pending.getdataListParm.parammaps.deptId =  Cookies.get('departmentid')
+
 
       GetDataByName(this.pending.getdataListParm).then((response) => {
         this.pending.total = response.data.total3
@@ -3033,6 +3034,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();
+      }
+
       if (this.radioAll === '全部') {
         this.getdataListParm.name = 'getpartpurchaseList'
         this.getdataListParm.offset = 1
@@ -3048,6 +3061,7 @@ export default {
           logindeptId: Cookies.get('departmentid'),
           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 === '待处理') {
@@ -3055,6 +3069,7 @@ export default {
         this.getdataListParm.offset = 1
         this.getdataListParm.parammaps = {
           pastureName: this.getdataListParm.parammaps.pastureName,
+          pastureArr :this.getdataListParm.parammaps.pastureArr,
           orderNumber: this.getdataListParm.parammaps.orderNumber,
           stuteSH: this.getdataListParm.parammaps.stuteSH,
           departmentId: this.getdataListParm.parammaps.departmentId,
@@ -3075,6 +3090,7 @@ export default {
         this.getdataListParm.offset = 1
         this.getdataListParm.parammaps = {
           pastureName: this.getdataListParm.parammaps.pastureName,
+          pastureArr :this.getdataListParm.parammaps.pastureArr,
           orderNumber: this.getdataListParm.parammaps.orderNumber,
           stuteSH: this.getdataListParm.parammaps.stuteSH,
           departmentId: this.getdataListParm.parammaps.departmentId,
@@ -4025,7 +4041,7 @@ export default {
       this.getdataListSee.parammaps.id = this.seeTemp.id
       this.getdataListSee.parammaps.empId = ''
       this.isApplyEx4 = false
-      this.getSeeList()
+      this.getSeeList(row)
       // // 赛四是同id 反之不同id
       // if( row.pastureId != Cookies.get('pastureid') ) {
       //       row.isPasturd = true
@@ -5394,7 +5410,7 @@ export default {
         }
       }
     },
-    getSeeList() {
+    getSeeList(row) {
       this.listLoadingSee = true
       console.log(this.dialogStatus, '======')
       if (this.dialogStatus == 'create') {
@@ -5411,7 +5427,12 @@ export default {
           }
         }
       }
-      this.getdataListSee.parammaps.pastureId = Cookies.get('pastureid')
+      if (row && row.pastureId) {
+        this.getdataListSee.parammaps.pastureId = row.pastureId
+        this.getdataListSee.parammaps.id = row.id || ''
+      } else {
+         this.getdataListSee.parammaps.pastureId =  Cookies.get('pastureid')
+      }
       GetDataByName(this.getdataListSee).then((response) => {
         if (response.data.list !== null) {
           console.log('查看下方table数据', response.data.list)
@@ -5517,7 +5538,7 @@ export default {
         this.$refs['createTemp'].clearValidate()
       })
       this.getdataListSee.parammaps.id = this.createTemp.id
-      this.getSeeList()
+      this.getSeeList(row)
     },
     edit_dialog_save() {
       this.isokDisable = true
@@ -5697,7 +5718,7 @@ export default {
       })
     },
     getDepartDownList() {
-      this.getDepartParam.parammaps.pastureId = Cookies.get('pastureid')
+      this.getDepartParam.parammaps.pastureId =this.getdataListParm.parammaps.pastureId ||  Cookies.get('pastureid')
       GetDataByName(this.getDepartParam).then((response) => {
         this.findAllDepart = response.data.list
       })
@@ -5990,7 +6011,7 @@ export default {
         this.$set(this.examineTemp, 'statue', 1)
         this.$set(this.examineTemp, 'workflowNote', '')
       }
-      this.getSeeList()
+      this.getSeeList(row)
       this.dialogStatus = 'examine3'
       this.dialogFormVisible_Examine = true
       this.statueReason = false
@@ -6706,7 +6727,7 @@ export default {
       this.dialogFormVisible_modify = true
       this.modifylist = []
       this.getdataListSee.parammaps.id = row.id
-      this.getSeeList()
+      this.getSeeList(row)
     },
     partReject(row) {
       // 驳回
@@ -6748,7 +6769,7 @@ export default {
                 duration: 2000
               })
               this.getdataListSee.parammaps.id = this.modifyTemp.id
-              this.getSeeList()
+              this.getSeeList(row)
             } else {
               failproccess(response, this.$notify)
             }

Some files were not shown because too many files changed in this diff