chenrui 1 vuosi sitten
vanhempi
commit
e5b43de1f9

BIN
public/templ/发货单信息导入模板.xlsx


+ 14 - 5
src/components/Table/index.js

@@ -10,6 +10,7 @@ export default {
       localLoading: false,
       localDataSource: [],
       localPagination: Object.assign({}, this.pagination),
+      sortObj: null,
       isSucceed: true ,//  是否请求成功
       leftAlignId:"",
     }
@@ -153,6 +154,7 @@ export default {
       this.localLoading = false
       this.localDataSource = []
       this.needTotalList = []
+      this.sortObj = null
       this.clearSelected()
       this.localPagination = Object.assign({}, {
         current: 1, pageSize: this.pageSize, total: 0
@@ -166,6 +168,7 @@ export default {
      */
     loadData (pagination, filters, sorter) {
       this.localLoading = true
+      console.log(sorter)
       const parameter = Object.assign({
         pageNo: (pagination && pagination.current) ||
           this.showPagination && this.localPagination.current || this.pageNum,
@@ -174,16 +177,22 @@ export default {
         tableId: this.tableId,
         index: this.index
       },
-      (sorter && sorter.field && {
+      (sorter ? sorter.field && {
         sortField: sorter.field
-      }) || {},
-      (sorter && sorter.order && {
+      } : this.sortObj&&{sortField:this.sortObj.field}) || {},
+      (sorter ? sorter.order && {
         sortOrder: sorter.order
-      }) || {}, {
+      } : this.sortObj&&{sortOrder:this.sortObj.order}) || {}, {
         ...filters
       }
       )
-      // console.log('parameter', parameter)
+      // 缓存排序参数
+      if(sorter){
+        this.sortObj = {
+          field: sorter.field||'',
+          order: sorter.order||''
+        }
+      }
       const result = this.data(parameter)
       // 对接自己的通用数据接口需要修改下方代码中的 r.pageNo, r.count, r.data
       // eslint-disable-next-line

+ 10 - 3
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -48,7 +48,7 @@
               </a-col>
             </template>
             <a-col :md="7" :sm="24">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryList-refresh">查询</a-button>
+              <a-button type="primary" @click="$refs.table.refresh()" :disabled="disabled" id="inventoryQueryList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryList-reset">重置</a-button>
               <a-button
                 v-if="$hasPermissions('B_inventoryQuery_export')"
@@ -154,15 +154,22 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
+        console.log(parameter)
         // 排序
-        if (parameter.sortField == 'currentStockQty') {
+        if (parameter.sortOrder&&parameter.sortField == 'currentStockQty') {
           parameter.sortField = 'qty'
           parameter.sortAlias = ''
         }
-        if (parameter.sortField == 'currentStockCost') {
+        if (parameter.sortOrder&&parameter.sortField == 'currentStockCost') {
           parameter.sortField = 'currentStockCost'
           parameter.sortAlias = 'stock'
         }
+        
+        if(!parameter.sortOrder){
+          parameter.sortField = ''
+          parameter.sortAlias = ''
+        }
+        
         const params = Object.assign(parameter, this.queryParam)
         if (params.zeroQtyFlag) {
           params.zeroQtyFlag = '0'

+ 3 - 0
src/views/salesManagement/outboundOrder/sendGoodModal.vue

@@ -131,6 +131,9 @@
                 <a-select-option value="机油">
                   机油
                 </a-select-option>
+                <a-select-option value="轮胎">
+                  轮胎
+                </a-select-option>
               </a-select>
             </template>
             <!-- 数量 -->

+ 1 - 1
src/views/salesManagement/salesList/list.vue

@@ -90,7 +90,7 @@
                     placeholder="请选择提醒环节"
                     allowClear></v-select>
                 </a-form-model-item>
-              </a-col> -->s
+              </a-col> -->
             </template>
             <a-col :md="6" :sm="24">
               <div class="table-page-search-submitButtons">

+ 8 - 17
src/views/salesManagement/sendOutOrder/importGuideModal.vue

@@ -17,9 +17,13 @@
           <ul>
             <li>1) 请先下载导入模板,模板中已标示出必填项</li>
             <li>2) 如果物流单号相同,则视为同一个发货单</li>
-            <li>3) 同一个发货单可有多个不同类型的类型,包括易损件、电池、机油、电池机油</li>
+            <li>3) 同一个发货单可有多个不同类型的类型,包括易损件、电池、机油、电池机油、轮胎</li>
+            <li>
+              <a :href="filePath" style="margin: 5px 0 0;display: block;">
+                <a-icon type="download" style="padding-right: 5px;" />下载导入模板
+              </a>
+            </li>
           </ul>
-          <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 +92,8 @@ export default {
       uploadParams: {
         savePathType: 'local'
       },
-      exportLoading: false
+      exportLoading: false,
+      filePath: location.protocol + '//' + location.host + '/templ/发货单信息导入模板.xlsx'
     }
   },
   methods: {
@@ -123,20 +128,6 @@ export default {
     handleClose () {
       this.openImportModal = false
       this.isShow = false
-    },
-    // 下载模板
-    handleExport () {
-      this.exportLoading = true
-      setTimeout(() => {
-        this.exportLoading = false
-      }, 1000)
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = 'https://jg-ocs.oss-cn-beijing.aliyuncs.com/templ/promo/sendOutOrderImport.xlsx?t=' + new Date().getTime()
-      link.setAttribute('download', '发货单信息导入模板' + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-      document.body.removeChild(link)
     }
   },
   watch: {