lilei 3 лет назад
Родитель
Сommit
883b6dfbc0

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

@@ -12,6 +12,7 @@ export default {
       newTabIndex: 0
     }
   },
+  inject: ['reloadView'],
   created () {
     // bind event
     events.$on('open', val => {
@@ -56,6 +57,9 @@ export default {
     },
 
     // content menu
+    refashThat (e) {
+      this.reloadView()
+    },
     closeThat (e) {
       // 判断是否为最后一个标签页,如果是最后一个,则无法被关闭
       if (this.tabsList.length > 1) {
@@ -102,7 +106,7 @@ export default {
     renderTabPaneMenu (e) {
       return (
         <a-menu {...{ on: { click: ({ key, item, domEvent }) => { this.closeMenuClick(key, e) } } }}>
-          <a-menu-item key="closeThat">关闭当前标签</a-menu-item>
+          {this.activeKey == e ? (<a-menu-item key="refashThat">刷新页面</a-menu-item>) : ''}
           <a-menu-item key="closeRight">关闭右侧</a-menu-item>
           <a-menu-item key="closeLeft">关闭左侧</a-menu-item>
           <a-menu-item key="closeAll">关闭全部</a-menu-item>
@@ -150,7 +154,7 @@ export default {
     }
   },
   render () {
-    const { onEdit, $data: { pages } } = this
+    const { onEdit, refashThat, $data: { pages } } = this
     const panes = pages.map(page => {
       return (
         <a-tab-pane
@@ -159,6 +163,10 @@ export default {
         >
           <span slot="tab">
             {this.renderTabPane(page.meta.customTitle || page.meta.title, page.name)}
+            {this.activeKey == page.name ? (<a-icon
+              {...{ on: { click: refashThat } }}
+              style={{ marginLeft: '8px', fontSize: '12px' }}
+              type="reload" />) : ''}
           </span>
         </a-tab-pane>)
     })

+ 3 - 3
src/components/custom.less

@@ -95,11 +95,11 @@ body{
 // 页签样式
 .multi-tab-con{
   .ant-tabs-nav-container{
-    height: 25px!important;
+    height: 31px!important;
     .ant-tabs-tab{
       padding: 0 8px!important;
-      height: 24px!important;
-      line-height: 24px!important;
+      height: 30px!important;
+      line-height: 30px!important;
     }
   }
 }

+ 51 - 51
src/config/router.config.js

@@ -63,7 +63,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/salesQuery',
             redirect: '/salesManagement/salesQuery/list',
             name: 'salesQuery',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '销售单查询',
               icon: 'monitor',
@@ -121,7 +121,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/outboundOrder',
             redirect: '/salesManagement/outboundOrder/list',
             name: 'outboundOrder',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '出库',
               icon: 'export',
@@ -146,7 +146,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/urgentItemsOffset',
             redirect: '/salesManagement/urgentItemsOffset/list',
             name: 'urgentItemsOffset',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '急件冲减',
               icon: 'rocket',
@@ -182,7 +182,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/salesReturn',
             redirect: '/salesManagement/salesReturn/list',
             name: 'salesReturn',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '销售退货',
               icon: 'fund',
@@ -240,7 +240,7 @@ export const asyncRouterMap = [
           //   path: '/salesManagement/quotation',
           //   redirect: '/salesManagement/quotation/list',
           //   name: 'quotation',
-          //   component: RouteView,
+          //   component: BlankLayout,
           //   meta: {
           //     title: '报价单',
           //     icon: 'idcard'
@@ -298,7 +298,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/giftRecord',
             redirect: '/salesManagement/giftRecord/list',
             name: 'giftRecord',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '赠品记录',
               icon: 'file-search',
@@ -323,7 +323,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/salesman',
             redirect: '/salesManagement/salesman/list',
             name: 'salesman',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '业务员管理',
               icon: 'file-search',
@@ -361,7 +361,7 @@ export const asyncRouterMap = [
             path: '/purchasingManagement/purchaseOrder',
             redirect: '/purchasingManagement/purchaseOrder/list',
             name: 'purchaseOrder',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '采购单管理',
               icon: 'money-collect',
@@ -430,7 +430,7 @@ export const asyncRouterMap = [
             path: '/purchasingManagement/purchaseReturn',
             redirect: '/purchasingManagement/purchaseReturn/list',
             name: 'purchaseReturn',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '采购退货',
               icon: 'money-collect',
@@ -501,7 +501,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/warehousingAudit',
             redirect: '/financialManagement/warehousingAudit/list',
             name: 'warehousingAudit',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '入库审核',
               icon: 'pull-request',
@@ -537,7 +537,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/inventoryCheckAudit',
             redirect: '/financialManagement/inventoryCheckAudit/list',
             name: 'inventoryCheckAudit',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '盘点审核',
               icon: 'laptop',
@@ -562,7 +562,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/financialPayment',
             redirect: '/financialManagement/financialPayment/list',
             name: 'financialPayment',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '财务付款',
               icon: 'pay-circle',
@@ -587,7 +587,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/financialCollection',
             redirect: '/financialManagement/financialCollection/list',
             name: 'financialCollection',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '财务收款',
               icon: 'money-collect',
@@ -612,7 +612,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/expenseManagement',
             redirect: '/financialManagement/expenseManagement/list',
             name: 'expenseManagement',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '费用管理',
               icon: 'pound',
@@ -659,7 +659,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/companyReceivablePayable',
             redirect: '/financialManagement/companyReceivablePayable/list',
             name: 'companyReceivablePayable',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '单位应收应付管理',
               icon: 'transaction',
@@ -706,7 +706,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/companyCollectionPayment',
             redirect: '/financialManagement/companyCollectionPayment/list',
             name: 'companyCollectionPayment',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '单位收付款记录',
               icon: 'file-protect',
@@ -742,7 +742,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/withdrawalManagement',
             redirect: '/financialManagement/withdrawalManagement/list',
             name: 'withdrawalManagement',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '提现管理',
               icon: 'dollar',
@@ -767,7 +767,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/ledgerRecord',
             redirect: '/financialManagement/ledgerRecord/list',
             name: 'ledgerRecord',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '分账记录',
               icon: 'profile',
@@ -805,7 +805,7 @@ export const asyncRouterMap = [
             path: '/allocationManagement/warehouseAllocation',
             redirect: '/allocationManagement/warehouseAllocation/list',
             name: 'warehouseAllocation',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '仓库调拨',
               icon: 'gateway',
@@ -863,7 +863,7 @@ export const asyncRouterMap = [
             path: '/allocationManagement/chainTransferIn',
             redirect: '/allocationManagement/chainTransferIn/list',
             name: 'chainTransferIn',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '连锁调入',
               icon: 'cluster',
@@ -910,7 +910,7 @@ export const asyncRouterMap = [
             path: '/allocationManagement/chainTransferOut',
             redirect: '/allocationManagement/chainTransferOut/list',
             name: 'chainTransferOut',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '连锁调出',
               icon: 'pull-request',
@@ -968,7 +968,7 @@ export const asyncRouterMap = [
             path: '/allocationManagement/storeTransferOut',
             redirect: '/allocationManagement/storeTransferOut/list',
             name: 'storeTransferOut',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '店内调出',
               icon: 'interaction',
@@ -1039,7 +1039,7 @@ export const asyncRouterMap = [
             path: '/inventoryManagement/inventoryQuery',
             redirect: '/inventoryManagement/inventoryQuery/list',
             name: 'inventoryQuery',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '库存查询',
               icon: 'monitor',
@@ -1095,7 +1095,7 @@ export const asyncRouterMap = [
             path: '/inventoryManagement/inventoryChecking',
             redirect: '/inventoryManagement/inventoryChecking/list',
             name: 'inventoryChecking',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '库存盘点',
               icon: 'reconciliation',
@@ -1153,7 +1153,7 @@ export const asyncRouterMap = [
             path: '/inventoryManagement/inventoryImport',
             redirect: '/inventoryManagement/inventoryImport/list',
             name: 'inventoryImport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '库存导入',
               icon: 'frown'
@@ -1178,7 +1178,7 @@ export const asyncRouterMap = [
             path: '/inventoryManagement/warehouse',
             redirect: '/inventoryManagement/warehouse/list',
             name: 'warehouse',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '仓库管理',
               icon: 'deployment-unit',
@@ -1227,7 +1227,7 @@ export const asyncRouterMap = [
             path: '/bulkManagement/bulkWarehousingOrder',
             redirect: '/bulkManagement/bulkWarehousingOrder/list',
             name: 'bulkWarehousingOrder',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '散件入库',
               icon: 'gold',
@@ -1285,7 +1285,7 @@ export const asyncRouterMap = [
             path: '/bulkManagement/bulkReturnGoods',
             redirect: '/bulkManagement/bulkReturnGoods/list',
             name: 'bulkReturnGoods',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '散件退货',
               icon: 'frown',
@@ -1332,7 +1332,7 @@ export const asyncRouterMap = [
             path: '/bulkManagement/bulkImport',
             redirect: '/bulkManagement/bulkImport/list',
             name: 'bulkImport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '散件导入',
               icon: 'frown'
@@ -1370,7 +1370,7 @@ export const asyncRouterMap = [
             path: '/reportData/chainStockReport',
             redirect: '/reportData/chainStockReport/list',
             name: 'chainStockReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '连锁库存总表(天)',
               icon: 'profile',
@@ -1395,7 +1395,7 @@ export const asyncRouterMap = [
             path: '/reportData/chainSalesReport',
             redirect: '/reportData/chainSalesReport/list',
             name: 'chainSalesReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '连锁销售报表(天)',
               icon: 'profile',
@@ -1420,7 +1420,7 @@ export const asyncRouterMap = [
             path: '/reportData/chainSalesDetailReport',
             redirect: '/reportData/chainSalesDetailReport/list',
             name: 'chainSalesDetailReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '连锁销售明细报表(天)',
               icon: 'profile',
@@ -1445,7 +1445,7 @@ export const asyncRouterMap = [
             path: '/reportData/chainReceivedSendStorageReport',
             redirect: '/reportData/chainReceivedSendStorageReport/list',
             name: 'chainReceivedSendStorageReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '连锁收发存报表',
               icon: 'profile',
@@ -1470,7 +1470,7 @@ export const asyncRouterMap = [
             path: '/reportData/customerReport',
             redirect: '/reportData/customerReport/list',
             name: 'customerReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '大客户报表(天)',
               icon: 'profile',
@@ -1495,7 +1495,7 @@ export const asyncRouterMap = [
             path: '/reportData/stockIncomeReport',
             redirect: '/reportData/stockIncomeReport/list',
             name: 'stockIncomeReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '库存总入报表',
               icon: 'profile',
@@ -1520,7 +1520,7 @@ export const asyncRouterMap = [
             path: '/reportData/stockExpenditureReport',
             redirect: '/reportData/stockExpenditureReport/list',
             name: 'stockExpenditureReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '库存总出报表',
               icon: 'profile',
@@ -1545,7 +1545,7 @@ export const asyncRouterMap = [
             path: '/reportData/receivedSendStorageReport',
             redirect: '/reportData/receivedSendStorageReport/list',
             name: 'receivedSendStorageReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '收发存报表',
               icon: 'profile',
@@ -1583,7 +1583,7 @@ export const asyncRouterMap = [
             path: '/customerManagement/customerInfo',
             redirect: '/customerManagement/customerInfo/list',
             name: 'customerInfo',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '客户管理',
               icon: 'idcard',
@@ -1643,7 +1643,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productInfo',
             redirect: '/productManagement/productInfo/list',
             name: 'productInfo',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '产品信息管理(自建)',
               icon: 'file-text',
@@ -1690,7 +1690,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productInfoJg',
             redirect: '/productManagement/productInfoJg/list',
             name: 'productInfoJg',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '产品信息管理(箭冠)',
               icon: 'file-text',
@@ -1715,7 +1715,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productBrand',
             redirect: '/productManagement/productBrand/list',
             name: 'productBrand',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '产品品牌管理',
               icon: 'sketch',
@@ -1740,7 +1740,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productCategory',
             redirect: '/productManagement/productCategory/list',
             name: 'productCategory',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '产品分类管理',
               icon: 'sliders',
@@ -1765,7 +1765,7 @@ export const asyncRouterMap = [
             path: '/productManagement/priceChangeRecord',
             redirect: '/productManagement/priceChangeRecord/list',
             name: 'priceChangeRecord',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '价格变更记录',
               icon: 'sketch',
@@ -1825,7 +1825,7 @@ export const asyncRouterMap = [
             path: '/supplierManagement/supplierInfo',
             redirect: '/supplierManagement/supplierInfo/list',
             name: 'supplierInfo',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '供应商管理',
               icon: 'team',
@@ -1863,7 +1863,7 @@ export const asyncRouterMap = [
             path: '/storeManagement/bind',
             redirect: '/storeManagement/bind/list',
             name: 'storeManagementBind',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '中心店/配送店绑定',
               icon: 'link',
@@ -1888,7 +1888,7 @@ export const asyncRouterMap = [
             path: '/storeManagement/userAuthorization',
             redirect: '/storeManagement/userAuthorization/list',
             name: 'storeManagementUserAuth',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '中心店用户授权',
               icon: 'link',
@@ -1926,7 +1926,7 @@ export const asyncRouterMap = [
             path: '/basicData/storeTransferOutTypeManagement',
             redirect: '/basicData/storeTransferOutTypeManagement/list',
             name: 'storeTransferOutTypeManagement',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '店内调出类型管理',
               icon: 'interaction',
@@ -1951,7 +1951,7 @@ export const asyncRouterMap = [
             path: '/basicData/bulkPartsTypeManagement',
             redirect: '/basicData/bulkPartsTypeManagement/list',
             name: 'bulkPartsTypeManagement',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '散件入库类型管理',
               icon: 'gold',
@@ -1976,7 +1976,7 @@ export const asyncRouterMap = [
             path: '/basicData/expenseType',
             redirect: '/basicData/expenseType/list',
             name: 'expenseType',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '费用类型管理',
               icon: 'pay-circle',
@@ -2001,7 +2001,7 @@ export const asyncRouterMap = [
           //   path: '/basicData/processSettings',
           //   redirect: '/basicData/processSettings/setup',
           //   name: 'processSettings',
-          //   component: RouteView,
+          //   component: BlankLayout,
           //   meta: {
           //     title: '业务自动化设置',
           //     icon: 'sliders'
@@ -2026,7 +2026,7 @@ export const asyncRouterMap = [
             path: '/basicData/customerTypeManagement',
             redirect: '/basicData/customerTypeManagement/list',
             name: 'customerTypeManagement',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '客户类型管理',
               icon: 'idcard',

+ 15 - 3
src/layouts/BasicLayout.vue

@@ -39,9 +39,9 @@
         @toggle="toggle"
       />
       <!-- layout content -->
-      <a-layout-content :style="{ height: '100%', margin: '24px 20px 0', paddingTop: multiTab&&fixedHeader ? '66px' : (!multiTab&&fixedHeader?'45px':'0') }">
+      <a-layout-content :style="{ height: '100%', margin: '30px 20px 0', paddingTop: multiTab&&fixedHeader ? '66px' : (!multiTab&&fixedHeader?'45px':'0') }">
         <transition name="page-transition">
-          <route-view/>
+          <route-view v-if="isRouterAlive"/>
         </transition>
       </a-layout-content>
       <!-- 视频播放弹窗 -->
@@ -88,6 +88,11 @@ import store from '@/store'
 export default {
   name: 'BasicLayout',
   mixins: [mixin, mixinDevice],
+  provide () {
+    return {
+      reloadView: this.reloadView
+    }
+  },
   components: {
     RouteView,
     SideMenu,
@@ -99,7 +104,8 @@ export default {
     return {
       production: config.production,
       collapsed: false,
-      menus: []
+      menus: [],
+      isRouterAlive: true
     }
   },
   computed: {
@@ -215,6 +221,12 @@ export default {
     },
     drawerClose () {
       this.collapsed = false
+    },
+    reloadView () {
+      this.isRouterAlive = false
+      this.$nextTick(() => {
+        this.isRouterAlive = true
+      })
     }
   }
 }

+ 1 - 1
src/layouts/PageView.vue

@@ -38,7 +38,7 @@
         </div>
       </div>
     </page-header>
-    <div class="content" :style="{ height: contHeight+'px' }">
+    <div class="content">
       <div class="page-header-index-wide">
         <slot>
           <!-- keep-alive  -->

+ 4 - 4
src/layouts/RouteView.vue

@@ -11,10 +11,10 @@ export default {
     return {}
   },
   render () {
-    const { $route: { meta }, $store: { getters } } = this
+    const { $route: { meta, name }, $store: { getters } } = this
     const inKeep = (
       <keep-alive>
-        <router-view key={ this.$route.fullPath }/>
+        <router-view key={ name }/>
       </keep-alive>
     )
     const notKeep = (
@@ -26,8 +26,8 @@ export default {
     // if (!getters.multiTab && !meta.keepAlive) {
     //   return notKeep
     // }
-    // return this.keepAlive || getters.multiTab || meta.keepAlive ? inKeep : notKeep
-    return meta.keepAlive ? inKeep : notKeep
+    return this.keepAlive || getters.multiTab || meta.keepAlive ? inKeep : notKeep
+    // return meta.keepAlive ? inKeep : notKeep
   }
 }
 </script>

+ 1 - 0
src/views/financialManagement/financialCollection/list.vue

@@ -338,6 +338,7 @@ export default {
     const _this = this
     this.$nextTick(() => { // 页面渲染完成后的回调
       _this.setTableH()
+      _this.queryByTypeSum()
     })
   },
   watch: {

+ 1 - 0
src/views/financialManagement/financialPayment/list.vue

@@ -337,6 +337,7 @@ export default {
     const _this = this
     this.$nextTick(() => { // 页面渲染完成后的回调
       _this.setTableH()
+      _this.queryByTypeSum()
     })
   },
   watch: {

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

@@ -26,19 +26,19 @@
       </a-page-header>
       <a-card size="small" :bordered="false" class="pages-wrap">
         <!-- 查询配件列表 -->
-        <queryPart :buyerSn="$route.params.buyerSn" :priceType="ordeDetail.priceType" grabFlag="0" :newLoading="isInster" @add="saveProduct"></queryPart>
+        <queryPart :buyerSn="$route.params.buyerSn" :priceType="ordeDetail&&ordeDetail.priceType||''" grabFlag="0" :newLoading="isInster" @add="saveProduct"></queryPart>
       </a-card>
       <a-card size="small" :bordered="false" class="pages-wrap">
         <!-- alert -->
         <a-alert style="margin-bottom: 10px;" type="info">
           <div slot="message" class="total-bar">
-            <div>
+            <div v-if="countData">
               <span>退货总金额:{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? countData.totalAmount : '--' }}元;</span>
               <span>总款数:{{ countData&&(countData.totalCategory || countData.totalCategory==0) ? countData.totalCategory : '--' }};</span>
               <span>总数量:{{ countData&&(countData.totalQty || countData.totalQty==0) ? countData.totalQty : '--' }};</span>
               <span>废品总数量:{{ countData&&(countData.totalCelQty || countData.totalCelQty==0) ? countData.totalCelQty : '--' }};</span>
             </div>
-            <div>
+            <div v-if="ordeDetail">
               <div>
                 折扣金额:
                 <a-input-number id="discount" v-model="ordeDetail.discountAmount" :min="0" :precision="2" :max="999999"/>