lilei vor 3 Jahren
Ursprung
Commit
69dcc8d9c8

+ 2 - 2
src/components/MultiTab/MultiTab.vue

@@ -1,6 +1,5 @@
 <script>
 import events from './events'
-
 export default {
   name: 'MultiTab',
   data () {
@@ -13,7 +12,7 @@ export default {
       maxTabNums: 10
     }
   },
-  inject: ['reloadView'],
+  inject: ['reloadView', 'setIsHomeNav'],
   created () {
     // bind event
     events.$on('open', val => {
@@ -66,6 +65,7 @@ export default {
         this.selectedLastPath()
       }
       this.$store.state.app.closeTabPages.push(targetKey)
+      this.setIsHomeNav(targetKey, null)
     },
     selectedLastPath () {
       this.activeKey = this.tabsList[this.tabsList.length - 1]

+ 4 - 3
src/layouts/BasicLayout.vue

@@ -80,7 +80,7 @@
 import moment from 'moment'
 import { triggerWindowResizeEvent } from '@/utils/util'
 import { mapState, mapActions, mapGetters } from 'vuex'
-import { mixin, mixinDevice } from '@/utils/mixin'
+import { mixin, mixinDevice, commonMixin } from '@/utils/mixin'
 import config from '@/config/defaultSettings'
 
 import RouteView from './RouteView'
@@ -92,10 +92,11 @@ import { asyncRouterMap } from '@/config/router.config'
 import store from '@/store'
 export default {
   name: 'BasicLayout',
-  mixins: [mixin, mixinDevice],
+  mixins: [mixin, mixinDevice, commonMixin],
   provide () {
     return {
-      reloadView: this.reloadView
+      reloadView: this.reloadView,
+      setIsHomeNav: this.setIsHomeNav
     }
   },
   components: {

+ 0 - 1
src/store/modules/app.js

@@ -33,7 +33,6 @@ const app = {
     updateList: false,
     loadingStatus: false,
     winHeight: 0 ,//  窗口高度
-    isHomeNav: false ,// 是否从首页流程导航打开的页面
     isLastDayForMonth: false, // 是否是当月最后一天
   },
   mutations: {

+ 10 - 0
src/utils/mixin.js

@@ -89,6 +89,16 @@ const commonMixin = {
     }
   },
   methods: {
+    getIsHomeNav () {
+      const data = sessionStorage.getItem('isHomeNav')
+      return JSON.parse(data) || {}
+    },
+    // 设置this.isHomeNav
+    setIsHomeNav(name,params){
+      const data = this.getIsHomeNav()
+      data[name] = params
+      sessionStorage.setItem('isHomeNav', JSON.stringify(data))
+    },
     // 清除组件缓存
     clearCompCache (cache, keys, key) {
       if (cache[key] && cache[key].componentInstance) {

+ 60 - 69
src/views/Home.vue

@@ -354,7 +354,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_customer.png'),
               name: '客户',
               styleC: 'blue-color',
-              url: '/customerManagement/customerInfo/list',
+              url: 'customerInfoList',
               permission: 'M_customerInfoList',
               orderNum: ''
             }
@@ -364,7 +364,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_billing.png'),
               name: '销售开单',
               styleC: 'red-color',
-              url: '/salesManagement/salesQuery/list',
+              url: 'salesQueryList',
               permission: 'M_salesQueryList',
               orderNum: ''
             },
@@ -372,7 +372,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_return.png'),
               name: '销售退货',
               styleC: 'red-color',
-              url: '/salesManagement/salesReturn/list',
+              url: 'salesReturnList',
               permission: 'M_salesReturnList',
               orderNum: ''
             }
@@ -382,7 +382,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify.png'),
               name: '销售审核',
               styleC: 'blue-color',
-              url: '/salesManagement/salesQuery/list',
+              url: 'salesQueryList',
               params: { billStatus: 'WAIT_AUDIT' },
               permission: 'M_salesQueryList',
               orderNum: 'salesWaitAuditCount'
@@ -391,7 +391,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify.png'),
               name: '退货审核',
               styleC: 'blue-color',
-              url: '/salesManagement/salesReturn/list',
+              url: 'salesReturnList',
               params: { state: 'WAIT_AUDIT' },
               permission: 'M_salesReturnList',
               orderNum: 'salesReturnWaitAuditCount'
@@ -402,8 +402,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_stock.png'),
               name: '销售出库',
               styleC: 'red-color',
-              url: '/outboundOrderManagement/outboundOrder/list',
-              params: JSON.stringify({ state: 'WAIT', outBizType: 'SALES' }),
+              url: 'outboundOrderList',
+              params: { state: 'WAIT', outBizType: 'SALES' },
               permission: 'M_outboundList',
               orderNum: 'salesWaitOutWarehouseCount'
             },
@@ -411,8 +411,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance_pay.png'),
               name: '财务付款',
               styleC: 'red-color',
-              url: '/financialManagement/financialPayment/list',
-              params: JSON.stringify({ bizType: 'SELL_REFUND', billState: 'UNSETTLE' }),
+              url: 'financialPaymentList',
+              params: { bizType: 'SELL_REFUND', billState: 'UNSETTLE' },
               permission: 'M_financialPaymentList',
               orderNum: 'salesReturnFinancialWaitCount'
             }
@@ -422,8 +422,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance_payment.png'),
               name: '财务收款',
               styleC: 'blue-color',
-              url: '/financialManagement/financialCollection/list',
-              params: JSON.stringify({ bizType: 'SELL', billState: 'UNSETTLE' }),
+              url: 'financialCollectionList',
+              params: { bizType: 'SELL', billState: 'UNSETTLE' },
               permission: 'M_financialCollectionList',
               orderNum: 'salesFinancialWaitCount'
             },
@@ -445,7 +445,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_purchase_billing.png'),
               name: '采购开单',
               styleC: 'red-color',
-              url: '/purchasingManagement/purchaseOrder/list',
+              url: 'purchaseOrderList',
               permission: 'M_purchasingList',
               orderNum: ''
             },
@@ -453,7 +453,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_purchase_return.png'),
               name: '采购退货',
               styleC: 'red-color',
-              url: this.$hasPermissions('M_purchaseReturn_outSnycList') ? '/purchasingManagement/purchaseReturnOutSync/list' : '/purchasingManagement/purchaseReturn/list',
+              url: this.$hasPermissions('M_purchaseReturn_outSnycList') ? 'purchaseReturnOutSyncList' : 'purchaseReturnList',
               permission: this.$hasPermissions('M_purchaseReturn_outSnycList') ? 'M_purchaseReturn_outSnycList' : 'M_purchaseReturnList',
               orderNum: ''
             }
@@ -463,7 +463,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify_return.png'),
               name: '入库审核',
               styleC: 'blue-color',
-              url: '/financialManagement/warehousingAudit/list',
+              url: 'warehousingAuditList',
               params: { auditState: 'WAIT_PUT_WAREHOUSE_AUDIT' },
               permission: 'M_warehousingAuditList',
               orderNum: 'purchaseWaitAuditCount'
@@ -472,7 +472,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify_return.png'),
               name: '退货审核',
               styleC: 'blue-color',
-              url: this.$hasPermissions('M_purchaseReturn_outSnycList') ? '/purchasingManagement/purchaseReturnOutSync/list' : '/purchasingManagement/purchaseReturn/list',
+              url: this.$hasPermissions('M_purchaseReturn_outSnycList') ? 'purchaseReturnOutSyncList' : 'purchaseReturnList',
               params: { state: 'WAIT_AUDIT' },
               permission: this.$hasPermissions('M_purchaseReturn_outSnycList') ? 'M_purchaseReturn_outSnycList' : 'M_purchaseReturnList',
               orderNum: 'purchaseReturnWaitAuditCount'
@@ -483,8 +483,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance_pay.png'),
               name: '财务付款',
               styleC: 'red-color',
-              url: '/financialManagement/financialPayment/list',
-              params: JSON.stringify({ bizType: 'PURCHASE', billState: 'UNSETTLE' }),
+              url: 'financialPaymentList',
+              params: { bizType: 'PURCHASE', billState: 'UNSETTLE' },
               permission: 'M_financialPaymentList',
               orderNum: 'purchaseFinancialWaitCount'
             },
@@ -492,8 +492,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance_pay.png'),
               name: '财务收款',
               styleC: 'red-color',
-              url: '/financialManagement/financialCollection/list',
-              params: JSON.stringify({ bizType: 'PURCHASE_RETURN', billState: 'UNSETTLE' }),
+              url: 'financialCollectionList',
+              params: { bizType: 'PURCHASE_RETURN', billState: 'UNSETTLE' },
               permission: 'M_financialCollectionList',
               orderNum: 'purchaseReturnFinancialWaitCount'
             }
@@ -505,7 +505,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_supplier.png'),
               name: '供应商(其他)',
               styleC: 'blue-color',
-              url: '/supplierManagement/supplierInfo/list',
+              url: 'supplierInfoList',
               permission: 'M_supplierInfoList',
               orderNum: ''
             }
@@ -515,7 +515,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_scatter_warehousing.png'),
               name: '散件入库',
               styleC: 'red-color',
-              url: '/bulkManagement/bulkWarehousingOrder/list',
+              url: 'bulkWarehousingOrderList',
               permission: 'M_bulkWarehousingOrderList',
               orderNum: ''
             },
@@ -523,7 +523,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_scatter_return.png'),
               name: '散件退货',
               styleC: 'red-color',
-              url: '/bulkManagement/bulkReturnGoods/list',
+              url: 'bulkReturnGoodsList',
               permission: 'M_bulkReturnGoodsList',
               orderNum: ''
             }
@@ -533,7 +533,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify_return.png'),
               name: '待入库',
               styleC: 'blue-color',
-              url: '/bulkManagement/bulkWarehousingOrder/list',
+              url: 'bulkWarehousingOrderList',
               params: { state: 'WAIT_PUT_WAREHOUSE' },
               permission: 'M_bulkWarehousingOrderList',
               orderNum: 'sparePartsPurchaseWaitAuditCount'
@@ -542,7 +542,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify_return.png'),
               name: '退货审核',
               styleC: 'blue-color',
-              url: '/bulkManagement/bulkReturnGoods/list',
+              url: 'bulkReturnGoodsList',
               params: { state: 'WAIT_AUDIT' },
               permission: 'M_bulkReturnGoodsList',
               orderNum: 'sparePartsReturnWaitAuditCount'
@@ -553,8 +553,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance_pay.png'),
               name: '财务付款',
               styleC: 'red-color',
-              url: '/financialManagement/financialPayment/list',
-              params: JSON.stringify({ bizType: 'PARTS_INPUT', billState: 'UNSETTLE' }),
+              url: 'financialPaymentList',
+              params: { bizType: 'PARTS_INPUT', billState: 'UNSETTLE' },
               permission: 'M_financialPaymentList',
               orderNum: 'sparePartsPurchaseFinancialWaitCount'
             },
@@ -562,7 +562,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_stock.png'),
               name: '待出库',
               styleC: 'red-color',
-              url: '/bulkManagement/bulkReturnGoods/list',
+              url: 'bulkReturnGoodsList',
               params: { state: 'WAIT_OUT_WAREHOUSE' },
               permission: 'M_bulkReturnGoodsList',
               orderNum: 'sparePartsReturnWaitOutWarehouseCount'
@@ -574,8 +574,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance_payment.png'),
               name: '财务收款',
               styleC: 'blue-color',
-              url: '/financialManagement/financialCollection/list',
-              params: JSON.stringify({ bizType: 'SPARE_PARTS_RETURN', billState: 'UNSETTLE' }),
+              url: 'financialCollectionList',
+              params: { bizType: 'SPARE_PARTS_RETURN', billState: 'UNSETTLE' },
               permission: 'M_financialCollectionList',
               orderNum: 'sparePartsReturnFinancialWaitCount'
             }
@@ -596,7 +596,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_stor_out.png'),
               name: '店内调出',
               styleC: 'red-color',
-              url: '/allocationManagement/storeTransferOut/list',
+              url: 'storeTransferOutList',
               permission: 'M_storeTransferOutList',
               orderNum: ''
             },
@@ -604,7 +604,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_billing.png'),
               name: '仓库调拨',
               styleC: 'red-color',
-              url: '/allocationManagement/warehouseAllocation/list',
+              url: 'warehouseAllocationList',
               permission: 'M_warehouseAllocationList',
               orderNum: ''
             },
@@ -612,7 +612,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_billing.png'),
               name: '连锁调出',
               styleC: 'red-color',
-              url: '/allocationManagement/chainTransferOut/list',
+              url: 'chainTransferOutList',
               permission: 'M_chainTransferOutList',
               orderNum: ''
             }
@@ -622,7 +622,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify.png'),
               name: '调出审核',
               styleC: 'blue-color',
-              url: '/allocationManagement/storeTransferOut/list',
+              url: 'storeTransferOutList',
               params: { state: 'WAIT_AUDIT' },
               permission: 'M_storeTransferOutList',
               orderNum: 'storeCallOutWaitAuditCount'
@@ -631,7 +631,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify.png'),
               name: '调拨审核',
               styleC: 'blue-color',
-              url: '/allocationManagement/warehouseAllocation/list',
+              url: 'warehouseAllocationList',
               params: { state: 'WAIT_AUDIT' },
               permission: 'M_warehouseAllocationList',
               orderNum: 'alloWarehouseWaitAuditCount'
@@ -640,7 +640,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_verify.png'),
               name: '调出审核',
               styleC: 'blue-color',
-              url: '/allocationManagement/chainTransferOut/list',
+              url: 'chainTransferOutList',
               params: { state: 'WAIT_AUDIT' },
               permission: 'M_chainTransferOutList',
               orderNum: 'alloLinkageOutWaitAuditCount'
@@ -649,20 +649,20 @@ export default {
           [
             {
               icon: require('@/assets/home-icon/home_icon_stock.png'),
-              name: '出库审核',
+              name: '调出出库',
               styleC: 'red-color',
-              url: '/outboundOrderManagement/outboundOrder/list',
-              params: JSON.stringify({ state: 'WAIT', outBizType: 'SHOP_CALL_OUT' }),
+              url: 'outboundOrderList',
+              params: { state: 'WAIT', outBizType: 'SHOP_CALL_OUT' },
               permission: 'M_outboundList',
               orderNum: 'storeCallOutWaitOutWarehouseCount'
             },
             {},
             {
               icon: require('@/assets/home-icon/home_icon_stock.png'),
-              name: '出库审核',
+              name: '调出出库',
               styleC: 'red-color',
-              url: '/outboundOrderManagement/outboundOrder/list',
-              params: JSON.stringify({ state: 'WAIT', outBizType: 'LINKAGE_CALL_OUT' }),
+              url: 'outboundOrderList',
+              params: { state: 'WAIT', outBizType: 'LINKAGE_CALL_OUT' },
               permission: 'M_outboundList',
               orderNum: 'alloLinkageOutWaitOutWarehouseCount'
             }
@@ -672,8 +672,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance_payment.png'),
               name: '财务收款',
               styleC: 'blue-color',
-              url: '/financialManagement/financialCollection/list',
-              params: JSON.stringify({ bizType: 'STORE_CALL_OUT', billState: 'UNSETTLE' }),
+              url: 'financialCollectionList',
+              params: { bizType: 'STORE_CALL_OUT', billState: 'UNSETTLE' },
               permission: 'M_financialCollectionList',
               orderNum: 'storeCallOutFinancialWaitCount'
             },
@@ -693,7 +693,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_receivable.png'),
               name: '应收应付',
               styleC: 'blue-color',
-              url: '/financialManagement/companyReceivablePayable/list',
+              url: 'companyReceivablePayableList',
               permission: 'M_companyReceivablePayableList',
               orderNum: ''
             },
@@ -701,8 +701,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_finance.png'),
               name: '财务收款',
               styleC: 'blue-color',
-              url: '/financialManagement/financialCollection/list',
-              params: JSON.stringify({ bizType: 'ALL' }),
+              url: 'financialCollectionList',
+              params: { bizType: 'ALL' },
               permission: 'M_financialCollectionList',
               orderNum: ''
             }
@@ -712,7 +712,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_unit.png'),
               name: '收付款记录',
               styleC: 'blue-color',
-              url: '/financialManagement/companyCollectionPayment/list',
+              url: 'companyCollectionPaymentList',
               permission: 'M_companyCollectionPaymentList',
               orderNum: ''
             },
@@ -720,8 +720,8 @@ export default {
               icon: require('@/assets/home-icon/home_icon_pay.png'),
               name: '财务付款',
               styleC: 'blue-color',
-              url: '/financialManagement/financialPayment/list',
-              params: JSON.stringify({ bizType: 'ALL' }),
+              url: 'financialPaymentList',
+              params: { bizType: 'ALL' },
               permission: 'M_financialPaymentList',
               orderNum: ''
             }
@@ -735,7 +735,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_stock s.png'),
               name: '实时库存',
               styleC: 'blue-color',
-              url: '/inventoryManagement/inventoryQuery/list',
+              url: 'inventoryQueryList',
               permission: 'M_inventoryInventoryQueryList',
               orderNum: ''
             }
@@ -745,7 +745,7 @@ export default {
               icon: require('@/assets/home-icon/home_icon_inventory.png'),
               name: '库存盘点',
               styleC: 'blue-color',
-              url: '/inventoryManagement/inventoryChecking/list',
+              url: 'inventoryCheckingList',
               permission: 'M_inventoryCheckingList',
               orderNum: ''
             }
@@ -776,7 +776,7 @@ export default {
     seeMore () {
       this.openNewProduct = false
       if (this.onlineFalg == '1') { // 上线
-        this.$router.push({ path: '/productManagement/productOnlineInfo/list' })
+        this.$router.push({ name: 'productOnlineInfo' })
       } else { // 下线
         this.$router.push({ name: 'newProductList', params: { onlineFalg: this.onlineFalg } })
       }
@@ -803,26 +803,17 @@ export default {
     // 导航跳转
     goPage (data, subInd) {
       if (data) {
+        let params = null
         // 有待办数据,则跳转带有条件的;若无待办数据,则跳转全部数据
-        if (data.orderNum && this.countData[data.orderNum]) {
-          this.$router.push({ path: data.url, query: { pageParams: data.params ? data.params : null } })
+        if (data.orderNum && this.countData[data.orderNum] || data.params) {
+          params = { pageParams: data.params, type: 'todo' }
         } else {
-          if (data.url == '/outboundOrderManagement/outboundOrder/list') { // 出库
-            const params = data.params ? JSON.parse(data.params) : null
-            this.$router.push({ path: data.url, query: { pageParams: JSON.stringify({ outBizType: params && params.outBizType ? params.outBizType : null }) } })
-          } else if (data.url == '/financialManagement/financialPayment/list') { // 财务付款
-            const params = data.params ? JSON.parse(data.params) : null
-            this.$router.push({ path: data.url, query: { pageParams: JSON.stringify({ bizType: params && params.bizType ? params.bizType : null }) } })
-          } else if (data.url == '/financialManagement/financialCollection/list') { // 财务收款
-            const params = data.params ? JSON.parse(data.params) : null
-            this.$router.push({ path: data.url, query: { pageParams: JSON.stringify({ bizType: params && params.bizType ? params.bizType : null }) } })
-          } else {
-            this.$router.push({ path: data.url, query: { pageParams: null } })
-          }
-        }
-        if (subInd == '1') {
-          this.$store.state.app.isHomeNav = true
+          params = { pageParams: null, type: subInd == 1 ? 'new' : 'todo' }
         }
+        this.setIsHomeNav(data.url, params)
+        setTimeout(() => {
+          this.$router.push({ name: data.url })
+        }, 100)
       }
     },
     // 数据看板信息

+ 41 - 24
src/views/allocationManagement/chainTransferOut/list.vue

@@ -224,10 +224,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.putTenantSn = undefined
       this.queryParam.allocationType = undefined
       this.queryParam.state = undefined
@@ -235,6 +235,8 @@ export default {
     },
     //  基本信息  保存
     handleOk (data) {
+      this.resetData()
+      this.setIsHomeNav(this.$route.name, null)
       this.$router.push({ path: `/allocationManagement/chainTransferOut/add/${data.id}/${data.allocationLinkageOutSn}` })
     },
     //  删除
@@ -330,6 +332,39 @@ export default {
       })
       this.openModal = false
       this.getPutTenantList()
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -347,27 +382,9 @@ export default {
       this.setTableH()
     }
   },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
+  mounted () {},
   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.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {})

+ 40 - 22
src/views/allocationManagement/storeTransferOut/list.vue

@@ -214,10 +214,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.putPersonName = undefined
       this.queryParam.callOutType = undefined
       this.queryParam.state = undefined
@@ -225,6 +225,8 @@ export default {
     },
     //  基本信息  保存
     handleOk (data) {
+      this.resetData()
+      this.setIsHomeNav(this.$route.name, null)
       this.$router.push({ path: `/allocationManagement/storeTransferOut/add/${data.id}/${data.storeCallOutSn}` })
     },
     //  删除
@@ -315,6 +317,39 @@ export default {
       })
       this.openModal = false
       this.getStoreCallOutTypeAllList()
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -333,26 +368,9 @@ export default {
     }
   },
   mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
   },
   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.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {})

+ 44 - 24
src/views/allocationManagement/warehouseAllocation/list.vue

@@ -88,7 +88,7 @@
             size="small"
             type="link"
             class="button-primary"
-            @click="handleEdit(record)"
+            @click="handleEdit(record,1)"
             id="warehouseAllocationList-edit-btn">
             编辑
           </a-button>
@@ -198,10 +198,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime,
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.outWarehouseSn = undefined
       this.queryParam.putWarehouseSn = undefined
       this.queryParam.state = undefined
@@ -253,7 +253,11 @@ export default {
       this.$router.push({ path: `/allocationManagement/warehouseAllocation/detail/${row.allocationWarehouseSn}` })
     },
     //  新增/编辑
-    handleEdit (row) {
+    handleEdit (row, flag) {
+      if (!flag) {
+        this.resetData()
+        this.setIsHomeNav(this.$route.name, null)
+      }
       this.$router.push({ path: `/allocationManagement/warehouseAllocation/edit/${row.id}/${row.allocationWarehouseSn}` })
     },
     pageInit () {
@@ -262,6 +266,39 @@ export default {
         _this.setTableH()
       })
       this.getWarehouseList()
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -280,26 +317,9 @@ export default {
     }
   },
   mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
   },
   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.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {})

+ 41 - 24
src/views/bulkManagement/bulkReturnGoods/list.vue

@@ -231,10 +231,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.sparePartsReturnNo = ''
       this.queryParam.supplierSn = undefined
       this.queryParam.isGrab = undefined
@@ -243,6 +243,8 @@ export default {
     },
     //  基本信息  保存
     handleOk (data) {
+      this.resetData()
+      this.setIsHomeNav(this.$route.name, null)
       this.handleEdit(data)
     },
     //  新增
@@ -347,6 +349,39 @@ export default {
       })
       this.openModal = false
       this.getSupplierList()
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -364,27 +399,9 @@ export default {
       this.setTableH()
     }
   },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
+  mounted () {},
   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.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {})

+ 41 - 24
src/views/bulkManagement/bulkWarehousingOrder/list.vue

@@ -248,6 +248,8 @@ export default {
     },
     //  基本信息  保存
     handleOk (row) {
+      this.resetData()
+      this.setIsHomeNav(this.$route.name, null)
       this.$router.push({ path: `/bulkManagement/bulkWarehousingOrder/add/${row.id}/${row.sparePartsPurchaseSn}/${row.supplierSn}` })
     },
     //  编辑
@@ -306,10 +308,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.sparePartsPurchaseNo = ''
       this.queryParam.supplierSn = undefined
       this.queryParam.state = undefined
@@ -362,6 +364,39 @@ export default {
       })
       this.openModal = false
       this.getSupplierList()
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -379,27 +414,9 @@ export default {
       this.setTableH()
     }
   },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
+  mounted () {},
   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.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {})

+ 18 - 11
src/views/financialManagement/financialCollection/list.vue

@@ -293,9 +293,7 @@ export default {
       queryByTypeSum({}).then(res => {
         if (res.data && res.status == 200) {
           this.tabPaneData = res.data
-          if (this.$route.query.pageParams) {
-            this.queryParam.bizType = JSON.parse(this.$route.query.pageParams).bizType
-          } else {
+          if (this.curBizType == 'ALL') {
             this.queryParam.bizType = res.data[0].bizType
           }
           this.$refs.table.refresh(true)
@@ -433,20 +431,29 @@ export default {
     }
   },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab || this.$route.query.pageParams) {
+    // 是否从首页点击进入
+    const isHomeNav = this.getIsHomeNav()[this.$route.name]
+    console.log(this.getIsHomeNav(), isHomeNav, this.$route.name)
+    // 待办查询
+    if (isHomeNav && isHomeNav.type == 'todo') {
+      this.curBizType = isHomeNav.pageParams.bizType
       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.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
       this.pageInit()
+    } else {
+      // 如果是新页签打开,则重置当前页面
+      if (this.$store.state.app.isNewTab) {
+        this.curBizType = 'ALL'
+        this.resetData()
+        this.pageInit()
+      }
     }
+
     // 结算账户状态查询
-    if(this.$hasPermissions('M_fundAccountList') && this.$hasPermissions('B_fundAccountEnable')){
+    if (this.$hasPermissions('M_fundAccountList') && this.$hasPermissions('B_fundAccountEnable')) {
     	this.GetSettleAccountState().then(res => {
     	  if (res.status == 200) {
-    		this.enableFundAccount = res.data.functionEnableFlag == 1
+          this.enableFundAccount = res.data.functionEnableFlag == 1
     	  }
     	})
     }

+ 18 - 11
src/views/financialManagement/financialPayment/list.vue

@@ -232,9 +232,7 @@ export default {
       queryByTypeSum({}).then(res => {
         if (res.data && res.status == 200) {
           this.tabPaneData = res.data
-          if (this.$route.query.pageParams) {
-            this.queryParam.bizType = JSON.parse(this.$route.query.pageParams).bizType
-          } else {
+          if (this.curBizType == 'ALL') {
             this.queryParam.bizType = res.data[0].bizType
           }
           this.$refs.table.refresh(true)
@@ -373,20 +371,29 @@ export default {
     }
   },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab || this.$route.query.pageParams) {
+    // 是否从首页点击进入
+    const isHomeNav = this.getIsHomeNav()[this.$route.name]
+    console.log(this.getIsHomeNav(), isHomeNav, this.$route.name)
+    // 待办查询
+    if (isHomeNav && isHomeNav.type == 'todo') {
+      this.curBizType = isHomeNav.pageParams.bizType
       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.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
       this.pageInit()
+    } else {
+      // 如果是新页签打开,则重置当前页面
+      if (this.$store.state.app.isNewTab) {
+        this.curBizType = 'ALL'
+        this.resetData()
+        this.pageInit()
+      }
     }
+
     // 结算账户状态查询
-    if(this.$hasPermissions('M_fundAccountList') && this.$hasPermissions('B_fundAccountEnable')){
+    if (this.$hasPermissions('M_fundAccountList') && this.$hasPermissions('B_fundAccountEnable')) {
     	this.GetSettleAccountState().then(res => {
     	  if (res.status == 200) {
-    		this.enableFundAccount = res.data.functionEnableFlag == 1
+    		 this.enableFundAccount = res.data.functionEnableFlag == 1
     	  }
     	})
     }

+ 18 - 12
src/views/financialManagement/warehousingAudit/list.vue

@@ -221,13 +221,13 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.auditTime)
-      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime + ' 00:00:00'
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime + ' 23:59:59'
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.auditTime)
+      this.queryParam.beginDate = flag ? '' : (getDate.getThreeMonthDays().starttime + ' 00:00:00')
+      this.queryParam.endDate = flag ? '' : (getDate.getCurrMonthDays().endtime + ' 23:59:59')
       this.queryParam.purchaseBillNo = ''
       this.queryParam.receivingBillNo = ''
-      this.queryParam.auditState = 'WAIT_PUT_WAREHOUSE_AUDIT'
+      this.queryParam.auditState = flag ? '' : 'WAIT_PUT_WAREHOUSE_AUDIT'
     },
     pageInit () {
       const _this = this
@@ -258,14 +258,20 @@ export default {
     }
   },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.resetData()
-      if (this.$route.query.pageParams) {
-        this.queryParam.auditState = this.$route.query.pageParams.auditState
-      }
-      this.pageInit()
+    // 是否从首页点击进入
+    const isHomeNav = this.getIsHomeNav()[this.$route.name]
+    console.log(this.getIsHomeNav(), isHomeNav, this.$route.name)
+    // 待办查询
+    if (isHomeNav && isHomeNav.type == 'todo') {
+      this.resetData(true)
+      this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
       this.$refs.table.refresh(true)
+    } else {
+      // 如果是新页签打开
+      if (this.$store.state.app.isNewTab) {
+        this.pageInit()
+        this.resetSearchForm()
+      }
     }
   },
   beforeRouteEnter (to, from, next) {

+ 17 - 12
src/views/outboundOrderManagement/outboundOrder/list.vue

@@ -236,10 +236,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.demanderName = undefined
       this.queryParam.outBizType = undefined
       this.queryParam.state = undefined
@@ -359,15 +359,20 @@ export default {
     }
   },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.resetData()
-      if (this.$route.query.pageParams) {
-        this.queryParam.state = JSON.parse(this.$route.query.pageParams).state
-        this.queryParam.outBizType = JSON.parse(this.$route.query.pageParams).outBizType
-      }
-      this.pageInit()
+    // 是否从首页点击进入
+    const isHomeNav = this.getIsHomeNav()[this.$route.name]
+    console.log(this.getIsHomeNav(), isHomeNav, this.$route.name)
+    this.pageInit()
+    // 待办查询
+    if (isHomeNav && isHomeNav.type == 'todo') {
+      this.resetData(true)
+      this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
       this.$refs.table.refresh(true)
+    } else {
+      // 如果是新页签打开
+      if (this.$store.state.app.isNewTab) {
+        this.resetSearchForm()
+      }
     }
   },
   beforeRouteEnter (to, from, next) {

+ 41 - 26
src/views/purchasingManagement/purchaseOrder/list.vue

@@ -301,10 +301,10 @@ export default {
       })
     },
     //  重置
-    resetSearchForm () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetSearchForm (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.orderBundleNo = ''
       this.queryParam.purchaseBillNo = ''
       this.queryParam.purchaseTargetSn = undefined
@@ -312,7 +312,9 @@ export default {
       this.queryParam.billStatus = undefined
       this.queryParam.financialStatus = undefined
       this.queryParam.purchaseBillSource = undefined
-      this.$refs.table.refresh(true)
+      if (!flag) {
+        this.$refs.table.refresh(true)
+      }
     },
     filterOption (input, option) {
       return (
@@ -336,6 +338,39 @@ export default {
       })
       this.openModal = false
       this.getSupperList()
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetSearchForm(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -353,31 +388,11 @@ export default {
       this.setTableH()
     }
   },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.pageInit()
-      this.resetSearchForm()
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      // 从首页点击销售开单过来的,直接打开新建弹框
-      if (from.name == 'home' && vm.$store.state.app.isHomeNav && vm.$route.query.pageParams == null) {
-        vm.openModal = true
-        vm.$store.state.app.isHomeNav = false
-      }
     })
   }
 }

+ 42 - 24
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -200,10 +200,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.purchaseReturnNo = ''
       this.queryParam.state = undefined
       this.queryParam.settleState = undefined
@@ -260,6 +260,9 @@ export default {
               if (res.status == 200) {
                 const data = res.data
                 _this.spinning = false
+                // 重置查询条件
+                _this.resetData()
+                _this.setIsHomeNav(_this.$route.name, null)
                 _this.$router.push({ path: `/purchasingManagement/purchaseReturn/add/${data.id}/${data.purchaseReturnSn}/${data.returnTargetName}` })
               } else {
                 _this.spinning = false
@@ -326,6 +329,39 @@ export default {
         _this.setTableH()
       })
       this.getParentDealer()
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -343,27 +379,9 @@ export default {
       this.setTableH()
     }
   },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
+  mounted () {},
   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.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {})

+ 45 - 29
src/views/purchasingManagement/purchaseReturnOutSync/list.vue

@@ -112,7 +112,7 @@
             type="link"
             class="button-primary"
             v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_purchaseReturn_outSnycEdit')"
-            @click="handleEdit(record)"
+            @click="handleEdit(record,1)"
             id="purchaseReturnList-edit-btn">编辑</a-button>
           <a-button
             size="small"
@@ -236,10 +236,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.purchaseReturnNo = ''
       this.queryParam.state = undefined
       this.queryParam.settleState = undefined
@@ -272,7 +272,12 @@ export default {
       })
     },
     // 编辑
-    handleEdit (row) {
+    handleEdit (row, flag) {
+      // 新增后跳转到编辑页,非列表点击的编辑,重置查询条件
+      if (!flag) {
+        this.resetData()
+        this.setIsHomeNav(this.$route.name, null)
+      }
       this.$router.push({ name: row.grabFlag == 1 ? 'purchaseReturnOutSyncGrapEdit' : 'purchaseReturnOutSyncEdit', params: { sn: row.purchaseReturnSn, returnTargetType: row.returnTargetType } })
     },
     // 详情
@@ -327,6 +332,39 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -345,34 +383,12 @@ export default {
     }
   },
   mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
   },
   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.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      // 从首页点击销售开单过来的,直接打开新建弹框
-      if (from.name == 'home' && vm.$store.state.app.isHomeNav && vm.$route.query.pageParams == null) {
-        vm.openModal = true
-        vm.$store.state.app.isHomeNav = false
-      }
     })
   }
 }

+ 43 - 35
src/views/salesManagement/salesQuery/list.vue

@@ -295,10 +295,6 @@ export default {
     handleAdd () {
       this.openModal = true
     },
-    // 选择客户成功
-    chooseCustomOk (data) {
-      this.$router.push({ name: 'salesAdd', params: { id: data.id, sn: data.salesBillSn, priceType: data.priceType } })
-    },
     //  审核
     handleEexamine (row) {
       this.auditInfo = row
@@ -353,6 +349,12 @@ export default {
     handleEdit (row) {
       this.$router.push({ name: 'salesEdit', params: { id: row.id, sn: row.salesBillSn, priceType: row.priceType } })
     },
+    // 选择客户成功
+    chooseCustomOk (data) {
+      this.resetData()
+      this.setIsHomeNav(this.$route.name, null)
+      this.$router.push({ name: 'salesAdd', params: { id: data.id, sn: data.salesBillSn, priceType: data.priceType } })
+    },
     // 删除
     handleDel (row, type) {
       const _this = this
@@ -389,10 +391,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (falg) {
+      this.$refs.rangeDate.resetDate(falg ? '' : this.time)
+      this.queryParam.beginDate = falg ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = falg ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.buyerSn = undefined
       this.queryParam.salesBillNo = ''
       this.queryParam.purchaseBillNo = ''
@@ -435,12 +437,38 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
-    }
-  },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     }
   },
   watch: {
@@ -455,30 +483,10 @@ export default {
     }
   },
   activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.resetData()
-      this.pageInit()
-      this.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      // 从首页点击销售开单过来的,直接打开选择客户弹框
-      if (from.name == 'home' && vm.$store.state.app.isHomeNav) {
-        console.log(vm.$route.query.pageParams)
-        if (vm.$route.query.pageParams) {
-        	vm.queryParam.billStatus = vm.$route.query.pageParams.billStatus
-        } else {
-          vm.openModal = true
-          vm.$store.state.app.isHomeNav = false
-        }
-      }
     })
   }
 }

+ 47 - 27
src/views/salesManagement/salesReturn/list.vue

@@ -103,7 +103,7 @@
             v-if="(record.state == 'WAIT_AUDIT'||record.state == 'WAIT_SUBMIT') &&$hasPermissions('B_salesReturnEdit')"
             type="link"
             class="button-primary"
-            @click="handleEdit(record)"
+            @click="handleEdit(record,1)"
             id="salesReturn-edit-btn">编辑</a-button>
           <a-button
             size="small"
@@ -221,7 +221,12 @@ export default {
       })
     },
     // 编辑
-    handleEdit (row) {
+    handleEdit (row, flag) {
+      // 新增后跳转到编辑页,非列表点击的编辑,重置查询条件
+      if (!flag) {
+        this.resetData()
+        this.setIsHomeNav(this.$route.name, null)
+      }
       this.$router.push({ name: row.grabFlag == 1 ? 'salesReturnGrabEdit' : 'salesReturnEdit', params: { id: row.id, sn: row.salesReturnSn, buyerSn: row.buyerSn } })
     },
     // 详情
@@ -277,10 +282,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 重置数据
-    resetData () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+    resetData (flag) {
+      this.$refs.rangeDate.resetDate(flag ? '' : this.time)
+      this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.$refs.rangeExamineDate.resetDate()
       this.queryParam.auditBeginDate = ''
       this.queryParam.auditEndDate = ''
@@ -298,6 +303,39 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
+
+      // 是否打开的页签
+      const a = this.$store.state.app.isNewTab
+      // 是否要刷新列表
+      const b = this.$store.state.app.updateList
+      // 是否从首页点击进入
+      const isHomeNav = this.getIsHomeNav()[this.$route.name]
+      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+
+      // 从首页进入,判断式新建还式待办查询
+      if (isHomeNav) {
+        // 新增
+        if (isHomeNav.type == 'new') {
+          this.resetSearchForm()
+          this.openModal = true
+          this.setIsHomeNav(this.$route.name, null)
+        }
+        // 待办
+        if (isHomeNav.type == 'todo') {
+          this.resetData(true)
+          this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.table.refresh(true)
+        }
+      } else {
+        // 如果是新页签打开,则重置当前页面
+        if (a && !b) {
+          this.resetSearchForm()
+        }
+      }
+      // 仅刷新列表,不重置页面
+      if (b) {
+        this.$refs.table.refresh()
+      }
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -315,30 +353,12 @@ export default {
       this.setTableH()
     }
   },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
   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.$refs.table.refresh(true)
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {})
+    next(vm => {
+    })
   }
 }
 </script>

+ 2 - 2
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -469,8 +469,8 @@ export default {
       } else {
         params.salesQty = row.qty
         // 默认仓库
-        params.warehouseLocationSn = '100000000165'
-        params.warehouseSn = '100000000156'
+        // params.warehouseLocationSn = '100000000165'
+        // params.warehouseSn = '100000000156'
       }
       this.spinning = true
       salesReturnSaveProduct(params).then(res => {