Browse Source

库存预警

lilei 2 years ago
parent
commit
9b5dbbbab6

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1657867843874
+  "version": 1657873315407
 }

+ 9 - 0
src/api/stockWarn.js

@@ -19,3 +19,12 @@ export const stockWarnSaveBatch = (params) => {
     method: 'post'
   })
 }
+//  库存预警 导出
+export const stockWarnExport = (params) => {
+  return axios({
+    url: '/stockWarn/export',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 5 - 15
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -163,7 +163,7 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import { stockWarnList, stockWarnSaveBatch } from '@/api/stockWarn'
+import { stockWarnList, stockWarnSaveBatch, stockWarnExport } from '@/api/stockWarn'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
@@ -254,20 +254,10 @@ export default {
     // 导出
     handleExport () {
       const _this = this
-      this.$refs.ruleForm.validate(valid => {
-        if (valid) {
-          const params = _this.queryParam
-          _this.exportLoading = true
-          _this.spinning = true
-          reportSparePartsReturnExport(params).then(res => {
-            downloadExcel(res, '库存预警')
-            _this.exportLoading = false
-            _this.spinning = false
-          })
-        } else {
-          console.log('error submit!!')
-          return false
-        }
+      _this.exportLoading = true
+      stockWarnExport(_this.queryParam).then(res => {
+        downloadExcel(res, '库存预警')
+        _this.exportLoading = false
       })
     },
     //  保存

+ 2 - 2
vue.config.js

@@ -211,8 +211,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.0.102/qpls-md',
-        target: 'http://p.iscm.360arrow.com/qpls-md',
+        target: 'http://192.168.0.215:8076/qpls-md',
+        // target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,