gjy 3 éve
szülő
commit
a7d0fc1ae5

+ 2 - 2
src/views/contractManagement/purchaseContractEdit.vue

@@ -506,7 +506,7 @@ import {
   delxiala,
   examineList,
   editInfo,
-  getstaff,
+  getstafffind
 } from '@/model/contarct/index'
 import WsUpload from '@/components/WsUpload'
 import { EventBus, dayjs } from 'base-core-lib'
@@ -569,7 +569,7 @@ export default {
   },
 
   activated() {
-    getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
+    getstafffind({ roles: 'd6a5c8a52da544309259f91f75de1ec6' })
       .toPromise()
       .then((response) => {
         this.options = response

+ 25 - 3
src/views/warehouse/warehouseManagementEdit.vue

@@ -83,6 +83,7 @@
             v-model="deptBudgetList.otherPersonPhone"
             placeholder="请选择其他负责人"
             @change="selectstaffOther"
+            :filter-method="dataFilter1"
             filterable 
             multiple
           >
@@ -236,13 +237,15 @@
 </template>
 <script>
 import { getFileList, saveFiles } from '@/model/upload'
+import {
+  getstafffind,
+} from '@/model/contarct/index'
 import {
   xiala,
   billoperatehis,
   getLook,
   edit,
-  delPosition,
-  getstaff,
+  delPosition
 } from '@/model/warehouse/index'
 import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
 import { downloadFile } from '@/utils/batchDown'
@@ -313,6 +316,7 @@ export default {
         },
       },
       options: [],
+      staffList1:[],
       optionsOther: [],
       value: '',
       accessoryTFs: false,
@@ -321,11 +325,12 @@ export default {
   },
   activated() {
     this.loaddata()
-    getstaff({ compId: sessionStorage.getItem('ws-pf_compId'),warehouseId:'' })
+    getstafffind({ roles: 'd6a5c8a52da544309259f91f75de1ec6' })
       .toPromise()
       .then((response) => {
         this.options = response
         this.optionsOther = response
+        this.staffList1 = response
         this.staffList = response
       })
     this.showType = this.isShow
@@ -378,6 +383,23 @@ export default {
         this.options = this.staffList
       }
     },
+    dataFilter1(val) {
+      this.deptBudgetList.personCharge = val
+      if (val) {
+        //val存在
+        this.optionsOther = this.staffList1.filter((item) => {
+          if (
+            !!~item.staffName.indexOf(val) ||
+            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        //val为空时,还原数组
+        this.optionsOther = this.staffList1
+      }
+    },
     selectstaff(e) {
       for (var i = 0; i < this.staffList.length; i++) {
         if (this.staffList[i].staffName == e) {