gjy 2 лет назад
Родитель
Сommit
08e85508ca
1 измененных файлов с 9 добавлено и 1 удалено
  1. 9 1
      src/views/warehousenew/dryRecord.vue

+ 9 - 1
src/views/warehousenew/dryRecord.vue

@@ -131,6 +131,9 @@ import {
 import {
     selectWarehouseSelf,
 } from '@/model/outboundManagement/index'
+import {
+    getcomp
+  } from '@/model/indexRx'
 export default {
     data() {
         return {
@@ -292,7 +295,10 @@ export default {
         this.compId = localStorage.getItem('ws-pf_compId')
         this.warehouseName = this.$route.query.warehouseName //仓库名
         this.warehouseId = this.$route.query.warehouseId //仓库Id
-        if(localStorage.getItem('compNameoptions')){
+        getcomp({userMobilePhone:JSON.parse(localStorage.getItem('ws_login_getTenantInfoByUser')).loginInfo.userMobilePhone}).toPromise().then((res)=>{
+        this.compNameoptions=res
+        localStorage.setItem('compNameoptions',JSON.stringify(this.compNameoptions))
+        if(this.compNameoptions.length>0){
         var company=JSON.parse(localStorage.getItem('compNameoptions'))
         
         var extra=company.filter((item)=>{
@@ -416,6 +422,7 @@ export default {
           }else{
             this.ewCustomer=extra[0]
           }
+          
           for (let i = 0; i < extra.length; i++) {
             this.ewCustomerOptions.push({value: extra[i],label:extra[i]})
             this.companyNameOptions.push({value: extra[i],label:extra[i]})
@@ -423,6 +430,7 @@ export default {
           }
         }
       }
+      })
         this.getList()
     },
     methods: {