Ver código fonte

Merge branch 'deploy_0804' of jianguan-web/jg-ocs-html into master

李磊 3 anos atrás
pai
commit
444f73821b
100 arquivos alterados com 2354 adições e 3055 exclusões
  1. 2 2
      .env
  2. 1 1
      .env.practice
  3. 5 0
      package-lock.json
  4. 1 0
      package.json
  5. 5 0
      src/App.vue
  6. 16 2
      src/api/allocateBill.js
  7. 11 0
      src/api/product.js
  8. 31 5
      src/components/MultiTab/MultiTab.vue
  9. 15 3
      src/components/UploadFile/index.vue
  10. 13 7
      src/components/custom.less
  11. 1 1
      src/components/global.less
  12. 13 2
      src/components/tools/UserMenu.vue
  13. 79 212
      src/config/router.config.js
  14. 15 3
      src/layouts/BasicLayout.vue
  15. 3 0
      src/layouts/PageView.vue
  16. 4 4
      src/layouts/RouteView.vue
  17. 3 1
      src/store/getters.js
  18. 3 1
      src/store/modules/app.js
  19. 51 2
      src/views/Home.vue
  20. 54 19
      src/views/allocationManagement/transferOut/detail.vue
  21. 131 36
      src/views/allocationManagement/transferOut/edit.vue
  22. 26 27
      src/views/allocationManagement/transferOut/list.vue
  23. 167 0
      src/views/allocationManagement/transferOut/printModal.vue
  24. 18 4
      src/views/basicData/transferTypeManagement/list.vue
  25. 22 5
      src/views/basicData/warehouse/list.vue
  26. 21 4
      src/views/basicData/warehouse/storingLocation/list.vue
  27. 68 0
      src/views/common/allocateType.js
  28. 5 0
      src/views/common/rangeDate.vue
  29. 1 0
      src/views/dealerManagement/dealerAccountManagement/detailModal.vue
  30. 39 5
      src/views/dealerManagement/dealerAccountManagement/editModal.vue
  31. 19 5
      src/views/dealerManagement/dealerAccountManagement/list.vue
  32. 13 4
      src/views/dealerManagement/dealerRelationshipBinding/list.vue
  33. 19 6
      src/views/dealerManagement/marketingDivisionSet/list.vue
  34. 13 13
      src/views/dealerManagement/merchantInfoManagement/detailModal.vue
  35. 19 7
      src/views/dealerManagement/merchantInfoManagement/edit.vue
  36. 22 9
      src/views/dealerManagement/merchantInfoManagement/list.vue
  37. 18 4
      src/views/dealerManagement/merchantInfoManagement/permissionSetting.vue
  38. 19 5
      src/views/dealerManagement/rebateSettings/list.vue
  39. 22 9
      src/views/financialManagement/financialCollection/list.vue
  40. 0 161
      src/views/financialManagement/inventoryReview/detail.vue
  41. 0 174
      src/views/financialManagement/inventoryReview/list.vue
  42. 2 0
      src/views/financialManagement/returnConfirmation/detailModal.vue
  43. 23 6
      src/views/financialManagement/returnConfirmation/list.vue
  44. 1 0
      src/views/financialManagement/warehousingConfirmation/detailModal.vue
  45. 21 4
      src/views/financialManagement/warehousingConfirmation/list.vue
  46. 28 9
      src/views/inventoryManagement/intelligentReplenishment/edit.vue
  47. 12 0
      src/views/inventoryManagement/intelligentReplenishment/import.vue
  48. 21 4
      src/views/inventoryManagement/intelligentReplenishment/list.vue
  49. 17 0
      src/views/inventoryManagement/intelligentReplenishment/set.vue
  50. 0 199
      src/views/inventoryManagement/inventoryChecking/checkingTipsModal.vue
  51. 0 155
      src/views/inventoryManagement/inventoryChecking/checkingTypeModal.vue
  52. 0 183
      src/views/inventoryManagement/inventoryChecking/detail.vue
  53. 0 146
      src/views/inventoryManagement/inventoryChecking/financialAuditDetail.vue
  54. 0 219
      src/views/inventoryManagement/inventoryChecking/list.vue
  55. 0 187
      src/views/inventoryManagement/inventoryChecking/makeInventory.vue
  56. 0 144
      src/views/inventoryManagement/inventoryChecking/makeInventoryDetail.vue
  57. 0 108
      src/views/inventoryManagement/inventoryChecking/overall.vue
  58. 0 326
      src/views/inventoryManagement/inventoryChecking/selfDisk.vue
  59. 8 0
      src/views/inventoryManagement/inventoryQuery/detailModal.vue
  60. 40 14
      src/views/inventoryManagement/inventoryQuery/list.vue
  61. 22 9
      src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue
  62. 26 42
      src/views/inventoryManagement/inventoryWarning/list.vue
  63. 18 4
      src/views/power/OperateJournal/OperateJournal.vue
  64. 19 6
      src/views/power/dataDictionary/dataDictionary.vue
  65. 19 5
      src/views/power/role/roleList.vue
  66. 19 5
      src/views/power/user/userList.vue
  67. 172 0
      src/views/productManagement/newProduct/detail.vue
  68. 263 0
      src/views/productManagement/newProduct/list.vue
  69. 89 0
      src/views/productManagement/newProduct/modal.vue
  70. 26 13
      src/views/productManagement/priceChangeRecord/list.vue
  71. 1 0
      src/views/productManagement/productBrand/detailModal.vue
  72. 19 5
      src/views/productManagement/productBrand/list.vue
  73. 13 1
      src/views/productManagement/productCategory/list.vue
  74. 25 11
      src/views/productManagement/productInfo/edit.vue
  75. 24 11
      src/views/productManagement/productInfo/list.vue
  76. 18 4
      src/views/productManagement/productLaunchAudit/list.vue
  77. 23 10
      src/views/productManagement/productLevel/list.vue
  78. 26 13
      src/views/productManagement/productOfflineAudit/list.vue
  79. 23 10
      src/views/productManagement/productPricing/list.vue
  80. 21 7
      src/views/productManagement/productUniversal/list.vue
  81. 0 116
      src/views/productManagement/purchaseBaseLimit/editModal.vue
  82. 0 248
      src/views/productManagement/purchaseBaseLimit/list.vue
  83. 1 0
      src/views/promotionRulesManagement/orderStatistics/detailModal.vue
  84. 20 6
      src/views/promotionRulesManagement/orderStatistics/list.vue
  85. 1 0
      src/views/promotionRulesManagement/productStatistics/detailModal.vue
  86. 23 10
      src/views/promotionRulesManagement/productStatistics/list.vue
  87. 20 9
      src/views/promotionRulesManagement/promotionRules/detail.vue
  88. 22 5
      src/views/promotionRulesManagement/promotionRules/list.vue
  89. 21 4
      src/views/promotionRulesManagement/promotionRules/rule.vue
  90. 20 10
      src/views/purchasingManagement/bulkWarehousingOrder/edit.vue
  91. 23 10
      src/views/purchasingManagement/bulkWarehousingOrder/list.vue
  92. 26 2
      src/views/purchasingManagement/bulkWarehousingOrder/productModal.vue
  93. 16 5
      src/views/reportData/actualSalesReport/list.vue
  94. 23 8
      src/views/reportData/allocationDetails/list.vue
  95. 18 4
      src/views/reportData/allocationOrderTotal/list.vue
  96. 18 4
      src/views/reportData/billingReturnReport/list.vue
  97. 17 0
      src/views/reportData/districtTypeSalesDetails/list.vue
  98. 21 6
      src/views/reportData/hPriceDifferenceDetailReport/list.vue
  99. 17 0
      src/views/reportData/nationalCustomerCostStatistics/list.vue
  100. 20 5
      src/views/reportData/priceDifferenceDetailReport/list.vue

+ 2 - 2
.env

@@ -1,7 +1,7 @@
 NODE_ENV=production
 VUE_APP_PREVIEW=false
-VUE_APP_API_BASE_URL=http://ocs-admin.360arrow.com/ocs-admin
-VUE_APP_WX_BASE_URL=//ocs-admin.360arrow.com/ocs-admin/websocket/
+VUE_APP_API_BASE_URL=https://ocs.360arrow.com/ocs-admin
+VUE_APP_WX_BASE_URL=//ocs.360arrow.com/ocs-admin/websocket/
 VUE_APP_VERSION=V1.0.1
 VUE_APP_ENVTIPS=
 VUE_APP_PRO_NAME=箭冠运营中心系统

+ 1 - 1
.env.practice

@@ -1,6 +1,6 @@
 NODE_ENV=production
 VUE_APP_PREVIEW=false
-VUE_APP_API_BASE_URL=http://t.ocs.360arrow.com/ocs-admin
+VUE_APP_API_BASE_URL=https://t.ocs.360arrow.com/ocs-admin
 VUE_APP_WX_BASE_URL=//t.ocs.360arrow.com/ocs-admin/websocket/
 VUE_APP_VERSION=V1.0.1
 VUE_APP_ENVTIPS=练习环境

+ 5 - 0
package-lock.json

@@ -14524,6 +14524,11 @@
         "ajv-keywords": "^3.1.0"
       }
     },
+    "screenfull": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/screenfull/-/screenfull-5.1.0.tgz",
+      "integrity": "sha512-dYaNuOdzr+kc6J6CFcBrzkLCfyGcMg+gWkJ8us93IQ7y1cevhQAugFsaCdMHb6lw8KV3xPzSxzH7zM1dQap9mA=="
+    },
     "select": {
       "version": "1.1.2",
       "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",

+ 1 - 0
package.json

@@ -25,6 +25,7 @@
     "mockjs2": "1.0.7",
     "moment": "^2.24.0",
     "nprogress": "^0.2.0",
+    "screenfull": "^5.1.0",
     "v-runtime-template": "^1.10.0",
     "v-viewer": "^1.6.4",
     "viser-vue": "^2.4.6",

+ 5 - 0
src/App.vue

@@ -33,6 +33,11 @@ export default {
     window.addEventListener('beforeunload', () => {
       sessionStorage.setItem('store', JSON.stringify(this.$store.state))
     })
+    this.$message.config({
+      top: `100px`,
+      duration: 3,
+      maxCount: 3
+    })
   }
 }
 </script>

+ 16 - 2
src/api/allocateBill.js

@@ -105,12 +105,26 @@ export const allocateBillDetailSave = params => {
 }
 // 调拨管理 详情  打印
 export const allocateBillDetailPrint = params => {
+  const url = `/allocateBill/print/${params.printType}/${params.isPreview}`
+  delete params.printType
+  delete params.isPreview
   return axios.request({
-    url: `/allocateBill/print/${params.sn}/${params.isPreview}`,
-    method: 'get',
+    url: url,
+    data: params,
+    method: 'post',
     responseType: 'blob'
   })
 }
+// 调拨管理  详情  打印  产品列表
+export const allocateBillProductTypeList = params => {
+  const url = `/allocateBill/queryProductTypeList/${params.sn}`
+  delete params.sn
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
 // 调拨管理 下载模板
 export const allocateBillDownload = params => {
   return axios.request({

+ 11 - 0
src/api/product.js

@@ -238,3 +238,14 @@ export const productPriceInfo = (params) => {
     method: 'get'
   })
 }
+// 查询最近上下线产品
+export const queryNewProductPage = (params) => {
+  const url = `/product/queryNewProductPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 31 - 5
src/components/MultiTab/MultiTab.vue

@@ -12,6 +12,7 @@ export default {
       newTabIndex: 0
     }
   },
+  inject: ['reloadView'],
   created () {
     // bind event
     events.$on('open', val => {
@@ -43,6 +44,17 @@ export default {
     onEdit (targetKey, action) {
       this[action](targetKey)
     },
+    onChange (targetKey) {
+      const index = this.tabsList.indexOf(targetKey)
+      if (index >= 0) {
+        const row = this.pages[index]
+        if (row && row.fullPath && row.fullPath.indexOf('/list') == -1) { // 非列表页
+          this.$store.state.app.isNewSubTab = true
+        } else {
+          this.$store.state.app.isNewSubTab = false
+        }
+      }
+    },
     remove (targetKey) {
       this.pages = this.pages.filter(page => page.name !== targetKey)
       this.tabsList = this.tabsList.filter(name => name !== targetKey)
@@ -54,8 +66,10 @@ export default {
     selectedLastPath () {
       this.activeKey = this.tabsList[this.tabsList.length - 1]
     },
-
     // content menu
+    refashThat (e) {
+      this.reloadView()
+    },
     closeThat (e) {
       // 判断是否为最后一个标签页,如果是最后一个,则无法被关闭
       if (this.tabsList.length > 1) {
@@ -100,9 +114,16 @@ export default {
       this[key](route)
     },
     renderTabPaneMenu (e) {
+      // return (
+      //   <a-menu {...{ on: { click: ({ key, item, domEvent }) => { this.closeMenuClick(key, e) } } }}>
+      //     {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>
+      //   </a-menu>
+      // )
       return (
         <a-menu {...{ on: { click: ({ key, item, domEvent }) => { this.closeMenuClick(key, e) } } }}>
-          <a-menu-item key="closeThat">关闭当前标签</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>
@@ -134,13 +155,14 @@ export default {
       if (index < 0) { // 不存在
         this.tabsList.push(newVal.name)
         this.pages.push(newVal)
+        this.$store.state.app.isNewTab = true
       } else { // 已存在
         this.pages.splice(index, 1, newVal)
+        this.$store.state.app.isNewTab = false
       }
     },
     activeKey: function (newPathKey) {
       const row = this.pages.find(item => item.name == newPathKey)
-      // console.log(row, '+++', row.fullPath)
       if (row.fullPath.indexOf('/list') == -1) {
         this.$router.push({ path: row.fullPath })
       } else {
@@ -150,7 +172,7 @@ export default {
     }
   },
   render () {
-    const { onEdit, $data: { pages } } = this
+    const { onEdit, onChange, refashThat, $data: { pages } } = this
     const panes = pages.map(page => {
       return (
         <a-tab-pane
@@ -159,6 +181,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>)
     })
@@ -171,7 +197,7 @@ export default {
             type={'editable-card'}
             v-model={this.activeKey}
             tabBarStyle={{ background: '#FFF', margin: 0, paddingLeft: '16px', paddingTop: '1px' }}
-            {...{ on: { edit: onEdit } }}>
+            {...{ on: { edit: onEdit, 'change': onChange } }}>
             {panes}
           </a-tabs>
         </div>

+ 15 - 3
src/components/UploadFile/index.vue

@@ -7,6 +7,7 @@
       :disabled="disabled"
       @preview="handlePreview"
       @change="handleChange"
+      :remove="handleRemove"
       :beforeUpload="beforeUpload"
       :data="params"
       :value="comVal"
@@ -144,11 +145,22 @@ export default {
       this.previewImage = file.url || file.thumbUrl
       this.previewVisible = true
     },
+    handleRemove (file) {
+      this.$emit('remove')
+    },
     handleChange ({ file, fileList }) {
       // console.log(file, fileList, '-----change')
-      if (file.status == 'error' || (file.response && (file.response.status == 500))) {
-        this.$message.error('上传失败,请重试!')
-        return
+      // if (file.status == 'error' || (file.response && (file.response.status == 500 || file.response.status == 900))) {
+      //   this.$message.error('上传失败,请重试!')
+      //   this.$emit('remove')
+      //   return
+      // }
+      if (file.response && (file.response.status == 500 || file.response.status == 900)) {
+        if (file.status == 'error' || file.status == 'done') {
+          this.$message.error(file.response.message || '上传失败,请重试!')
+          this.$emit('remove')
+          return
+        }
       }
       this.fileList = this.validaFile(file, fileList)
       this.$emit('change', this.formatFile())

+ 13 - 7
src/components/custom.less

@@ -1,9 +1,12 @@
 // 自定义样式文件   覆盖框架样式
 
 body{
-  font-size: 13px!important;
+  font-size: 12px!important;
   span,td,label,.ant-btn-sm{
-    font-size: 13px!important;
+    font-size: 12px!important;
+  }
+  .ant-form-item-label > label{
+    color: #333!important;
   }
 }
 // 查询条件样式
@@ -65,7 +68,8 @@ body{
 // 内容盒子样式
 .content {
   .table-operator {
-    padding: 8px 0;
+    // padding: 8px 0;
+    padding: 0 0 8px;
   }
   .table-operator-nobor{
     padding: 0 0 10px 0;
@@ -88,11 +92,11 @@ body{
 // 页签样式
 .multi-tab-con{
   .ant-tabs-nav-container{
-    height: 25px!important;
+    height: 30px!important;
     .ant-tabs-tab{
       padding: 0 8px!important;
-      height: 24px!important;
-      line-height: 24px!important;
+      height: 30px!important;
+      line-height: 30px!important;
     }
   }
 }
@@ -128,12 +132,14 @@ body{
       .ant-table-header tr th, .ant-table-thead tr th{
         background: #fafafa!important;
         font-weight: bold;
+        color: #333!important;
       }
     }
   }
   .ant-table-row{
     .ant-table-row-cell-break-word, td{
-      padding: 6px 4px!important;
+      padding: 3px 4px!important;
+      color: #333!important;
     }
   }
   .ant-pagination.ant-table-pagination{

+ 1 - 1
src/components/global.less

@@ -532,7 +532,7 @@ body {
 .content {
   .table-operator {
     padding: 15px 0;
-    border-top: 1px solid #eee;
+    // border-top: 1px solid #eee;
     button {
       margin-right: 8px;
     }

+ 13 - 2
src/components/tools/UserMenu.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="user-wrapper">
     <div class="content-box">
-		<notice-icon class="action"/>
+      <notice-icon class="action"/>
       <!-- <a href="https://pro.loacg.com/docs/getting-started" target="_blank">
         <span class="action">
           <a-icon type="question-circle-o"></a-icon>
@@ -41,11 +41,13 @@
           </a-menu-item>
         </a-menu>
       </a-dropdown>
+      <a-icon type="fullscreen" title="全屏" :style="{ fontSize: '20px', color: '#08c', marginLeft: '5px' }" @click="screen" />
     </div>
   </div>
 </template>
 
 <script>
+import screenfull from 'screenfull'
 import NoticeIcon from '@/components/NoticeIcon'
 import { mapActions, mapGetters } from 'vuex'
 import defaultAvatar from '@/assets/avatar2.jpg'
@@ -59,7 +61,8 @@ export default {
   },
   data () {
     return {
-      defaultAvatar: defaultAvatar
+      defaultAvatar: defaultAvatar,
+      isFullscreen: false
     }
   },
   methods: {
@@ -85,6 +88,14 @@ export default {
         onCancel () {
         }
       })
+    },
+    screen () {
+      // 如果不允许进入全屏,发出不允许提示
+      if (!screenfull.isEnabled) {
+        this.$message.info('您的浏览器不能全屏')
+        return false
+      }
+      screenfull.toggle()
     }
   }
 }

+ 79 - 212
src/config/router.config.js

@@ -48,6 +48,28 @@ export const asyncRouterMap = [
         },
         hidden: true
       },
+      // 新品列表
+      {
+        path: '/newProduct/:onlineFalg',
+        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
+      },
       // 销售管理
       {
         path: '/salesManagement',
@@ -63,7 +85,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/salesQuery',
             redirect: '/salesManagement/salesQuery/list',
             name: 'salesQuery',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '销售单查询',
               icon: 'monitor',
@@ -132,7 +154,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/examineVerify',
             redirect: '/salesManagement/examineVerify/list',
             name: 'examineVerify',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '备货审核',
               icon: 'audit',
@@ -157,7 +179,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/outboundOrder',
             redirect: '/salesManagement/outboundOrder/list',
             name: 'outboundOrder',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '出库',
               icon: 'export',
@@ -182,7 +204,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/pushOrderManagement',
             redirect: '/salesManagement/pushOrderManagement/list',
             name: 'pushOrderManagement',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '下推订单列表',
               icon: 'vertical-align-bottom',
@@ -218,7 +240,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/salesReturn',
             redirect: '/salesManagement/salesReturn/list',
             name: 'salesReturn',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '销售退货列表',
               icon: 'fund',
@@ -287,7 +309,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/backorder',
             redirect: '/salesManagement/backorder/list',
             name: 'backorder',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '销售缺货列表',
               icon: 'exception',
@@ -312,7 +334,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/shortageStatisticsC',
             redirect: '/salesManagement/shortageStatisticsC/list',
             name: 'shortageStatisticsC',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '缺货统计(按客户)',
               icon: 'file-done',
@@ -337,7 +359,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/shortageStatisticsP',
             redirect: '/salesManagement/shortageStatisticsP/list',
             name: 'shortageStatisticsP',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '缺货统计(按产品)',
               icon: 'file-protect',
@@ -362,7 +384,7 @@ export const asyncRouterMap = [
             path: '/salesManagement/priceInquiry',
             redirect: '/salesManagement/priceInquiry/list',
             name: 'priceInquiry',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '价格查询',
               icon: 'file-protect',
@@ -400,7 +422,7 @@ export const asyncRouterMap = [
             path: '/purchasingManagement/bulkWarehousingOrder',
             redirect: '/purchasingManagement/bulkWarehousingOrder/list',
             name: 'bulkWarehousingOrder',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '散件入库',
               icon: 'gold',
@@ -454,48 +476,11 @@ export const asyncRouterMap = [
           permission: 'M_financialManagement'
         },
         children: [
-          // 二期
-          // {
-          //   path: '/financialManagement/inventoryReview',
-          //   redirect: '/financialManagement/inventoryReview/list',
-          //   name: 'inventoryReview',
-          //   component: RouteView,
-          //   meta: {
-          //     title: '盘点审核',
-          //     icon: 'laptop'
-          //     // permission: 'M_goodsManage_list'
-          //   },
-          //   hideChildrenInMenu: true,
-          //   children: [
-          //     {
-          //       path: 'list',
-          //       name: 'inventoryReviewList',
-          //       component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/inventoryReview/list.vue'),
-          //       meta: {
-          //         title: '盘点审核列表',
-          //         icon: 'laptop',
-          //         hidden: true
-          //         // permission: 'M_goodsManage_list'
-          //       }
-          //     },
-          //     {
-          //       path: 'detail/:id',
-          //       name: 'inventoryReviewDetail',
-          //       component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/inventoryReview/detail.vue'),
-          //       meta: {
-          //         title: '盘点审核详情',
-          //         icon: 'laptop',
-          //         hidden: true
-          //         // permission: 'B_goodsManage_edit'
-          //       }
-          //     }
-          //   ]
-          // },
           {
             path: '/financialManagement/warehousingConfirmation',
             redirect: '/financialManagement/warehousingConfirmation/list',
             name: 'warehousingConfirmation',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '入库确认',
               icon: 'vertical-align-bottom',
@@ -520,7 +505,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/returnConfirmation',
             redirect: '/financialManagement/returnConfirmation/list',
             name: 'returnConfirmation',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '退货确认',
               icon: 'vertical-align-top',
@@ -545,7 +530,7 @@ export const asyncRouterMap = [
             path: '/financialManagement/financialCollection',
             redirect: '/financialManagement/financialCollection/list',
             name: 'financialCollection',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '财务收款',
               icon: 'pay-circle',
@@ -583,7 +568,7 @@ export const asyncRouterMap = [
             path: '/inventoryManagement/inventoryQuery',
             redirect: '/inventoryManagement/inventoryQuery/list',
             name: 'inventoryQuery',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '库存查询',
               icon: 'monitor',
@@ -629,7 +614,7 @@ export const asyncRouterMap = [
             path: '/inventoryManagement/intelligentReplenishment',
             redirect: '/inventoryManagement/intelligentReplenishment/list',
             name: 'intelligentReplenishment',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '智能补货',
               icon: 'monitor',
@@ -710,98 +695,6 @@ export const asyncRouterMap = [
               }
             ]
           }
-          // 二期
-          // {
-          //   path: '/inventoryManagement/inventoryChecking',
-          //   redirect: '/inventoryManagement/inventoryChecking/list',
-          //   name: 'inventoryChecking',
-          //   component: RouteView,
-          //   meta: {
-          //     title: '库存盘点',
-          //     icon: 'reconciliation'
-          //     // permission: 'M_goodsManage_list'
-          //   },
-          //   hideChildrenInMenu: true,
-          //   children: [
-          //     {
-          //       path: 'list',
-          //       name: 'inventoryCheckingList',
-          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryChecking/list.vue'),
-          //       meta: {
-          //         title: '库存盘点列表',
-          //         icon: 'reconciliation',
-          //         hidden: true
-          //         // permission: 'M_goodsManage_list'
-          //       }
-          //     },
-          //     {
-          //       path: 'overall/:id',
-          //       name: 'inventoryCheckingOverall',
-          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryChecking/overall.vue'),
-          //       meta: {
-          //         title: '盘点人盘点【全盘】',
-          //         icon: 'reconciliation',
-          //         hidden: true
-          //         // permission: 'B_goodsManage_edit'
-          //       }
-          //     },
-          //     {
-          //       path: 'selfDisk/:id',
-          //       name: 'inventoryCheckingSelfDisk',
-          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryChecking/selfDisk.vue'),
-          //       meta: {
-          //         title: '盘点人盘点【自选盘点】',
-          //         icon: 'reconciliation',
-          //         hidden: true
-          //         // permission: 'B_goodsManage_edit'
-          //       }
-          //     },
-          //     {
-          //       path: 'detail/:id',
-          //       name: 'inventoryCheckingDetail',
-          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryChecking/detail.vue'),
-          //       meta: {
-          //         title: '库存盘点详情',
-          //         icon: 'reconciliation',
-          //         hidden: true
-          //         // permission: 'B_goodsManage_edit'
-          //       }
-          //     },
-          //     {
-          //       path: 'makeInventory/:id',
-          //       name: 'inventoryCheckingMakeInventory',
-          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryChecking/makeInventory.vue'),
-          //       meta: {
-          //         title: '待盘点【盘点】',
-          //         icon: 'reconciliation',
-          //         hidden: true
-          //         // permission: 'B_goodsManage_edit'
-          //       }
-          //     },
-          //     {
-          //       path: 'makeInventory/detail/:id', /* 待盘点【盘点】详情  */
-          //       name: 'inventoryCheckingMakeInventoryDetail',
-          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryChecking/makeInventoryDetail.vue'),
-          //       meta: {
-          //         title: '库存盘点详情',
-          //         icon: 'reconciliation',
-          //         hidden: true
-          //         // permission: 'B_goodsManage_edit'
-          //       }
-          //     },
-          //     {
-          //       path: 'financialAudit/detail/:id', /* 财务审核详情  */
-          //       name: 'inventoryCheckingFinancialAuditDetail',
-          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryChecking/financialAuditDetail.vue'),
-          //       meta: {
-          //         title: '库存盘点详情',
-          //         icon: 'reconciliation',
-          //         hidden: true
-          //         // permission: 'B_goodsManage_edit'
-          //       }
-          //     }
-          //   ]
-          // }
         ]
       },
       // 调拨管理
@@ -819,7 +712,7 @@ export const asyncRouterMap = [
             path: '/allocationManagement/transferOut',
             redirect: '/allocationManagement/transferOut/list',
             name: 'transferOut',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '调拨列表',
               icon: 'pull-request',
@@ -839,7 +732,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'add/:sn/:name/:dealerLevel',
+                path: 'add/:sn/:dealerLevel',
                 name: 'transferOutAdd',
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/transferOut/edit.vue'),
                 meta: {
@@ -850,7 +743,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'edit/:sn/:name/:dealerLevel',
+                path: 'edit/:sn/:dealerLevel',
                 name: 'transferOutEdit',
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/transferOut/edit.vue'),
                 meta: {
@@ -890,7 +783,7 @@ export const asyncRouterMap = [
             path: '/reportData/salesDetails',
             redirect: '/reportData/salesDetails/list',
             name: 'salesDetails',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '销售明细(开单统计)',
               icon: 'profile',
@@ -915,7 +808,7 @@ export const asyncRouterMap = [
             path: '/reportData/allocationOrderTotal',
             redirect: '/reportData/allocationOrderTotal/list',
             name: 'allocationOrderTotal',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '调拨开单统计',
               icon: 'profile',
@@ -940,7 +833,7 @@ export const asyncRouterMap = [
             path: '/reportData/allocationDetails',
             redirect: '/reportData/allocationDetails/list',
             name: 'allocationDetails',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '调拨明细',
               icon: 'profile',
@@ -965,7 +858,7 @@ export const asyncRouterMap = [
             path: '/reportData/salesReturnsReport',
             redirect: '/reportData/salesReturnsReport/list',
             name: 'salesReturnsReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '销售退货单报表',
               icon: 'profile',
@@ -990,7 +883,7 @@ export const asyncRouterMap = [
             path: '/reportData/salesReturnDetailReport',
             redirect: '/reportData/salesReturnDetailReport/list',
             name: 'salesReturnDetailReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '销售退货明细报表',
               icon: 'profile',
@@ -1014,7 +907,7 @@ export const asyncRouterMap = [
             path: '/reportData/salesSlipReport',
             redirect: '/reportData/salesSlipReport/list',
             name: 'salesSlipReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '开单销售单报表',
               icon: 'profile',
@@ -1038,7 +931,7 @@ export const asyncRouterMap = [
             path: '/reportData/returnSlipReport',
             redirect: '/reportData/returnSlipReport/list',
             name: 'returnSlipReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '开单退货单报表',
               icon: 'profile',
@@ -1062,7 +955,7 @@ export const asyncRouterMap = [
             path: '/reportData/salesAmountReport',
             redirect: '/reportData/salesAmountReport/list',
             name: 'salesAmountReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '开单销售报表',
               icon: 'profile',
@@ -1086,7 +979,7 @@ export const asyncRouterMap = [
             path: '/reportData/actualSalesReport',
             redirect: '/reportData/actualSalesReport/list',
             name: 'actualSalesReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '实售销售报表',
               icon: 'profile',
@@ -1111,7 +1004,7 @@ export const asyncRouterMap = [
             path: '/reportData/billingReturnReport',
             redirect: '/reportData/billingReturnReport/list',
             name: 'billingReturnReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '开单退货报表',
               icon: 'profile',
@@ -1136,7 +1029,7 @@ export const asyncRouterMap = [
             path: '/reportData/salesReturnReport',
             redirect: '/reportData/salesReturnReport/list',
             name: 'salesReturnReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '实售退货报表',
               icon: 'profile',
@@ -1161,7 +1054,7 @@ export const asyncRouterMap = [
             path: '/reportData/hPriceDifferenceDetailReport',
             redirect: '/reportData/hPriceDifferenceDetailReport/list',
             name: 'hPriceDifferenceDetailReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '总部差价明细报表',
               icon: 'profile',
@@ -1186,7 +1079,7 @@ export const asyncRouterMap = [
             path: '/reportData/priceDifferenceDetailReport',
             redirect: '/reportData/priceDifferenceDetailReport/list',
             name: 'priceDifferenceDetailReport',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '差价明细报表',
               icon: 'profile',
@@ -1211,7 +1104,7 @@ export const asyncRouterMap = [
             path: '/reportData/provinceTypeSalesDetails',
             redirect: '/reportData/provinceTypeSalesDetails/list',
             name: 'provinceTypeSalesDetails',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '全国各省品类实际销售明细',
               icon: 'profile',
@@ -1236,7 +1129,7 @@ export const asyncRouterMap = [
             path: '/reportData/districtTypeSalesDetails',
             redirect: '/reportData/districtTypeSalesDetails/list',
             name: 'districtTypeSalesDetails',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '全国各区品类实际销售明细',
               icon: 'profile',
@@ -1261,7 +1154,7 @@ export const asyncRouterMap = [
             path: '/reportData/regionalPromotionCostStatistics',
             redirect: '/reportData/regionalPromotionCostStatistics/list',
             name: 'regionalPromotionCostStatistics',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '区域促销费用统计',
               icon: 'profile',
@@ -1286,7 +1179,7 @@ export const asyncRouterMap = [
             path: '/reportData/nationalCustomerCostStatistics',
             redirect: '/reportData/nationalCustomerCostStatistics/list',
             name: 'nationalCustomerCostStatistics',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '全国客户费用统计',
               icon: 'profile',
@@ -1324,7 +1217,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productInfo',
             redirect: '/productManagement/productInfo/list',
             name: 'productInfo',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '产品列表',
               icon: 'gold',
@@ -1371,7 +1264,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productPricing',
             redirect: '/productManagement/productPricing/list',
             name: 'productPricing',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '产品定价',
               icon: 'transaction',
@@ -1396,7 +1289,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productLaunchAudit',
             redirect: '/productManagement/productLaunchAudit/list',
             name: 'productLaunchAudit',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '产品上线审核',
               icon: 'rise',
@@ -1421,7 +1314,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productOfflineAudit',
             redirect: '/productManagement/productOfflineAudit/list',
             name: 'productOfflineAudit',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '产品下线审核',
               icon: 'fall',
@@ -1446,7 +1339,7 @@ export const asyncRouterMap = [
             path: '/productManagement/priceChangeRecord',
             redirect: '/productManagement/priceChangeRecord/list',
             name: 'priceChangeRecord',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '价格变更记录',
               icon: 'profile',
@@ -1471,7 +1364,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productUniversal',
             redirect: '/productManagement/productUniversal/list',
             name: 'productUniversal',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '通用产品管理',
               icon: 'deployment-unit',
@@ -1496,7 +1389,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productLevel',
             redirect: '/productManagement/productLevel/list',
             name: 'productLevel',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '产品级别管理',
               icon: 'fund',
@@ -1521,7 +1414,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productBrand',
             redirect: '/productManagement/productBrand/list',
             name: 'productBrand',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '产品品牌管理',
               icon: 'file-ppt',
@@ -1546,7 +1439,7 @@ export const asyncRouterMap = [
             path: '/productManagement/productCategory',
             redirect: '/productManagement/productCategory/list',
             name: 'productCategory',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '产品分类管理',
               icon: 'radar-chart',
@@ -1567,32 +1460,6 @@ export const asyncRouterMap = [
               }
             ]
           }
-          // 二期
-          // {
-          //   path: '/productManagement/purchaseBaseLimit',
-          //   redirect: '/productManagement/purchaseBaseLimit/list',
-          //   name: 'purchaseBaseLimit',
-          //   component: RouteView,
-          //   meta: {
-          //     title: '产品采购基数限制',
-          //     icon: 'sliders'
-          //     // permission: 'M_goodsManage_list'
-          //   },
-          //   hideChildrenInMenu: true,
-          //   children: [
-          //     {
-          //       path: 'list',
-          //       name: 'purchaseBaseLimitList',
-          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/purchaseBaseLimit/list.vue'),
-          //       meta: {
-          //         title: '采购基数限制列表',
-          //         icon: 'sliders',
-          //         hidden: true
-          //         // permission: 'M_goodsManage_list'
-          //       }
-          //     }
-          //   ]
-          // }
         ]
       },
       // 经销商管理
@@ -1610,7 +1477,7 @@ export const asyncRouterMap = [
             path: '/dealerManagement/merchantInfoManagement',
             redirect: '/dealerManagement/merchantInfoManagement/list',
             name: 'merchantInfoManagement',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '经销商资料管理',
               icon: 'file-text',
@@ -1668,7 +1535,7 @@ export const asyncRouterMap = [
             path: '/dealerManagement/dealerAccountManagement',
             redirect: '/dealerManagement/dealerAccountManagement/list',
             name: 'dealerAccountManagement',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '经销商账号管理',
               icon: 'team',
@@ -1693,7 +1560,7 @@ export const asyncRouterMap = [
             path: '/dealerManagement/dealerRelationshipBinding',
             redirect: '/dealerManagement/dealerRelationshipBinding/list',
             name: 'dealerRelationshipBinding',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '经销商关系绑定',
               icon: 'share-alt',
@@ -1718,7 +1585,7 @@ export const asyncRouterMap = [
             path: '/dealerManagement/rebateSettings',
             redirect: '/dealerManagement/rebateSettings/list',
             name: 'rebateSettings',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '差价归属设置',
               icon: 'stock',
@@ -1743,7 +1610,7 @@ export const asyncRouterMap = [
             path: '/dealerManagement/marketingDivisionSet',
             redirect: '/dealerManagement/marketingDivisionSet/list',
             name: 'marketingDivisionSet',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '营销分区设置',
               icon: 'setting',
@@ -1781,7 +1648,7 @@ export const asyncRouterMap = [
             path: '/supplierManagement/supplierInfo',
             redirect: '/supplierManagement/supplierInfo/list',
             name: 'supplierInfo',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '供应商列表',
               icon: 'team',
@@ -1839,7 +1706,7 @@ export const asyncRouterMap = [
             path: '/supplierManagement/associatedProductDetails',
             redirect: '/supplierManagement/associatedProductDetails/list',
             name: 'associatedProductDetails',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '关联产品明细表',
               icon: 'build',
@@ -1877,7 +1744,7 @@ export const asyncRouterMap = [
             path: '/promotionRulesManagement/promotionRules',
             redirect: '/promotionRulesManagement/promotionRules/list',
             name: 'promotionRules',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '促销规则管理',
               icon: 'thunderbolt',
@@ -1924,7 +1791,7 @@ export const asyncRouterMap = [
             path: '/promotionRulesManagement/orderStatistics',
             redirect: '/promotionRulesManagement/orderStatistics/list',
             name: 'orderStatistics',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '促销订单统计',
               icon: 'contacts',
@@ -1949,7 +1816,7 @@ export const asyncRouterMap = [
             path: '/promotionRulesManagement/productStatistics',
             redirect: '/promotionRulesManagement/productStatistics/list',
             name: 'productStatistics',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '促销产品统计',
               icon: 'file-ppt',
@@ -1987,7 +1854,7 @@ export const asyncRouterMap = [
             path: '/basicData/warehouse',
             redirect: '/basicData/warehouse/list',
             name: 'warehouse',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '仓库管理',
               icon: 'deployment-unit',
@@ -2023,7 +1890,7 @@ export const asyncRouterMap = [
             path: '/basicData/transferTypeManagement',
             redirect: '/basicData/transferTypeManagement/list',
             name: 'transferTypeManagement',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '调拨类型管理',
               icon: 'interaction',
@@ -2136,7 +2003,7 @@ export const asyncRouterMap = [
             path: '/setting/noticeManagement',
             redirect: '/setting/noticeManagement/list',
             name: 'noticeManagement',
-            component: RouteView,
+            component: BlankLayout,
             meta: {
               title: '公告管理',
               icon: 'sketch',

+ 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: '31px 20px 0', paddingTop: multiTab&&fixedHeader ? '61px' : (!multiTab&&fixedHeader?'45px':'0') }">
         <transition name="page-transition">
-          <route-view/>
+          <route-view v-if="isRouterAlive"/>
         </transition>
       </a-layout-content>
 
@@ -73,6 +73,11 @@ import { asyncRouterMap } from '@/config/router.config'
 export default {
   name: 'BasicLayout',
   mixins: [mixin, mixinDevice],
+  provide () {
+    return {
+      reloadView: this.reloadView
+    }
+  },
   components: {
     RouteView,
     SideMenu,
@@ -84,7 +89,8 @@ export default {
     return {
       production: config.production,
       collapsed: false,
-      menus: []
+      menus: [],
+      isRouterAlive: true
     }
   },
   computed: {
@@ -152,6 +158,12 @@ export default {
     },
     drawerClose () {
       this.collapsed = false
+    },
+    reloadView () {
+      this.isRouterAlive = false
+      this.$nextTick(() => {
+        this.isRouterAlive = true
+      })
     }
   }
 }

+ 3 - 0
src/layouts/PageView.vue

@@ -131,6 +131,9 @@ export default {
     margin: 12px 12px 0;
     .page-header-index-wide{
       height: 100%;
+      >div{
+        height: 100%;
+      }
     }
     .link {
       margin-top: 16px;

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

+ 3 - 1
src/store/getters.js

@@ -11,7 +11,9 @@ const getters = {
   userInfo: state => state.user.info,
   addRouters: state => state.permission.addRouters,
   multiTab: state => state.app.multiTab,
-  lang: state => state.i18n.lang
+  lang: state => state.i18n.lang,
+  isNewTab: state => state.app.isNewTab,
+  isNewSubTab: state => state.app.isNewSubTab
 }
 
 export default getters

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

@@ -24,7 +24,9 @@ const app = {
     autoHideHeader: false,
     color: null,
     weak: false,
-    multiTab: true
+    multiTab: true,
+    isNewTab: false,
+    isNewSubTab: false
   },
   mutations: {
     SET_SIDEBAR_TYPE: (state, type) => {

+ 51 - 2
src/views/Home.vue

@@ -15,19 +15,36 @@
       v-model="openResetPwd">
       <ResetPwd />
     </a-modal>
+    <!-- 新产品上线提醒 -->
+    <a-modal
+      class="newProductTips"
+      :title="'新产品'+(onlineFalg=='1'?'上':'下')+'线提醒'"
+      :width="800"
+      centered
+      :footer="null"
+      :maskClosable="false"
+      :destroyOnClose="true"
+      @cancel="cancelProductTips"
+      v-model="openNewProduct">
+      <newProduct :onlineFalg="onlineFalg" @seeMore="seeMore"></newProduct>
+    </a-modal>
   </div>
 </template>
 
 <script>
 import { mapGetters } from 'vuex'
 import ResetPwd from '@/views/user/ResetPwd.vue'
+import newProduct from '@/views/productManagement/newProduct/modal.vue'
+import { queryNewProductPage } from '@/api/product'
 export default {
   name: 'Home',
-  components: { ResetPwd },
+  components: { ResetPwd, newProduct },
   data () {
     return {
       message: '欢迎登录' + process.env.VUE_APP_PRO_NAME,
-      openResetPwd: false //  重置密码是否显示
+      openResetPwd: false, //  重置密码是否显示
+      openNewProduct: false,
+      onlineFalg: '1' // 上下线标识  1为上线,0为下线
     }
   },
   computed: {
@@ -36,12 +53,44 @@ export default {
   created () {
   },
   methods: {
+    hasNewProduct () {
+      queryNewProductPage({ pageNo: 1, pageSize: 20, onlineFalg: this.onlineFalg }).then(res => {
+        if (res.status == 200) {
+          if (res.data.count > 0) {
+            this.openNewProduct = true
+          } else {
+            if (this.onlineFalg == '1') {
+              this.onlineFalg = '0'
+              this.hasNewProduct()
+            }
+          }
+        }
+      })
+    },
+    // 查看更多产品
+    seeMore () {
+      this.openNewProduct = false
+      this.$router.push({ name: 'newProduct', params: { onlineFalg: this.onlineFalg } })
+    },
+    // 关闭弹框
+    cancelProductTips () {
+      const _this = this
+      this.openNewProduct = false
+      if (this.onlineFalg == '1') {
+        this.onlineFalg = '0'
+        setTimeout(() => { _this.hasNewProduct() }, 100)
+      }
+    }
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
       //  判断登录用户是否重置过密码(首次登陆需强制重置密码)
       if (vm.mustChangePwd == 0) {
         vm.openResetPwd = false
+        if (from.name == 'login') {
+          // 判断是否有新产品上线
+          vm.hasNewProduct()
+        }
       } else {
         vm.openResetPwd = true
       }

+ 54 - 19
src/views/allocationManagement/transferOut/detail.vue

@@ -15,8 +15,20 @@
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template v-if="$hasPermissions('B_transferOut_print')" slot="extra">
-          <a-button key="2" id="allocateBillDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
-          <a-button key="1" type="primary" id="allocateBillDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+          <a-button
+            key="2"
+            type="primary"
+            class="button-error"
+            id="allocateBillDetail-db-print-btn"
+            :disabled="localDataSource.length==0"
+            @click="handlePrint('dbPrint')">调拨打印</a-button>
+          <a-button
+            key="1"
+            type="primary"
+            class="button-info"
+            id="allocateBillDetail-dbfl-print-btn"
+            :disabled="localDataSource.length==0"
+            @click="handlePrint('dbflPrint')">调拨分类打印</a-button>
         </template>
       </a-page-header>
       <a-card size="small" :bordered="false" class="allocateBillDetail-cont">
@@ -50,10 +62,13 @@
           :columns="columns"
           :data="loadData"
           :scroll="{ x: 1335 }"
+          :defaultLoadData="false"
           bordered>
         </s-table>
       </a-card>
     </a-spin>
+    <!-- 打印导出 -->
+    <print-modal :openModal="openModal" :itemData="basicInfoData" :nowType="nowType" @ok="handleOk" @close="openModal=false" />
     <!-- 打印 -->
     <div id="print"></div>
   </div>
@@ -61,9 +76,10 @@
 
 <script>
 import { STable, VSelect } from '@/components'
+import printModal from './printModal.vue'
 import { allocateBillDetailList, allocateBillDetail, allocateBillDetailCount, allocateBillDetailPrint } from '@/api/allocateBill'
 export default {
-  components: { STable, VSelect },
+  components: { STable, VSelect, printModal },
   props: {
     outBizSn: { //  有值则为弹框,无值则为页面
       type: [Number, String],
@@ -75,6 +91,7 @@ export default {
       spinning: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
+        this.spinning = true
         return allocateBillDetailList(Object.assign(parameter, { allocateSn: this.outBizSn || this.$route.params.sn })).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -82,17 +99,20 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.localDataSource = data.list
+          this.spinning = false
           return data
         })
       },
       basicInfoData: null, //  基本信息
       productTotal: null, //  合计
-      localDataSource: []
+      localDataSource: [],
+      openModal: false,
+      nowType: null
     }
   },
   computed: {
     isEdit () {
-      return this.basicInfoData && ((this.basicInfoData.state == 'WAIT_SUBMIT') || (this.basicInfoData.state == 'WAIT_AUDIT') || (this.basicInfoData.state == 'AUDIT_REJECT')) && $hasPermissions('M_transferOut_edit')
+      return this.basicInfoData && ((this.basicInfoData.state == 'WAIT_SUBMIT') || (this.basicInfoData.state == 'WAIT_AUDIT') || (this.basicInfoData.state == 'AUDIT_REJECT')) && this.$hasPermissions('M_transferOut_edit')
     },
     columns () {
       const arr = [
@@ -139,13 +159,19 @@ export default {
     },
     //  编辑
     handleEdit () {
-      this.$router.push({ path: `/allocationManagement/transferOut/edit/${this.basicInfoData.allocateSn}/${this.basicInfoData.targetName}/${this.basicInfoData.dealerLevel}` })
+      this.$router.push({ path: `/allocationManagement/transferOut/edit/${this.basicInfoData.allocateSn}/${this.basicInfoData.targetType}` })
     },
     // 打印预览/快捷打印
     handlePrint (type) {
+      this.nowType = type
+      this.openModal = true
+    },
+    handleOk (objs) {
       const _this = this
+      const params = JSON.parse(JSON.stringify(objs))
+      delete params.type
       _this.spinning = true
-      allocateBillDetailPrint({ sn: this.outBizSn || this.$route.params.sn, isPreview: type == 'preview' ? 1 : 0 }).then(res => {
+      allocateBillDetailPrint(params).then(res => {
         _this.spinning = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
@@ -158,7 +184,7 @@ export default {
           })
           reader.readAsText(res)
         } else {
-          this.print(res, type)
+          this.print(res, objs.isPreview)
         }
       })
     },
@@ -167,24 +193,33 @@ export default {
         return
       }
       const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
-      document.getElementById('print').innerHTML = '<iframe id="printf" name="printf" src="' + url + '" hidden></iframe>'
-      if (type == 'preview') { //  预览
+      document.getElementById('print').innerHTML = '<iframe id="printftod" name="printftod" src="' + url + '" hidden></iframe>'
+      if (type == '1') { //  预览
         window.open(url)
-      } else if (type == 'print') { //  打印
-        window.frames['printf'].focus()
-        window.frames['printf'].print()
+      } else if (type == '0') { //  打印
+        window.frames['printftod'].focus()
+        window.frames['printftod'].print()
       }
+    },
+    pageInit () {
+      this.$refs.table.refresh(true)
+      this.getDetail()
+      this.getDetailCount()
     }
   },
   mounted () {
-    this.getDetail()
-    this.getDetailCount()
+    if (!this.$store.state.app.isNewTab || this.outBizSn) { // 页签刷新 或 为弹框时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      // vm.getDetail()
-      // vm.getDetailCount()
-    })
+    next(vm => {})
   }
 }
 </script>

+ 131 - 36
src/views/allocationManagement/transferOut/edit.vue

@@ -5,18 +5,44 @@
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="allocateBillEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <span style="margin: 0 15px;color: #666;">调往对象:{{ $route.params.name || '--' }}</span>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template v-if="$hasPermissions('B_transferOut_print')" slot="extra">
-          <a-button key="2" id="allocateBillEdit-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
-          <a-button key="1" type="primary" id="allocateBillEdit-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+          <a-button
+            key="2"
+            type="primary"
+            class="button-error"
+            id="allocateBillEdit-db-print-btn"
+            :disabled="localDataSource.length==0"
+            @click="handlePrint('dbPrint')">调拨打印</a-button>
+          <a-button
+            key="1"
+            type="primary"
+            class="button-info"
+            id="allocateBillEdit-dbfl-print-btn"
+            :disabled="localDataSource.length==0"
+            @click="handlePrint('dbflPrint')">调拨分类打印</a-button>
         </template>
       </a-page-header>
+      <a-card size="small" :bordered="false" v-if="basicInfoData" class="allocateBillEdit-cont">
+        <a-collapse :activeKey="['0']">
+          <a-collapse-panel key="0" header="基础信息">
+            <a-descriptions :column="3">
+              <a-descriptions-item label="调往对象">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调拨单号">{{ (basicInfoData&&basicInfoData.allocateNo) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调拨类型">
+                <AllocateType id="allocateEdit-allocateTypeSn" style="width: 200px;" @change="changeAllocateType" v-model="basicInfoData.allocateTypeSn"></AllocateType>
+              </a-descriptions-item>
+              <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
       <!-- 选择产品 -->
       <a-card size="small" :bordered="false" class="allocateBillEdit-cont">
         <a-collapse :activeKey="['1']">
-          <a-collapse-panel key="1" header="选择产品">
+          <a-collapse-panel key="1" forceRender header="选择产品">
             <!-- 筛选条件 -->
             <div class="table-page-search-wrapper">
               <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
@@ -48,14 +74,17 @@
               class="sTable"
               ref="table"
               size="small"
+              index="0"
+              tableId="table1"
               :rowKey="(record) => record.stockSn"
               :columns="columns"
               :customRow="handleClickRow"
               :data="loadData"
               :scroll="{ x: 990, y: 300 }"
+              :defaultLoadData="false"
               bordered>
               <!-- 操作 -->
-              <template slot="action" slot-scope="text, record">
+              <template slot="action1" slot-scope="text, record">
                 <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="allocateBillEdit-add-btn">添加</a-button>
               </template>
             </s-table>
@@ -64,8 +93,8 @@
       </a-card>
       <!-- 已选产品 -->
       <a-card size="small" :bordered="false" class="allocateBillEdit-cont">
-        <a-collapse :activeKey="['1']">
-          <a-collapse-panel key="1" header="已选产品">
+        <a-collapse :activeKey="['2']">
+          <a-collapse-panel key="2" forceRender header="已选产品">
             <!-- 总计 -->
             <a-alert type="info" style="margin-bottom:10px">
               <div slot="message">
@@ -108,10 +137,13 @@
               class="sTable"
               ref="chooseTable"
               size="small"
+              index="1"
+              tableId="table2"
               :rowKey="(record) => record.id"
               :columns="chooseColumns"
               :data="chooseLoadData"
               :scroll="{ x: 1160, y: 300 }"
+              :defaultLoadData="false"
               bordered>
               <!-- 售价 -->
               <template slot="price" slot-scope="text, record, index">
@@ -167,7 +199,9 @@
         style="padding: 0 60px;">提交</a-button>
     </div>
     <!-- 导入产品 -->
-    <importGuideModal :openModal="openGuideModal" :params="{allocateSn: $route.params.sn}" @close="openGuideModal=false" @ok="hanldeOk" />
+    <importGuideModal :openModal="openGuideModal" :params="{allocateSn: $route.params.sn}" @close="openGuideModal=false" @ok="handleGuideOk" />
+    <!-- 打印导出 -->
+    <print-modal :openModal="openModal" :itemData="basicInfoData" :nowType="nowType" @ok="handleOk" @close="openModal=false" />
     <!-- 打印 -->
     <div id="print"></div>
   </div>
@@ -176,11 +210,14 @@
 <script>
 import { STable, VSelect } from '@/components'
 import ImportGuideModal from './importGuideModal.vue'
+import printModal from './printModal.vue'
 import { queryStockProductPage } from '@/api/stock'
 import { productPriceInfo } from '@/api/product'
-import { allocateBillDetailList, allocateBillDetailCount, allocateBillDetailSave, allocateBillSubmit, allocateBillDetailDel, allocateBillDetailDelAll, allocateBillDetailPrint, allocateBillBatchInsert } from '@/api/allocateBill'
+import AllocateType from '@/views/common/allocateType.js'
+import { allocateBillSave, allocateBillDetailList, allocateBillDetailCount, allocateBillDetail, allocateBillDetailSave, allocateBillSubmit, allocateBillDetailDel, allocateBillDetailDelAll, allocateBillDetailPrint, allocateBillBatchInsert } from '@/api/allocateBill'
+
 export default {
-  components: { STable, VSelect, ImportGuideModal },
+  components: { STable, VSelect, ImportGuideModal, AllocateType, printModal },
   data () {
     return {
       spinning: false,
@@ -222,8 +259,7 @@ export default {
         this.chooseDisabled = true
         const params = Object.assign(parameter, this.chooseQueryParam, { allocateSn: this.$route.params.sn })
         return allocateBillDetailList(params).then(res => {
-          //  合计
-          this.getDetailCount(params)
+          this.getDetailCount()
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
@@ -237,7 +273,10 @@ export default {
         })
       },
       productTotal: null, //  合计
-      openGuideModal: false //  导入产品引导
+      basicInfoData: null, // 基本信息
+      openGuideModal: false, //  导入产品引导
+      openModal: false,
+      nowType: null
     }
   },
   computed: {
@@ -250,7 +289,7 @@ export default {
         { title: '售价', dataIndex: 'productPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '库存数量', dataIndex: 'currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'productUnit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
+        { title: '操作', scopedSlots: { customRender: 'action1' }, width: 80, align: 'center', fixed: 'right' }
       ]
       if (this.$hasPermissions('B_isShowCost')) {
         arr.splice(4, 0, { title: '成本价', dataIndex: 'lastStockCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
@@ -276,6 +315,33 @@ export default {
     }
   },
   methods: {
+    // 修改调拨类型
+    changeAllocateType (val) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确定要更改调拨类型吗?',
+        centered: true,
+        onOk () {
+          const params = _this.basicInfoData
+          allocateBillSave({
+            allocateSn: params.allocateSn,
+            targetType: params.targetType,
+            targetSn: params.targetSn,
+            targetName: params.targetName,
+            allocateTypeSn: params.allocateTypeSn,
+            remark: params.remark
+          }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.getDetail()
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
     //  重置
     resetSearchForm () {
       this.queryParam.productCode = ''
@@ -294,7 +360,7 @@ export default {
       }
     },
     // 导入产品
-    hanldeOk (obj) {
+    handleGuideOk (obj) {
       allocateBillBatchInsert(obj).then(res => {
         if (res.status == 200) {
           this.$refs.chooseTable.refresh(true)
@@ -352,27 +418,17 @@ export default {
         centered: true,
         onOk () {
           if (isAll) { //  整单删除
-            _this.spinning = true
             allocateBillDetailDelAll({ sn: _this.$route.params.sn }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.$refs.table.refresh()
-                _this.$refs.chooseTable.refresh()
-                _this.spinning = false
-              } else {
-                _this.spinning = false
+                _this.refashPage()
               }
             })
           } else { //  单个删除
-            _this.spinning = true
             allocateBillDetailDel({ id: row.id }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.$refs.table.refresh()
-                _this.$refs.chooseTable.refresh()
-                _this.spinning = false
-              } else {
-                _this.spinning = false
+                _this.refashPage()
               }
             })
           }
@@ -395,9 +451,21 @@ export default {
         }
       })
     },
+    // 基本信息
+    getDetail () {
+      this.spinning = true
+      allocateBillDetail({ sn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.basicInfoData = res.data
+        } else {
+          this.basicInfoData = null
+        }
+        this.spinning = false
+      })
+    },
     // 合计
-    getDetailCount (params) {
-      allocateBillDetailCount(params).then(res => {
+    getDetailCount () {
+      allocateBillDetailCount({ allocateSn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.productTotal = res.data
         } else {
@@ -437,9 +505,15 @@ export default {
     },
     // 打印预览/快捷打印
     handlePrint (type) {
+      this.nowType = type
+      this.openModal = true
+    },
+    handleOk (objs) {
       const _this = this
+      const params = JSON.parse(JSON.stringify(objs))
+      delete params.type
       _this.spinning = true
-      allocateBillDetailPrint({ sn: this.$route.params.sn, isPreview: type == 'preview' ? 1 : 0 }).then(res => {
+      allocateBillDetailPrint(params).then(res => {
         _this.spinning = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
@@ -452,7 +526,7 @@ export default {
           })
           reader.readAsText(res)
         } else {
-          this.print(res, type)
+          this.print(res, objs.isPreview)
         }
       })
     },
@@ -461,13 +535,34 @@ export default {
         return
       }
       const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
-      document.getElementById('print').innerHTML = '<iframe id="printf" name="printf" src="' + url + '" hidden></iframe>'
-      if (type == 'preview') { //  预览
+      document.getElementById('print').innerHTML = '<iframe id="printftoe" name="printftoe" src="' + url + '" hidden></iframe>'
+      if (type == '1') { //  预览
         window.open(url)
-      } else if (type == 'print') { //  打印
-        window.frames['printf'].focus()
-        window.frames['printf'].print()
+      } else if (type == '0') { //  打印
+        window.frames['printftoe'].focus()
+        window.frames['printftoe'].print()
       }
+    },
+    // 刷新当前页面
+    refashPage () {
+      this.$refs.table.refresh()
+      this.$refs.chooseTable.refresh()
+    },
+    pageInit () {
+      this.getDetail()
+      this.resetSearchForm()
+      this.chooseResetSearchForm()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 26 - 27
src/views/allocationManagement/transferOut/list.vue

@@ -17,9 +17,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="调拨类型">
-                <a-select id="allocateBillList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择调拨类型" allowClear >
-                  <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
-                </a-select>
+                <AllocateType id="allocateBillList-allocateTypeSn" v-model="queryParam.allocateTypeSn"></AllocateType>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -73,6 +71,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
+        :defaultLoadData="false"
         :scroll="{ x: 1540, y: tableHeight }"
         bordered>
         <!-- 单号 -->
@@ -121,9 +120,9 @@ import basicInfoModal from './basicInfoModal.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import auditModal from '@/views/common/auditModal.vue'
 import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
-import { allocateTypeAllList } from '@/api/allocateType'
+import AllocateType from '@/views/common/allocateType.js'
 export default {
-  components: { STable, VSelect, basicInfoModal, rangeDate, auditModal },
+  components: { STable, VSelect, basicInfoModal, rangeDate, auditModal, AllocateType },
   data () {
     return {
       spinning: false,
@@ -161,7 +160,6 @@ export default {
       visibleAudit: false,
       auditInfo: null,
       spinningAudit: false,
-      allocateTypeList: [], //  调拨类型
       openModal: false //  新增编辑  弹框
     }
   },
@@ -207,7 +205,7 @@ export default {
     },
     //  基本信息  保存
     handleOk (data) {
-      this.$router.push({ path: `/allocationManagement/transferOut/add/${data.allocateSn}/${data.targetName}/${data.targetType}` })
+      this.$router.push({ path: `/allocationManagement/transferOut/add/${data.allocateSn}/${data.targetType}` })
     },
     //  删除
     handleDel (row) {
@@ -259,7 +257,7 @@ export default {
     },
     //  编辑
     handleEdit (row) {
-      this.$router.push({ path: `/allocationManagement/transferOut/edit/${row.allocateSn}/${row.targetName}/${row.dealerLevel}` })
+      this.$router.push({ path: `/allocationManagement/transferOut/edit/${row.allocateSn}/${row.dealerLevel}` })
     },
     //  导出
     handleExport () {
@@ -284,27 +282,18 @@ export default {
       document.body.appendChild(link)
       link.click()
     },
-    //  调拨类型
-    getAllocateTypeAllList () {
-      allocateTypeAllList().then(res => {
-        if (res.status == 200) {
-          this.allocateTypeList = res.data
-        } else {
-          this.allocateTypeList = []
-        }
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
       })
+      this.openModal = false
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 245
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -313,11 +302,21 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.openModal = false
-      vm.getAllocateTypeAllList()
-    })
+    next(vm => {})
   }
 }
 </script>

+ 167 - 0
src/views/allocationManagement/transferOut/printModal.vue

@@ -0,0 +1,167 @@
+<template>
+  <a-modal
+    centered
+    :footer="null"
+    :maskClosable="false"
+    class="allocateBill-print-type-modal"
+    :title="modalTit"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="600">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="allocateBill-print-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-form-model-item label="调拨单号">{{ itemData&&itemData.allocateNo || '--' }}</a-form-model-item>
+        <a-form-model-item label="客户名称">{{ itemData&&itemData.targetName || '--' }}</a-form-model-item>
+        <a-form-model-item label="产品分类" prop="id" v-if="nowType=='dbflPrint'">
+          <a-select id="allocateBill-print-form" v-model="form.id" placeholder="请选择产品分类">
+            <a-select-option v-for="item in typeList" :value="item.id" :key="item.id">
+              <span v-if="item.id != 'all'">{{ item.productBrandName }} - {{ item.productTypeName3 }}</span>
+              <span v-else>全部</span>
+            </a-select-option>
+          </a-select>
+        </a-form-model-item>
+        <a-form-model-item label="产品价格" prop="priceType" v-if="nowType=='dbPrint'">
+          <a-radio-group v-model="form.priceType">
+            <a-radio value="ALLOCATE_BILL_PRICE">销售价</a-radio>
+            <a-radio value="ALLOCATE_BILL_COST">成本价</a-radio>
+            <a-radio value="ALLOCATE_BILL">不打印</a-radio>
+          </a-radio-group>
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="allocateBill-print-save" @click="handleSave('preview')">打印预览</a-button>
+        <a-button id="allocateBill-print-back" @click="handleSave('print')" style="margin-left: 15px;">快捷打印</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { allocateBillProductTypeList } from '@/api/allocateBill'
+export default {
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemData: {
+      type: Object,
+      default: () => {
+        return null
+      }
+    },
+    nowType: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      form: {
+        id: undefined,
+        priceType: undefined
+      },
+      rules: {
+        id: [{ required: true, message: '请选择产品分类', trigger: 'change' }],
+        priceType: [{ required: true, message: '请选择产品价格', trigger: 'change' }]
+      },
+      formItemLayout: {
+        labelCol: { span: 6 },
+        wrapperCol: { span: 18 }
+      },
+      spinning: false,
+      typeList: []
+    }
+  },
+  computed: {
+    modalTit () {
+      let title = ''
+      if (this.nowType == 'dbPrint') {
+        title = '调拨打印'
+      } else if (this.nowType == 'dbflPrint') {
+        title = '调拨分类打印'
+      }
+      return title
+    }
+  },
+  methods: {
+    // 确认
+    handleSave (type) {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          if (_this.nowType == 'dbflPrint') {
+            const item = _this.typeList.find(item => item.id == _this.form.id)
+            if (item) {
+              const obj = {
+                allocateSn: _this.itemData.allocateSn,
+                productBrandSn: item.productBrandSn,
+                productTypeSn3: item.productTypeSn3,
+                printType: 'ALLOCATE_BILL_TYPE',
+                isPreview: type == 'preview' ? 1 : 0
+              }
+              _this.$emit('ok', obj)
+            }
+          } else {
+            const obj = {
+              allocateSn: _this.itemData.allocateSn,
+              printType: _this.form.priceType,
+              isPreview: type == 'preview' ? 1 : 0
+            }
+            _this.$emit('ok', obj)
+          }
+          _this.isShow = false
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    // 获取该销售单产品二级分类
+    getTypeData () {
+      this.typeList = [{ id: 'all' }]
+      allocateBillProductTypeList({ sn: this.itemData.allocateSn || null }).then(res => {
+        if (res.status == 200) {
+          if (res.data && res.data.length > 0) {
+            this.typeList = [...this.typeList, ...res.data]
+          }
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.$refs.ruleForm.resetFields()
+      } else {
+        if (this.nowType == 'dbflPrint') {
+          this.getTypeData()
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .allocateBill-print-type-modal{
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 18 - 4
src/views/basicData/transferTypeManagement/list.vue

@@ -20,6 +20,7 @@
         :columns="columns"
         :scroll="{ y: tableHeight }"
         :data="loadData"
+        :defaultLoadData="false"
         bordered>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -115,16 +116,29 @@ export default {
       this.openModal = false
       this.$refs.table.refresh(true)
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 195
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.$refs.table.refresh(true)
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.$refs.table.refresh(true)
+      this.pageInit()
+    }
   }
 }
 </script>

+ 22 - 5
src/views/basicData/warehouse/list.vue

@@ -31,6 +31,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -151,16 +152,32 @@ export default {
     goStoringLocation (row) {
       this.$router.push({ path: `/basicData/storingLocation/${row.warehouseSn}`, query: { name: row.name } })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 245
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
   }
 }
 </script>

+ 21 - 4
src/views/basicData/warehouse/storingLocation/list.vue

@@ -39,6 +39,7 @@
           :columns="columns"
           :data="loadData"
           :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
           bordered>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
@@ -161,16 +162,32 @@ export default {
     handleBack () {
       this.$router.push({ path: '/basicData/warehouse/list', query: { closeLastOldTab: true } })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 285
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
   }
 }
 </script>

+ 68 - 0
src/views/common/allocateType.js

@@ -0,0 +1,68 @@
+import { allocateTypeAllList } from '@/api/allocateType'
+const AllocateType = {
+  template: `
+      <a-select
+        placeholder="请选择调拨类型"
+        :id="id"
+        allowClear
+        :value="defaultVal"
+        :showSearch="true"
+        @change="handleChange"
+        option-filter-prop="children"
+        :filter-option="filterOption">
+        <a-select-option v-for="item in list" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
+      </a-select>
+    `,
+  props: {
+    value: {
+      type: String,
+      defatut: ''
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    sysFlag: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      defaultVal: this.value,
+      list: []
+    };
+  },
+  mounted() {
+    this.getProductBrand()
+  },
+  watch: {
+    value(newValue, oldValue) {
+      this.defaultVal = newValue
+    }
+  },
+  methods: {
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    handleChange(value) {
+      this.defaultVal = value;
+      this.$emit('change', value);
+      this.$emit('input', value);
+    },
+    //  调拨类型
+    getProductBrand () {
+      allocateTypeAllList().then(res => {
+        if (res.status == 200) {
+          this.list = res.data
+        } else {
+          this.list = []
+        }
+      })
+    },
+  },
+};
+
+export default AllocateType

+ 5 - 0
src/views/common/rangeDate.vue

@@ -4,6 +4,7 @@
     :size="size"
     :value="date"
     :disabledDate="disabledDate"
+    :allowClear="allowClear"
     :format="dateFormat"
     @change="dateChange"
     @calendarChange="dateCalendarChange"
@@ -22,6 +23,10 @@ export default {
     size: {
       type: String,
       default: 'default'
+    },
+    allowClear: {
+      type: Boolean,
+      default: true
     }
   },
   data () {

+ 1 - 0
src/views/dealerManagement/dealerAccountManagement/detailModal.vue

@@ -57,6 +57,7 @@ export default {
     //  父页面传过来的弹框状态
     openModal (newValue, oldValue) {
       this.isShow = newValue
+      this.detailData = null
     },
     //  重定义的弹框状态
     isShow (newValue, oldValue) {

+ 39 - 5
src/views/dealerManagement/dealerAccountManagement/editModal.vue

@@ -47,13 +47,14 @@
               placeholder="请输入管理员账号,字母/数字(最多50个字符)"
               allowClear />
           </a-form-model-item>
-          <a-form-model-item label="管理员密码" :prop="itemId=='' ? 'password' : ''" :extra="itemId ? '说明:已录入的密码不会显示,录入新密码将会覆盖原有密码' : ''" >
+          <a-form-model-item label="管理员密码" prop="password" :extra="itemId ? '说明:已录入的密码不会显示,录入新密码将会覆盖原有密码' : ''" >
             <a-input
               id="dealerAccountEdit-password"
               :maxLength="50"
+              :minLength="6"
               type="password"
               v-model.trim="form.password"
-              placeholder="请输入管理员密码,字母/数字(最多50个字符)"
+              placeholder="请输入管理员密码,字母/数字(最少6个字符,最多50个字符)"
               allowClear />
           </a-form-model-item>
           <a-form-model-item label="最大可开通用户数" prop="org.childUserMaxNum" extra="(含管理员账号)">
@@ -116,9 +117,10 @@ export default {
         phone: [{ required: true, message: '请输入管理员手机', trigger: 'blur' }, { pattern: /^\d{11}$/, message: '请输入正确的手机号' }],
         loginName: [{ required: true, message: '请输入管理员账号', trigger: 'blur' }, { pattern: /^[0-9a-zA-Z]+$/, message: '管理员账号由字母和数字组成' }],
         password: [
-          { required: true, message: '请输入管理员密码', trigger: 'blur' },
-          { pattern: /^[0-9a-zA-Z]+$/, message: '管理员密码由字母和数字组成' },
-          { min: 6, message: '管理员密码为6~50位' }
+        //   { validator: this.passwordValid }
+        //   // { required: true, message: '请输入管理员密码', trigger: 'blur' },
+        //   // { pattern: /^[0-9a-zA-Z]+$/, message: '管理员密码由字母和数字组成' },
+        //   // { min: 6, message: '管理员密码为6~50位' }
         ],
         'org.childUserMaxNum': [{ required: true, message: '请输入最大可开通用户数', trigger: 'blur' }]
       },
@@ -126,6 +128,27 @@ export default {
     }
   },
   methods: {
+    //  密码位数校验
+    passwordValid (rule, value, callback) {
+      if ((this.itemId && value) || (!this.itemId && value)) {
+        var reg = /^[0-9a-zA-Z]+$/
+        if ((reg.test(value)) && !(value.length < 6 || value.length > 50)) {
+          callback()
+        }
+        if (!reg.test(value)) {
+          callback('管理员密码由字母和数字组成')
+        }
+        if (value.length < 6 || value.length > 50) {
+          callback('管理员密码为6~50位')
+        }
+      } else {
+        if (!this.itemId && !value) {
+          callback('请输入管理员密码')
+        } else {
+          callback()
+        }
+      }
+    },
     custChange (val) {
       this.form.tenantSn = val.key
     },
@@ -177,6 +200,17 @@ export default {
   watch: {
     //  父页面传过来的弹框状态
     openModal (newValue, oldValue) {
+      if (this.itemId) {
+        this.rules.password = [
+          { required: false },
+          { validator: this.passwordValid }
+        ]
+      } else {
+        this.rules.password = [
+          { required: true, message: '请输入管理员密码', trigger: 'blur' },
+          { validator: this.passwordValid }
+        ]
+      }
       this.isShow = newValue
     },
     //  重定义的弹框状态

+ 19 - 5
src/views/dealerManagement/dealerAccountManagement/list.vue

@@ -41,6 +41,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1030, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 账号状态 -->
         <template slot="loginFlag" slot-scope="text, record">
@@ -208,16 +209,29 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 245
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
   }
 }
 </script>

+ 13 - 4
src/views/dealerManagement/dealerRelationshipBinding/list.vue

@@ -123,10 +123,6 @@ export default {
       dealerSn: []
     }
   },
-  mounted () {
-    this.tableHeight = window.innerHeight - 290
-    this.getList()
-  },
   methods: {
     expand (expanded, record) {
       this.nowData = record
@@ -241,6 +237,19 @@ export default {
         }
       })
     }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.tableHeight = window.innerHeight - 290
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.tableHeight = window.innerHeight - 290
+      this.resetSearchForm()
+    }
   }
 }
 </script>

+ 19 - 6
src/views/dealerManagement/marketingDivisionSet/list.vue

@@ -16,6 +16,7 @@
         :showPagination="false"
         :data="loadData"
         :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 市区 -->
         <template slot="cityArea" slot-scope="text, record">
@@ -128,20 +129,32 @@ export default {
       this.nowData = null
       this.openModal = false
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 195
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-    })
+    next(vm => {})
   }
 }
 </script>

+ 13 - 13
src/views/dealerManagement/merchantInfoManagement/detailModal.vue

@@ -9,7 +9,7 @@
     @cancle="isShow=false"
     :width="960">
     <a-spin :spinning="spinning" tip="Loading...">
-      <div>
+      <div style="max-height: 400px;overflow: auto;">
         <a-collapse :activeKey="['1','2','3']" class="merchantInfoManagement-cont-m">
           <a-collapse-panel key="1" header="基础信息">
             <a-descriptions :column="2" bordered size="small">
@@ -81,17 +81,17 @@
             </a-descriptions>
           </a-collapse-panel>
         </a-collapse>
-        <div class="btn-cont">
-          <a-button
-            id="merchantInfoManagement-audit"
-            size="large"
-            v-if="isAudit"
-            type="primary"
-            class="button-primary"
-            style="margin-right: 50px;"
-            @click="visibleAudit=true">审核</a-button>
-          <a-button id="merchantInfoManagement-back" size="large" @click="isShow = false" style="font-size: 12px;">返回列表</a-button>
-        </div>
+      </div>
+      <div class="btn-cont">
+        <a-button
+          id="merchantInfoManagement-audit"
+          size="large"
+          v-if="isAudit"
+          type="primary"
+          class="button-primary"
+          style="margin-right: 50px;"
+          @click="visibleAudit=true">审核</a-button>
+        <a-button id="merchantInfoManagement-back" size="large" @click="isShow = false" style="font-size: 12px;">返回列表</a-button>
       </div>
     </a-spin>
     <!-- 审核 -->
@@ -205,7 +205,7 @@ export default {
     }
     .btn-cont {
       text-align: center;
-      margin: 35px 0 30px;
+      margin: 15px 0 10px;
       button{
         width: 150px;
       }

+ 19 - 7
src/views/dealerManagement/merchantInfoManagement/edit.vue

@@ -667,16 +667,28 @@ export default {
           }
         }
       })
+    },
+    pageInit () {
+      this.getArea('province')
+      this.$refs.ruleForm.resetFields()
+      if (this.$route.params.id) { //  编辑页
+        this.getDetail()
+      }
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getArea('province')
-      vm.$refs.ruleForm.resetFields()
-      if (vm.$route.params.id) { //  编辑页
-        vm.getDetail()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 22 - 9
src/views/dealerManagement/merchantInfoManagement/list.vue

@@ -66,6 +66,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1870, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 经销商 -->
         <template slot="dealerName" slot-scope="text, record">
@@ -260,17 +261,17 @@ export default {
       document.body.appendChild(link)
       link.click()
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 245
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -279,9 +280,21 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-    })
+    next(vm => {})
   }
 }
 </script>

+ 18 - 4
src/views/dealerManagement/merchantInfoManagement/permissionSetting.vue

@@ -57,6 +57,7 @@
           :columns="columns"
           :data="loadData"
           :scroll="{ x: 930, y: tableHeight }"
+          :defaultLoadData="false"
           bordered>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
@@ -279,16 +280,29 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 295
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.$refs.table.refresh(true)
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.$refs.table.refresh(true)
+      this.pageInit()
+    }
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {})

+ 19 - 5
src/views/dealerManagement/rebateSettings/list.vue

@@ -27,6 +27,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -127,16 +128,29 @@ export default {
       this.nowData = null
       this.openModal = false
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 195
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  }
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
 }
 </script>

+ 22 - 9
src/views/financialManagement/financialCollection/list.vue

@@ -119,6 +119,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1440, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 单号 -->
         <template slot="salesBillNo" slot-scope="text, record">
@@ -317,17 +318,18 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.getArea('province')
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 195
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -336,10 +338,21 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getArea('province')
-    })
+    next(vm => {})
   }
 }
 </script>

+ 0 - 161
src/views/financialManagement/inventoryReview/detail.vue

@@ -1,161 +0,0 @@
-<template>
-  <div class="inventoryReviewDetail-wrap">
-    <a-page-header :ghost="false" @back="handleBack" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="inventoryReviewDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <!-- <template slot="extra">
-        <a-button key="2" id="inventoryReviewDetail-preview-btn">打印预览</a-button>
-        <a-button key="1" type="primary" id="inventoryReviewDetail-print-btn">快速打印</a-button>
-      </template> -->
-    </a-page-header>
-    <!-- 内容 -->
-    <a-page-header title="盘点单号:CG2021010100001" ></a-page-header>
-    <!-- alert -->
-    <a-alert type="info" style="margin-bottom:10px">
-      <div slot="message"><strong class="red">红色代表盘盈</strong>,<strong class="green">绿色代表盈亏</strong></div>
-    </a-alert>
-    <!-- 盈亏统计 -->
-    <a-card size="small" :bordered="false" class="inventoryReviewDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="盈亏统计">
-          <a-descriptions :column="2" bordered>
-            <a-descriptions-item label="库存数量">2</a-descriptions-item>
-            <a-descriptions-item label="库存成本">20</a-descriptions-item>
-            <a-descriptions-item label="盘盈数量">¥120.36</a-descriptions-item>
-            <a-descriptions-item label="盘盈成本">3</a-descriptions-item>
-            <a-descriptions-item label="盘亏数量">4</a-descriptions-item>
-            <a-descriptions-item label="盘亏成本">¥11.2</a-descriptions-item>
-            <a-descriptions-item>
-              <template slot="label">
-                盈亏总数量
-                <a-popover>
-                  <template slot="content">
-                    盘盈数量与盘亏数量之和
-                  </template>
-                  <a-icon type="question-circle" theme="twoTone" />
-                </a-popover>
-              </template>
-              4
-            </a-descriptions-item>
-            <a-descriptions-item>
-              <template slot="label">
-                盈亏总成本
-                <a-popover>
-                  <template slot="content">
-                    盘盈成本与盘亏成本之和
-                  </template>
-                  <a-icon type="question-circle" theme="twoTone" />
-                </a-popover>
-              </template>
-              4
-            </a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 产品明细 -->
-    <a-card size="small" :bordered="false" class="inventoryReviewDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="产品明细">
-          <!-- 列表 -->
-          <s-table
-            class="sTable"
-            ref="table"
-            size="small"
-            :rowKey="(record) => record.id"
-            :columns="columns"
-            :data="loadData"
-            :scroll="{ x: 1290 }"
-            bordered>
-            <!-- 采购数量 -->
-            <template slot="purchaseNum" slot-scope="text, record">
-              <span>{{ record.purchaseNum }}</span>
-            </template>
-            <!-- 缺货数量 -->
-            <template slot="outOfStockNum" slot-scope="text, record">
-              <span>{{ record.outOfStockNum }}</span>
-            </template>
-          </s-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-  </div>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-export default {
-  components: { STable, VSelect },
-  data () {
-    return {
-      // 表头
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'productCode', width: 160, align: 'center' },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
-        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center' },
-        { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '库存数量', dataIndex: 'qtsy', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '库存成本', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘点数量', dataIndex: 'qtssy', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘点盈亏数量', dataIndex: 'qtdsy', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘点盈亏成本', dataIndex: 'prifce', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-            ],
-            count: 10
-          }
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      }
-    }
-  },
-  methods: {
-    //  返回列表
-    handleBack () {
-      this.$router.push({ path: '/financialManagement/inventoryReview/list', query: { closeLastOldTab: true } })
-    }
-  }
-}
-</script>
-
-<style lang="less">
-  .inventoryReviewDetail-wrap{
-    .inventoryReviewDetail-cont{
-      margin-bottom: 10px;
-    }
-    .green{
-      color: #19be6b;
-    }
-    .red{
-      color: #ed1c24;
-    }
-  }
-</style>

+ 0 - 174
src/views/financialManagement/inventoryReview/list.vue

@@ -1,174 +0,0 @@
-<template>
-  <a-card size="small" :bordered="false" class="inventoryReviewList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="盘点单号">
-              <a-input id="inventoryReviewList-purchaseNo" v-model.trim="queryParam.purchaseNo" allowClear placeholder="请输入盘点单号"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="盘点审核时间">
-              <a-range-picker v-model="queryParam.creatDate" allowClear id="inventoryReviewList-creatDate"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="财务审核状态">
-              <v-select
-                v-model="queryParam.billStatus"
-                ref="billStatus"
-                id="inventoryReviewList-billStatus"
-                code="PAYMENT_TYPE"
-                placeholder="请选择财务审核状态"
-                allowClear></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <span class="table-page-search-submitButtons">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryReviewList-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="inventoryReviewList-reset">重置</a-button>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- alert -->
-    <a-alert type="info" style="margin-bottom:10px">
-      <div slot="message">共 <strong>6</strong> 条记录,其中待审核 <strong>14</strong> 条 </div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1300 }"
-      bordered>
-      <!-- 采购单号 -->
-      <template slot="purchaseNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;">{{ record.purchaseNo }}</span>
-      </template>
-      <!-- 采购入库单号 -->
-      <template slot="purchaseNos" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;">{{ record.purchaseNo }}</span>
-      </template>
-      <!-- 状态 -->
-      <template slot="state" slot-scope="text, record">
-        <span>{{ record.state == 1 ? '已启用' : '已禁用' }}</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" @click="handleExamine(record, 1)" id="inventoryReview-adopt-btn">通过</a-button>
-        <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleExamine(record, 2)" id="inventoryReview-unadopt-btn">不通过</a-button>
-        <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleDetail(record)" id="inventoryReview-detail-btn">详情</a-button>
-      </template>
-    </s-table>
-  </a-card>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-// import { getRoleList, getServiceList } from '@/api/manage'
-export default {
-  components: { STable, VSelect },
-  data () {
-    return {
-      disabled: false, //  查询、重置按钮是否可操作
-      // 查询参数
-      queryParam: {},
-      // 表头
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '盘点单号', scopedSlots: { customRender: 'purchaseBillNo' }, align: 'center' },
-        { title: '盘点产品款数', dataIndex: 'totalCategory', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '库存总成本', dataIndex: 'totalAmount', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘盈总数量', dataIndex: 'totalQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘亏总数量', dataIndex: 'totalssQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘点审核时间', dataIndex: 'sauditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务审核状态', scopedSlots: { customRender: 'auditStatus' }, width: 120, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 190, align: 'center', fixed: 'right' }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-            ],
-            count: 10
-          }
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      }
-    }
-  },
-  methods: {
-    //  详情
-    handleDetail (row) {
-      this.$router.push({ path: `/financialManagement/inventoryReview/detail/${row.id}` })
-    },
-    //  审核
-    handleExamine (row, type) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '操作后不可恢复,确定要进行' + (type == 1 ? ' 通过 ' : ' 不通过 ') + '操作吗?',
-        centered: true,
-        onOk () {
-          // delectRolePower({
-          //   id: row.id
-          // }).then(res => {
-          //   console.log(res, 'res1111')
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //   }
-          // })
-        }
-      })
-    },
-    //  重置
-    resetSearchForm () {
-      this.queryParam.orderBundleNo = ''
-      this.queryParam.orderBundle.custMobile = ''
-      this.queryParam.bundleName = ''
-      this.queryParam.itemName = ''
-      this.oldTime = undefined
-      this.newTime = undefined
-      this.$refs.table.refresh(true)
-    }
-  }
-}
-</script>
-<style lang="less">
-  .inventoryReviewList-wrap{
-    .sTable{
-      margin-top: 15px;
-    }
-  }
-</style>

+ 2 - 0
src/views/financialManagement/returnConfirmation/detailModal.vue

@@ -115,6 +115,8 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.detailData = null
+        this.$refs.table.clearTable()
       }
     },
     itemSn (newValue, oldValue) {

+ 23 - 6
src/views/financialManagement/returnConfirmation/list.vue

@@ -65,6 +65,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1210, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 销退单号 -->
         <template slot="salesReturnBillNo" slot-scope="text, record">
@@ -207,17 +208,17 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 195
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -225,6 +226,22 @@ export default {
         _this.setTableH()
       }, 400)
     }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
   }
 }
 </script>

+ 1 - 0
src/views/financialManagement/warehousingConfirmation/detailModal.vue

@@ -86,6 +86,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.$refs.table.clearTable()
       }
     },
     itemSn (newValue, oldValue) {

+ 21 - 4
src/views/financialManagement/warehousingConfirmation/list.vue

@@ -45,6 +45,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1280, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 入库单号 -->
         <template slot="stockPutNo" slot-scope="text, record">
@@ -240,16 +241,32 @@ export default {
       console.log('selectedRowKeys changed: ', selectedRowKeys)
       this.selectedRowKeys = selectedRowKeys
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
   }
 }
 </script>

+ 28 - 9
src/views/inventoryManagement/intelligentReplenishment/edit.vue

@@ -224,20 +224,39 @@ export default {
     },
     setTableH () {
       this.tableHeight = window.innerHeight - 550
+    },
+    pageInit () {
+      this.form = {
+        stockPredictRange: 1,
+        saleEnsureNum: '',
+        trendSn: '',
+        serviceLevel: '',
+        safetyFactor: ''
+      }
+      this.$refs.ruleForm.resetFields()
+      this.getDetail()
+      this.getTrendSn()
+      this.current = 0
+
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getDetail()
-      vm.getTrendSn()
-      vm.current = 0
-    })
+    next(vm => {})
   }
 }
 </script>

+ 12 - 0
src/views/inventoryManagement/intelligentReplenishment/import.vue

@@ -20,6 +20,7 @@
             :scroll="{ x: 1440 }"
             :rowClassName="(record, index) => record.cost ? 'redBg-row':''"
             :showPagination="false"
+            :defaultLoadData="false"
             bordered>
           </s-table>
           <div class="btn-cont">
@@ -119,6 +120,17 @@ export default {
         }
       })
     }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.$refs.table.refresh(true)
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.$refs.table.refresh(true)
+    }
   }
 }
 </script>

+ 21 - 4
src/views/inventoryManagement/intelligentReplenishment/list.vue

@@ -20,6 +20,7 @@
         :data="loadData"
         :scroll="{ y: tableHeight }"
         :showPagination="false"
+        :defaultLoadData="false"
         bordered>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -178,16 +179,32 @@ export default {
       document.body.appendChild(link)
       link.click()
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.$refs.table.refresh(true)
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.$refs.table.refresh(true)
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
   }
 }
 </script>

+ 17 - 0
src/views/inventoryManagement/intelligentReplenishment/set.vue

@@ -38,6 +38,7 @@
                   uploadType="import"
                   :action="attachAction"
                   :uploadParams="uploadParams"
+                  @remove="resetForm"
                   upText="添加文件"
                   @change="changeImport"></Upload>
               </p>
@@ -133,6 +134,22 @@ export default {
       link.setAttribute('download', fname + '.xlsx')
       document.body.appendChild(link)
       link.click()
+    },
+    resetForm () {
+      this.$refs.importUpload.setFileList() //  清空导入文件
+      this.paramsData = null //  清空上传数据
+      VueCookies.set('REPLENISHMENT_PATH', '')
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.resetForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.resetForm()
     }
   }
 }

+ 0 - 199
src/views/inventoryManagement/inventoryChecking/checkingTipsModal.vue

@@ -1,199 +0,0 @@
-<template>
-  <a-modal
-    centered
-    class="checkingTipsEdit-modal"
-    :footer="null"
-    :maskClosable="false"
-    title="提示"
-    v-model="isShow"
-    @cancle="isShow=false"
-    width="80%">
-    <div class="checkingTipsEdit-header">
-      <strong>以下为影响出入库的未完成单据</strong>
-      <a-button type="danger" @click="handleExport" :loading="exportLoading" id="checkingTipsEdit-export">导出</a-button>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      bordered>
-    </s-table>
-    <a-divider />
-    <div class="checkingTipsEdit-explain">
-      <strong>盘点说明:</strong>
-      <ul class="checkingTipsEdit-explain-list">
-        <li>1、以上影响出入库的未完成单据,不处理也可进行盘点,但建议处理完再进行盘点。</li>
-        <li>2、开始盘点到盘点结束期间,所有出入库单据将不能操作。</li>
-      </ul>
-    </div>
-    <div class="btn-cont">
-      <a-button type="primary" id="checking-tips-edit-modal-check" @click="handleCheck">开始盘点</a-button>
-      <a-button id="checking-tips-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-    </div>
-    <checking-type-modal :openModal="openTypeModal" :nowData="nowTypeData" :itemId="itemId" @ok="handleOk" @close="closeModal" />
-  </a-modal>
-</template>
-
-<script>
-import { STable } from '@/components'
-import checkingTypeModal from './checkingTypeModal.vue'
-// import { checkingTipsSave } from '@/api/checkingTips'
-export default {
-  name: 'CheckingTipsEditModal',
-  components: { STable, checkingTypeModal },
-  props: {
-    openModal: { //  弹框显示状态
-      type: Boolean,
-      default: false
-    },
-    itemId: {
-      type: [Number, String],
-      default: ''
-    },
-    nowData: {
-      type: Object,
-      default: null
-    }
-  },
-  data () {
-    return {
-      isShow: this.openModal, //  是否打开弹框
-      exportLoading: false, // 导出loading
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单号', dataIndex: 'nsso', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据类型', dataIndex: 'sort', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据状态', dataIndex: 'name', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return warehouseAllList( this.queryParam ).then(res => {
-        //   const data = res.data
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-            ],
-            count: 10
-          }
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      },
-      openTypeModal: false, //  新增编辑  弹框
-      nowTypeData: null //  当前记录数据
-    }
-  },
-  methods: {
-    //  详情
-    getDetail () {
-
-    },
-    //  开始盘点
-    handleCheck () {
-      this.openTypeModal = true
-    },
-    //  新增/编辑  成功
-    handleOk (type) {
-      this.$emit('ok', type)
-      this.isShow = false
-    },
-    //  关闭弹框
-    closeModal () {
-      this.openTypeModal = false
-    },
-    //  导出
-    handleExport () {
-      this.exportLoading = true
-      customerBundleExportDelay({}).then(res => {
-        this.exportLoading = false
-        this.download(res)
-      })
-    },
-    download (data) {
-      if (!data) { return }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '未完成单据_盘点' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-    }
-  },
-  watch: {
-    //  父页面传过来的弹框状态
-    openModal (newValue, oldValue) {
-      this.isShow = newValue
-    },
-    //  重定义的弹框状态
-    isShow (newValue, oldValue) {
-      if (!newValue) {
-        this.$emit('close')
-      } else {
-        this.form = {
-          name: '',
-          sort: ''
-        }
-      }
-    },
-    itemId (newValue, oldValue) {
-      if (this.isShow && newValue) {
-        this.getDetail()
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less">
-  .checkingTipsEdit-modal{
-    .ant-modal-body {
-    	padding: 40px 40px 24px;
-    }
-    .checkingTipsEdit-header{
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-      margin-bottom: 20px;
-      strong{
-        font-size: 15px;
-      }
-    }
-    .checkingTipsEdit-explain{
-      strong{
-        display: block;
-        margin-bottom: 5px;
-      }
-      .checkingTipsEdit-explain-list{
-        list-style: none;
-        margin: 0;
-        padding: 0;
-        li{
-          padding: 3px 0;
-        }
-      }
-    }
-    .btn-cont {
-    	text-align: center;
-    	margin: 35px 0 10px;
-    }
-  }
-</style>

+ 0 - 155
src/views/inventoryManagement/inventoryChecking/checkingTypeModal.vue

@@ -1,155 +0,0 @@
-<template>
-  <a-modal
-    centered
-    class="checkingTypeEdit-modal"
-    :footer="null"
-    :maskClosable="false"
-    title="选择盘点类型"
-    v-model="isShow"
-    @cancle="isShow=false"
-    :width="800">
-    <!-- 表单 -->
-    <div>
-      <a-form-model
-        id="checkingTypeEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="" prop="type">
-          <a-radio-group v-model="form.type" size="large" class="radio-group">
-            <a-radio-button value="a" class="radio-button">
-              全盘<a-icon class="radio-button-icon" type="check" v-show="form.type=='a'" />
-            </a-radio-button>
-            <a-radio-button value="b" class="radio-button">
-              自选盘点<a-icon class="radio-button-icon" type="check" v-show="form.type=='b'" />
-            </a-radio-button>
-          </a-radio-group>
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="checkingType-edit-modal-save" @click="handleSubmit">确定</a-button>
-        <a-button id="checkingType-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-      </div>
-    </div>
-  </a-modal>
-</template>
-
-<script>
-// import { checkingTypeSave } from '@/api/checkingType'
-export default {
-  name: 'checkingTypeEditModal',
-  props: {
-    openModal: { //  弹框显示状态
-      type: Boolean,
-      default: false
-    },
-    itemId: {
-      type: [Number, String],
-      default: ''
-    },
-    nowData: {
-      type: Object,
-      default: null
-    }
-  },
-  data () {
-    return {
-      isShow: this.openModal, //  是否打开弹框
-      formItemLayout: {
-        labelCol: { span: 0 },
-        wrapperCol: { span: 24 }
-      },
-      form: {
-        type: '', // 盘点类型
-      },
-      rules: {
-        type: [
-          { required: true, message: '请先选择盘点类型', trigger: 'change' }
-        ],
-      }
-    }
-  },
-  methods: {
-    //  确定
-    handleSubmit(){
-      const _this = this
-      this.$refs.ruleForm.validate(valid => {
-        if (valid) {
-          _this.$emit('ok', _this.form.type)
-          _this.isShow = false
-          // const params = {
-          //   id: this.itemId ? this.itemId : undefined,
-          //   name: this.form.name,  //  仓库名称
-          //   sort: this.form.sort,  //  排序
-          //   isDefault: 0  //  是否为默认仓库   0为非默认,1为默认
-          // }
-          // checkingTipsSave(params).then(res => {
-          //   if(res.status == 200){
-          //     _this.$message.success(res.message)
-          //     _this.$emit('ok')
-          //     setTimeout(function () {
-          //       _this.isShow = false
-          //       _this.$refs.ruleForm.resetFields()
-          //     }, 300)
-          //   }else{
-              
-          //   }
-          // })
-        } else {
-          console.log('error submit!!')
-          return false
-        }
-      })
-    },
-  },
-  watch: {
-    //  父页面传过来的弹框状态
-    openModal (newValue, oldValue) {
-      this.isShow = newValue
-    },
-    //  重定义的弹框状态
-    isShow (newValue, oldValue) {
-      if (!newValue) {
-        this.$emit('close')
-      }else{
-        this.form = {
-          name: '',
-          sort: ''
-        }
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less">
-  .checkingTypeEdit-modal{
-    .ant-modal-body {
-    	padding: 40px 40px 24px;
-    }
-    .radio-group{
-      display: block;
-      margin: 30px auto;
-      width: 80%;
-      .radio-button{
-        width: 50%;
-        height: 100px;
-        line-height: 100px;
-        text-align: center;
-        position: relative;
-        &-icon{
-          position: absolute;
-          right: 30px;
-          top: 42px;
-        }
-      }
-    }
-    .btn-cont {
-    	text-align: center;
-    	margin: 35px 0 10px;
-    }
-  }
-</style>

+ 0 - 183
src/views/inventoryManagement/inventoryChecking/detail.vue

@@ -1,183 +0,0 @@
-<template>
-  <div class="inventoryCheckingDetail-wrap">
-    <a-page-header :ghost="false" @back="handleBack" class="inventoryCheckingDetail-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="inventoryCheckingDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-button key="1" type="danger" @click="handleExport" :loading="exportLoading" id="inventoryCheckingDetail-export-btn">导出</a-button>
-      </template>
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="inventoryCheckingDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <a-descriptions-item label="盘点单号">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="监盘审核状态">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="完结状态">箭冠营销中心</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-card size="small" :bordered="false" class="inventoryCheckingDetail-cont">
-      <!-- 总计 -->
-      <a-alert type="info" style="margin-bottom:10px">
-        <div slot="message">
-          库存总数量:
-          <strong>6</strong>
-          ,盈亏总数量:
-          <strong>6</strong>
-        </div>
-      </a-alert>
-      <!-- 筛选条件 -->
-      <div class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
-              <a-form-item label="类型">
-                <a-select placeholder="请选择" id="inventoryCheckingDetail-type" allowClear v-model="queryParam.dataSourceNo">
-                  <a-select-option v-for="item in brandData" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckingDetail-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckingDetail-reset">重置</a-button>
-            </a-col>
-          </a-row>
-        </a-form>
-      </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="record => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 820 }"
-        bordered>
-        <!-- 采购数量 -->
-        <template slot="purchaseNum" slot-scope="text, record">
-          <span>{{ record.purchaseNum }}</span>
-        </template>
-        <!-- 缺货数量 -->
-        <template slot="outOfStockNum" slot-scope="text, record">
-          <span>{{ record.outOfStockNum }}</span>
-        </template>
-      </s-table>
-    </a-card>
-  </div>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-export default {
-  components: { STable, VSelect },
-  data () {
-    return {
-      queryParam: {
-        dataSourceNo: undefined
-      },
-      exportLoading: false, // 导出loading
-      disabled: false, //  查询、重置按钮是否可操作
-      // 表头
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '库存数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘点数量', dataIndex: 'qtsy', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盈亏数量', dataIndex: 'qdty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-            ],
-            count: 10
-          }
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      },
-      brandData: []
-    }
-  },
-  methods: {
-    //  重置
-    resetSearchForm () {},
-    //  返回列表
-    handleBack () {
-      this.$router.push({ path: '/inventoryManagement/inventoryChecking/list', query: { closeLastOldTab: true } })
-    },
-    //  导出
-    handleExport () {
-      const params = this.queryParam
-      if (this.oldTime && this.oldTime.length > 0) {
-        params.beginOldExpiryDate = moment(this.oldTime[0]).format('YYYY-MM-DD')
-        params.endOldExpirydDate = moment(this.oldTime[1]).format('YYYY-MM-DD')
-      } else {
-        params.beginOldExpiryDate = ''
-        params.endOldExpirydDate = ''
-      }
-      if (this.newTime && this.newTime.length > 0) {
-        params.beginDate = moment(this.newTime[0]).format('YYYY-MM-DD')
-        params.endDate = moment(this.newTime[1]).format('YYYY-MM-DD')
-      } else {
-        params.beginDate = ''
-        params.endDate = ''
-      }
-      this.exportLoading = true
-      customerBundleExportDelay(params).then(res => {
-        this.exportLoading = false
-        this.download(res)
-      })
-    },
-    download (data) {
-      if (!data) {
-        return
-      }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '仓库调拨' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-    }
-  }
-}
-</script>
-
-<style lang="less">
-.inventoryCheckingDetail-cont,
-.inventoryCheckingDetail-back {
-  margin-bottom: 10px;
-}
-</style>

+ 0 - 146
src/views/inventoryManagement/inventoryChecking/financialAuditDetail.vue

@@ -1,146 +0,0 @@
-<template>
-  <div class="financialAuditDetail-wrap">
-    <a-page-header :ghost="false" @back="handleBack" class="financialAuditDetail-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="financialAuditDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <!-- <template slot="extra">
-        <a-button key="1" type="primary" id="financialAuditDetail-print-btn">快速打印</a-button>
-      </template> -->
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="financialAuditDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <a-descriptions-item label="盘点单号">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="监盘审核状态">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="完结状态">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="库存总数量">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="库存总成本(¥)">箭冠营销中心</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 详情 -->
-    <a-card size="small" :bordered="false" class="financialAuditDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="详情">
-          <!-- 总计 -->
-          <a-alert type="info" style="margin-bottom:10px">
-            <div slot="message">盘盈总数量: <strong>6</strong> ,库存总成本(¥): <strong>6</strong> ,盘亏总数量: <strong>6</strong> ,盘亏总成本(¥): <strong>6</strong>,盈亏总数量: <strong>6</strong> ,盈亏总成本(¥): <strong>6</strong> </div>
-          </a-alert>
-          <!-- 筛选条件 -->
-          <div class="table-page-search-wrapper">
-            <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-              <a-row :gutter="15">
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="类型">
-                    <a-select placeholder="请选择" id="financialAuditDetail-type" allowClear v-model="queryParam.dataSourceNo">
-                      <a-select-option v-for="item in brandData" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
-                    </a-select>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                  <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="financialAuditDetail-refresh">查询</a-button>
-                  <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="financialAuditDetail-reset">重置</a-button>
-                </a-col>
-              </a-row>
-            </a-form>
-          </div>
-          <!-- 列表 -->
-          <s-table
-            class="sTable"
-            ref="table"
-            size="small"
-            :rowKey="(record) => record.id"
-            :columns="columns"
-            :data="loadData"
-            bordered>
-            <!-- 采购数量 -->
-            <template slot="purchaseNum" slot-scope="text, record">
-              <span>{{record.purchaseNum}}</span>
-            </template>
-            <!-- 缺货数量 -->
-            <template slot="outOfStockNum" slot-scope="text, record">
-              <span>{{record.outOfStockNum}}</span>
-            </template>
-          </s-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-  </div>
-</template>
-
-<script>
-  import { STable, VSelect } from '@/components'
-  export default{
-    components: { STable, VSelect },
-    data(){
-      return{
-        queryParam: {
-          dataSourceNo: undefined
-        },
-        exportLoading: false, // 导出loading
-        disabled: false, //  查询、重置按钮是否可操作
-        // 表头
-        columns: [
-          { title: '序号', dataIndex: 'no', align: 'center' },
-          { title: '产品编码', dataIndex: 'creatDate', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '产品名称', dataIndex: 'custName', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '单位', dataIndex: 'mementPay', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '库存数量', scopedSlots: { customRender: 'outOfStockNum' }, align: 'center' },
-          { title: '盘点数量', dataIndex: 'tostalP', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '盈亏数量', dataIndex: 'totalNums', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        ],
-        // 加载数据方法 必须为 Promise 对象
-        loadData: parameter => {
-          this.disabled = true
-          // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-          //   const data = res.data
-          //   const no = (data.pageNo - 1) * data.pageSize
-          //   for (var i = 0; i < data.list.length; i++) {
-          //     data.list[i].no = no + i + 1
-          //   }
-          //   this.disabled = false
-          //   return data
-          // })
-          const _this = this
-          return new Promise(function(resolve, reject){
-            const data = {
-              pageNo: 1,
-              pageSize: 10,
-              list: [
-                { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-              ],
-              count: 10
-            }
-            const no = (data.pageNo - 1) * data.pageSize
-            for (var i = 0; i < data.list.length; i++) {
-              data.list[i].no = no + i + 1
-            }
-            _this.disabled = false
-            resolve(data)
-          })
-        },
-        brandData: []
-      }
-    },
-    methods: {
-      //  重置
-      resetSearchForm(){},
-      //  返回列表
-      handleBack(){
-        this.$router.push({ path: '/inventoryManagement/inventoryChecking/list', query: { closeLastOldTab: true }})
-      },
-    }
-  }
-</script>
-
-<style lang="less">
-  .financialAuditDetail-cont, .financialAuditDetail-back{
-    margin-bottom: 10px;
-  }
-</style>

+ 0 - 219
src/views/inventoryManagement/inventoryChecking/list.vue

@@ -1,219 +0,0 @@
-<template>
-  <a-card size="small" :bordered="false" class="inventoryCheckingList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
-              <a-range-picker
-                style="width:100%"
-                id="inventoryCheckingList-creatTime"
-                :disabledDate="disabledDate"
-                @change="creatTimechange"
-                :format="dateFormat"
-                :placeholder="['开始时间', '结束时间']" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="状态">
-              <v-select code="ENABLED_FLAG" id="inventoryCheckingList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckingList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckingList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-	  <a-button id="inventoryCheckingList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :showPagination="false"
-      :scroll="{ x: 1480 }"
-      bordered>
-      <!-- 状态 -->
-      <template slot="state" slot-scope="text, record">
-        <a-tag :color="record.state==1?'green':'red'" >{{ record.state==1? '待提交': '待单据审核' }}</a-tag>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" @click="handleEexamine(record)" id="inventoryCheckingList-eexamine-btn">审核</a-button>
-        <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleInventory(record)" id="inventoryCheckingList-inventory-btn">盘点</a-button>
-        <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleEdit(record)" id="inventoryCheckingList-edit-btn">编辑</a-button>
-        <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleDetail(record)" id="inventoryCheckingList-detail-btn">详情</a-button>
-        <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleDel(record)" id="inventoryCheckingList-del-btn">删除</a-button>
-      </template>
-    </s-table>
-    <!-- 新增/编辑盘点单 -->
-    <inventory-checking-tips-modal :openModal="openModal" :nowData="nowData" :itemId="itemId" @ok="handleOk" @close="closeModal" />
-  </a-card>
-</template>
-
-<script>
-import { warehouseAllList, warehouseDel } from '@/api/warehouse'
-import { STable, VSelect } from '@/components'
-import inventoryCheckingTipsModal from './checkingTipsModal.vue'
-export default {
-  components: { STable, VSelect, inventoryCheckingTipsModal },
-  data () {
-    return {
-      queryParam: { //  查询条件
-        enabledFlag: undefined, //  状态
-        beginDate: '', //  创建时间  开始时间
-        endDate: '' //  创建时间  结束时间
-      },
-      disabled: false, //  查询、重置按钮是否可操作
-      dateFormat: 'YYYY-MM-DD',
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '盘点单号', dataIndex: 'nsso', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '库存总款数', dataIndex: 'no3', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '库存总数量', dataIndex: 'n4o', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '开单人', dataIndex: 'neo', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '单据审核时间', dataIndex: 'shcreateDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', scopedSlots: { customRender: 'state' }, width: 100, align: 'center' },
-        { title: '盘点类型', dataIndex: 'sort', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 260, align: 'center', fixed: 'right' }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return warehouseAllList( this.queryParam ).then(res => {
-        //   const data = res.data
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', state: 1, purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' },
-              { id: '2', state: 2, purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' },
-              { id: '3', state: 3, purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' },
-              { id: '4', state: 4, purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' },
-              { id: '5', state: 5, purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-            ],
-            count: 10
-          }
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      },
-      openModal: false, //  新增编辑  弹框
-      itemId: '', //  当前id
-      nowData: null //  当前记录数据
-    }
-  },
-  methods: {
-    // 不可选日期
-    disabledDate (date, dateStrings) {
-      return date && date.valueOf() > Date.now()
-    },
-    //  创建时间  change
-    creatTimechange (dates, dateStrings) {
-      this.queryParam.beginDate = dateStrings[0]
-      this.queryParam.endDate = dateStrings[1]
-    },
-    //  重置
-    resetSearchForm () {
-      this.queryParam.name = ''
-      this.$refs.table.refresh(true)
-    },
-    //  新增/编辑
-    handleEdit (row) {
-      this.itemId = row ? row.id : null
-      this.nowData = row || null
-      this.openModal = true
-    },
-    //  新增/编辑  成功
-    handleOk (type) {
-      if (type == 'a') {
-        this.$router.push({ path: `/inventoryManagement/inventoryChecking/overall/${this.itemId}` })
-      } else if (type == 'b') {
-        this.$router.push({ path: `/inventoryManagement/inventoryChecking/selfDisk/${this.itemId}` })
-      }
-    },
-    //  关闭弹框
-    closeModal () {
-      this.itemId = ''
-      this.openModal = false
-    },
-    //  详情
-    handleDetail (row) {
-      if (row.state == 3) { //  待盘点  详情
-        this.$router.push({ path: `/inventoryManagement/inventoryChecking/makeInventory/detail/${row.id}` })
-      } else if (row.state == 4) { //  待财务审核  详情
-        this.$router.push({ path: `/inventoryManagement/inventoryChecking/financialAudit/detail/${row.id}` })
-      } else { //  其他状态  详情
-        this.$router.push({ path: `/inventoryManagement/inventoryChecking/detail/${row.id}` })
-      }
-    },
-    //  审核
-    handleEexamine (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确认要审核通过吗?',
-        okText: row.state == 2 ? '确定' : '审核通过',
-        cancelText: row.state == 2 ? '取消' : '驳回重盘',
-        centered: true,
-        onOk () {
-          // delectRolePower({
-          //   id: row.id
-          // }).then(res => {
-          //   console.log(res, 'res1111')
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //   }
-          // })
-        }
-      })
-    },
-    //  盘点
-    handleInventory (row) {
-      this.$router.push({ path: `/inventoryManagement/inventoryChecking/makeInventory/${row.id}` })
-    },
-    //  删除
-    handleDel (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '删除后不可恢复,确定要进行删除吗?',
-        centered: true,
-        onOk () {
-          // warehouseDel({
-          //   id: row.id
-          // }).then(res => {
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //   }
-          // })
-        }
-      })
-    }
-  }
-}
-</script>

+ 0 - 187
src/views/inventoryManagement/inventoryChecking/makeInventory.vue

@@ -1,187 +0,0 @@
-<template>
-  <div class="makeInventory-wrap">
-    <a-page-header :ghost="false" @back="handleBack" class="makeInventory-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="makeInventory-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <!-- <template slot="extra">
-        <a-button key="1" type="primary" id="makeInventory-print-btn">快速打印</a-button>
-        <a-button key="2" id="makeInventory-preview-btn">打印预览</a-button>
-        <a-button key="3" type="danger" @click="handleExport" :loading="exportLoading" id="makeInventory-export-btn">导出</a-button>
-        <a-button key="4" @click="handleImport" id="makeInventory-import-btn">导入</a-button>
-        <a-button key="5" type="link" @click="handleDownImport" id="makeInventory-down-import-btn">下载导入模板</a-button>
-      </template> -->
-    </a-page-header>
-    <!-- 详情 -->
-    <a-card size="small" :bordered="false" class="makeInventory-cont">
-      <!-- 筛选条件 -->
-      <div class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
-              <a-form-item label="产品编码">
-                <a-input id="makeInventory-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入产品编码"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="产品名称">
-                <a-input id="makeInventory-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入产品名称"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="产品类别">
-                <a-cascader :options="typeData" id="makeInventory-state" placeholder="请选择产品类别" allowClear v-model="queryParam.brand" />
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="makeInventory-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="makeInventory-reset">重置</a-button>
-            </a-col>
-          </a-row>
-        </a-form>
-      </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1070 }"
-        bordered>
-        <!-- 盘点数量 -->
-        <template slot="outOfStockNum" slot-scope="text, record">
-          <a-input-number
-            id="makeInventory-outOfStockNum"
-            :value="record.outOfStockNum"
-            :precision="0"
-            :min="0"
-            :max="999999"
-            placeholder="请输入" />
-        </template>
-      </s-table>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 30px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button type="primary" id="makeInventory-submit" size="large" @click="handleSubmit" style="padding: 0 60px;">提交</a-button>
-      </div>
-    </a-affix>
-  </div>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-export default {
-  components: { STable, VSelect },
-  data () {
-    return {
-      queryParam: {
-        dataSourceNo: undefined
-      },
-      exportLoading: false, // 导出loading
-      disabled: false, //  查询、重置按钮是否可操作
-      // 表头
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'creatDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'custName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位', dataIndex: 'mementPay', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '仓库', dataIndex: 'memsentPay', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '仓位', dataIndex: 'memendtPay', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '库存数量', dataIndex: 'tostalP', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘点数量', scopedSlots: { customRender: 'outOfStockNum' }, width: 150, align: 'center' },
-        { title: '盈亏数量', dataIndex: 'totalNums', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-            ],
-            count: 10
-          }
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      },
-      typeData: []
-    }
-  },
-  methods: {
-    //  返回列表
-    handleBack () {
-      this.$router.push({ path: '/inventoryManagement/inventoryChecking/list', query: { closeLastOldTab: true } })
-    },
-    //  导入
-    handleImport () {},
-    //  下载导入模板
-    handleDownImport () {},
-    //  提交
-    handleSubmit () {},
-    //  重置
-    resetSearchForm () {},
-    //  导出
-    handleExport () {
-      const params = this.queryParam
-      if (this.oldTime && this.oldTime.length > 0) {
-        params.beginOldExpiryDate = moment(this.oldTime[0]).format('YYYY-MM-DD')
-        params.endOldExpirydDate = moment(this.oldTime[1]).format('YYYY-MM-DD')
-      } else {
-        params.beginOldExpiryDate = ''
-        params.endOldExpirydDate = ''
-      }
-      if (this.newTime && this.newTime.length > 0) {
-        params.beginDate = moment(this.newTime[0]).format('YYYY-MM-DD')
-        params.endDate = moment(this.newTime[1]).format('YYYY-MM-DD')
-      } else {
-        params.beginDate = ''
-        params.endDate = ''
-      }
-      this.exportLoading = true
-      customerBundleExportDelay(params).then(res => {
-        this.exportLoading = false
-        this.download(res)
-      })
-    },
-    download (data) {
-      if (!data) { return }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '仓库调拨' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-    }
-  }
-}
-</script>
-
-<style lang="less">
-  .makeInventory-cont, .makeInventory-back{
-    margin-bottom: 10px;
-  }
-</style>

+ 0 - 144
src/views/inventoryManagement/inventoryChecking/makeInventoryDetail.vue

@@ -1,144 +0,0 @@
-<template>
-  <div class="makeInventoryDetail-wrap">
-    <a-page-header :ghost="false" @back="handleBack" class="makeInventoryDetail-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="makeInventoryDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <!-- <template slot="extra">
-        <a-button key="1" type="primary" id="makeInventoryDetail-print-btn">快速打印</a-button>
-      </template> -->
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="makeInventoryDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <a-descriptions-item label="盘点单号">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="监盘审核状态">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="完结状态">箭冠营销中心</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 详情 -->
-    <a-card size="small" :bordered="false" class="makeInventoryDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="详情">
-          <!-- 总计 -->
-          <a-alert type="info" style="margin-bottom:10px">
-            <div slot="message">库存总数量: <strong>6</strong> ,盈亏总数量: <strong>6</strong></div>
-          </a-alert>
-          <!-- 筛选条件 -->
-          <div class="table-page-search-wrapper">
-            <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-              <a-row :gutter="15">
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="类型">
-                    <a-select placeholder="请选择" id="makeInventoryDetail-type" allowClear v-model="queryParam.dataSourceNo">
-                      <a-select-option v-for="item in brandData" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
-                    </a-select>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                  <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="makeInventoryDetail-refresh">查询</a-button>
-                  <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="makeInventoryDetail-reset">重置</a-button>
-                </a-col>
-              </a-row>
-            </a-form>
-          </div>
-          <!-- 列表 -->
-          <s-table
-            class="sTable"
-            ref="table"
-            size="small"
-            :rowKey="(record) => record.id"
-            :columns="columns"
-            :data="loadData"
-            bordered>
-            <!-- 采购数量 -->
-            <template slot="purchaseNum" slot-scope="text, record">
-              <span>{{record.purchaseNum}}</span>
-            </template>
-            <!-- 缺货数量 -->
-            <template slot="outOfStockNum" slot-scope="text, record">
-              <span>{{record.outOfStockNum}}</span>
-            </template>
-          </s-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-  </div>
-</template>
-
-<script>
-  import { STable, VSelect } from '@/components'
-  export default{
-    components: { STable, VSelect },
-    data(){
-      return{
-        queryParam: {
-          dataSourceNo: undefined
-        },
-        exportLoading: false, // 导出loading
-        disabled: false, //  查询、重置按钮是否可操作
-        // 表头
-        columns: [
-          { title: '序号', dataIndex: 'no', align: 'center' },
-          { title: '产品编码', dataIndex: 'creatDate', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '产品名称', dataIndex: 'custName', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '单位', dataIndex: 'mementPay', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '库存数量', scopedSlots: { customRender: 'outOfStockNum' }, align: 'center' },
-          { title: '盘点数量', dataIndex: 'tostalP', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '盈亏数量', dataIndex: 'totalNums', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        ],
-        // 加载数据方法 必须为 Promise 对象
-        loadData: parameter => {
-          this.disabled = true
-          // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-          //   const data = res.data
-          //   const no = (data.pageNo - 1) * data.pageSize
-          //   for (var i = 0; i < data.list.length; i++) {
-          //     data.list[i].no = no + i + 1
-          //   }
-          //   this.disabled = false
-          //   return data
-          // })
-          const _this = this
-          return new Promise(function(resolve, reject){
-            const data = {
-              pageNo: 1,
-              pageSize: 10,
-              list: [
-                { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-              ],
-              count: 10
-            }
-            const no = (data.pageNo - 1) * data.pageSize
-            for (var i = 0; i < data.list.length; i++) {
-              data.list[i].no = no + i + 1
-            }
-            _this.disabled = false
-            resolve(data)
-          })
-        },
-        brandData: []
-      }
-    },
-    methods: {
-      //  重置
-      resetSearchForm(){},
-      //  返回列表
-      handleBack(){
-        this.$router.push({ path: '/inventoryManagement/inventoryChecking/list', query: { closeLastOldTab: true }})
-      },
-    }
-  }
-</script>
-
-<style lang="less">
-  .makeInventoryDetail-cont, .makeInventoryDetail-back{
-    margin-bottom: 10px;
-  }
-</style>

+ 0 - 108
src/views/inventoryManagement/inventoryChecking/overall.vue

@@ -1,108 +0,0 @@
-<template>
-  <div class="inventoryCheckingOverall-wrap">
-    <a-page-header :ghost="false" @back="handleBack" class="inventoryCheckingOverall-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="inventoryChecking-overall-submit" href="javascript:;" @click="handleBack">返回列表</a>
-      </template>
-    </a-page-header>
-    <a-card size="small" :bordered="false" class="inventoryCheckingOverall-cont">
-      <!-- 操作按钮 -->
-      <div class="table-operator">
-        <a-checkbox-group @change="onChange" v-model="queryParam.keyword" :disabled="disabled" id="inventoryCheckingOverall-type">
-          <a-checkbox value="A">不含废品仓</a-checkbox>
-          <a-checkbox value="B">有库存</a-checkbox>
-        </a-checkbox-group>
-      </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :showPagination="false"
-        bordered>
-      </s-table>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 30px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button type="primary" id="inventoryChecking-overall-submit" size="large" @click="handleSubmit" style="padding: 0 60px;">提交</a-button>
-      </div>
-    </a-affix>
-  </div>
-</template>
-
-<script>
-import { warehouseAllList, warehouseDel } from '@/api/warehouse'
-import { STable, VSelect } from '@/components'
-export default {
-  components: { STable, VSelect },
-  data () {
-    return {
-      queryParam: { //  查询条件
-        keyword: [] //
-      },
-      disabled: false, //  查询、重置按钮是否可操作
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '产品编码', dataIndex: 'createDate', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'nsso', width: 70, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位', dataIndex: 'no3', width: 70, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '库存数量', dataIndex: 'n4o', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return warehouseAllList( this.queryParam ).then(res => {
-        //   const data = res.data
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-            ],
-            count: 10
-          }
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      }
-
-    }
-  },
-  methods: {
-    //  提交
-    handleSubmit () {
-
-    },
-    //  返回
-    handleBack () {
-      this.$router.push({ path: '/inventoryManagement/inventoryChecking/list', query: { closeLastOldTab: true } })
-    },
-    //
-    onChange () {}
-  }
-}
-</script>
-
-<style lang="less">
-  .inventoryCheckingOverall-wrap{
-    padding: 10px 0 30px;
-    .table-operator{
-      margin-bottom: 25px;
-    }
-    .inventoryCheckingOverall-cont, .inventoryCheckingOverall-back{
-      margin-bottom: 10px;
-    }
-  }
-</style>

+ 0 - 326
src/views/inventoryManagement/inventoryChecking/selfDisk.vue

@@ -1,326 +0,0 @@
-<template>
-  <div class="selfDisk-wrap">
-    <a-page-header :ghost="false" @back="handleBack" class="selfDisk-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="selfDisk-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
-      </template>
-    </a-page-header>
-    <!-- 选择产品 -->
-    <a-card size="small" :bordered="false" class="selfDisk-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">选择产品</template>
-          <!-- 选择产品 -->
-          <div>
-            <!-- 搜索条件 -->
-            <div class="table-page-search-wrapper">
-              <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-                <a-row :gutter="15">
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="关键词">
-                      <a-input id="selfDisk-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="产品名称/产品编码/原厂编码"/>
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="产品品牌">
-                      <a-select
-                        placeholder="请选择"
-                        id="selfDisk-state"
-                        allowClear
-                        v-model="queryParam.dataSourceNo"
-                        :showSearch="true"
-                        option-filter-prop="children"
-                        :filter-option="filterOption">
-                        <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="产品类别">
-                      <a-cascader :options="typeData" id="selfDisk-state" placeholder="请选择产品类别" allowClear v-model="queryParam.brand" />
-                    </a-form-item>
-                  </a-col>
-                  <template v-if="advanced">
-                    <a-col :md="6" :sm="24">
-                      <a-form-item label="库存">
-                        <a-select
-                          placeholder="请选择"
-                          id="selfDisk-state"
-                          allowClear
-                          v-model="queryParam.dataSourceNo"
-                          :showSearch="true"
-                          option-filter-prop="children"
-                          :filter-option="filterOption">
-                          <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
-                        </a-select>
-                      </a-form-item>
-                    </a-col>
-                    <a-col :md="6" :sm="24">
-                      <a-form-item label="仓库">
-                        <a-select
-                          placeholder="请选择"
-                          id="selfDisk-state"
-                          allowClear
-                          v-model="queryParam.dataSourceNo"
-                          :showSearch="true"
-                          option-filter-prop="children"
-                          :filter-option="filterOption">
-                          <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
-                        </a-select>
-                      </a-form-item>
-                    </a-col>
-                    <a-col :md="6" :sm="24">
-                      <a-form-item label="仓位">
-                        <a-select
-                          placeholder="请选择"
-                          id="selfDisk-state"
-                          allowClear
-                          v-model="queryParam.dataSourceNo"
-                          :showSearch="true"
-                          option-filter-prop="children"
-                          :filter-option="filterOption">
-                          <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
-                        </a-select>
-                      </a-form-item>
-                    </a-col>
-                  </template>
-                  <a-col :md="6" :sm="24">
-                    <a-button style="margin-bottom: 10px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="selfDisk-refresh">查询</a-button>
-                    <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="selfDisk-reset">重置</a-button>
-                    <a @click="advanced=!advanced" style="margin-left: 5px">
-                      {{ advanced ? '收起' : '展开' }}
-                      <a-icon :type="advanced ? 'up' : 'down'"/>
-                    </a>
-                  </a-col>
-                </a-row>
-              </a-form>
-            </div>
-            <!-- 列表 -->
-            <s-table
-              class="sTable"
-              ref="table"
-              size="small"
-              :rowKey="(record) => record.id"
-              :columns="columns"
-              :data="loadData"
-              :scroll="{ x: 1420 }"
-              bordered>
-              <!-- 操作 -->
-              <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="link" @click="handleAdd(record)" id="selfDisk-add-btn">添加</a-button>
-              </template>
-            </s-table>
-          </div>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 已选产品 -->
-    <a-card size="small" :bordered="false" class="selfDisk-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">
-            已选产品
-            <a-button size="small" class="import-btn" id="selfDisk-import-btn" @click.stop="handleImport">导入明细</a-button>
-          </template>
-          <!-- 已选产品 -->
-          <div>
-            <!-- 总计 -->
-            <a-alert type="info" style="margin-bottom:10px">
-              <div slot="message">产品款数 <strong>6</strong> ,采购数量合计 <strong>6</strong> ,采购金额合计¥<strong>6.33</strong></div>
-            </a-alert>
-            <!-- 列表 -->
-            <s-table
-              class="sTable"
-              ref="table"
-              size="small"
-              :rowKey="(record) => record.id"
-              :columns="chooseColumns"
-              :data="chooseLoadData"
-              :scroll="{ x: 1420 }"
-              bordered>
-              <!-- 操作 -->
-              <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="link" @click="handleDel(record)" id="selfDisk-del-btn">删除</a-button>
-              </template>
-            </s-table>
-          </div>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 30px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button type="primary" id="warehouseAllocationEdit-submit" size="large" @click="handleSubmit" style="padding: 0 60px;">提交</a-button>
-      </div>
-    </a-affix>
-  </div>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-export default {
-  components: { STable, VSelect },
-  data () {
-    return {
-      queryParam: {
-
-      },
-      brandData: [], //  产品品牌  下拉数据
-      typeData: [], //  产品类别  下拉数据
-      advanced: false, //  高级搜索 展开/关闭
-      disabled: false, //  查询、重置按钮是否可操作
-      // 表头
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '产品编码', dataIndex: 'creatDate', width: 140, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'custName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'totalP', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'custssName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品级别', dataIndex: 'custsdName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '仓库', dataIndex: 'totalNums', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '仓位', dataIndex: 'totalNsums', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '库存数量', dataIndex: 'storageQuantity', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', scopedSlots: { customRender: 'outOfStockNum' }, width: 100, align: 'center' },
-        { title: '最后入库时间', scopedSlots: { customRender: 'purchaseNum' }, width: 160, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-            ],
-            count: 10
-          }
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      },
-      // 表头
-      chooseColumns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '产品编码', dataIndex: 'creatDate', width: 140, align: 'center', sorter: true },
-        { title: '产品名称', dataIndex: 'custName', align: 'center' },
-        { title: '原厂编码', dataIndex: 'totalP', width: 140, align: 'center' },
-        { title: '产品品牌', dataIndex: 'custsNasme', width: 100, align: 'center' },
-        { title: '产品级别', dataIndex: 'custsNdme', width: 100, align: 'center' },
-        { title: '仓库', dataIndex: 'totalNums', width: 100, align: 'center' },
-        { title: '仓位', dataIndex: 'totalNsums', width: 100, align: 'center' },
-        { title: '库存数量', dataIndex: 'storageQuantity', width: 100, align: 'center' },
-        { title: '单位', scopedSlots: { customRender: 'outOfStockNum' }, width: 100, align: 'center' },
-        { title: '最后入库时间', scopedSlots: { customRender: 'purchaseNum' }, width: 160, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      chooseLoadData: parameter => {
-        this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', purchaseNo: 'jgqp11111111111', custssName: 0, creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' },
-              { id: '2', purchaseNo: 'jgqp11111111111', custssName: 0, creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' },
-              { id: '3', purchaseNo: 'jgqp11111111111', custssName: 0, creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-            ],
-            count: 10
-          }
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      },
-      openModal: false // 选择基本信息弹框是否显示
-    }
-  },
-  methods: {
-    //  重置
-    resetSearchForm () {
-      this.queryParam.orderBundleNo = ''
-      this.queryParam.orderBundle.custMobile = ''
-      this.queryParam.bundleName = ''
-      this.queryParam.itemName = ''
-      this.oldTime = undefined
-      this.newTime = undefined
-      this.$refs.table.refresh(true)
-    },
-    //  提交
-    handleSubmit () {},
-    //  添加
-    handleAdd (row) {},
-    //  删除
-    handleDel (row) {},
-    //  编辑基本信息
-    handleEditInfo () {
-      this.openModal = true
-    },
-    //  基本信息  保存
-    handleOk () {
-
-    },
-    //  导入明细
-    handleImport () {
-      console.log(333)
-    },
-    //  返回列表
-    handleBack () {
-      this.$router.push({ path: '/inventoryManagement/inventoryChecking/list', query: { closeLastOldTab: true } })
-    },
-    filterOption (input, option) {
-      	return (
-      		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      	)
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.openModal = false
-    })
-  }
-}
-</script>
-
-<style lang="less">
-  .selfDisk-wrap{
-    .selfDisk-back{
-      margin-bottom: 10px;
-    }
-    .selfDisk-cont{
-      margin-bottom: 10px;
-      .import-btn{
-        margin-left: 15px;
-      }
-    }
-  }
-</style>

+ 8 - 0
src/views/inventoryManagement/inventoryQuery/detailModal.vue

@@ -115,12 +115,20 @@ export default {
           }
         }
       })
+    },
+    resetPage () {
+      this.currentStock = { // 合计信息
+        currentQty: '',
+        putCost: ''
+      }
+      this.$refs.table.clearTable()
     }
   },
   watch: {
     //  父页面传过来的弹框状态
     openModal (newValue, oldValue) {
       this.isShow = newValue
+      this.resetPage()
     },
     //  重定义的弹框状态
     isShow (newValue, oldValue) {

+ 40 - 14
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -51,9 +51,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="库存情况">
-                  <a-select placeholder="请选择库存情况" id="inventoryQueryList-zeroQtyFlag" allowClear v-model="queryParam.zeroQtyFlag">
-                    <a-select-option v-for="item in zeroQtyData" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
-                  </a-select>
+                  <a-checkbox v-model="queryParam.zeroQtyFlag" id="inventoryQueryList-zeroQtyFlag">只查看有库存</a-checkbox>
                 </a-form-item>
               </a-col>
             </template>
@@ -94,6 +92,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1170, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -142,7 +141,7 @@ export default {
         productTypeSn1: '', //  产品分类1
         productTypeSn2: '', //  产品分类2
         productTypeSn3: '', //  产品分类3
-        zeroQtyFlag: undefined //  库存数量是否为0
+        zeroQtyFlag: false //  库存情况
       },
       productType: [],
       exportLoading: false, // 导出loading
@@ -166,7 +165,13 @@ export default {
           parameter.sortField = 'currentStockCost'
           parameter.sortAlias = 'stock'
         }
-        return stockList(Object.assign(parameter, this.queryParam)).then(res => {
+        const params = Object.assign(parameter, this.queryParam)
+        if (params.zeroQtyFlag) {
+          params.zeroQtyFlag = '0'
+        } else {
+          params.zeroQtyFlag = ''
+        }
+        return stockList(params).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
@@ -175,7 +180,7 @@ export default {
           this.disabled = false
           this.spinning = false
           // 总计
-          this.getTotal(Object.assign(parameter, this.queryParam))
+          this.getTotal(params)
           // 产品分类
           if (this.productTypeList.length == 0) {
             this.getProductType()
@@ -220,7 +225,7 @@ export default {
       this.queryParam.productCode = ''
       this.queryParam.productOrigCode = ''
       this.queryParam.productName = ''
-      this.queryParam.zeroQtyFlag = undefined
+      this.queryParam.zeroQtyFlag = false
       this.productType = []
       this.$refs.table.refresh(true)
     },
@@ -251,7 +256,12 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
+      const params = JSON.parse(JSON.stringify(this.queryParam))
+      if (params.zeroQtyFlag) {
+        params.zeroQtyFlag = '0'
+      } else {
+        params.zeroQtyFlag = ''
+      }
       this.exportLoading = true
       _this.spinning = true
       stockExport(params).then(res => {
@@ -327,17 +337,17 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -345,6 +355,22 @@ export default {
         _this.setTableH()
       }, 400)
     }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
   }
 }
 </script>

+ 22 - 9
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -81,6 +81,7 @@
           :columns="columns"
           :data="loadData"
           :scroll="{ x: 1590, y: tableHeight }"
+          :defaultLoadData="false"
           bordered>
           <!-- 数量 -->
           <template slot="qty" slot-scope="text, record">
@@ -207,17 +208,18 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.getWarehouseList()
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 230 - 52
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -226,10 +228,21 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.$refs.table.refresh(true)
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.$refs.table.refresh(true)
+      this.pageInit()
+    }
+  },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getWarehouseList()
-    })
+    next(vm => {})
   }
 }
 </script>

+ 26 - 42
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -65,13 +65,6 @@
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryWarningList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryWarningList-reset">重置</a-button>
-              <!-- <a-button
-                style="margin-left: 8px"
-                type="danger"
-                @click="handleExport"
-                :disabled="disabled"
-                :loading="exportLoading"
-                id="inventoryWarningList-export">导出</a-button> -->
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -97,7 +90,8 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1800, y: tableHeight }"
+        :scroll="{ x: 1690, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -204,9 +198,9 @@ export default {
         { title: '原厂编码', dataIndex: 'productOrigCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品品牌', dataIndex: 'productBrandName', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 180, align: 'center' },
-        { title: '实时库存数(个)', scopedSlots: { customRender: 'stockQty' }, width: 110, align: 'center' },
+        // { title: '实时库存数(个)', scopedSlots: { customRender: 'stockQty' }, width: 110, align: 'center' },
         { title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width: 100, align: 'center' },
-        { title: '总库存数(个)', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总库存数(个)', dataIndex: 'currentStockQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width: 110, align: 'center' },
         { title: '最小库存数(个)', scopedSlots: { customRender: 'lowerLimit' }, width: 110, align: 'center' },
         { title: '差异数量', dataIndex: 'differenceNum', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -394,39 +388,19 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
-    //  导出
-    handleExport () {
-      const params = this.queryParam
-      this.exportLoading = true
-      // customerBundleExportDelay(params).then(res => {
-      //   this.exportLoading = false
-      //   this.download(res)
-      // })
-    },
-    //  下载
-    download (data) {
-      if (!data) { return }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '库存预警' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.getProductType()
+      this.getProductBrand()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 245
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -435,11 +409,21 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getProductType()
-      vm.getProductBrand()
-    })
+    next(vm => {})
   }
 }
 </script>

+ 18 - 4
src/views/power/OperateJournal/OperateJournal.vue

@@ -37,6 +37,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <span slot="actDesc" slot-scope="text, record">{{ record.actDate }}-{{ record.actDesc }}</span>
         <span slot="actorName" slot-scope="text, record">{{ record.actorName }}-{{ record.actorPhone }}</span>
@@ -108,16 +109,29 @@ export default {
       this.queryParam.actorName = ''
       this.$refs.table.refresh(true)
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 195
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
   }
 }
 </script>

+ 19 - 6
src/views/power/dataDictionary/dataDictionary.vue

@@ -79,6 +79,7 @@
             rowKey="id"
             :columns="columns"
             :data="loadData"
+            :defaultLoadData="false"
             bordered
           >
             <span slot="action" slot-scope="text, record">
@@ -276,6 +277,7 @@ export default {
     cancelSel () {
       this.selectedKey = []
       this.selectedMenu = ''
+      this.$refs.table.clearTable()
     },
 
     // 新增数据
@@ -341,16 +343,27 @@ export default {
       this.itemCodeData = row
     }
 
-  },
-  mounted () {
   },
   beforeCreate () {
     this.form = this.$form.createForm(this, { name: 'miniForm' })
   },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getCodeList()
-    })
+  // beforeRouteEnter (to, from, next) {
+  //   next(vm => {
+  //     vm.getCodeList()
+  //   })
+  // },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.getCodeList()
+      this.cancelSel()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.getCodeList()
+      this.cancelSel()
+    }
   },
   watch: {
     selectedKey (newValue, oldValue) {

+ 19 - 5
src/views/power/role/roleList.vue

@@ -40,6 +40,7 @@
         :data="loadData"
         :scroll="{ y: tableHeight }"
         style="word-break: break-all;"
+        :defaultLoadData="false"
         bordered>
         <!-- 启用禁用 -->
         <span slot="status" slot-scope="text, record">
@@ -217,16 +218,29 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 245
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.reset()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.reset()
+    }
   }
 }
 </script>

+ 19 - 5
src/views/power/user/userList.vue

@@ -39,6 +39,7 @@
         :data="loadData"
         :scroll="{ x: 1350, y: tableHeight }"
         style="word-break: break-all;"
+        :defaultLoadData="false"
         bordered
       >
         <span slot="status" slot-scope="text, record">
@@ -220,16 +221,29 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 245
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.reset()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.reset()
+    }
   }
 }
 </script>

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

@@ -0,0 +1,172 @@
+<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.size) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="重量:">{{ (detailsData && detailsData.weight) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="计量单位:">{{ (detailsData && detailsData.unit) || '--' }}</a-descriptions-item>
+          </a-descriptions>
+          <div class="productDetail">
+            <h4>产品介绍</h4>
+            <div class="productDesc">
+              <div v-if="detailsData && detailsData.description" v-html="detailsData.description"></div>
+              <span v-else>暂无产品介绍</span>
+            </div>
+          </div>
+        </div>
+        <div class="productImg" v-if="detailsData && detailsData.productMsg">
+          <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="detailsData.productMsg" /></div>
+          </a-carousel>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { productSnDetail } 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 () {
+      this.detailsData = null
+      productSnDetail({ sn: this.itemId }).then(res => {
+        if (res.status == 200) {
+          this.detailsData = res.data
+        } else {
+          this.detailsData = null
+        }
+      })
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.itemId = this.$route.params.sn
+      this.getDetail()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.itemId = this.$route.params.sn
+      this.getDetail()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style lang="less">
+/* For demo */
+.ant-carousel .slick-slide {
+  text-align: center;
+  overflow: hidden;
+  border: 1px solid #eee;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.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%;
+  max-height: 100%;
+}
+.newProductDetail-back {
+  margin-bottom: 10px;
+}
+.newProductDetail-modal {
+  background-color: #fff;
+  padding: 15px;
+  h4 {
+    font-size: 18px;
+  }
+  .productHead {
+    display: flex;
+    .productImg {
+      width: 240px;
+    }
+    .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>

+ 263 - 0
src/views/productManagement/newProduct/list.vue

@@ -0,0 +1,263 @@
+<template>
+  <a-card size="small" :bordered="false" class="productInfoList-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品编码">
+                <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品名称">
+                <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item :label="($route.params.onlineFalg=='1'?'上':'下')+'线时间'">
+                <rangeDate ref="rangeDate" @change="dateChange" />
+              </a-form-model-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品品牌">
+                  <a-select
+                    placeholder="请选择产品品牌"
+                    id="productInfoList-productBrandSn"
+                    allowClear
+                    v-model="queryParam.productBrandSn"
+                    :showSearch="true"
+                    option-filter-prop="children"
+                    :filter-option="filterOption">
+                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品分类">
+                  <a-cascader
+                    @change="changeProductType"
+                    change-on-select
+                    v-model="productType"
+                    expand-trigger="hover"
+                    :options="productTypeList"
+                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                    id="productInfoList-productType"
+                    placeholder="请选择产品分类"
+                    allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="原厂编码">
+                  <a-input id="productInfoList-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :defaultLoadData="false"
+        :scroll="{ x: 1090, y: tableHeight }"
+        bordered>
+        <!-- 上/下线时间 表头 -->
+        <template slot="auditTimeTit">
+          {{ $route.params.onlineFalg=='1'?'上':'下' }}线时间
+        </template>
+        <!-- 上/下线时间 内容 -->
+        <template slot="auditTime" slot-scope="text, record">
+          {{ $route.params.onlineFalg=='1'?record.onlineAuditTime:record.offlineAuditTime }}
+        </template>
+        <!-- 产品分类 -->
+        <template slot="productType" slot-scope="text, record">
+          <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-success"
+            @click="handleDetail(record)"
+            id="productInfoList-detail-btn">详情</a-button>
+        </template>
+      </s-table>
+    </a-spin>
+  </a-card>
+</template>
+
+<script>
+import { productBrandQuery } from '@/api/productBrand'
+import { productTypeQueryAll } from '@/api/productType'
+import { queryNewProductPage } from '@/api/product'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+export default {
+  components: { STable, VSelect, rangeDate },
+  data () {
+    return {
+      spinning: false,
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      productType: [],
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        code: '', //  产品编码
+        name: '', //  产品名称
+        origCode: '', //  原厂编码
+        sysFlag: '0',
+        productBrandSn: undefined, //  产品品牌
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '', //  产品三级分类
+        enabledFlag: undefined //  状态
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出loading
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 50, align: 'center' },
+        { slots: { title: 'auditTimeTit' }, scopedSlots: { customRender: 'auditTime' }, width: 140, align: 'center' },
+        { title: '产品品牌', dataIndex: 'productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
+        { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'origCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return queryNewProductPage(Object.assign(parameter, this.queryParam, { onlineFalg: this.$route.params.onlineFalg })).then(res => {
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          this.disabled = false
+          this.spinning = false
+          return data
+        })
+      },
+      openModal: false, //  查看详情  弹框
+      itemId: '', //  当前产品productSn
+      productBrandList: [], //  品牌下拉数据
+      productTypeList: [] //  分类下拉数据
+    }
+  },
+  methods: {
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.code = ''
+      this.queryParam.name = ''
+      this.queryParam.origCode = ''
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.queryParam.enabledFlag = undefined
+      this.productType = []
+      this.$refs.table.refresh(true)
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    //  详情
+    handleDetail (row) {
+      this.itemId = row.productSn
+      this.$router.push({ name: 'viewProduct', params: { sn: row.productSn } })
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    //  产品品牌  列表
+    getProductBrand () {
+      productBrandQuery({}).then(res => {
+        if (res.status == 200) {
+          this.productBrandList = res.data
+        } else {
+          this.productBrandList = []
+        }
+      })
+    },
+    //  产品分类  列表
+    getProductType () {
+      productTypeQueryAll({}).then(res => {
+        if (res.status == 200) {
+          this.productTypeList = res.data
+        } else {
+          this.productTypeList = []
+        }
+      })
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.getProductBrand()
+      this.getProductType()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 215
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 89 - 0
src/views/productManagement/newProduct/modal.vue

@@ -0,0 +1,89 @@
+<template>
+  <div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :scroll="{ y: 400 }"
+        :data="loadData"
+        :defaultLoadData="false"
+        :showPagination="false"
+        bordered>
+      </s-table>
+      <div style="padding-top: 15px;">
+        <a-button @click="viewMore" block type="primary" ghost>查看更多新品</a-button>
+      </div>
+    </a-spin>
+  </div>
+</template>
+
+<script>
+import { STable } from '@/components'
+import { queryNewProductPage } from '@/api/product'
+export default {
+  name: 'NewProduct',
+  components: { STable },
+  props: {
+    onlineFalg: { // 上下线标识  1为上线,0为下线
+      type: [ String, Number ],
+      default: '1'
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      queryParam: {},
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.spinning = true
+        return queryNewProductPage(Object.assign(parameter, this.queryParam, { onlineFalg: this.onlineFalg })).then(res => {
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: 50, align: 'center' },
+        { title: '产品品牌', dataIndex: 'productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'code', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.onlineFalg == '1') {
+        arr.push({ title: '上线时间', dataIndex: 'onlineAuditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } })
+      } else if (this.onlineFalg == '0') {
+        arr.push({ title: '下线时间', dataIndex: 'offlineAuditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    viewMore () {
+      this.$emit('seeMore')
+    }
+  },
+  mounted () {
+    this.$refs.table.refresh(true)
+  },
+  watch: {
+    onlineFalg (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.$refs.table.refresh(true)
+      }, 400)
+    }
+  }
+}
+</script>

+ 26 - 13
src/views/productManagement/priceChangeRecord/list.vue

@@ -25,9 +25,9 @@
                 <a-form-item label="品牌">
                   <a-select
                     placeholder="请选择"
-                    id="productChangeRecordList-brandSn"
+                    id="productChangeRecordList-productBrandSn"
                     allowClear
-                    v-model="queryParam.brandSn"
+                    v-model="queryParam.productBrandSn"
                     :showSearch="true"
                     option-filter-prop="children"
                     :filter-option="filterOption">
@@ -79,6 +79,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1810, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -236,7 +237,7 @@ export default {
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.code = ''
       this.queryParam.name = ''
-      this.queryParam.brandSn = undefined
+      this.queryParam.productBrandSn = undefined
       this.queryParam.productTypeSn1 = ''
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
@@ -330,17 +331,19 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.getProductBrand()
+      this.getProductType()
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 233
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -349,11 +352,21 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getProductBrand()
-      vm.getProductType()
-    })
+    next(vm => {})
   }
 }
 </script>

+ 1 - 0
src/views/productManagement/productBrand/detailModal.vue

@@ -78,6 +78,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.detailsData = null
       }
     },
     itemSn (newValue, oldValue) {

+ 19 - 5
src/views/productManagement/productBrand/list.vue

@@ -43,6 +43,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 产品图片 -->
         <template slot="imageUrl" slot-scope="text, record">
@@ -200,16 +201,29 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 245
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
   }
 }
 </script>

+ 13 - 1
src/views/productManagement/productCategory/list.vue

@@ -16,6 +16,7 @@
         :showPagination="false"
         :defaultExpandedRowKeys="defaultExpandedRowKeys"
         :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -75,7 +76,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 200
+          this.tableHeight = window.innerHeight - 190
         }
         return productTypeQuery({}).then(res => {
           //  递归去除空children
@@ -157,6 +158,17 @@ export default {
         })
       }
     }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.$refs.table.refresh(true)
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.$refs.table.refresh(true)
+    }
   }
 }
 </script>

+ 25 - 11
src/views/productManagement/productInfo/edit.vue

@@ -291,8 +291,10 @@ export default {
             })
             str = str.substr(0, str.length - 1)
             this.$refs.productMsg.setFileList(str)
+            this.form.productMsg = str
           } else {
             this.$refs.productMsg.setFileList('')
+            this.form.productMsg = ''
           }
           this.$refs.editor.setHtml(res.data.description)
           this.$refs.otherDesc.setHtml(res.data.otherDesc)
@@ -411,20 +413,32 @@ export default {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
+    },
+    pageInit () {
+      this.$refs.productMsg.setFileList('')
+      this.$refs.editor.setHtml('')
+      this.$refs.otherDesc.setHtml('')
+      this.$refs.ruleForm.resetFields()
+      this.getProductBrand()
+      this.getProductType()
+      if (this.$route.params.id) { //  编辑页
+        this.getDetail()
+      }
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.$refs.productMsg.setFileList('')
-      vm.$refs.editor.setHtml('')
-      vm.$refs.otherDesc.setHtml('')
-      vm.$refs.ruleForm.resetFields()
-      vm.getProductBrand()
-      vm.getProductType()
-      if (vm.$route.params.id) { //  编辑页
-        vm.getDetail()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 24 - 11
src/views/productManagement/productInfo/list.vue

@@ -116,6 +116,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1650, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 自定义表头 -->
         <template slot="arrowFalgTitle">
@@ -575,17 +576,19 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.getProductBrand()
+      this.getProductType()
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 245
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -594,11 +597,21 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getProductBrand()
-      vm.getProductType()
-    })
+    next(vm => {})
   }
 }
 </script>

+ 18 - 4
src/views/productManagement/productLaunchAudit/list.vue

@@ -50,6 +50,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1200, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -197,16 +198,29 @@ export default {
       console.log('selectedRowKeys changed: ', selectedRowKeys)
       this.selectedRowKeys = selectedRowKeys
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
   }
 }
 </script>

+ 23 - 10
src/views/productManagement/productLevel/list.vue

@@ -75,6 +75,7 @@
       :columns="columns"
       :data="loadData"
       :scroll="{ x: 1210, y: tableHeight }"
+      :defaultLoadData="false"
       bordered>
       <!-- 产品分类 -->
       <template slot="productType" slot-scope="text, record">
@@ -240,17 +241,19 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.getProductBrand()
+      this.getProductType()
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 195
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -259,11 +262,21 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getProductBrand()
-      vm.getProductType()
-    })
+    next(vm => {})
   }
 }
 </script>

+ 26 - 13
src/views/productManagement/productOfflineAudit/list.vue

@@ -12,7 +12,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="产品编码/通用编码">
-                <a-input id="productOfflineAuditList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码/通用编码"/>
+                <a-input id="productOfflineAuditList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/通用编码"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -95,6 +95,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1600, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -131,7 +132,7 @@ export default {
       tableHeight: 0,
       queryParam: { //  查询条件
         name: '', //  产品名称
-        code: '', // 产品编码
+        queryWord: '',
         productBrandSn: undefined, //  产品品牌
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
@@ -200,7 +201,7 @@ export default {
     //  重置
     resetSearchForm () {
       this.queryParam.name = ''
-      this.queryParam.code = ''
+      this.queryParam.queryWord = ''
       this.queryParam.productBrandSn = undefined
       this.queryParam.productTypeSn1 = ''
       this.queryParam.productTypeSn2 = ''
@@ -289,17 +290,19 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.getProductBrand()
+      this.getProductType()
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -308,11 +311,21 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getProductBrand()
-      vm.getProductType()
-    })
+    next(vm => {})
   }
 }
 </script>

+ 23 - 10
src/views/productManagement/productPricing/list.vue

@@ -71,6 +71,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1870, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -245,17 +246,19 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.getProductBrand()
+      this.getProductType()
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 195
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -264,11 +267,21 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getProductBrand()
-      vm.getProductType()
-    })
+    next(vm => {})
   }
 }
 </script>

+ 21 - 7
src/views/productManagement/productUniversal/list.vue

@@ -57,6 +57,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1230, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -206,17 +207,17 @@ export default {
       document.body.appendChild(link)
       link.click()
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 245
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -225,6 +226,19 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   beforeRouteEnter (to, from, next) {
     next(vm => {})
   }

+ 0 - 116
src/views/productManagement/purchaseBaseLimit/editModal.vue

@@ -1,116 +0,0 @@
-<template>
-  <a-modal
-    centered
-    class="purchaseBaseLimitEdit-modal"
-    :footer="null"
-    :maskClosable="false"
-    title="编辑价格"
-    v-model="isShow"
-    @cancle="isShow=false"
-    :width="800">
-    <div>
-      <a-form-model
-        id="purchaseBaseLimitEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="purchaseBaseLimitEdit-save" @click="handleSave">保存</a-button>
-        <a-button id="purchaseBaseLimitEdit-cancel" @click="isShow = false" style="margin-left: 100px;">取消</a-button>
-      </div>
-    </div>
-  </a-modal>
-</template>
-
-<script>
-// import { dealerProductDetail } from '@/api/dealerProduct'
-export default {
-  name: 'PurchaseBaseLimitEditModal',
-  props: {
-    openModal: { //  弹框显示状态
-      type: Boolean,
-      default: false
-    },
-    itemId: {
-      type: [Number, String],
-      default: ''
-    }
-  },
-  computed: {
-    productTypeName () {
-      const productTypeName1 = this.detailsData.productTypeName1 ? this.detailsData.productTypeName1 : ''
-      const productTypeName2 = this.detailsData.productTypeName2 ? ' > ' + this.detailsData.productTypeName2 : ''
-      const productTypeName3 = this.detailsData.productTypeName3 ? ' > ' + this.detailsData.productTypeName3 : ''
-      return productTypeName1 + productTypeName2 + productTypeName3
-    }
-  },
-  data () {
-    return {
-      isShow: this.openModal, //  是否打开弹框
-      formItemLayout: {
-        labelCol: { span: 4 },
-        wrapperCol: { span: 16 }
-      },
-      detailsData: null, //  详情数据
-      form: {
-        storageQuantity: ''
-      },
-      rules: {
-        supplierName: [
-          { required: true, message: '请输入供应商名称', trigger: 'blur' }
-        ]
-      },
-      brandData: []
-    }
-  },
-  methods: {
-    //  获取详情
-    getDetail () {
-      // dealerProductDetail({ id: this.itemId }).then(res => {
-      //   if (res.status == 200) {
-      //     this.detailsData = res.data
-      //   } else {
-      //     this.detailsData = null
-      //   }
-      // })
-    },
-    // 保存
-    handleSave () {
-
-    }
-  },
-  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">
-  .purchaseBaseLimitEdit-modal{
-    .ant-modal-body {
-      padding: 40px 40px 24px;
-    }
-    .btn-cont {
-      text-align: center;
-      margin: 35px 0 30px;
-    }
-  }
-</style>

+ 0 - 248
src/views/productManagement/purchaseBaseLimit/list.vue

@@ -1,248 +0,0 @@
-<template>
-  <a-card size="small" :bordered="false" class="purchaseBaseLimitList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品名称">
-              <a-input id="purchaseBaseLimitList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品编码">
-              <a-input id="purchaseBaseLimitList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="品牌">
-              <a-select
-                placeholder="请选择"
-                id="purchaseBaseLimitList-productBrandSn"
-                allowClear
-                v-model="queryParam.productBrandSn"
-                :showSearch="true"
-                option-filter-prop="children"
-                :filter-option="filterOption">
-                <a-select-option v-for="item in productBrandList" :key="item.productBrandSn" :value="item.productBrandSn">{{ item.productBrandName }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
-            <a-col :md="6" :sm="24">
-              <a-form-item label="产品分类">
-                <a-cascader
-                  @change="changeProductType"
-                  change-on-select
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="purchaseBaseLimitList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear />
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="客户级别">
-                <v-select code="ENABLED_FLAG" id="purchaseBaseLimitList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择客户级别"></v-select>
-              </a-form-item>
-            </a-col>
-          </template>
-          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseBaseLimitList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="purchaseBaseLimitList-reset">重置</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="purchaseBaseLimitList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1120 }"
-      bordered>
-      <!-- 产品分类 -->
-      <template slot="productType" slot-scope="text, record">
-        <a-tooltip placement="top">
-          <template slot="title">
-            <span>{{ record.productTypeName }}</span>
-          </template>
-          {{ record.productTypeName3 }}
-        </a-tooltip>
-      </template>
-      <!-- 产品状态 -->
-      <template slot="status" slot-scope="text, record">
-        <a-tag :color="record.status==1?'green':'red'" >{{ record.status==1? '待提交': '待单据审核' }}</a-tag>
-      </template>
-      <!-- 定价状态 -->
-      <template slot="sstatus" slot-scope="text, record">
-        <a-tag :color="record.status==1?'green':'red'" >{{ record.status==1? '待提交': '待单据审核' }}</a-tag>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" @click="handleDel(record)" id="purchaseBaseLimitList-del-btn">删除</a-button>
-      </template>
-    </s-table>
-    <!-- 编辑 -->
-    <purchase-base-limit-edit-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
-  </a-card>
-</template>
-
-<script>
-// import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-// import { dealerProductTypeQuery } from '@/api/dealerProductType'
-import { STable, VSelect } from '@/components'
-import purchaseBaseLimitEditModal from './editModal.vue'
-export default {
-  components: { STable, VSelect, purchaseBaseLimitEditModal },
-  data () {
-    return {
-      advanced: true, // 高级搜索 展开/关闭
-      queryParam: { //  查询条件
-        productName: '', //  产品名称
-        productCode: '', //  产品编码/原厂编码
-        productBrandSn: undefined, //  品牌
-        productTypeSn1: '', //  产品一级分类
-        productTypeSn2: '', //  产品二级分类
-        productTypeSn3: '', //  产品三级分类
-        enabledFlag: undefined //  定价状态
-      },
-      disabled: false, //  查询、重置按钮是否可操作
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
-        { title: '客户级别', dataIndex: 'productdName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
-        { title: '产品品牌', dataIndex: 'productBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return dealerProductList(Object.assign(parameter, this.queryParam)).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //     const productTypeName1 = data.list[i].productTypeName1 ? data.list[i].productTypeName1 : ''
-        //     const productTypeName2 = data.list[i].productTypeName2 ? ' > ' + data.list[i].productTypeName2 : ''
-        //     const productTypeName3 = data.list[i].productTypeName3 ? ' > ' + data.list[i].productTypeName3 : ''
-        //     data.list[i].productTypeName = productTypeName1 + productTypeName2 + productTypeName3
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productPic: ['https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg', 'https://qn.antdv.com/vue.png'], productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
-            ]
-          }
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      },
-      openModal: false, //  编辑  弹框
-      itemId: '', //  当前产品id
-      productBrandList: [], //  品牌下拉数据
-      productTypeList: [] //  分类下拉数据
-    }
-  },
-  methods: {
-    //  重置
-    resetSearchForm () {
-      this.queryParam.productCode = ''
-      this.queryParam.productName = ''
-      this.queryParam.productBrandSn = undefined
-      this.queryParam.productTypeSn1 = ''
-      this.queryParam.productTypeSn2 = ''
-      this.queryParam.productTypeSn3 = ''
-      this.queryParam.enabledFlag = undefined
-      this.$refs.table.refresh(true)
-    },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
-    //  新增
-    handleAdd () {
-      this.openModal = true
-    },
-    //  关闭弹框
-    closeModal () {
-      this.itemId = ''
-      this.openModal = false
-    },
-    // 删除
-    handleDel (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确认要删除吗?',
-        centered: true,
-        onOk () {
-          // salesDel({ id: row.id }).then(res => {
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //   }
-          // })
-        }
-      })
-    },
-    //  产品分类  change
-    changeProductType (val, opt) {
-      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
-      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
-      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
-    },
-    //  产品品牌  列表
-    getProductBrand () {
-      dealerProductBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      dealerProductTypeQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getProductBrand()
-      vm.getProductType()
-    })
-  }
-}
-</script>

+ 1 - 0
src/views/promotionRulesManagement/orderStatistics/detailModal.vue

@@ -96,6 +96,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.$refs.table.clearTable()
       }
     },
     itemSn (newValue, oldValue) {

+ 20 - 6
src/views/promotionRulesManagement/orderStatistics/list.vue

@@ -73,6 +73,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1510, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -213,17 +214,17 @@ export default {
       this.itemSn = ''
       this.nowData = null
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -232,6 +233,19 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   beforeRouteEnter (to, from, next) {
     next(vm => {})
   }

+ 1 - 0
src/views/promotionRulesManagement/productStatistics/detailModal.vue

@@ -97,6 +97,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.$refs.table.clearTable()
       }
     },
     itemSn (newValue, oldValue) {

+ 23 - 10
src/views/promotionRulesManagement/productStatistics/list.vue

@@ -78,6 +78,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -235,17 +236,19 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.getProductBrand()
+      this.getProductType()
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -254,11 +257,21 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getProductBrand()
-      vm.getProductType()
-    })
+    next(vm => {})
   }
 }
 </script>

+ 20 - 9
src/views/promotionRulesManagement/promotionRules/detail.vue

@@ -222,16 +222,16 @@ export default {
     handleBack () {
       this.$router.push({ path: '/promotionRulesManagement/promotionRules/list', query: { closeLastOldTab: true } })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       this.tableHeight = window.innerHeight - 400
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     detailsData: {
       handler (newValue, oldValue) {
@@ -242,10 +242,21 @@ export default {
       deep: true
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.getDetail()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
+      this.getDetail()
+    }
+  },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getDetail()
-    })
+    next(vm => {})
   }
 }
 </script>

+ 22 - 5
src/views/promotionRulesManagement/promotionRules/list.vue

@@ -41,6 +41,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1210, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 促销时间 -->
         <template slot="activeDate" slot-scope="text, record">
@@ -204,16 +205,32 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 245
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
   }
 }
 </script>

+ 21 - 4
src/views/promotionRulesManagement/promotionRules/rule.vue

@@ -22,6 +22,7 @@
           :data="loadData"
           :scroll="{ y: tableHeight }"
           :showPagination="false"
+          :defaultLoadData="false"
           bordered>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
@@ -137,15 +138,31 @@ export default {
     handleBack () {
       this.$router.push({ path: '/promotionRulesManagement/promotionRules/list', query: { closeLastOldTab: true } })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       this.tableHeight = window.innerHeight - 250
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.$refs.table.refresh(true)
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
+      this.$refs.table.refresh(true)
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
   }
 }
 </script>

+ 20 - 10
src/views/purchasingManagement/bulkWarehousingOrder/edit.vue

@@ -7,15 +7,10 @@
         <template slot="subTitle">
           <a id="bulkWarehousingOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         </template>
-        <!-- 操作区,位于 title 行的行尾 -->
-        <!-- <template slot="extra">
-          <a-button key="2" id="bulkWarehousingOrderEdit-preview-btn">打印预览</a-button>
-          <a-button key="1" type="primary" id="bulkWarehousingOrderEdit-print-btn">快速打印</a-button>
-        </template> -->
       </a-page-header>
       <!-- 基础信息 -->
       <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
-        <a-collapse :activeKey="['1']">
+        <a-collapse :activeKey="['1']" v-if="productTotal">
           <a-collapse-panel key="1">
             <template slot="header">
               基础信息
@@ -34,7 +29,7 @@
           <a-button id="bulkWarehousingOrderEdit-add" type="primary" class="button-error" @click="handleEdit()">新增产品</a-button>
         </div>
         <!-- 总计 -->
-        <a-alert type="info" style="margin-bottom:10px">
+        <a-alert type="info" v-if="productTotal" style="margin-bottom:10px">
           <div slot="message">
             入库数量 <strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong> ,
             入库金额 <strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong>
@@ -48,6 +43,7 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
+          :defaultLoadData="false"
           bordered>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
@@ -167,12 +163,26 @@ export default {
           this.productTotal = null
         }
       })
+    },
+    pageInit () {
+      this.productTotal = null
+      this.openModal = false
+      this.$refs.table.refresh(true)
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.openModal = false
-    })
+    next(vm => {})
   }
 }
 </script>

+ 23 - 10
src/views/purchasingManagement/bulkWarehousingOrder/list.vue

@@ -50,6 +50,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1550, y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 入库单号 -->
         <template slot="sparePartsNo" slot-scope="text, record">
@@ -270,23 +271,35 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.openModal = false
+      this.openDetailModal = false
+      this.itemSn = null
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 245
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.openModal = false
-      vm.openDetailModal = false
-      vm.itemSn = null
-    })
+    next(vm => {})
   }
 }
 </script>

+ 26 - 2
src/views/purchasingManagement/bulkWarehousingOrder/productModal.vue

@@ -68,7 +68,7 @@
         </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
-        <a-button type="primary" id="bulkWarehousingOrder-product-modal-save" @click="handleSave">保存</a-button>
+        <a-button type="primary" id="bulkWarehousingOrder-product-modal-save" @click="handleSave">保存并新增</a-button>
         <a-button id="bulkWarehousingOrder-product-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
       </div>
     </a-spin>
@@ -196,14 +196,23 @@ export default {
           form.sparePartsSn = this.nowData.sparePartsSn
           form.sparePartsNo = this.nowData.sparePartsNo
           form.supplierSn = this.nowData.supplierSn
+          if (!_this.itemSn) {
+            delete form.id
+            delete form.sparePartsDetailSn
+          }
           _this.spinning = true
           sparePartsSaveDetail(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               setTimeout(() => {
-                _this.isShow = false
                 _this.$emit('ok', res.data)
                 _this.spinning = false
+                _this.form.productSn = undefined
+                _this.form.productName = ''
+                _this.form.productCode = ''
+                _this.form.productOrigCode = ''
+                _this.form.productCost = ''
+                _this.form.productQty = ''
               }, 1000)
             } else {
               _this.spinning = false
@@ -267,6 +276,20 @@ export default {
           this.warehouseCascadeData = []
         }
       })
+    },
+    resetData () {
+      this.form = {
+        supplierSn: '', // 供应商
+        productSn: undefined,
+        productName: '',
+        productCode: '',
+        productOrigCode: '',
+        warehouse: [],
+        warehouseSn: '',
+        warehouseLocationSn: '',
+        productCost: '',
+        productQty: ''
+      }
     }
   },
   watch: {
@@ -279,6 +302,7 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.$refs.ruleForm.resetFields()
+        this.resetData()
         this.warehouseSnBackups = ''
         this.warehouseLocationSnBackups = ''
       } else {

+ 16 - 5
src/views/reportData/actualSalesReport/list.vue

@@ -41,7 +41,7 @@
               </a-col>
               <a-col :md="12" :sm="24">
                 <a-row>
-                  <a-form-model-item label="地区">
+                  <a-form-model-item label="地区" style="margin-bottom: 0!important;">
                     <a-col span="7">
                       <a-form-model-item prop="dealerProvinceSn" style="margin: 0;">
                         <a-select v-model="queryParam.dealer.provinceSn" allowClear @change="getCityList" placeholder="请选择省">
@@ -83,11 +83,11 @@
         class="sTable"
         ref="table"
         size="small"
-        :defaultLoadData="false"
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 3120 }"
+        :defaultLoadData="false"
         bordered>
         <template slot="footer">
           <a-row>
@@ -445,10 +445,21 @@ export default {
       })
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.getArea('province')
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.getArea('province')
+      this.resetSearchForm()
+    }
+  },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getArea('province')
-    })
+    next(vm => {})
   }
 }
 </script>

+ 23 - 8
src/views/reportData/allocationDetails/list.vue

@@ -124,6 +124,7 @@
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
+                v-if="$hasPermissions('B_allocationDetails_Export')"
                 id="allocationDetailsList-export">导出</a-button>
               <a @click="advanced=!advanced">
                 {{ advanced ? '收起' : '展开' }}
@@ -234,7 +235,7 @@ export default {
         { title: '毛利', dataIndex: 'grossProfit', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '仓库', dataIndex: 'warehouseName', width: 200, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
         { title: '仓位', dataIndex: 'warehouseLocationName', width: 200, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
-        { title: '操作员', dataIndex: 'creatorName', width: 150, align: 'center', sorter: true, customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '操作员', dataIndex: 'creatorName', width: 150, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '调拨类型', dataIndex: 'allocateTypeName', width: 140, align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -455,16 +456,30 @@ export default {
           }
         }
       })
+    },
+    pageInit () {
+      this.getProductBrand()
+      this.getProductType()
+      this.getAllocateTypeAllList()
+      this.getUserList()
+      this.getArea('province')
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getProductBrand()
-      vm.getProductType()
-      vm.getAllocateTypeAllList()
-      vm.getUserList()
-      vm.getArea('province')
-    })
+    next(vm => {})
   }
 }
 </script>

+ 18 - 4
src/views/reportData/allocationOrderTotal/list.vue

@@ -237,13 +237,27 @@ export default {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
+    },
+    pageInit () {
+      this.getAllocateTypeAllList()
+      this.getUserList()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getAllocateTypeAllList()
-      vm.getUserList()
-    })
+    next(vm => {})
   }
 }
 </script>

+ 18 - 4
src/views/reportData/billingReturnReport/list.vue

@@ -41,7 +41,7 @@
               </a-col>
               <a-col :md="12" :sm="24">
                 <a-row>
-                  <a-form-model-item label="地区">
+                  <a-form-model-item label="地区" style="margin-bottom: 0!important;">
                     <a-col span="7">
                       <a-form-model-item prop="dealerProvinceSn" style="margin: 0;">
                         <a-select v-model="queryParam.dealer.provinceSn" allowClear @change="getCityList" placeholder="请选择省">
@@ -445,12 +445,26 @@ export default {
           }
         }
       })
+    },
+    pageInit () {
+      this.getArea('province')
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getArea('province')
-    })
+    next(vm => {})
   }
 }
 </script>

+ 17 - 0
src/views/reportData/districtTypeSalesDetails/list.vue

@@ -31,6 +31,7 @@
       :columns="columns"
       :data="loadData"
       :scroll="{ x: 3450 }"
+      :defaultLoadData="false"
       bordered>
     </s-table>
   </a-card>
@@ -147,6 +148,22 @@ export default {
       this.queryParam.state = undefined
       this.queryParam.allocateNo = ''
       this.$refs.table.refresh(true)
+    },
+    pageInit () {
+
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 21 - 6
src/views/reportData/hPriceDifferenceDetailReport/list.vue

@@ -194,6 +194,9 @@ export default {
       loadData: parameter => {
         this.disabled = true
         const params = Object.assign(parameter, this.queryParam)
+        if (!params.dealer.dealerSn && !params.dealer.dealerLevel && !params.dealer.subareaSn && !params.dealer.provinceSn) {
+          delete params.dealer
+        }
         delete params.time
         this.spinning = true
         return headRebateDetailReportList(params).then(res => {
@@ -312,17 +315,29 @@ export default {
       this.queryParam.bizType = undefined
       this.productType = []
       this.totalData = null
-      if (this.advanced) {
-        this.$refs.custList.resetForm()
-      }
+      this.$refs.custList.resetForm()
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
+    },
+    pageInit () {
+      this.getArea('province')
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getArea('province')
-    })
+    next(vm => {})
   }
 }
 </script>

+ 17 - 0
src/views/reportData/nationalCustomerCostStatistics/list.vue

@@ -68,6 +68,7 @@
       :showPagination="false"
       :data="loadData"
       :scroll="{ x: 2920 }"
+      :defaultLoadData="false"
       bordered>
     </s-table>
   </a-card>
@@ -410,6 +411,22 @@ export default {
       this.queryParam.state = undefined
       this.queryParam.allocateNo = ''
       this.$refs.table.refresh(true)
+    },
+    pageInit () {
+
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 20 - 5
src/views/reportData/priceDifferenceDetailReport/list.vue

@@ -46,6 +46,7 @@
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
+                v-if="$hasPermissions('B_priceDifferenceDetail_Export')"
                 id="allocationDetailsList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
@@ -99,7 +100,7 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       exportLoading: false,
       queryParam: { //  查询条件
-        month: moment(),
+        month: moment().format('YYYY-MM'),
         provinceSn: undefined,
         rebateDealerSn: undefined,
         dealerSn: undefined
@@ -207,7 +208,7 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.month = undefined
+      this.queryParam.month = moment().format('YYYY-MM')
       this.queryParam.provinceSn = undefined
       this.queryParam.rebateDealerSn = undefined
       this.queryParam.dealerSn = undefined
@@ -254,12 +255,26 @@ export default {
       link.setAttribute('download', fname + '.xlsx')
       document.body.appendChild(link)
       link.click()
+    },
+    pageInit () {
+      this.getArea('province')
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getArea('province')
-    })
+    next(vm => {})
   }
 }
 </script>

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff