Переглянути джерело

Merge branch 'deploy_0804' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into deploy_0804

zhangdan 3 роки тому
батько
коміт
39cac247c5

BIN
src/assets/def_img@2x.png


+ 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;
     }
   }
 }

+ 74 - 63
src/config/router.config.js

@@ -48,17 +48,6 @@ export const asyncRouterMap = [
         },
         hidden: true
       },
-      // 新品列表
-      {
-        path: '/newProduct',
-        name: 'newProduct',
-        component: () => import(/* webpackChunkName: "home" */ '@/views/productManagement/newProduct/list'),
-        meta: {
-          title: '新品信息',
-          icon: 'home'
-        },
-        hidden: true
-      },
       // 销售管理
       {
         path: '/salesManagement',
@@ -74,7 +63,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/salesQuery',
             redirect: '/salesManagement/salesQuery/list',
             name: 'salesQuery',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '销售单查询',
               icon: 'monitor',
@@ -132,7 +121,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/outboundOrder',
             redirect: '/salesManagement/outboundOrder/list',
             name: 'outboundOrder',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '出库',
               icon: 'export',
@@ -157,7 +146,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/urgentItemsOffset',
             redirect: '/salesManagement/urgentItemsOffset/list',
             name: 'urgentItemsOffset',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '急件冲减',
               icon: 'rocket',
@@ -193,7 +182,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/salesReturn',
             redirect: '/salesManagement/salesReturn/list',
             name: 'salesReturn',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '销售退货',
               icon: 'fund',
@@ -251,7 +240,7 @@ export const asyncRouterMap = [
           //   path: '/salesManagement/quotation',
           //   redirect: '/salesManagement/quotation/list',
           //   name: 'quotation',
-          //   component: RouteView,
+          //   component: BlankLayout,
           //   meta: {
           //     title: '报价单',
           //     icon: 'idcard'
@@ -309,7 +298,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/giftRecord',
             redirect: '/salesManagement/giftRecord/list',
             name: 'giftRecord',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '赠品记录',
               icon: 'file-search',
@@ -334,7 +323,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/salesman',
             redirect: '/salesManagement/salesman/list',
             name: 'salesman',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '业务员管理',
               icon: 'file-search',
@@ -372,7 +361,7 @@ export const asyncRouterMap = [
             path: '/purchasingManagement/purchaseOrder',
             redirect: '/purchasingManagement/purchaseOrder/list',
             name: 'purchaseOrder',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '采购单管理',
               icon: 'money-collect',
@@ -441,7 +430,7 @@ export const asyncRouterMap = [
             path: '/purchasingManagement/purchaseReturn',
             redirect: '/purchasingManagement/purchaseReturn/list',
             name: 'purchaseReturn',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '采购退货',
               icon: 'money-collect',
@@ -512,7 +501,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/warehousingAudit',
             redirect: '/financialManagement/warehousingAudit/list',
             name: 'warehousingAudit',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '入库审核',
               icon: 'pull-request',
@@ -548,7 +537,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/inventoryCheckAudit',
             redirect: '/financialManagement/inventoryCheckAudit/list',
             name: 'inventoryCheckAudit',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '盘点审核',
               icon: 'laptop',
@@ -573,7 +562,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/financialPayment',
             redirect: '/financialManagement/financialPayment/list',
             name: 'financialPayment',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '财务付款',
               icon: 'pay-circle',
@@ -598,7 +587,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/financialCollection',
             redirect: '/financialManagement/financialCollection/list',
             name: 'financialCollection',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '财务收款',
               icon: 'money-collect',
@@ -623,7 +612,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/expenseManagement',
             redirect: '/financialManagement/expenseManagement/list',
             name: 'expenseManagement',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '费用管理',
               icon: 'pound',
@@ -670,7 +659,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/companyReceivablePayable',
             redirect: '/financialManagement/companyReceivablePayable/list',
             name: 'companyReceivablePayable',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '单位应收应付管理',
               icon: 'transaction',
@@ -717,7 +706,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/companyCollectionPayment',
             redirect: '/financialManagement/companyCollectionPayment/list',
             name: 'companyCollectionPayment',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '单位收付款记录',
               icon: 'file-protect',
@@ -753,7 +742,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/withdrawalManagement',
             redirect: '/financialManagement/withdrawalManagement/list',
             name: 'withdrawalManagement',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '提现管理',
               icon: 'dollar',
@@ -778,7 +767,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/ledgerRecord',
             redirect: '/financialManagement/ledgerRecord/list',
             name: 'ledgerRecord',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '分账记录',
               icon: 'profile',
@@ -816,7 +805,7 @@ export const asyncRouterMap = [
             path: '/allocationManagement/warehouseAllocation',
             redirect: '/allocationManagement/warehouseAllocation/list',
             name: 'warehouseAllocation',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '仓库调拨',
               icon: 'gateway',
@@ -874,7 +863,7 @@ export const asyncRouterMap = [
             path: '/allocationManagement/chainTransferIn',
             redirect: '/allocationManagement/chainTransferIn/list',
             name: 'chainTransferIn',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '连锁调入',
               icon: 'cluster',
@@ -921,7 +910,7 @@ export const asyncRouterMap = [
             path: '/allocationManagement/chainTransferOut',
             redirect: '/allocationManagement/chainTransferOut/list',
             name: 'chainTransferOut',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '连锁调出',
               icon: 'pull-request',
@@ -979,7 +968,7 @@ export const asyncRouterMap = [
             path: '/allocationManagement/storeTransferOut',
             redirect: '/allocationManagement/storeTransferOut/list',
             name: 'storeTransferOut',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '店内调出',
               icon: 'interaction',
@@ -1050,7 +1039,7 @@ export const asyncRouterMap = [
             path: '/inventoryManagement/inventoryQuery',
             redirect: '/inventoryManagement/inventoryQuery/list',
             name: 'inventoryQuery',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '库存查询',
               icon: 'monitor',
@@ -1106,7 +1095,7 @@ export const asyncRouterMap = [
             path: '/inventoryManagement/inventoryChecking',
             redirect: '/inventoryManagement/inventoryChecking/list',
             name: 'inventoryChecking',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '库存盘点',
               icon: 'reconciliation',
@@ -1164,7 +1153,7 @@ export const asyncRouterMap = [
             path: '/inventoryManagement/inventoryImport',
             redirect: '/inventoryManagement/inventoryImport/list',
             name: 'inventoryImport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '库存导入',
               icon: 'frown'
@@ -1189,7 +1178,7 @@ export const asyncRouterMap = [
             path: '/inventoryManagement/warehouse',
             redirect: '/inventoryManagement/warehouse/list',
             name: 'warehouse',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '仓库管理',
               icon: 'deployment-unit',
@@ -1238,7 +1227,7 @@ export const asyncRouterMap = [
             path: '/bulkManagement/bulkWarehousingOrder',
             redirect: '/bulkManagement/bulkWarehousingOrder/list',
             name: 'bulkWarehousingOrder',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '散件入库',
               icon: 'gold',
@@ -1296,7 +1285,7 @@ export const asyncRouterMap = [
             path: '/bulkManagement/bulkReturnGoods',
             redirect: '/bulkManagement/bulkReturnGoods/list',
             name: 'bulkReturnGoods',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '散件退货',
               icon: 'frown',
@@ -1343,7 +1332,7 @@ export const asyncRouterMap = [
             path: '/bulkManagement/bulkImport',
             redirect: '/bulkManagement/bulkImport/list',
             name: 'bulkImport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '散件导入',
               icon: 'frown'
@@ -1381,7 +1370,7 @@ export const asyncRouterMap = [
             path: '/reportData/chainStockReport',
             redirect: '/reportData/chainStockReport/list',
             name: 'chainStockReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '连锁库存总表(天)',
               icon: 'profile',
@@ -1406,7 +1395,7 @@ export const asyncRouterMap = [
             path: '/reportData/chainSalesReport',
             redirect: '/reportData/chainSalesReport/list',
             name: 'chainSalesReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '连锁销售报表(天)',
               icon: 'profile',
@@ -1431,7 +1420,7 @@ export const asyncRouterMap = [
             path: '/reportData/chainSalesDetailReport',
             redirect: '/reportData/chainSalesDetailReport/list',
             name: 'chainSalesDetailReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '连锁销售明细报表(天)',
               icon: 'profile',
@@ -1456,7 +1445,7 @@ export const asyncRouterMap = [
             path: '/reportData/chainReceivedSendStorageReport',
             redirect: '/reportData/chainReceivedSendStorageReport/list',
             name: 'chainReceivedSendStorageReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '连锁收发存报表',
               icon: 'profile',
@@ -1481,7 +1470,7 @@ export const asyncRouterMap = [
             path: '/reportData/customerReport',
             redirect: '/reportData/customerReport/list',
             name: 'customerReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '大客户报表(天)',
               icon: 'profile',
@@ -1506,7 +1495,7 @@ export const asyncRouterMap = [
             path: '/reportData/stockIncomeReport',
             redirect: '/reportData/stockIncomeReport/list',
             name: 'stockIncomeReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '库存总入报表',
               icon: 'profile',
@@ -1531,7 +1520,7 @@ export const asyncRouterMap = [
             path: '/reportData/stockExpenditureReport',
             redirect: '/reportData/stockExpenditureReport/list',
             name: 'stockExpenditureReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '库存总出报表',
               icon: 'profile',
@@ -1556,7 +1545,7 @@ export const asyncRouterMap = [
             path: '/reportData/receivedSendStorageReport',
             redirect: '/reportData/receivedSendStorageReport/list',
             name: 'receivedSendStorageReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '收发存报表',
               icon: 'profile',
@@ -1594,7 +1583,7 @@ export const asyncRouterMap = [
             path: '/customerManagement/customerInfo',
             redirect: '/customerManagement/customerInfo/list',
             name: 'customerInfo',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '客户管理',
               icon: 'idcard',
@@ -1654,7 +1643,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productInfo',
             redirect: '/productManagement/productInfo/list',
             name: 'productInfo',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '产品信息管理(自建)',
               icon: 'file-text',
@@ -1701,7 +1690,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productInfoJg',
             redirect: '/productManagement/productInfoJg/list',
             name: 'productInfoJg',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '产品信息管理(箭冠)',
               icon: 'file-text',
@@ -1726,7 +1715,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productBrand',
             redirect: '/productManagement/productBrand/list',
             name: 'productBrand',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '产品品牌管理',
               icon: 'sketch',
@@ -1751,7 +1740,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productCategory',
             redirect: '/productManagement/productCategory/list',
             name: 'productCategory',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '产品分类管理',
               icon: 'sliders',
@@ -1776,7 +1765,7 @@ export const asyncRouterMap = [
             path: '/productManagement/priceChangeRecord',
             redirect: '/productManagement/priceChangeRecord/list',
             name: 'priceChangeRecord',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '价格变更记录',
               icon: 'sketch',
@@ -1796,7 +1785,29 @@ export const asyncRouterMap = [
                 }
               }
             ]
-          }
+          },
+          // 新品列表
+          {
+            path: '/newProduct',
+            name: 'newProduct',
+            component: () => import(/* webpackChunkName: "home" */ '@/views/productManagement/newProduct/list'),
+            meta: {
+              title: '新品信息',
+              icon: 'home'
+            },
+            hidden: true
+          },
+          // 产品详情
+          {
+            path: '/viewProduct/:sn',
+            name: 'viewProduct',
+            component: () => import(/* webpackChunkName: "home" */ '@/views/productManagement/newProduct/detail'),
+            meta: {
+              title: '产品详情',
+              icon: 'home'
+            },
+            hidden: true
+          },
         ]
       },
       //  供应商管理
@@ -1814,7 +1825,7 @@ export const asyncRouterMap = [
             path: '/supplierManagement/supplierInfo',
             redirect: '/supplierManagement/supplierInfo/list',
             name: 'supplierInfo',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '供应商管理',
               icon: 'team',
@@ -1852,7 +1863,7 @@ export const asyncRouterMap = [
             path: '/storeManagement/bind',
             redirect: '/storeManagement/bind/list',
             name: 'storeManagementBind',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '中心店/配送店绑定',
               icon: 'link',
@@ -1877,7 +1888,7 @@ export const asyncRouterMap = [
             path: '/storeManagement/userAuthorization',
             redirect: '/storeManagement/userAuthorization/list',
             name: 'storeManagementUserAuth',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '中心店用户授权',
               icon: 'link',
@@ -1915,7 +1926,7 @@ export const asyncRouterMap = [
             path: '/basicData/storeTransferOutTypeManagement',
             redirect: '/basicData/storeTransferOutTypeManagement/list',
             name: 'storeTransferOutTypeManagement',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '店内调出类型管理',
               icon: 'interaction',
@@ -1940,7 +1951,7 @@ export const asyncRouterMap = [
             path: '/basicData/bulkPartsTypeManagement',
             redirect: '/basicData/bulkPartsTypeManagement/list',
             name: 'bulkPartsTypeManagement',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '散件入库类型管理',
               icon: 'gold',
@@ -1965,7 +1976,7 @@ export const asyncRouterMap = [
             path: '/basicData/expenseType',
             redirect: '/basicData/expenseType/list',
             name: 'expenseType',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '费用类型管理',
               icon: 'pay-circle',
@@ -1990,7 +2001,7 @@ export const asyncRouterMap = [
           //   path: '/basicData/processSettings',
           //   redirect: '/basicData/processSettings/setup',
           //   name: 'processSettings',
-          //   component: RouteView,
+          //   component: BlankLayout,
           //   meta: {
           //     title: '业务自动化设置',
           //     icon: 'sliders'
@@ -2015,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: {

+ 171 - 0
src/views/productManagement/newProduct/detail.vue

@@ -0,0 +1,171 @@
+<template>
+  <div>
+    <a-page-header :ghost="false" :backIcon="false" class="newProductDetail-back">
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="newProductDetail-back-btn" href="javascript:;" @click="$router.go(-1)">
+          <a-icon type="left" />
+          返回
+        </a>
+      </template>
+    </a-page-header>
+    <div class="newProductDetail-modal">
+      <!-- 产品详情 -->
+      <h4>{{ (detailsData && detailsData.name) || '--' }}</h4>
+      <div class="productHead">
+        <div class="productInfo">
+          <a-descriptions bordered :column="2" size="small">
+            <a-descriptions-item label="产品品牌:">{{ (detailsData && detailsData.productBrandName) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="产品编码:">{{ (detailsData && detailsData.code) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="原厂编码:">{{ (detailsData && detailsData.origCode) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="商品尺寸:">{{ (detailsData && detailsData.name) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="重量:">{{ (detailsData && detailsData.unit) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="计量单位:">{{ (detailsData && detailsData.unit) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="其它编号:">
+              {{ detailsData && (detailsData.specialPrice || detailsData.specialPrice == 0) ? detailsData.specialPrice : '--' }}
+            </a-descriptions-item>
+            <a-descriptions-item label=""></a-descriptions-item>
+            <a-descriptions-item label="适用车型:">{{ productTypeName || '--' }}</a-descriptions-item>
+          </a-descriptions>
+          <div class="productDetail">
+            <h4>产品介绍</h4>
+            <div class="productDesc">阿斯顿发链接撒旦发了就阿斯大幅拉四大佛教萨拉丁撒地方就拉萨撒萨德勒撒旦发了撒打发士大夫了士大夫了撒打发</div>
+          </div>
+        </div>
+        <div class="productImg">
+          <a-carousel arrows>
+            <div slot="prevArrow" slot-scope="props" class="custom-slick-arrow" style="left: 10px;zIndex: 1"><a-icon type="left-circle" /></div>
+            <div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px"><a-icon type="right-circle" /></div>
+            <div><img src="../../../assets/avatar2.jpg" /></div>
+            <div><img src="../../../assets/avatar2.jpg" /></div>
+            <div><img src="../../../assets/avatar2.jpg" /></div>
+          </a-carousel>
+          <div class="sycxImg">
+            <p>适用车型图片</p>
+            <div>
+              <img src="../../../assets/avatar2.jpg" />
+              <div>江陵凯瑞200</div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { productDetail } from '@/api/product.js'
+export default {
+  name: 'ProductInfoDetail',
+  computed: {
+    productTypeName () {
+      const productTypeName1 = this.detailsData && this.detailsData.productTypeName1 ? this.detailsData.productTypeName1 : ''
+      const productTypeName2 = this.detailsData && this.detailsData.productTypeName2 ? ' > ' + this.detailsData.productTypeName2 : ''
+      const productTypeName3 = this.detailsData && this.detailsData.productTypeName3 ? ' > ' + this.detailsData.productTypeName3 : ''
+      return productTypeName1 + productTypeName2 + productTypeName3
+    }
+  },
+  data () {
+    return {
+      itemId: null,
+      detailsData: null //  详情数据
+    }
+  },
+  methods: {
+    //  获取详情
+    getDetail () {
+      productDetail({ sn: this.itemId }).then(res => {
+        if (res.status == 200) {
+          this.detailsData = res.data
+        } else {
+          this.detailsData = null
+        }
+      })
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.itemId = vm.$route.params.sn
+      vm.getDetail()
+    })
+  }
+}
+</script>
+
+<style lang="less">
+/* For demo */
+.ant-carousel .slick-slide {
+  text-align: center;
+  height: 190px;
+  line-height: 190px;
+  background: #364d79;
+  overflow: hidden;
+}
+.ant-carousel .custom-slick-arrow {
+  width: 25px;
+  height: 25px;
+  font-size: 25px;
+  color: #fff;
+  opacity: 0.3;
+}
+.ant-carousel .custom-slick-arrow:before {
+  display: none;
+}
+.ant-carousel .custom-slick-arrow:hover {
+  opacity: 0.5;
+}
+.ant-carousel .slick-slide img {
+  width: 100%;
+  height: 100%;
+}
+.newProductDetail-back {
+  margin-bottom: 10px;
+}
+.newProductDetail-modal {
+  background-color: #fff;
+  padding: 15px;
+  h4 {
+    font-size: 18px;
+  }
+  .productHead {
+    display: flex;
+    .productImg {
+      width: 25%;
+    }
+    .productInfo {
+      flex-grow: 1;
+      margin-right: 10px;
+    }
+    .sycxImg {
+      margin-top: 10px;
+      p {
+        font-size: 14px;
+        padding: 5px 10px;
+        background-color: #dcf1ff;
+      }
+      img {
+        width: 100px;
+      }
+    }
+  }
+  .productDetail {
+    border: 1px solid #eee;
+    margin-top: 10px;
+    h4 {
+      font-size: 14px;
+      padding: 5px 10px;
+      background-color: #dcf1ff;
+    }
+    .productDesc {
+      padding: 15px;
+    }
+  }
+  .ant-descriptions-item-label.ant-descriptions-item-colon {
+    width: 120px;
+  }
+  .btn-cont {
+    text-align: center;
+    margin: 35px 0 10px;
+  }
+}
+</style>

+ 0 - 197
src/views/productManagement/newProduct/detailModal.vue

@@ -1,197 +0,0 @@
-<template>
-  <a-modal
-    centered
-    class="newProductDetail-modal"
-    :footer="null"
-    :maskClosable="false"
-    title="产品详情"
-    v-model="isShow"
-    @cancle="isShow=false"
-    width="80%">
-    <!-- 产品详情 -->
-    <h4>{{ detailsData&&detailsData.name || '--' }}</h4>
-    <div class="productHead">
-      <div class="productInfo">
-        <a-descriptions bordered :column="2" size="small">
-          <a-descriptions-item label="产品品牌:">{{ detailsData&&detailsData.productBrandName || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="产品编码:">{{ detailsData&&detailsData.code || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="原厂编码:">{{ detailsData&&detailsData.origCode || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="商品尺寸:">{{ detailsData&&detailsData.name || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="重量:">{{ detailsData&&detailsData.unit || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="计量单位:">{{ detailsData&&detailsData.unit || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="其它编号:">{{ detailsData&&(detailsData.specialPrice || detailsData.specialPrice==0) ? detailsData.specialPrice : '--' }}</a-descriptions-item>
-          <a-descriptions-item label=""></a-descriptions-item>
-          <a-descriptions-item label="适用车型:">{{ productTypeName || '--' }}</a-descriptions-item>
-        </a-descriptions>
-        <div class="productDetail">
-          <h4>产品介绍</h4>
-          <div class="productDesc">
-            阿斯顿发链接撒旦发了就阿斯大幅拉四大佛教萨拉丁撒地方就拉萨撒萨德勒撒旦发了撒打发士大夫了士大夫了撒打发
-          </div>
-        </div>
-      </div>
-      <div class="productImg">
-        <a-carousel arrows>
-          <div
-            slot="prevArrow"
-            slot-scope="props"
-            class="custom-slick-arrow"
-            style="left: 10px;zIndex: 1"
-          >
-            <a-icon type="left-circle" />
-          </div>
-          <div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px">
-            <a-icon type="right-circle" />
-          </div>
-          <div><img src="../../../assets/avatar2.jpg"></div>
-          <div><img src="../../../assets/avatar2.jpg"></div>
-          <div><img src="../../../assets/avatar2.jpg"></div>
-        </a-carousel>
-        <div class="sycxImg">
-          <p>适用车型图片</p>
-          <div>
-            <img src="../../../assets/avatar2.jpg">
-            <div>江陵凯瑞200</div>
-          </div>
-        </div>
-      </div>
-    </div>
-    <div class="btn-cont"><a-button id="product-management-detail-modal-back" @click="isShow = false">返回列表</a-button></div>
-  </a-modal>
-</template>
-
-<script>
-import { productDetail } from '@/api/product.js'
-export default {
-  name: 'ProductInfoDetailModal',
-  props: {
-    openModal: { //  弹框显示状态
-      type: Boolean,
-      default: false
-    },
-    itemId: {
-      type: [Number, String],
-      default: ''
-    }
-  },
-  computed: {
-    productTypeName () {
-      const productTypeName1 = this.detailsData && this.detailsData.productTypeName1 ? this.detailsData.productTypeName1 : ''
-      const productTypeName2 = this.detailsData && this.detailsData.productTypeName2 ? ' > ' + this.detailsData.productTypeName2 : ''
-      const productTypeName3 = this.detailsData && this.detailsData.productTypeName3 ? ' > ' + this.detailsData.productTypeName3 : ''
-      return productTypeName1 + productTypeName2 + productTypeName3
-    }
-  },
-  data () {
-    return {
-      isShow: this.openModal, //  是否打开弹框
-      detailsData: null //  详情数据
-    }
-  },
-  methods: {
-    //  获取详情
-    getDetail () {
-      productDetail({ sn: this.itemId }).then(res => {
-        if (res.status == 200) {
-          this.detailsData = res.data
-        } else {
-          this.detailsData = null
-        }
-      })
-    }
-  },
-  watch: {
-    //  父页面传过来的弹框状态
-    openModal (newValue, oldValue) {
-      this.isShow = newValue
-    },
-    //  重定义的弹框状态
-    isShow (newValue, oldValue) {
-      if (!newValue) {
-        this.$emit('close')
-      }
-    },
-    itemId (newValue, oldValue) {
-      if (this.isShow && newValue) {
-        this.getDetail()
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less">
-  /* For demo */
-  .ant-carousel .slick-slide {
-    text-align: center;
-    height: 190px;
-    line-height: 190px;
-    background: #364d79;
-    overflow: hidden;
-  }
-  .ant-carousel .custom-slick-arrow {
-    width: 25px;
-    height: 25px;
-    font-size: 25px;
-    color: #fff;
-    opacity: 0.3;
-  }
-  .ant-carousel .custom-slick-arrow:before {
-    display: none;
-  }
-  .ant-carousel .custom-slick-arrow:hover {
-    opacity: 0.5;
-  }
-  .ant-carousel .slick-slide img {
-    width: 100%;
-    height: 100%;
-  }
-  .newProductDetail-modal{
-    .ant-modal-body {
-      padding: 15px;
-      h4{
-        font-size: 18px;
-      }
-      .productHead{
-        display: flex;
-        .productImg{
-          width: 25%;
-        }
-        .productInfo{
-          flex-grow: 1;
-          margin-right: 10px;
-        }
-        .sycxImg{
-          margin-top: 10px;
-          p{
-            font-size: 14px;
-            padding: 5px 10px;
-            background-color: #dcf1ff;
-          }
-          img{
-            width: 100px;
-          }
-        }
-      }
-      .productDetail{
-        border: 1px solid #eee;
-        margin-top: 10px;
-        h4{
-          font-size: 14px;
-          padding: 5px 10px;
-          background-color: #dcf1ff;
-        }
-        .productDesc{
-          padding: 15px;
-        }
-      }
-    }
-    .ant-descriptions-item-label.ant-descriptions-item-colon{
-      width: 120px;
-    }
-    .btn-cont {
-      text-align: center;
-      margin: 35px 0 10px;
-    }
-  }
-</style>

+ 2 - 12
src/views/productManagement/newProduct/list.vue

@@ -92,18 +92,14 @@
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
-            v-if="$hasPermissions('B_product_dealerProduct_detail')"
             size="small"
             type="link"
             class="button-success"
             @click="handleDetail(record)"
             id="productInfoList-detail-btn">详情</a-button>
-          <span v-if="!$hasPermissions('B_product_dealerProduct_edit') && !$hasPermissions('B_product_dealerProduct_detail')">--</span>
         </template>
       </s-table>
     </a-spin>
-    <!-- 产品详情 -->
-    <product-info-detail-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
   </a-card>
 </template>
 
@@ -114,9 +110,8 @@ import { dealerProductTypeList } from '@/api/dealerProductType'
 import { dealerProductList, dealerProductExport } from '@/api/dealerProduct'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import productInfoDetailModal from './detailModal.vue'
 export default {
-  components: { STable, VSelect, productInfoDetailModal, rangeDate },
+  components: { STable, VSelect, rangeDate },
   data () {
     return {
       spinning: false,
@@ -203,12 +198,7 @@ export default {
     //  详情
     handleDetail (row) {
       this.itemId = row.productSn
-      this.openModal = true
-    },
-    //  关闭弹框
-    closeModal () {
-      this.itemId = ''
-      this.openModal = false
+      this.$router.push({ name: 'viewProduct', params: { sn: row.productSn } })
     },
     //  产品分类  change
     changeProductType (val, opt) {

+ 5 - 8
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -97,13 +97,11 @@
                 <!-- 产品图片 -->
                 <template slot="imageUrl" slot-scope="text, record">
                   <img
-                    v-if="record.productMainPic && record.productMainPic.imageUrl"
-                    :src="record.productMainPic.imageUrl+'?x-oss-process=image/resize,h_30,m_lfit' || ''"
+                    :src="record.productMainPic && record.productMainPic.imageUrl?(record.productMainPic.imageUrl+'?x-oss-process=image/resize,h_30,m_lfit'):defImg"
                     width="30"
                     height="30"
                     class="imageUrl"
                     @click="handlePicDetail(record)" />
-                  <span v-else>--</span>
                 </template>
                 <!-- 产品编码 -->
                 <template slot="code" slot-scope="text, record">
@@ -255,6 +253,7 @@ import ProductBrand from '../../common/productBrand.js'
 import { purchaseDetailBySn, purchaseWriteSubmit, purchaseDetailPrint, purchaseDetailBatchInsert, purchaseDetailExport } from '@/api/purchase'
 import { purchaseDetailList, purchaseDetailSave, purchaseDetailDel, purchaseDetailCount, purchaseDetailCancelList } from '@/api/purchaseDetail'
 import { productListPurchase } from '@/api/product'
+import defImg from '@/assets/def_img@2x.png'
 export default {
   components: { STable, VSelect, ProductType, ProductBrand, ImportGuideModal, outStockModal },
   data () {
@@ -262,6 +261,7 @@ export default {
       spinning: false,
       detail: null, // 详细信息
       subLoading: false,
+      defImg,
       // 选择产品
       addLoading: false,
       productType: [],
@@ -501,11 +501,8 @@ export default {
     },
     // 查看产品
     handlePicDetail (row) {
-      if (row.productMainPic && row.productMainPic.imageUrl) {
-        this.$viewerApi({
-          images: [row.productMainPic.imageUrl.replace('/small/', '/big/')]
-        })
-      }
+      console.log(row)
+      this.$router.push({ name: 'viewProduct', params: { sn: row.productSn } })
     },
     // 上次缺货 导入成功
     hanldeOkOutStock () {

+ 1 - 1
src/views/purchasingManagement/purchaseReturn/edit.vue

@@ -171,7 +171,7 @@ export default {
         { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '采购总数', dataIndex: 'qty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { slots: { title: 'refundableQtyTitle' }, dataIndex: 'refundableQty', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '库存数量', dataIndex: 'stock.currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '') } },
+        { title: '库存数量', dataIndex: 'stock.currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '缺货数量', dataIndex: 'cancelQty', width: 100, align: 'center' },
         { title: '退货数量', scopedSlots: { customRender: 'returnQty' }, width: 100, align: 'center' },
         { title: '采购价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 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"/>