Просмотр исходного кода

Merge branch 'develop_yh12' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh12

chenrui 2 лет назад
Родитель
Сommit
25e203f583

+ 16 - 5
src/utils/request.js

@@ -12,7 +12,7 @@ const service = axios.create({
 })
 
 const err = (error) => {
-  console.log(error, error.response,error.message,'error')
+  console.log(error, error.response.data,error.message,'error')
   const config = error.config
   // 网络连接出错
   if (error.message.indexOf('Network Error') >= 0) {
@@ -28,12 +28,23 @@ const err = (error) => {
   // 业务错误提示
   if (error.response) {
     const status = error.response.status
+    const message = error.response.data
     if ((status == 503 || status == 500 || status == 404)) {
       notification.destroy()
-      notification.error({
-        message: '提示',
-        description: error.response.data.message
-      })
+      if(message instanceof Blob){
+        message.text().then(data => {
+          const res = JSON.parse(data)
+          notification.error({
+            message: '提示',
+            description: res.message
+          })
+        })
+      }else{
+        notification.error({
+          message: '提示',
+          description: message
+        })
+      }
     }
     store.commit('SET_loadingStatus', false)
     return Promise.reject(err)

+ 5 - 2
src/views/allocationManagement/transferOut/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) 除了“产品编码”、“数量”两列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -89,7 +89,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -126,8 +127,10 @@ export default {
     handleExport () {
       const _this = this
       _this.spinning = true
+      _this.exportLoading = true
       allocateBillDownload({}).then(res => {
         _this.spinning = false
+        _this.exportLoading = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 5 - 2
src/views/allocationManagement/transferReturn/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) 除了“产品编码”、“数量”两列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -89,7 +89,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -126,8 +127,10 @@ export default {
     handleExport () {
       const _this = this
       _this.spinning = true
+      _this.exportLoading = true
       allocateBillDownload({}).then(res => {
         _this.spinning = false
+        _this.exportLoading = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 7 - 2
src/views/inventoryManagement/intelligentReplenishment/set.vue

@@ -22,7 +22,7 @@
                 <li>4) “是否淘汰”字段,如果确定淘汰,则输入“是”,如果不淘汰,则不需要输入,保持为空即可</li>
                 <li>5) “淘汰描述”字段,只有当是否淘汰为“是”时,才能录入淘汰描述,否则,淘汰描述只能保持为空</li>
               </ul>
-              <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+              <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
             </div>
             <div class="explain-item">
               <div class="explain-tit">
@@ -72,11 +72,13 @@ import moment from 'moment'
 import VueCookies from 'vue-cookies'
 import { Upload } from '@/components'
 import { predictProductInfoExport } from '@/api/predict'
+import debounce from 'lodash/debounce'
 export default {
   name: 'IntelligentReplenishmentSet',
   mixins: [commonMixin],
   components: { Upload },
   data () {
+    this.handleExport = debounce(this.handleExport, 2200)
     return {
       spinning: false,
       filePath: 'javascript:;',
@@ -84,7 +86,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -109,8 +112,10 @@ export default {
     handleExport () {
       const _this = this
       _this.spinning = true
+      _this.exportLoading = true
       predictProductInfoExport({}).then(res => {
         _this.spinning = false
+        _this.exportLoading = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 8 - 3
src/views/productManagement/productPricing/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) “产品编码”必须是列表中已存在的产品</li>
             <li>3) 省级价、市级价、特约价、终端价、车主价均可为空,为空表示不对原有价格做改变</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -88,7 +88,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -123,7 +124,11 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      this.spinning = true
+      _this.spinning = true
+      _this.exportLoading = true
+      setTimeout(() => {
+        _this.exportLoading = false
+      }, 1000)
       hdExportExcel(productPriceTplDownload, {}, '产品定价导入模板', function () {
         _this.spinning = false
       })

+ 7 - 2
src/views/productManagement/shelfNoManage/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) “产品编码”必须是列表中已存在的产品</li>
             <li>3) “货位编号”可为空,为空表示此产品没有货位信息</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -88,7 +88,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -124,6 +125,10 @@ export default {
     handleExport () {
       const _this = this
       this.spinning = true
+      this.exportLoading = true
+      setTimeout(() => {
+        _this.exportLoading = false
+      }, 1000)
       hdExportExcel(stackPlaceImportTemplate, {}, '货位编号管理导入模板', function () {
         _this.spinning = false
       })

+ 7 - 4
src/views/purchasingManagement/bulkWarehousingOrder/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) 除了“产品编码”、“数量”两列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -88,7 +88,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -125,10 +126,12 @@ export default {
     handleExport () {
       const _this = this
       const params = { grabFlag: this.params.grabFlag }
-      this.exportLoading = true
       this.spinning = true
-      hdExportExcel(sparePartsDetailDownload, params, '散件入库导入模板', function () {
+      this.exportLoading = true
+      setTimeout(() => {
         _this.exportLoading = false
+      }, 1000)
+      hdExportExcel(sparePartsDetailDownload, params, '散件入库导入模板', function () {
         _this.spinning = false
       })
     }

+ 14 - 1
src/views/salesManagement/receiptPrint/list.vue

@@ -42,7 +42,18 @@
                 </a-form-item>
               </a-col>
               <a-col :md="4" :sm="24">
-                <span class="table-page-search-submitButtons">
+                <a-form-item label="足额打款">
+                  <v-select
+                    v-model="queryParam.fullPaymentFlag"
+                    ref="fullPaymentFlag"
+                    id="salesCollectionList-fullPaymentFlag"
+                    code="FLAG"
+                    placeholder="请选择是否足额打款"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="currentTab==2?4:24" :sm="24">
+                <span style="float:right;" class="table-page-search-submitButtons">
                   <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
                   <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
                 </span>
@@ -146,6 +157,7 @@ export default {
         subareaSn: undefined,
         billStatus: undefined,
         dealerProvinceSn: undefined,
+        fullPaymentFlag:undefined,
         printStatus: 'NO_PRINT'
       },
       totalData: {
@@ -341,6 +353,7 @@ export default {
         subareaSn: undefined,
         billStatus: undefined,
         dealerProvinceSn: undefined,
+        fullPaymentFlag:undefined,
         printStatus: this.currentTab == 2 ? 'NO_PRINT' : undefined
       }
       this.$refs.table.refresh(true)

+ 6 - 3
src/views/salesManagement/salesQuery/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) 除了“产品编码”、“数量”两列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -90,7 +90,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -129,8 +130,10 @@ export default {
       const params = { grabFlag: this.params.grabFlag }
       this.exportLoading = true
       this.spinning = true
-      hdExportExcel(salesDownload, params, '销售导入模板', function () {
+      setTimeout(() => {
         _this.exportLoading = false
+      }, 1000)
+      hdExportExcel(salesDownload, params, '销售导入模板', function () {
         _this.spinning = false
       })
     }

+ 5 - 2
src/views/supplierManagement/associatedProduct/importGuideModal.vue

@@ -19,7 +19,7 @@
             <li>2) 除了“产品编码”列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -87,7 +87,8 @@ export default {
       paramsData: null,
       uploadParams: {
         savePathType: 'local'
-      }
+      },
+      exportLoading: false
     }
   },
   methods: {
@@ -124,8 +125,10 @@ export default {
     handleExport () {
       const _this = this
       _this.spinning = true
+      _this.exportLoading = true
       supplierProductDownload({}).then(res => {
         _this.spinning = false
+        _this.exportLoading = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {