luobang 1 éve
szülő
commit
d0747ec563

+ 2 - 3
build/utils.js

@@ -16,10 +16,9 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 
-let devModules = ['all']
-// let devModules = ['index', 'statisticalReport']
 // let devModules = ['all']
-
+// let devModules = ['index', 'statisticalReport', 'ADMINISTRATORS']
+let devModules = ['all']
 // let devModules = ['index', 'ADMINISTRATORS']
 
 if (pathSrc.indexOf('node_modules') > -1) {

+ 0 - 1
package.json

@@ -25,7 +25,6 @@
     "apollo-link-error": "^1.1.11",
     "apollo-link-http": "^1.5.14",
     "axios": "^0.26.1",
-    "babel-polyfill": "^6.26.0",
     "bignumber.js": "^9.0.2",
     "codemirror": "5.65.5",
     "crypto": "^1.0.1",

+ 1 - 3
src/components/main.vue

@@ -1953,7 +1953,7 @@ export default {
       }
       //   console.log('目录', that.selectedMenu, that.tabsData)
       // 左侧菜单点击切换的时候需要重新加载页面
-      /** 
+      /**
       that.menuTabIndex = that.getTabIndex(menuData.menuId)
       $('#menuTabId iframe').eq(that.menuTabIndex).length &&
         $('#menuTabId iframe')
@@ -2653,10 +2653,8 @@ export default {
       console.log('taskAllNum')
       console.log(this.taskAllNum)
       if (!this.taskAllNum) {
-        console.log('进入了弹出框的判断1')
         this.socketshow = false
       } else {
-        console.log('进入了弹出框的判断2')
         this.socketshow = true
       }
       //let height = document.body.clientHeight - 125

+ 179 - 143
src/config/axios.js

@@ -1,166 +1,202 @@
 /*
-* axios定义
-* */
-import Vue from 'vue';
-import axios from 'axios';
-import ElementUI from 'element-ui';
-import store from '@/store/index.js';
-import { getCookie, setCookie } from '@/utils/util.js';
-import { ajaxCtx, ajaxCtx2, ajaxCtx0 } from '@/config/config.js';
+ * axios定义
+ * */
+import Vue from 'vue'
+import axios from 'axios'
+import ElementUI from 'element-ui'
+import store from '@/store/index.js'
+import { getCookie, setCookie } from '@/utils/util.js'
+import { ajaxCtx, ajaxCtx2, ajaxCtx0 } from '@/config/config.js'
 // import { ajaxCtx, ajaxCtx2, ajaxCtx0 } from '../../static/js/config.js';
 //   平台拦截处理
-import { apiIsPassProject, requestConfig, responseConfig, APIPro } from './axiosPass.js';
+import {
+  apiIsPassProject,
+  requestConfig,
+  responseConfig,
+  APIPro
+} from './axiosPass.js'
 // axios支持跨域cookie
-axios.defaults.withCredentials = true;
+// 表示跨域请求是是否需要凭证
+axios.defaults.withCredentials = true
 // axios添加一个请求拦截器
-axios.interceptors.request.use((config) => {
-//   console.log('nb', config.url)
-//   console.log('hz', new Date().getTime())
-//   var returnFlag = false;
-//   let allPrivilege = window.localStorage.getItem('allPrivilege') ? JSON.parse(window.localStorage.getItem('allPrivilege')) : [];
-//   let ownPrivilege = window.localStorage.getItem('ownPrivilege') && window.localStorage.getItem('ownPrivilege') !== 'undefined' ? JSON.parse(window.localStorage.getItem('ownPrivilege')) : [];
-//   let menuID = '';
-//   if (allPrivilege != null && allPrivilege.length !== 0) {
-//     var tempArr = allPrivilege.filter(function (x) {
-//       var setStratIndex = config.url.indexOf('pass') === -1 ? 0 : config.url.indexOf('pass') + 4;
-//       var setEndIndex = config.url.indexOf('?') === -1 ? config.url.length : config.url.indexOf('?');
-//       var a = config.url.substring(setStratIndex, setEndIndex);
-//       // console.log('a', a);
-//       // console.log('x.menuUrl', x.menuUrl);
-//       // 判断当前菜单ID是否等于接口所在的菜单id
-//       if (x.menuUrl && x.menuUrl.indexOf(a) !== -1) {
-//         menuID = x.pId
-//       }
-//       return x.menuUrl ? x.menuUrl.indexOf(a) !== -1 : false;
-//     });
-//     if (tempArr.length > 0) {
-//       var setArr = ownPrivilege.filter(function (x) {
-//         var setStratIndex = config.url.indexOf('pass') === -1 ? 0 : config.url.indexOf('pass') + 4;
-//         var setEndIndex = config.url.indexOf('?') === -1 ? config.url.length : config.url.indexOf('?');
-//         var a = config.url.substring(setStratIndex, setEndIndex);
-//         return x.menuUrl ? x.menuUrl.indexOf(a) !== -1 : false;
-//       });
-//       if (setArr.length === 0) {
-//         returnFlag = menuID === window.localStorage.getItem('activeMenuId');
-//       }
-//     }
-//   }
-//   if (returnFlag) {
-//     console.log('这个接口叫' + config.url)
-//     if (config.method === 'get') {
-//       config.method = 'post'
-//     }
-//     config.url = '';
-//     return config;
-//   }
-  //  判断是否平台接口
-  if (config.url.indexOf('configCenter') === 0) {
-    config.url = 'pass/' + config.url
+axios.interceptors.request.use(
+  config => {
+    //   console.log('nb', config.url)
+    //   console.log('hz', new Date().getTime())
+    //   var returnFlag = false;
+    //   let allPrivilege = window.localStorage.getItem('allPrivilege') ? JSON.parse(window.localStorage.getItem('allPrivilege')) : [];
+    //   let ownPrivilege = window.localStorage.getItem('ownPrivilege') && window.localStorage.getItem('ownPrivilege') !== 'undefined' ? JSON.parse(window.localStorage.getItem('ownPrivilege')) : [];
+    //   let menuID = '';
+    //   if (allPrivilege != null && allPrivilege.length !== 0) {
+    //     var tempArr = allPrivilege.filter(function (x) {
+    //       var setStratIndex = config.url.indexOf('pass') === -1 ? 0 : config.url.indexOf('pass') + 4;
+    //       var setEndIndex = config.url.indexOf('?') === -1 ? config.url.length : config.url.indexOf('?');
+    //       var a = config.url.substring(setStratIndex, setEndIndex);
+    //       // console.log('a', a);
+    //       // console.log('x.menuUrl', x.menuUrl);
+    //       // 判断当前菜单ID是否等于接口所在的菜单id
+    //       if (x.menuUrl && x.menuUrl.indexOf(a) !== -1) {
+    //         menuID = x.pId
+    //       }
+    //       return x.menuUrl ? x.menuUrl.indexOf(a) !== -1 : false;
+    //     });
+    //     if (tempArr.length > 0) {
+    //       var setArr = ownPrivilege.filter(function (x) {
+    //         var setStratIndex = config.url.indexOf('pass') === -1 ? 0 : config.url.indexOf('pass') + 4;
+    //         var setEndIndex = config.url.indexOf('?') === -1 ? config.url.length : config.url.indexOf('?');
+    //         var a = config.url.substring(setStratIndex, setEndIndex);
+    //         return x.menuUrl ? x.menuUrl.indexOf(a) !== -1 : false;
+    //       });
+    //       if (setArr.length === 0) {
+    //         returnFlag = menuID === window.localStorage.getItem('activeMenuId');
+    //       }
+    //     }
+    //   }
+    //   if (returnFlag) {
+    //     console.log('这个接口叫' + config.url)
+    //     if (config.method === 'get') {
+    //       config.method = 'post'
+    //     }
+    //     config.url = '';
+    //     return config;
+    //   }
+    //  判断是否平台接口
+    if (config.url.indexOf('configCenter') === 0) {
+      config.url = 'pass/' + config.url
+    }
+    config = requestConfig(config)
+    return config
+  },
+  error => {
+    return Promise.reject(error)
   }
-  config = requestConfig(config);
-  return config;
-}, (error) => {
-  return Promise.reject(error);
-});
+)
 // axios添加一个响应拦截器
-axios.interceptors.response.use(function (response) {
-  //  判断是否是平台接口
-//   if (response.config.url === '') {
-//     response.status = '405'
-//   }
-  if (apiIsPassProject(response.config.url, APIPro)) {
-    //  是平台接口
-    //  处理配置
-    response = responseConfig(response);
-  } else {
-    //  不是
-    let flag = false, msg = '';
-    if (response && response.data) {
-      if (response.data.success === false) {
-        flag = true;
-        msg = response.data.message;
+axios.interceptors.response.use(
+  function(response) {
+    //  判断是否是平台接口
+    //   if (response.config.url === '') {
+    //     response.status = '405'
+    //   }
+    if (apiIsPassProject(response.config.url, APIPro)) {
+      //  是平台接口
+      //  处理配置
+      response = responseConfig(response)
+    } else {
+      //  不是
+      let flag = false,
+        msg = ''
+      if (response && response.data) {
+        if (response.data.success === false) {
+          flag = true
+          msg = response.data.message
+        }
+        let resCode = response.data.state
+        if (resCode === -1 || resCode === '-1') {
+          flag = true
+          msg = response.data.message
+        } else if (resCode === 500 || resCode === '500') {
+          flag = true
+          msg = response.data.msgInfo
+            ? response.data.msgInfo
+            : response.data.errorInfo
+        } else if (resCode === 300 || resCode === '300') {
+          // 后台session失效
+          flag = true
+          msg = '登录已过期,请重新登录'
+          window.top.location.href = store.getters.ctx
+          // window.location.href = this.$store.state.ctx + '/views/index.html';
+          // window.location.href = './index.html';
+        }
       }
-      let resCode = response.data.state;
-      if (resCode === -1 || resCode === '-1') {
-        flag = true;
-        msg = response.data.message;
-      } else if (resCode === 500 || resCode === '500') {
-        flag = true;
-        msg = response.data.msgInfo ? response.data.msgInfo : response.data.errorInfo;
-      } else if (resCode === 300 || resCode === '300') {
-        // 后台session失效
-        flag = true;
-        msg = '登录已过期,请重新登录';
-        window.top.location.href = store.getters.ctx;
-        // window.location.href = this.$store.state.ctx + '/views/index.html';
-        // window.location.href = './index.html';
+      if (flag) {
+        if (msg) {
+          ElementUI.Message({
+            message: msg,
+            type: 'error',
+            dangerouslyUseHTMLString: true
+          })
+        }
+        return null
       }
     }
-    if (flag) {
-      if (msg) { ElementUI.Message({ message: msg, type: 'error', dangerouslyUseHTMLString: true }); }
-      return null;
-    }
-  }
-  return response;
-}, function (error) {
-  let errorMsg = '<span style="font-weight: bold; font-size: 13px; display: inline-block; padding-bottom: 5px;">操作失败</span><br/>' +
-    '<span>请刷新页面重新操作,如果问题依旧存在,请联系管理员</span>';
-    if ((error.response.data.exception && error.response.data.exception.indexOf('ShiroJwtException') >= 0) || (error.response.data.message && (error.response.data.message.indexOf('Token') >= 0))) {
+    return response
+  },
+  function(error) {
+    let errorMsg =
+      '<span style="font-weight: bold; font-size: 13px; display: inline-block; padding-bottom: 5px;">操作失败</span><br/>' +
+      '<span>请刷新页面重新操作,如果问题依旧存在,请联系管理员</span>'
+    if (
+      (error.response.data.exception &&
+        error.response.data.exception.indexOf('ShiroJwtException') >= 0) ||
+      (error.response.data.message &&
+        error.response.data.message.indexOf('Token') >= 0)
+    ) {
       ElementUI.Message({
         message: '登录失效,请重新登录',
         dangerouslyUseHTMLString: true,
         type: 'error'
-      });
+      })
       setTimeout(() => {
-        window.top.location.href = store.getters.ctx;
-        setCookie('accessToken', '', -1, '/');
-        setCookie('refreshToken', '', -1, '/');
-        setCookie('workDate', '', -1);
-        setCookie('ticket', '', -1, '/');
+        window.top.location.href = store.getters.ctx
+        setCookie('accessToken', '', -1, '/')
+        setCookie('refreshToken', '', -1, '/')
+        setCookie('workDate', '', -1)
+        setCookie('ticket', '', -1, '/')
       }, 500)
       return
     }
-  if (error && error.response && error.response.data) {
-    let errorData;
-    if (typeof error.response.data === 'string') {
-      errorData = error.response.data.substring(0, error.response.data.length - 2);
-      try {
-        errorData = JSON.parse(errorData);
-        let index = errorData.message.indexOf(':') + 1
-        if (errorData.message) { errorMsg = errorData.message.substring(index); }
-      } catch (err) {
-        errorData = {
-          message: error.response.data,
-          code: error.response.status
+    if (error && error.response && error.response.data) {
+      let errorData
+      if (typeof error.response.data === 'string') {
+        errorData = error.response.data.substring(
+          0,
+          error.response.data.length - 2
+        )
+        try {
+          errorData = JSON.parse(errorData)
+          let index = errorData.message.indexOf(':') + 1
+          if (errorData.message) {
+            errorMsg = errorData.message.substring(index)
+          }
+        } catch (err) {
+          errorData = {
+            message: error.response.data,
+            code: error.response.status
+          }
+        }
+      } else {
+        errorData = error.response.data
+        if (errorData.message) {
+          errorMsg = errorData.message
         }
       }
-    } else {
-      errorData = error.response.data
-      if (errorData.message) { errorMsg = errorData.message; }
-    }
-    let mCode = errorData.code;
-    // data.error
-    if (errorData.error) {
-      if (errorData.error.message) { errorMsg = errorData.error.message; }
-      mCode = errorData.error.code;
-    }
-    if (mCode === '-99' || mCode === -99) {
-      errorMsg = '登录已过期,请重新登录';
-      window.top.location.href = store.getters.ctx;
-      // window.location.href = './index.html';
-    } else if (mCode === '405' || mCode === 405) {
-      errorMsg = '无权限访问,请联系系统管理员';
+      let mCode = errorData.code
+      // data.error
+      if (errorData.error) {
+        if (errorData.error.message) {
+          errorMsg = errorData.error.message
+        }
+        mCode = errorData.error.code
+      }
+      if (mCode === '-99' || mCode === -99) {
+        errorMsg = '登录已过期,请重新登录'
+        window.top.location.href = store.getters.ctx
+        // window.location.href = './index.html';
+      } else if (mCode === '405' || mCode === 405) {
+        errorMsg = '无权限访问,请联系系统管理员'
+      }
+      // console.log('执行2', errorData.message, errorMsg)
     }
-    // console.log('执行2', errorData.message, errorMsg)
+    // 提示
+    ElementUI.Message({
+      message: errorMsg,
+      dangerouslyUseHTMLString: true,
+      type: 'error'
+    })
+    return Promise.reject(error)
   }
-  // 提示
-  ElementUI.Message({
-    message: errorMsg,
-    dangerouslyUseHTMLString: true,
-    type: 'error'
-  });
-  return Promise.reject(error);
-});
-Vue.prototype.axios = axios;
+)
+Vue.prototype.axios = axios
 
-export default axios;
+export default axios

+ 35 - 26
src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue

@@ -997,34 +997,39 @@ export default {
       })
     },
     onClickConfirm() {
+      console.log(this.jsonStringValue, 'jsonStringValue')
       this.poundNo = 'jlbl' + toDateNo(new Date())
       console.log(typeof this.transferMap.orderNumber)
-      if (this.switchValue) {
-        if (
-          this.orderNumber == null ||
-          this.truckCalFirst == null ||
-          this.truckCalSecond == null ||
-          this.firstWeight == null ||
-          this.secondWeight == null ||
-          this.value1 == null ||
-          this.value2 == null ||
-          this.materialId == null
-        ) {
-          this.$message.warning('请填写所有值!!!')
-          return
+      if (!this.jsonStringValue) {
+        if (this.switchValue) {
+          if (
+            this.orderNumber == null ||
+            this.truckCalFirst == null ||
+            this.truckCalSecond == null ||
+            this.firstWeight == null ||
+            this.secondWeight == null ||
+            this.value1 == null ||
+            this.value2 == null ||
+            this.materialId == null
+          ) {
+            this.$message.warning('请填写所有值!!!')
+            return
+          }
+        } else {
+          if (
+            this.orderNumber == null ||
+            this.truckCalFirst == null ||
+            this.firstWeight == null ||
+            this.value1 == null ||
+            this.materialId == null
+          ) {
+            this.$message.warning('请填写所有值!!!')
+            return
+          }
         }
       } else {
-        if (
-          this.orderNumber == null ||
-          this.truckCalFirst == null ||
-          this.firstWeight == null ||
-          this.value1 == null ||
-          this.materialId == null
-        ) {
-          this.$message.warning('请填写所有值!!!')
-          return
-        }
       }
+
       let mapFirst = {
         orderNumber: this.orderNumber,
         resultTareCalculateNumber: this.truckCalFirstNum,
@@ -1065,10 +1070,14 @@ export default {
         }
       }
       var arr = []
-      if (this.switchValue) {
-        arr.push(mapSecond)
+      if (!this.jsonStringValue) {
+        if (this.switchValue) {
+          arr.push(mapSecond)
+        } else {
+          arr.push(mapFirst)
+        }
       } else {
-        arr.push(mapFirst)
+        arr.push(JSON.parse(this.jsonStringValue))
       }
       console.log(arr, 'arr')
       this.axios.post('/api/v1/uc/recordingWeightResult', arr).then(res => {

+ 1 - 1
src/views/statisticalReport/components/purchasFuelMonitor/purchasFuelNewMonitor.vue

@@ -49,6 +49,7 @@
 
 <script>
 import { sjTime } from '@/utils/sharedJsFile'
+import { getCookie } from '@/utils/util.js'
 export default {
   data() {
     return {
@@ -72,7 +73,6 @@ export default {
       this.$router.go(0)
     },
     func(res) {
-      console.log(res)
       var resultNetWeightTotal = 0
       res.list.forEach(e => {
         resultNetWeightTotal = resultNetWeightTotal + e.resultNetWeight

+ 114 - 35
src/views/statisticalReport/components/salesLogisticsStatistics/unloadingSteelReports.vue

@@ -332,6 +332,7 @@
 <script>
 import { sjTime } from '@/utils/sharedJsFile'
 import { getCookie } from '@/utils/util.js'
+
 export default {
   data() {
     return {
@@ -552,7 +553,6 @@ export default {
       } else {
         this.saleDateOfReceipt = loadTime1
       }
-      console.log(this.saleDateOfReceipt, 'this.saleDateOfReceipt')
     },
     //防抖函数--防止用户重复点击
     debounce(func, delay) {
@@ -644,7 +644,6 @@ export default {
             })
           )
         )
-        console.log(that.entryIdList)
         if (that.entryIdList.length > 0) {
           let obj = {}
           obj.entryIdList = that.entryIdList
@@ -667,7 +666,7 @@ export default {
         .then(() => {
           const loading = this.$loading({
             lock: true,
-            text: '正在快马加鞭为您生成上传销售订单,请稍候',
+            text: '正在快马加鞭为您生成上传销售订单,请勿退出该界面',
             spinner: 'el-icon-loading',
             background: 'rgba(0, 0, 0, 0.7)'
           })
@@ -696,7 +695,6 @@ export default {
           let result = Object.values(map1)
           //遍历数组
           let saleOrderListMap = []
-          console.log(result)
           result.forEach((saleOrderList, index) => {
             let map = {}
             let arr = []
@@ -719,37 +717,99 @@ export default {
             map.operator = getCookie('loginName')
             saleOrderListMap.push(map)
           })
-          console.log(saleOrderListMap, 'saleOrderListMap')
-          this.axios
-            .post('/api/v1/ams/addUnloadSteelSaleOrderList', saleOrderListMap, {
-              timeout: 5 * 60 * 1000
-            })
-            .then(res => {
-              if (res.data.code == '200') {
-                this.axios
-                  .post('/api/v1/ams/closingEntries', closeEntryList, {
-                    timeout: 3 * 60 * 1000
-                  })
-                  .then(res => {
-                    if (res.data.code == '200') {
-                      this.getSteelReport()
-                      loading.close()
-                      this.$message({
-                        type: 'success',
-                        offset: '250',
-                        message: '生成订单成功,关闭分录成功',
-                        duration: 2000
-                      })
-                    }
-                  })
-                  .catch(e => {
-                    loading.close()
-                  })
-              }
-            })
-            .catch(e => {
+          if (Promise.all && this.PromiseAllSettled) {
+            const promiseAllSettled = this.PromiseAllSettled([
+              this.axios.post(
+                '/api/v1/ams/addUnloadSteelSaleOrderList',
+                saleOrderListMap,
+                {
+                  timeout: 6 * 60 * 1000
+                }
+              ),
+              this.axios.post('/api/v1/ams/closingEntries', closeEntryList, {
+                timeout: 3 * 60 * 1000
+              })
+            ])
+            const _this = this
+            promiseAllSettled.then(function(res) {
+              console.log(res, 'res')
+              _this.getSteelReport()
               loading.close()
+              if (
+                res[0].status == 'fulfilled' &&
+                res[1].status == 'fulfilled'
+              ) {
+                _this.$message({
+                  type: 'success',
+                  offset: '250',
+                  message: '生成订单成功,关闭分录成功',
+                  duration: 2000
+                })
+              } else if (
+                res[0].status == 'rejected' &&
+                res[1].status == 'fulfilled'
+              ) {
+                _this.$message({
+                  type: 'error',
+                  offset: '250',
+                  message: '生成订单失败,关闭分录成功,请重新上传!',
+                  duration: 2000
+                })
+              } else if (
+                res[1].status == 'rejected' &&
+                res[0].status == 'fulfilled'
+              ) {
+                _this.$message({
+                  type: 'success',
+                  offset: '250',
+                  message: '生成订单成功,分录关闭失败',
+                  duration: 2000
+                })
+              } else {
+                _this.$message({
+                  type: 'success',
+                  offset: '250',
+                  message: '生成订单失败,分录关闭失败',
+                  duration: 2000
+                })
+              }
             })
+          } else {
+            this.axios
+              .post(
+                '/api/v1/ams/addUnloadSteelSaleOrderList',
+                saleOrderListMap,
+                {
+                  timeout: 5 * 60 * 1000
+                }
+              )
+              .then(res => {
+                if (res.data.code == '200') {
+                  this.axios
+                    .post('/api/v1/ams/closingEntries', closeEntryList, {
+                      timeout: 3 * 60 * 1000
+                    })
+                    .then(res => {
+                      if (res.data.code == '200') {
+                        this.getSteelReport()
+                        loading.close()
+                        this.$message({
+                          type: 'success',
+                          offset: '250',
+                          message: '生成订单成功,关闭分录成功',
+                          duration: 2000
+                        })
+                      }
+                    })
+                    .catch(e => {
+                      loading.close()
+                    })
+                }
+              })
+              .catch(e => {
+                loading.close()
+              })
+          }
         })
         .catch(() => {
           this.$message({
@@ -759,6 +819,20 @@ export default {
           })
         })
     },
+    PromiseAllSettled(promises = [], onlyResult) {
+      return Promise.all(
+        promises.map(
+          onlyResult
+            ? item => (item instanceof Promise ? item.catch(e => e) : item)
+            : item =>
+                item instanceof Promise
+                  ? item
+                      .then(value => ({ status: 'fulfilled', value }))
+                      .catch(reason => ({ status: 'rejected', reason }))
+                  : { status: 'fulfilled', value: item }
+        )
+      )
+    },
     getRemarkDate() {
       let day = new Date().getDate()
       let month = new Date().getMonth() + 1
@@ -771,7 +845,6 @@ export default {
     getRemarkDateOld() {
       let day = new Date(new Date().getTime() - 86400000).getDate()
       let month = new Date(new Date().getTime() - 86400000).getMonth() + 1
-      console.log(day)
       if (day < 10) {
         day = '0' + day
       }
@@ -909,7 +982,6 @@ export default {
       var title = this.tableTitle
       let tHeader = []
       let filterVal = []
-      console.log(this.$refs.tableRef)
       this.$refs.tableRef.$children.forEach(item => {
         if (item.label != undefined && item.prop != undefined) {
           if (tHeader.indexOf(item.label) === -1) {
@@ -1117,6 +1189,13 @@ export default {
             })
             .then(res => {
               if (res.data.code == '200') {
+                this.$message({
+                  type: 'success',
+                  message: '重置成功',
+                  offset: '200',
+                  duration: 2000
+                })
+                loading.close()
               }
             })
             .catch(e => {