Jelajahi Sumber

修改提示语 failproccess

Shan9312 1 Minggu lalu
induk
melakukan
21b2b18a97
3 mengubah file dengan 39 tambahan dan 11 penghapusan
  1. 1 1
      src/permission.js
  2. 27 0
      src/views/custom/outStock/index.vue
  3. 11 10
      src/views/custom/subscribe/index.vue

+ 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', 1)
+Cookies.set('sso', 0)
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
 
 const whiteList = ['/login'] // no redirect whitelist

+ 27 - 0
src/views/custom/outStock/index.vue

@@ -2988,6 +2988,19 @@ export default {
       this.requestParam.parammaps.useType = this.getdataListParm.parammaps.useType
       this.requestParam.parammaps.startTime = this.getdataListParm.parammaps.startTime
       this.requestParam.parammaps.stopTime = this.getdataListParm.parammaps.stopTime
+
+        // 对于多选的牧场,根据数组的名称来转换 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();
+      }
+      this.requestParam.parammaps.pastureId = this.getdataListParm.parammaps.pastureId
       GetAccount(this.requestParam).then(response => {
         this.$nextTick(() => {
           import('@/vendor/Export2Excel').then(excel => {
@@ -3045,6 +3058,20 @@ export default {
       this.requestParam.parammaps.partCode = this.getdataListParm2.parammaps.partCode
       this.requestParam.parammaps.partName = this.getdataListParm2.parammaps.partName
       this.requestParam.parammaps.providerId = this.getdataListParm2.parammaps.providerId
+
+        // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
+      if (this.getdataListParm2.parammaps.pastureArr && this.getdataListParm2.parammaps.pastureArr.length > 0) {
+        const arr = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm2.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids = arr.map((child) => { return child.id })
+        console.log(arr,ids,'999999')
+        this.getdataListParm2.parammaps.pastureId = ids.toString();
+      }
+      this.requestParam.parammaps.pastureId = this.getdataListParm2.parammaps.pastureId
+
       GetAccount(this.requestParam).then(response => {
         this.$nextTick(() => {
           import('@/vendor/Export2Excel').then(excel => {

+ 11 - 10
src/views/custom/subscribe/index.vue

@@ -5992,7 +5992,7 @@ export default {
                 duration: 2000
               })
             } else {
-              failproccess(response, this.$notify)
+              failproccess(response, this.$notify, 1)
             }
           })
         }
@@ -6074,7 +6074,7 @@ export default {
                 duration: 2000
               })
             } else {
-              failproccess(response, this.$notify)
+              failproccess(response, this.$notify, 1)
             }
           })
         }
@@ -6156,7 +6156,7 @@ export default {
                 duration: 2000
               })
             } else {
-              failproccess(response, this.$notify)
+              failproccess(response, this.$notify, 1)
             }
           })
         }
@@ -6260,7 +6260,7 @@ export default {
                 duration: 2000
               })
             } else {
-              failproccess(response, this.$notify)
+              failproccess(response, this.$notify, 1)
             }
           })
         }
@@ -6316,7 +6316,7 @@ export default {
                 duration: 2000
               })
             } else {
-              failproccess(response, this.$notify)
+              failproccess(response, this.$notify, 1)
             }
           })
         }
@@ -6373,7 +6373,7 @@ export default {
               })
 
             } else {
-              failproccess(response, this.$notify)
+              failproccess(response, this.$notify, 1)
             }
           })
         }
@@ -6715,7 +6715,7 @@ export default {
             duration: 2000
           })
         } else {
-          failproccess(response, this.$notify)
+          failproccess(response, this.$notify, 1)
         }
       })
       return true
@@ -6754,9 +6754,10 @@ export default {
             parammaps: {
               reject: 1,
               explain: value,
-              id: row.id
+              id:row.id,
             }
           }
+
           PostDataByName(data).then((response) => {
             console.log('审核确认发送参数', this.requestParam)
             this.isokDisable = false
@@ -6771,7 +6772,7 @@ export default {
               this.getdataListSee.parammaps.id = this.modifyTemp.id
               this.getSeeList(row)
             } else {
-              failproccess(response, this.$notify)
+              failproccess(response, this.$notify, 1)
             }
           })
         })
@@ -6808,7 +6809,7 @@ export default {
             duration: 2000
           })
         } else {
-          failproccess(response, this.$notify)
+          failproccess(response, this.$notify, 1)
         }
       })
     },