asd26269546 2 years ago
parent
commit
ab3dc57a08

+ 1 - 1
src/components/my-modal-form/charts.vue

@@ -168,7 +168,7 @@ export default {
     },
     id (id) {
       if (id) {
-        this.init()
+        //this.init()
       }
     }
   },

+ 9 - 9
src/components/my-modal-form/material-table.vue

@@ -360,15 +360,15 @@ export default {
       this.getList()
     },
     getList () {
-      GetFacPricePageList({
-        ...this.params,
-        factoryId: this.id
-      }).then(res => {
-        if (res.code === 0) {
-          this.data = res.result.list
-          this.params.total = res.result.totalCount
-        }
-      })
+      // GetFacPricePageList({
+      //   ...this.params,
+      //   factoryId: this.id
+      // }).then(res => {
+      //   if (res.code === 0) {
+      //     this.data = res.result.list
+      //     this.params.total = res.result.totalCount
+      //   }
+      // })
     },
     getFactorySelectItem () {
       GetFactorySelectItem().then(res => {

+ 1 - 2
src/components/my-modal-form/my-modal-form.vue

@@ -844,8 +844,7 @@ export default {
 			}
 		}
 		
-		console.log(this.formData)
-		console.log(this.data)
+		
 	},
 }
 </script>

+ 9 - 5
src/libs/http.js

@@ -74,10 +74,14 @@ axios.interceptors.response.use(
                 Toast.fail('服务器错误')
                 return
             }
+            
             switch (err.response.data.code) {
+                case 400:
+                    Vue.prototype.$Message.info(err.response.data.msg);
+                    break;
                 case 401:
-                    Toast.fail('登录已失效,请重新登录')
-                    router.push("/")
+                    
+                    router.push("/login")
                     break;
                 case 403:
                     err.message = '拒绝访问(403)';
@@ -119,11 +123,11 @@ axios.interceptors.response.use(
             //     router.push("/401")
             // }
         } else {
+            
             err.message = '连接服务器失败!'
         }
-        console.log(err.message)
-        // Toast.fail(err.message)
-        return Promise.reject(err);
+        
+        
     }
 )
 

+ 12 - 2
src/view/base-manage/provider-maintenance/my-form.vue

@@ -17,13 +17,13 @@
         <div class="col">
           <div class="label">申请人:</div>
           <div class="value">
-            {{ $store.state.user.name }}
+            {{ userName  }}
           </div>
         </div>
         <div class="col">
           <div class="label">申请部门:</div>
           <div class="value">
-            {{ $store.state.user.dept }}
+            {{ deptName  }}
           </div>
         </div>
         <div class="col">
@@ -100,6 +100,8 @@ export default {
   name: 'quality-form',
   data () {
     return {
+      userName:null,
+      deptName:null,
       purchaseBillNoList: [],
       supplierId: '',
       facSelectList: [],
@@ -190,6 +192,14 @@ export default {
       }
     }
   },
+  created() {
+    this.$post('/api/storage-restructure/common/getInfo', {})
+      .then(res => {
+        this.userName = res.data.userName
+        this.deptName = res.data.deptName
+      })
+
+  },
   methods: {
     change (index) {
       this.params.pageIndex = index

+ 14 - 7
src/view/base-manage/provider-maintenance/provider-maintenance2.vue

@@ -949,8 +949,9 @@ export default {
               },
               on: {
                 click: () => {
-                  axios.post('/api/storage-restructure/supplier/getSafetyWarnDayBySupplier',{supplierId:p.row.id}).then(res=>{
-                    this.accountDateRemarkModalData = res.data.data
+                  
+                  this.$post('/api/storage-restructure/material/getMaterialBySupplierId',{supplierId:p.row.id}).then(res=>{
+                    this.accountDateRemarkModalData = res.data
                     this.accountDateRemarkModal = true
                   })
                   
@@ -984,6 +985,7 @@ export default {
           fixed: 'right',
           width: 150,
           render: (h, params) => {
+            const v  = this
             return h('div', [
               h(
                 'Icon',
@@ -999,12 +1001,16 @@ export default {
                   on: {
                     click: () => {
                       this.show = true
-                      axios.get('/cloudApi/supplier/detail?id=' + params.row.id,{}).then(res=>{
-                        this.formData = res.data.data
+                      this.$post('/api/storage-restructure/supplier/details',{id:params.row.id}).then(res=>{
+                        
+                        v.$set(v,'formData',res.data)
+                        
+                        console.log(this.formData)
                         this.formType = 'form'
                         this.title = '供应商详情'
                         this.show = true
                       })
+                      
                     }
                   }
                 },
@@ -1163,8 +1169,7 @@ export default {
       
     },
     cfm (type, formData) {
-      if (type === 'add') {
-        const formDataCopy = {
+      const formDataCopy = {
           ...formData,
           supplierBank:{
             accountName:formData.accountName,
@@ -1184,6 +1189,8 @@ export default {
           supplierKeepList:[],
           otherQualifications:[],
         }
+      if (type === 'add') {
+        
 
         this.$post('/api/storage-restructure/supplier/add',formDataCopy).then(res=>{
           this.show = false
@@ -1196,7 +1203,7 @@ export default {
         })
       } else if (type === 'edit') {
         
-        axios.post('/cloudApi/supplier/edit',formData).then(res=>{
+        this.$post('/api/storage-restructure/supplier/edit',formDataCopy).then(res=>{
           this.show = false
           this.$Message.info(res.data.msg)
           this.getList()

+ 25 - 25
src/view/base-manage/warehouse-maintenance/warehouse-maintenance.vue

@@ -69,30 +69,30 @@ export default {
           width: '200px',
           render: (h, params) => {
             return h('div', [
-              h(
-                'Button',
-                {
-                  props: {
-                    type: 'primary',
-                    size: 'small'
-                  },
-                  style: {
-                    marginRight: '20px'
-                  },
-                  on: {
-                    click: () => {
-                      this.$router.push({
-                        name: 'subarea_manage',
-                        query: {
-                          stockHouseId: params.row.id,
-                          name: params.row.name
-                        }
-                      })
-                    }
-                  }
-                },
-                '分区管理'
-              ),
+              // h(
+              //   'Button',
+              //   {
+              //     props: {
+              //       type: 'primary',
+              //       size: 'small'
+              //     },
+              //     style: {
+              //       marginRight: '20px'
+              //     },
+              //     on: {
+              //       click: () => {
+              //         this.$router.push({
+              //           name: 'subarea_manage',
+              //           query: {
+              //             stockHouseId: params.row.id,
+              //             name: params.row.name
+              //           }
+              //         })
+              //       }
+              //     }
+              //   },
+              //   '分区管理'
+              // ),
               h(
                 'Icon',
                 {
@@ -199,7 +199,7 @@ export default {
       switch (option._evnet) {
         case 'search':
           this.params.pageIndex = 1
-          this.params.warehouseName = option.key
+          this.params.keyword = option.keyword
           this.getList()
           break
         case 'add':