Browse Source

bug 修复

lilei 3 years ago
parent
commit
ca9efafaf7
3 changed files with 20 additions and 3 deletions
  1. 1 1
      src/utils/request.js
  2. 17 0
      src/views/numsGoodsShelves/recallManagement/recallModal.vue
  3. 2 2
      vue.config.js

+ 1 - 1
src/utils/request.js

@@ -110,7 +110,7 @@ service.interceptors.response.use((response) => {
         })
       }
     })
-  } else if (response.data.status != 200 && response.data.status) {
+  } else if (response.data.status != 200 && response.data.status && response.data.errCode != 'VALIDATE_STOCK_LACK') {
     // 其它业务错误提示
     notification.destroy()
     notification.error({

+ 17 - 0
src/views/numsGoodsShelves/recallManagement/recallModal.vue

@@ -132,12 +132,29 @@ export default {
               _this.$emit('refresh')
               _this.cancel()
             } else {
+              if (res.errCode == 'VALIDATE_STOCK_LACK') {
+                _this.walidateStock(res.message)
+              }
               _this.spinning = false
             }
           })
         }
       })
     },
+    walidateStock (msg) {
+      const h = this.$createElement
+      const p = []
+      const m = msg.split('\n')
+      for (let i = 0; i < m.length; i++) {
+        p.push(h('div', m[i]))
+      }
+      this.$info({
+        title: '操作失败,以下配件库存不足',
+        content: h('div', {}, p),
+        centered: true,
+        onOk () {}
+      })
+    },
     getData () {
       this.spinning = true
       shelfRecallDetailList({ recallBillSn: this.currentData.recallBillSn }).then(res => {

+ 2 - 2
vue.config.js

@@ -108,9 +108,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.16.188:8503/qpls-md',
+        target: 'http://192.168.16.151:8503/qpls-md',
         // target: 'http://frps.chelingzhu.com:7800/qpls-md',
-        target: 'http://p.iscm.360arrow.com/qpls-md',
+        // target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,