Browse Source

首页 导航指引

chenrui 3 years ago
parent
commit
bab72d2b92

+ 5 - 0
src/views/Home.vue

@@ -251,6 +251,9 @@ export default {
               name: '销售出库',
               styleC: 'red-color',
               url: '/outboundOrderManagement/outboundOrder/list',
+              params: {
+              	state: 'WAIT'
+              },
               permission: 'M_outboundList',
               orderNum: 'salesWaitOutWarehouseCount'
             },
@@ -259,6 +262,7 @@ export default {
               name: '财务付款',
               styleC: 'red-color',
               url: '/financialManagement/financialPayment/list',
+              params: JSON.stringify({ bizType: 'SELL_REFUND', billState: 'UNSETTLE' }),
               permission: 'M_financialPaymentList',
               orderNum: 'salesReturnFinancialWaitCount'
             }
@@ -269,6 +273,7 @@ export default {
               name: '财务收款',
               styleC: 'blue-color',
               url: '/financialManagement/financialCollection/list',
+              params: JSON.stringify({ bizType: 'SELL', billState: 'UNSETTLE' }),
               permission: 'M_financialCollectionList',
               orderNum: 'salesFinancialWaitCount'
             },

+ 19 - 5
src/views/financialManagement/financialCollection/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="financialCollectionList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 标签页 -->
-      <a-tabs type="card" default-active-key="ALL" @change="handleTabChange" class="financialCollectionList-tabs ">
+      <a-tabs type="card" v-model="queryParam.bizType" @change="handleTabChange" class="financialCollectionList-tabs ">
         <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
           <span slot="tab">{{ item.bizName }}({{ item.countNum }})</span>
         </a-tab-pane>
@@ -130,6 +130,7 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       openModal: false, // 详情弹框
       tableHeight: 0,
+      curBizType: 'ALL',
       // 查询参数
       queryParam: {
         bizType: 'ALL',
@@ -236,7 +237,12 @@ export default {
       queryByTypeSum({}).then(res => {
         if (res.data && res.status == 200) {
           this.tabPaneData = res.data
-          this.queryParam.bizType = res.data[0].bizType
+          if (this.$route.query.pageParams) {
+            this.queryParam.bizType = JSON.parse(this.$route.query.pageParams).bizType
+          } else {
+            this.queryParam.bizType = res.data[0].bizType
+          }
+          this.$refs.table.refresh(true)
         }
       })
     },
@@ -289,6 +295,11 @@ export default {
     },
     // 重置
     resetSearchForm () {
+      this.resetData()
+      this.$refs.table.refresh(true)
+    },
+    // 重置数据
+    resetData () {
       if (this.advanced) {
         this.$refs.rangeDate.resetDate()
       }
@@ -301,7 +312,6 @@ export default {
         auditBeginDate: '',
         auditEndDate: ''
       }
-      this.$refs.table.refresh(true)
     },
     onSelectChange (record, selected, selectedRows, nativeEvent) {
       if (selected) { //  选择
@@ -354,15 +364,19 @@ export default {
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.resetData()
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
+      this.resetData()
+      if (this.$route.query.pageParams) {
+        this.queryParam.bizType = JSON.parse(this.$route.query.pageParams).bizType
+        this.queryParam.billState = JSON.parse(this.$route.query.pageParams).billState
+      }
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 19 - 6
src/views/financialManagement/financialPayment/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="finacialPay-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 标签页 -->
-      <a-tabs type="card" size="small" default-active-key="0" @change="handleTabChange" class="finacialPay-tabs">
+      <a-tabs type="card" size="small" v-model="queryParam.bizType" @change="handleTabChange" class="finacialPay-tabs">
         <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
           <span slot="tab">{{ item.bizName }}({{ item.countNum }})</span>
         </a-tab-pane>
@@ -128,7 +128,7 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       openModal: false, // 详情弹框
       tableHeight: 0,
-      curBizType: '',
+      curBizType: 'ALL',
       // 查询参数
       queryParam: {
         bizType: 'ALL',
@@ -235,7 +235,12 @@ export default {
       queryByTypeSum({}).then(res => {
         if (res.data && res.status == 200) {
           this.tabPaneData = res.data
-          this.queryParam.bizType = res.data[0].bizType
+          if (this.$route.query.pageParams) {
+            this.queryParam.bizType = JSON.parse(this.$route.query.pageParams).bizType
+          } else {
+            this.queryParam.bizType = res.data[0].bizType
+          }
+          this.$refs.table.refresh(true)
         }
       })
     },
@@ -288,6 +293,11 @@ export default {
     },
     //  重置
     resetSearchForm () {
+      this.resetData()
+      this.$refs.table.refresh(true)
+    },
+    // 重置数据
+    resetData () {
       if (this.advanced) {
         this.$refs.rangeDate.resetDate()
       }
@@ -300,7 +310,6 @@ export default {
         auditBeginDate: '',
         auditEndDate: ''
       }
-      this.$refs.table.refresh(true)
     },
     onSelectChange (record, selected, selectedRows, nativeEvent) {
       if (selected) { //  选择
@@ -353,15 +362,19 @@ export default {
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.resetData()
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
+      this.resetData()
+      if (this.$route.query.pageParams) {
+        this.queryParam.bizType = JSON.parse(this.$route.query.pageParams).bizType
+        this.queryParam.billState = JSON.parse(this.$route.query.pageParams).billState
+      }
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 10 - 3
src/views/outboundOrderManagement/outboundOrder/list.vue

@@ -243,13 +243,17 @@ export default {
     },
     //  重置
     resetSearchForm () {
+      this.resetData()
+      this.$refs.table.refresh(true)
+    },
+    // 重置数据
+    resetData () {
       this.$refs.rangeDate.resetDate(this.time)
       this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.demanderName = undefined
       this.queryParam.outBizType = undefined
       this.queryParam.state = undefined
-      this.$refs.table.refresh(true)
     },
     //  详情
     handleDetail (row) {
@@ -340,7 +344,6 @@ export default {
       })
     },
     onSelectChange (record, selected, selectedRows, nativeEvent) {
-      console.log(record, selected, selectedRows, nativeEvent)
       if (selected) { //  选择
         this.selectedRows.push(record)
       } else { //  取消
@@ -399,8 +402,12 @@ export default {
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
+      this.resetData()
+      if (this.$route.query.pageParams) {
+        this.queryParam.state = this.$route.query.pageParams.state
+      }
       this.pageInit()
-      this.resetSearchForm()
+      this.$refs.table.refresh(true)
     }
   },
   beforeRouteEnter (to, from, next) {