Przeglądaj źródła

Merge branch 'develop' of jianguan-web/qpls-md-html into master

陈瑞 3 lat temu
rodzic
commit
9f2377ed20
33 zmienionych plików z 1019 dodań i 254 usunięć
  1. 0 34
      public/index.html
  2. 3 0
      public/version.json
  3. 11 0
      src/api/dealerProduct.js
  4. 37 0
      src/api/reportData.js
  5. BIN
      src/assets/upBrowser/t1.png
  6. BIN
      src/assets/upBrowser/t2.png
  7. BIN
      src/assets/upBrowser/t3.png
  8. BIN
      src/assets/upBrowser/t4.png
  9. BIN
      src/assets/upBrowser/temp1.png
  10. 5 3
      src/components/MultiTab/MultiTab.vue
  11. 36 1
      src/config/router.config.js
  12. 8 2
      src/layouts/PageView.vue
  13. 28 0
      src/libs/versionUpdate.js
  14. 4 2
      src/permission.js
  15. 1 1
      src/utils/util.js
  16. 2 2
      src/views/bulkManagement/bulkImport/list.vue
  17. 74 0
      src/views/exception/updateBrowser.vue
  18. 2 2
      src/views/inventoryManagement/inventoryImport/list.vue
  19. 2 5
      src/views/productManagement/newProduct/detail.vue
  20. 8 5
      src/views/productManagement/productOnlineInfo/list.vue
  21. 26 16
      src/views/reportData/chainPurchaseReceiptReport/purchaseReceiptDetail.vue
  22. 24 14
      src/views/reportData/chainPurchaseReceiptReport/purchaseReceiptOrder.vue
  23. 32 2
      src/views/reportData/chainReceivedSendStorageReport/list.vue
  24. 231 0
      src/views/reportData/inventoryReport/inventoryDetail.vue
  25. 119 119
      src/views/reportData/inventoryReport/inventoryOrder.vue
  26. 36 5
      src/views/reportData/inventoryReport/list.vue
  27. 27 17
      src/views/reportData/purchaseReceiptReport/purchaseReceiptDetail.vue
  28. 24 14
      src/views/reportData/purchaseReceiptReport/purchaseReceiptOrder.vue
  29. 32 2
      src/views/reportData/receivedSendStorageReport/list.vue
  30. 8 4
      src/views/reportData/salesDetailReport/list.vue
  31. 8 4
      src/views/reportData/salesReport/list.vue
  32. 220 0
      src/views/salesManagement/productPricing/list.vue
  33. 11 0
      src/views/user/Login.vue

+ 0 - 34
public/index.html

@@ -13,40 +13,6 @@
     <link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
     <% } %>
      <script src="./menus.js"></script>
-    <script>
-    	//  非谷歌浏览器或非IE11时,则提示下载谷歌浏览器进行访问
-    	function BrowserType () {
-    	  var userAgent = navigator.userAgent // 取得浏览器的userAgent字符串
-    	  var isOpera = userAgent.indexOf('Opera') > -1 // 判断是否Opera浏览器
-    	  // var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器
-    	  var isIE = window.ActiveXObject || 'ActiveXObject' in window
-    	  // var isEdge = userAgent.indexOf("Windows NT 6.1; Trident/7.0;") > -1 && !isIE; //判断是否IE的Edge浏览器
-    	  var isEdge = userAgent.indexOf('Edge') > -1 // 判断是否IE的Edge浏览器
-    	  var isFF = userAgent.indexOf('Firefox') > -1 // 判断是否Firefox浏览器
-    	  var isSafari = userAgent.indexOf('Safari') > -1 && userAgent.indexOf('Chrome') == -1 // 判断是否Safari浏览器
-    	  var isChrome = userAgent.indexOf('Chrome') > -1 && userAgent.indexOf('Safari') > -1 && !isEdge // 判断Chrome浏览器
-    	
-    	  if (isIE) {
-    	    var reIE = new RegExp('MSIE (\\d+\\.\\d+);')
-    	    reIE.test(userAgent)
-    	    var fIEVersion = parseFloat(RegExp['$1'])
-    		console.log(fIEVersion)
-    	    if (userAgent.indexOf('MSIE 6.0') != -1 || fIEVersion<11) {
-    	      var con = alert('当前浏览器版本过低,为保证更好体验请下载谷歌浏览器进行操作, 点击【确定】升级,如不升级您将不能正常浏览网页!' + '\n' + '下载地址:“https://www.google.cn/chrome”') // 在页面上弹出对话框
-    	      if (con == true) {} else {
-    	        window.location = 'https://www.google.cn/chrome'
-    	      }
-    	    }
-    	  } // isIE end
-    	
-    	  if (isFF) { return 'FF' }
-    	  if (isOpera) { return 'Opera' }
-    	  if (isSafari) { return 'Safari' }
-    	  if (isChrome) { return 'Chrome' }
-    	  if (isEdge) { return 'Edge' }
-    	} 
-    	BrowserType()
-    </script>
   </head>
   <body>
     <noscript>

+ 3 - 0
public/version.json

@@ -0,0 +1,3 @@
+{
+    "version": "1.0.4"
+}

+ 11 - 0
src/api/dealerProduct.js

@@ -71,3 +71,14 @@ export const giftsDetailList = (params) => {
     method: 'post'
   })
 }
+//  产品定价 列表  分页
+export const dealerProductPriceList = (params) => {
+  const url = `/dealerProduct/queryPageForSalesOffer/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 37 - 0
src/api/reportData.js

@@ -18,6 +18,15 @@ export const linkageReportPageTotal = (params) => {
     method: 'post'
   })
 }
+// 连锁收发存报表  导出
+export const reportChainStockPutOutExport = params => {
+  return axios.request({
+    url: `/report/reportStockPutOut/exportLinkageReport`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
 // 收发存报表-分页列表
 export const reportPageList = (params) => {
   const url = `report/reportStockPutOut/reportPage/${params.pageNo}/${params.pageSize}`
@@ -45,6 +54,15 @@ export const reportStockPutOutCount = (params) => {
     method: 'post'
   })
 }
+// 收发存报表  导出
+export const reportStockPutOutExport = params => {
+  return axios.request({
+    url: `/report/reportStockPutOut/exportReport`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
 // 大客户报表-分页列表
 export const reportBigCustomerList = (params) => {
   const url = `report/reportBigCustomer/reportPage/${params.pageNo}/${params.pageSize}`
@@ -204,6 +222,25 @@ export const reportCheckWarehouseCount = (params) => {
     method: 'post'
   })
 }
+// 盘点报表  盘点明细报表 列表 分页
+export const reportCheckWarehouseDetailList = (params) => {
+  const url = `/report/reportCheckWarehouse/reportDetailPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 盘点报表  盘点明细报表 合计
+export const reportCheckWarehouseDetailCount = (params) => {
+  return axios({
+    url: '/report/reportCheckWarehouse/reportDetailCount',
+    data: params,
+    method: 'post'
+  })
+}
 // 采购入库报表  采购入库单报表 列表 分页
 export const reportReceivingBillList = (params) => {
   const url = `/report/reportReceivingBill/reportPage/${params.pageNo}/${params.pageSize}`

BIN
src/assets/upBrowser/t1.png


BIN
src/assets/upBrowser/t2.png


BIN
src/assets/upBrowser/t3.png


BIN
src/assets/upBrowser/t4.png


BIN
src/assets/upBrowser/temp1.png


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

@@ -178,16 +178,18 @@ export default {
         const na = newVal.meta.title.indexOf('详情') >= 0
         const nb = newVal.meta.title.indexOf('新增') >= 0
         const nc = newVal.meta.title.indexOf('编辑') >= 0
+        const nxt = newVal.meta.replaceTab
         const oa = oldMenu.meta.title.indexOf('详情') >= 0
         const ob = oldMenu.meta.title.indexOf('新增') >= 0
         const oc = oldMenu.meta.title.indexOf('编辑') >= 0
-        if ((na || nb || nc || oa || ob || oc) && hasChildren) {
+        const oxt = oldMenu.meta.replaceTab
+        if ((na || nb || nc || nxt || oa || ob || oc || oxt) && hasChildren) {
           // 替换当前页签
           this.replaceTab(newVal, oldMenu)
           // 从列表打开新增,编辑
-          this.$store.state.app.isNewTab = na || nb || nc
+          this.$store.state.app.isNewTab = na || nb || nc || nxt
           // 从编辑,新增返回列表,刷新列表
-          this.$store.state.app.updateList = ob || oc
+          this.$store.state.app.updateList = ob || oc || oxt
           this.activeKey = newVal.name
         } else {
           // 新打开的页签

+ 36 - 1
src/config/router.config.js

@@ -66,7 +66,8 @@ export const asyncRouterMap = [
         component: () => import(/* webpackChunkName: "home" */ '@/views/productManagement/newProduct/detail'),
         meta: {
           title: '产品详情',
-          icon: 'home'
+          icon: 'home',
+          replaceTab: true
         },
         hidden: true
       },
@@ -233,6 +234,31 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/salesManagement/productPricing',
+            redirect: '/salesManagement/productPricing/list',
+            name: 'productPricing',
+            component: BlankLayout,
+            meta: {
+              title: '产品报价',
+              icon: 'file-search',
+              permission: 'M_productPricingList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'productPricingList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/productPricing/list.vue'),
+                meta: {
+                  title: '产品报价列表',
+                  icon: 'file-search',
+                  hidden: true,
+                  permission: 'M_productPricingList'
+                }
+              }
+            ]
+          },
           {
             path: '/salesManagement/giftRecord',
             redirect: '/salesManagement/giftRecord/list',
@@ -360,6 +386,7 @@ export const asyncRouterMap = [
                   title: '采购入库',
                   icon: 'money-collect',
                   hidden: true,
+                  replaceTab: true,
                   permission: 'B_purchaseReceiving'
                 }
               }
@@ -1043,6 +1070,7 @@ export const asyncRouterMap = [
                   title: '出入库明细',
                   icon: 'monitor',
                   hidden: true,
+                  replaceTab: true,
                   permission: 'B_inventoryInventoryQueryStock'
                 }
               }
@@ -1121,6 +1149,7 @@ export const asyncRouterMap = [
                   title: '盘点',
                   icon: 'reconciliation',
                   hidden: true,
+                  replaceTab: true,
                   permission: 'B_inventoryCheckingInventory'
                 }
               }
@@ -1182,6 +1211,7 @@ export const asyncRouterMap = [
                   title: '仓位列表',
                   icon: 'deployment-unit',
                   hidden: true,
+                  replaceTab: true,
                   permission: 'M_inventoryWarehouseStoringLocationList'
                 }
               }
@@ -2360,6 +2390,11 @@ export const constantRouterMap = [
       }
     ]
   },
+  {
+    path: '/updateBrowser',
+    name: 'updateBrowser',
+    component: () => import(/* webpackChunkName: "user" */ '@/views/exception/updateBrowser')
+  },
   {
     path: '/404',
     component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')

+ 8 - 2
src/layouts/PageView.vue

@@ -99,23 +99,29 @@ export default {
     // }
   },
   mounted () {
+    console.log(window.innerHeight, 'mounted')
     this.tabs = this.directTabs
     this.getPageMeta()
     this.setpageH()
     const _this = this
     window.onresize = () => {
       return (() => {
-        _this.$store.dispatch('SetWinHeight', window.innerHeight)
         _this.setpageH()
       })()
     }
   },
+  activated () {
+    this.setpageH()
+  },
   updated () {
     this.getPageMeta()
   },
   methods: {
     setpageH () {
-      this.pageHeight = window.innerHeight - 85
+      this.$nextTick(() => {
+        this.$store.dispatch('SetWinHeight', window.innerHeight)
+        this.pageHeight = window.innerHeight - 85
+      })
     },
     getPageMeta () {
       // eslint-disable-next-line

+ 28 - 0
src/libs/versionUpdate.js

@@ -0,0 +1,28 @@
+import axios from 'axios'
+import modal from 'ant-design-vue/es/modal'
+const isNewVersion = () => {
+  let url = `//${window.location.host}/version.json?t=${new Date().getTime()}`;
+  axios.get(url).then(res => {
+    if (res.status === 200) {
+      let vueVersion = res.data.version;
+      let localVueVersion = localStorage.getItem('vueVersion');
+      if (localVueVersion && localVueVersion != vueVersion) {
+        localStorage.setItem('vueVersion', vueVersion);
+        modal.info({
+          title: '提示',
+          content: '发现有新版本发布,将会强制刷新页面!',
+          onOk () {
+            window.location.reload()
+          }
+        })
+        return;
+      } else {
+        localStorage.setItem('vueVersion', vueVersion);
+      }
+    }
+  });
+}
+ 
+export default {
+  isNewVersion
+}

+ 4 - 2
src/permission.js

@@ -7,13 +7,15 @@ import '@/components/NProgress/nprogress.less' // progress bar custom style
 import notification from 'ant-design-vue/es/notification'
 import { setDocumentTitle, domTitle } from '@/utils/domUtil'
 import { ACCESS_TOKEN } from '@/store/mutation-types'
-
+import versionTood from '@/libs/versionUpdate'
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
 
-const whiteList = ['login', 'register', 'registerResult'] // no redirect whitelist
+const whiteList = ['login', 'register', 'registerResult','updateBrowser'] // no redirect whitelist
 const defaultRoutePath = '/home'
 
 router.beforeEach((to, from, next) => {
+  //判断当前代码版本是否与服务器中代码版本一致,如不一致则刷新页面获取最新
+  // versionTood.isNewVersion()
 	store.commit('TOGGLE_NOW_ROUTER',to.fullPath)
   NProgress.start() // start progress bar
   to.meta && (typeof to.meta.title !== 'undefined' && setDocumentTitle(`${to.meta.title} - ${domTitle}`))

+ 1 - 1
src/utils/util.js

@@ -3,7 +3,7 @@ export function timeFix () {
   const hour = time.getHours()
   return hour < 9 ? '早上好' : hour <= 11 ? '上午好' : hour <= 13 ? '中午好' : hour < 20 ? '下午好' : '晚上好'
 }
-
+ 
 export function welcome () {
   const arr = ['休息一会儿吧', '准备吃什么呢?', '要不要打一把 DOTA', '我猜你可能累了']
   const index = Math.floor(Math.random() * arr.length)

+ 2 - 2
src/views/bulkManagement/bulkImport/list.vue

@@ -198,8 +198,8 @@ export default {
           })
           reader.readAsText(res)
         } else {
-		  const fileName = '散件导入错误项' + moment().format('YYYY_MMDD')
-		  downloadExcel(res, fileName)
+          const fileName = '散件导入错误项' + moment().format('YYYYMMDDHHmmss')
+          downloadExcel(res, fileName)
         }
       })
     },

+ 74 - 0
src/views/exception/updateBrowser.vue

@@ -0,0 +1,74 @@
+<template>
+  <div class="upbrowser-box">
+    <div>
+      <h1>非常抱歉,当前浏览器由于版本太低,不支持访问系统!</h1>
+      <h3>请仔细阅读以下说明,如有疑问请联系客服,进行技术支持,感谢您的使用!</h3>
+    </div>
+    <div>
+      <h2>一、请使用或安装以下浏览器;</h2>
+      <div>
+        <p><a href="http://browser.360.cn/" target="_blank">360 浏览器</a>,<a href="https://browser.qq.com/" target="_blank">QQ 浏览器</a>或其它国产浏览器 (只支持极速模式),<a href="https://www.google.cn/intl/zh-CN/chrome/" target="_blank">谷歌浏览器</a>,<a href="http://www.firefox.com.cn/" target="_blank">火狐浏览器</a>,Microsoft Edge 等高级浏览器。</p>
+        <p>注意:不支持ie11及其以下版本访问iSCM系统(ie 浏览器微软已经放弃持续更新)。</p>
+      </div>
+      <h2>二、如果使用的是360,QQ或其它国产浏览器,仍然无法访问;</h2>
+      <div>
+        <p>请检查当前浏览器模式是否是极速模式,如下图所示。</p>
+        <p><img src="@/assets/upBrowser/temp1.png"></p>
+      </div>
+      <!-- <h2>三、建议安装使用"iSCM系统"桌面端软件,以便体验更好,更流畅的使用体验;</h2>
+      <div>
+        <h3>桌面端软件安装指南:</h3>
+        <p>1、下载软件</p>
+        <p><a href="https://iscm.360arrow.com/iSCM智慧供应链系统_v0.1.0.exe" target="_blank">点击下载:iSCM智慧供应链系统 Setup 0.1.0</a></p>
+        <p>2、安装软件 </p>
+        <p style="color:red;">注意:(如果被电脑杀毒软件误杀/误报/误拦截的情况,请安装之前先关闭退出杀毒软件,比如360安全卫士,360杀毒软件或其它杀毒软件)</p>
+        <p><img src="@/assets/upBrowser/t1.png"></p>
+        <p><img src="@/assets/upBrowser/t2.png"></p>
+        <p><img src="@/assets/upBrowser/t3.png"></p>
+        <p>3、点击完成打开软件 </p>
+        <p><img width="499px" src="@/assets/upBrowser/t4.png"></p>
+      </div> -->
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'UpdateBrowser',
+  components: {
+  },
+  data () {
+    return {
+    }
+  },
+  created () {
+    document.body.style.background = '#FFFFFF'
+  },
+  methods: {
+    toDownloadDesktop () {
+      this.$router.push({ name: 'login' })
+    }
+  }
+}
+</script>
+
+<style scoped lang="less">
+  .upbrowser-box{
+    width: 800px;
+    margin: 50px auto;
+    font-size: 14px;
+    h2,h1{
+      font-weight: bold;
+    }
+    h2{
+      color: #333;
+    }
+    a{
+      text-decoration: underline;
+      color: #096DD9;
+      &:hover{
+        color: #108EE9;
+      }
+    }
+  }
+</style>

+ 2 - 2
src/views/inventoryManagement/inventoryImport/list.vue

@@ -192,8 +192,8 @@ export default {
           })
           reader.readAsText(res)
         } else {
-		  const fileName = '库存导入错误项' + moment().format('YYYY_MMDD')
-		  downloadExcel(res, fileName)
+          const fileName = '库存导入错误项' + moment().format('YYYYMMDDHHmmss')
+          downloadExcel(res, fileName)
         }
       })
     },

+ 2 - 5
src/views/productManagement/newProduct/detail.vue

@@ -100,11 +100,8 @@ export default {
     }
   },
   activated () {
-    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面  (当前产品详情页的上级页分别有 上下线产品列表、箭冠产品列表和采购新增编辑页。因此处判断是否为子页是通过上级页路由路径是否有'/list',故需单独处理)
-    if ((this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) || (this.prevPageInfo && (this.prevPageInfo.name == 'purchaseOrderEdit' || this.prevPageInfo.name == 'purchaseOrderAdd'))) {
-      this.itemId = this.$route.params.sn
-      this.getDetail()
-    }
+    this.itemId = this.$route.params.sn
+    this.getDetail()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {

+ 8 - 5
src/views/productManagement/productOnlineInfo/list.vue

@@ -106,11 +106,12 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { productTypeQuery } from '@/api/productType'
-import { hdPrint } from '@/libs/JGPrint'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import { productList, productExport } from '@/api/product'
 export default {
   name: 'ProductJgList',
@@ -205,12 +206,14 @@ export default {
     // 导出
     handleExport () {
       const _this = this
-      _this.spinning = true
+      const params = _this.queryParam
       _this.exportLoading = true
-      // 打印或导出
-      hdPrint('', 'export', productExport, this.queryParam, '产品上线信息', function () {
-        _this.spinning = false
+      _this.spinning = true
+      productExport(params).then(res => {
+        const fileName = '产品上线信息' + moment().format('YYYYMMDDHHmmss')
+        downloadExcel(res, fileName)
         _this.exportLoading = false
+        _this.spinning = false
       })
     },
     //  产品分类  change

+ 26 - 16
src/views/reportData/chainPurchaseReceiptReport/purchaseReceiptDetail.vue

@@ -98,11 +98,12 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
-import { hdPrint } from '@/libs/JGPrint'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import { reportChainReceivingBillDetailList, reportChainReceivingBillDetailCount, reportReceivingBillDetailExport, linkageGroupList } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
@@ -133,15 +134,16 @@ export default {
       advanced: true, // 高级搜索 展开/关闭
       exportLoading: false,
       columns: [
-        { title: '采购入库单号', dataIndex: 'receivingBillNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '17%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '采购数量', dataIndex: 'qty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库数量', dataIndex: 'putQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '采购成本', dataIndex: 'totalAmount', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库成本', dataIndex: 'putAmount', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '财务审核时间', dataIndex: 'auditTime', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '采购单号', dataIndex: 'purchaseBillNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购入库单号', dataIndex: 'receivingBillNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '16%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购数量', dataIndex: 'qty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库数量', dataIndex: 'putQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '采购成本', dataIndex: 'totalAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库成本', dataIndex: 'putAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '财务审核时间', dataIndex: 'auditTime', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -242,12 +244,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      _this.spinning = true
-      _this.exportLoading = true
-      // 打印或导出
-      hdPrint('', 'export', reportReceivingBillDetailExport, this.queryParam, '连锁采购入库明细报表', function () {
-        _this.exportLoading = false
-        _this.spinning = false
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          reportReceivingBillDetailExport(params).then(res => {
+            const fileName = '连锁采购入库明细报表' + moment().format('YYYYMMDDHHmmss')
+            downloadExcel(res, fileName)
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
       })
     },
     // 连锁店

+ 24 - 14
src/views/reportData/chainPurchaseReceiptReport/purchaseReceiptOrder.vue

@@ -73,9 +73,10 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { hdPrint } from '@/libs/JGPrint'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import { reportChainReceivingBillList, reportChainReceivingBillCount, reportReceivingBillExport, linkageGroupList } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate },
@@ -97,13 +98,14 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
       columns: [
-        { title: '采购入库单号', dataIndex: 'receivingBillNo', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库款数', dataIndex: 'totalPutCategory', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '采购数量', dataIndex: 'totalQty', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库数量', dataIndex: 'totalPutQty', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '采购成本', dataIndex: 'totalAmount', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库成本', dataIndex: 'totalPutAmount', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '财务审核时间', dataIndex: 'auditTime', width: '17%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '采购单号', dataIndex: 'purchaseBillNo', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购入库单号', dataIndex: 'receivingBillNo', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库款数', dataIndex: 'totalPutCategory', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '采购数量', dataIndex: 'totalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库数量', dataIndex: 'totalPutQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '采购成本', dataIndex: 'totalAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库成本', dataIndex: 'totalPutAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '财务审核时间', dataIndex: 'auditTime', width: '16%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -191,12 +193,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      _this.spinning = true
-      _this.exportLoading = true
-      // 打印或导出
-      hdPrint('', 'export', reportReceivingBillExport, this.queryParam, '连锁采购入库单报表', function () {
-        _this.exportLoading = false
-        _this.spinning = false
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          reportReceivingBillExport(params).then(res => {
+            const fileName = '连锁采购入库单报表' + moment().format('YYYYMMDDHHmmss')
+            downloadExcel(res, fileName)
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
       })
     },
     // 连锁店

+ 32 - 2
src/views/reportData/chainReceivedSendStorageReport/list.vue

@@ -76,7 +76,16 @@
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="sendStorageReportList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="sendStorageReportList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
+              <a-button
+                style="margin-left: 5px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                v-if="$hasPermissions('B_chainReceivedSendStorageReportExport')"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="sendStorageReportList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -117,7 +126,8 @@ import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { dealerProductTypeList } from '@/api/dealerProductType'
-import { linkageReportPageList, linkageReportPageTotal, linkageGroupList } from '@/api/reportData'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import { linkageReportPageList, linkageReportPageTotal, linkageGroupList, reportChainStockPutOutExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect },
   data () {
@@ -249,6 +259,26 @@ export default {
       this.totalData = null
       this.$refs.table.clearTable()
     },
+    //  导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          params.auditDate = params.auditDate + '-01'
+          _this.exportLoading = true
+          _this.spinning = true
+          reportChainStockPutOutExport(params).then(res => {
+            const fileName = '连锁收发存报表' + moment().format('YYYYMMDDHHmmss')
+            downloadExcel(res, fileName)
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
+      })
+    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''

+ 231 - 0
src/views/reportData/inventoryReport/inventoryDetail.vue

@@ -0,0 +1,231 @@
+<template>
+  <div>
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="inventoryReportList-form"
+        ref="ruleForm"
+        class="form-model-con"
+        layout="inline"
+        :model="queryParam"
+        :rules="rules"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol"
+        @keyup.enter.native="handleSearch" >
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="财务审核时间" prop="time">
+              <rangeDate ref="rangeDate" @change="dateChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品编码">
+              <a-input id="productPricingList-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品名称">
+              <a-input id="productPricingList-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品品牌">
+                <ProductBrand id="productPricingList-productBrandSn" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品分类">
+                <ProductType id="productPricingList-productType" @change="changeProductType" v-model="productType"></ProductType>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="inventoryReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryReportList-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-model>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" style="margin-bottom:10px">
+      <div class="ftext" slot="message">
+        库存总数量:<strong>{{ (totalData && (totalData.stockQty || totalData.stockQty==0)) ? totalData.stockQty : '--' }}</strong>;
+        盘盈总数量:<strong>{{ (totalData && (totalData.checkProfitQty || totalData.checkProfitQty==0)) ? totalData.checkProfitQty : '--' }}</strong>;
+        盘亏总数量:<strong>{{ (totalData && (totalData.checkLossQty || totalData.checkLossQty==0)) ? totalData.checkLossQty : '--' }}</strong>;
+        盈亏总数量:<strong>{{ (totalData && (totalData.checkProfitLossQty || totalData.checkProfitLossQty==0)) ? totalData.checkProfitLossQty : '--' }}</strong>;
+        盈亏总成本:<strong>{{ (totalData && (totalData.checkProfitLossCost || totalData.checkProfitLossCost==0)) ? '¥'+totalData.checkProfitLossCost : '--' }}</strong>;
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.checkWarehouseSn"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { reportCheckWarehouseDetailList, reportCheckWarehouseDetailCount } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
+  data () {
+    return {
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      tableHeight: 0,
+      advanced: true, // 高级搜索 展开/关闭
+      queryParam: { //  查询条件
+        time: [],
+        beginDate: '',
+        endDate: '',
+        productEntity: {
+          name: '',
+          code: '',
+          productBrandSn: undefined,
+          productTypeSn1: '',
+          productTypeSn2: '',
+          productTypeSn3: ''
+        }
+      },
+      productType: [],
+      rules: {
+        'time': [{ required: true, message: '请选择财务审核时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '19%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '库存数量', dataIndex: 'stockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘点数量', dataIndex: 'checkQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盈亏数量', dataIndex: 'checkProfitLossQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盈亏总成本', dataIndex: 'checkProfitLossCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.$emit('spinning', true)
+        delete params.time
+        if (params.beginDate) {
+          return reportCheckWarehouseDetailList(params).then(res => {
+            // 总计
+            this.getCount(params)
+            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.$emit('spinning', false)
+            return data
+          })
+        } else {
+          const _this = this
+          return new Promise(function (resolve, reject) {
+            const data = {
+              pageNo: 1,
+              pageSize: 10,
+              list: [],
+              count: 0
+            }
+            _this.disabled = false
+            _this.$emit('spinning', false)
+            _this.$message.info('请选择财务审核时间')
+            resolve(data)
+          })
+        }
+      },
+      totalData: null //  合计
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportCheckWarehouseDetailCount(params).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.time = date
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    //  查询
+    handleSearch () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.time = []
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.productEntity.name = ''
+      this.queryParam.productEntity.code = ''
+      this.queryParam.productEntity.productBrandSn = undefined
+      this.queryParam.productEntity.productTypeSn1 = ''
+      this.queryParam.productEntity.productTypeSn2 = ''
+      this.queryParam.productEntity.productTypeSn3 = ''
+      this.productType = []
+      this.$refs.ruleForm.resetFields()
+      this.totalData = null
+      this.$refs.table.clearTable()
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productEntity.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productEntity.productTypeSn3 = val[2] ? val[2] : ''
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style>
+</style>

+ 119 - 119
src/views/reportData/inventoryReport/inventoryOrder.vue

@@ -43,7 +43,7 @@
       class="sTable"
       ref="table"
       size="small"
-      :rowKey="(record) => record.salesTargetSn"
+      :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
       :defaultLoadData="false"
@@ -53,132 +53,132 @@
 </template>
 
 <script>
-  import { STable, VSelect } from '@/components'
-  import rangeDate from '@/views/common/rangeDate.vue'
-  import { reportCheckWarehouseList, reportCheckWarehouseCount } from '@/api/reportData'
-  export default {
-    components: { STable, VSelect, rangeDate },
-    data () {
-      return {
-        labelCol: { span: 8 },
-        wrapperCol: { span: 16 },
-        queryParam: { //  查询条件
-          time: [],
-          beginDate: '',
-          endDate: ''
-        },
-        productType: [],
-        rules: {
-          'time': [{ required: true, message: '请选择财务审核时间', trigger: 'change' }]
-        },
-        disabled: false, //  查询、重置按钮是否可操作
-        exportLoading: false,
-        columns: [
-          { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '库存总数量', dataIndex: 'totalStockQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '库存总成本', dataIndex: 'totalStockCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '盘盈总数量', dataIndex: 'totalProfitQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '盘盈总成本', dataIndex: 'totalProfitCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '盘亏总数量', dataIndex: 'totalLossQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '盘亏总成本', dataIndex: 'totalLossCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '盈亏总数量', dataIndex: 'totalProfitLossQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '盈亏总成本', dataIndex: 'totalProfitLossCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
-        ],
-        // 加载数据方法 必须为 Promise 对象
-        loadData: parameter => {
-          this.disabled = true
-          const params = Object.assign(parameter, this.queryParam)
-          // this.spinning = true
-          this.$emit('spinning', true)
-          delete params.time
-          if (params.beginDate) {
-            return reportCheckWarehouseList(params).then(res => {
-              // 总计
-              this.getCount(params)
-              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
-              this.$emit('spinning', false)
-              return data
-            })
-          } else {
-            const _this = this
-            return new Promise(function (resolve, reject) {
-              const data = {
-                pageNo: 1,
-                pageSize: 10,
-                list: [],
-                count: 0
-              }
-              _this.disabled = false
-              // _this.spinning = false
-              _this.$emit('spinning', false)
-              _this.$message.info('请选择财务审核时间')
-              resolve(data)
-            })
-          }
-        },
-        totalData: null //  合计
-      }
-    },
-    methods: {
-      // 合计
-      getCount (params) {
-        reportCheckWarehouseCount(params).then(res => {
-          if (res.status == 200) {
-            this.totalData = res.data
-          } else {
-            this.totalData = null
-          }
-        })
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { reportCheckWarehouseList, reportCheckWarehouseCount } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate },
+  data () {
+    return {
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      queryParam: { //  查询条件
+        time: [],
+        beginDate: '',
+        endDate: ''
       },
-      //  创建时间  change
-      dateChange (date) {
-        this.queryParam.time = date
-        this.queryParam.beginDate = date[0] || ''
-        this.queryParam.endDate = date[1] || ''
+      productType: [],
+      rules: {
+        'time': [{ required: true, message: '请选择财务审核时间', trigger: 'change' }]
       },
-      //  查询
-      handleSearch () {
-        this.$refs.ruleForm.validate(valid => {
-          if (valid) {
-            this.$refs.table.refresh(true)
-          } else {
-            console.log('error submit!!')
-            return false
-          }
-        })
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '盘点单号', dataIndex: 'checkWarehouseNo', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '库存总数量', dataIndex: 'totalStockQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '库存总成本', dataIndex: 'totalStockCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘盈总数量', dataIndex: 'totalProfitQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘盈总成本', dataIndex: 'totalProfitCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘亏总数量', dataIndex: 'totalLossQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘亏总成本', dataIndex: 'totalLossCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盈亏总数量', dataIndex: 'totalProfitLossQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盈亏总成本', dataIndex: 'totalProfitLossCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        // this.spinning = true
+        this.$emit('spinning', true)
+        delete params.time
+        if (params.beginDate) {
+          return reportCheckWarehouseList(params).then(res => {
+            // 总计
+            this.getCount(params)
+            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
+            this.$emit('spinning', false)
+            return data
+          })
+        } else {
+          const _this = this
+          return new Promise(function (resolve, reject) {
+            const data = {
+              pageNo: 1,
+              pageSize: 10,
+              list: [],
+              count: 0
+            }
+            _this.disabled = false
+            // _this.spinning = false
+            _this.$emit('spinning', false)
+            _this.$message.info('请选择财务审核时间')
+            resolve(data)
+          })
+        }
       },
-      //  重置
-      resetSearchForm () {
-        this.$refs.rangeDate.resetDate()
-        this.queryParam.time = []
-        this.queryParam.beginDate = ''
-        this.queryParam.endDate = ''
-        this.$refs.ruleForm.resetFields()
-        this.totalData = null
-        this.$refs.table.clearTable()
-      }
+      totalData: null //  合计
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportCheckWarehouseCount(params).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
     },
-    mounted () {
-      if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-        this.resetSearchForm()
-      }
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.time = date
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
     },
-    activated () {
-      // 如果是新页签打开,则重置当前页面
-      if (this.$store.state.app.isNewTab) {
-        this.resetSearchForm()
-      }
+    //  查询
+    handleSearch () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
     },
-    beforeRouteEnter (to, from, next) {
-      next(vm => {})
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.time = []
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.$refs.ruleForm.resetFields()
+      this.totalData = null
+      this.$refs.table.clearTable()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.resetSearchForm()
     }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
   }
+}
 </script>
 
 <style>

+ 36 - 5
src/views/reportData/inventoryReport/list.vue

@@ -1,24 +1,55 @@
 <template>
   <a-card size="small" :bordered="false" class="inventoryReportList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <inventoryOrder @spinning="spinningFun" />
+      <!-- 标签页 -->
+      <a-tabs type="card" :default-active-key="nowKey" @change="handleTabChange" class="purchaseReceiptReportList-tabs ">
+        <a-tab-pane v-for="item in tabPaneData" :key="item.val">
+          <span slot="tab">{{ item.name }}</span>
+        </a-tab-pane>
+      </a-tabs>
+      <inventoryOrder v-show="nowKey=='1'" @spinning="spinningFun" />
+      <inventoryDetail v-show="nowKey=='2'" @spinning="spinningFun" />
     </a-spin>
   </a-card>
 </template>
 
 <script>
-  import inventoryOrder from './inventoryOrder.vue'
+import inventoryOrder from './inventoryOrder.vue'
+import inventoryDetail from './inventoryDetail.vue'
 export default {
-  components: { inventoryOrder },
+  components: { inventoryOrder, inventoryDetail },
   data () {
     return {
-      spinning: false
+      spinning: false,
+      tabPaneData: [
+        { name: '盘点单报表', val: '1' },
+        { name: '盘点盈亏明细报表', val: '2' }
+      ],
+      nowKey: '1'
     }
   },
   methods: {
-    spinningFun(val){
+    spinningFun (val) {
       this.spinning = val
+    },
+    // tab切换
+    handleTabChange (key) {
+      this.nowKey = key
     }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.nowKey = '1'
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.nowKey = '1'
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
   }
 }
 </script>

+ 27 - 17
src/views/reportData/purchaseReceiptReport/purchaseReceiptDetail.vue

@@ -84,11 +84,12 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
-import { hdPrint } from '@/libs/JGPrint'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import { reportReceivingBillDetailList, reportReceivingBillDetailCount, reportReceivingBillDetailExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
@@ -113,19 +114,20 @@ export default {
       rules: {
         'time': [{ required: true, message: '请选择财务审核时间', trigger: 'change' }]
       },
-      disabled: false, //  查询、重置按钮是否可操作
+      disabled: false, //  查询、重置按钮是否可操作11
       advanced: true, // 高级搜索 展开/关闭
       exportLoading: false,
       columns: [
-        { title: '采购入库单号', dataIndex: 'receivingBillNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '17%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '采购数量', dataIndex: 'qty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库数量', dataIndex: 'putQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '采购成本', dataIndex: 'totalAmount', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库成本', dataIndex: 'putAmount', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '财务审核时间', dataIndex: 'auditTime', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '采购单号', dataIndex: 'purchaseBillNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购入库单号', dataIndex: 'receivingBillNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '16%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购数量', dataIndex: 'qty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库数量', dataIndex: 'putQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '采购成本', dataIndex: 'totalAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库成本', dataIndex: 'putAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '财务审核时间', dataIndex: 'auditTime', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -219,12 +221,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      _this.spinning = true
-      _this.exportLoading = true
-      // 打印或导出
-      hdPrint('', 'export', reportReceivingBillDetailExport, this.queryParam, '采购入库明细报表', function () {
-        _this.exportLoading = false
-        _this.spinning = false
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          reportReceivingBillDetailExport(params).then(res => {
+            const fileName = '采购入库明细报表' + moment().format('YYYYMMDDHHmmss')
+            downloadExcel(res, fileName)
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
       })
     }
   },

+ 24 - 14
src/views/reportData/purchaseReceiptReport/purchaseReceiptOrder.vue

@@ -59,9 +59,10 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { hdPrint } from '@/libs/JGPrint'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import { reportReceivingBillList, reportReceivingBillCount, reportReceivingBillExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate },
@@ -81,13 +82,14 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
       columns: [
-        { title: '采购入库单号', dataIndex: 'receivingBillNo', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库款数', dataIndex: 'totalPutCategory', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '采购数量', dataIndex: 'totalQty', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库数量', dataIndex: 'totalPutQty', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '采购成本', dataIndex: 'totalAmount', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库成本', dataIndex: 'totalPutAmount', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '财务审核时间', dataIndex: 'auditTime', width: '17%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '采购单号', dataIndex: 'purchaseBillNo', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购入库单号', dataIndex: 'receivingBillNo', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库款数', dataIndex: 'totalPutCategory', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '采购数量', dataIndex: 'totalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库数量', dataIndex: 'totalPutQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '采购成本', dataIndex: 'totalAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库成本', dataIndex: 'totalPutAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '财务审核时间', dataIndex: 'auditTime', width: '16%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -168,12 +170,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      _this.spinning = true
-      _this.exportLoading = true
-      // 打印或导出
-      hdPrint('', 'export', reportReceivingBillExport, this.queryParam, '采购入库单报表', function () {
-        _this.exportLoading = false
-        _this.spinning = false
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          reportReceivingBillExport(params).then(res => {
+            const fileName = '采购入库单报表' + moment().format('YYYYMMDDHHmmss')
+            downloadExcel(res, fileName)
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
       })
     }
   },

+ 32 - 2
src/views/reportData/receivedSendStorageReport/list.vue

@@ -62,7 +62,16 @@
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="receivedSendStorageReportList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="receivedSendStorageReportList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
+              <a-button
+                style="margin-left: 5px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                v-if="$hasPermissions('B_receivedSendStorageReportExport')"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="receivedSendStorageReportList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -99,11 +108,13 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { dealerProductTypeList } from '@/api/dealerProductType'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { reportPageList, reportStockPutOutCount } from '@/api/reportData'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import { reportPageList, reportStockPutOutCount, reportStockPutOutExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate },
   data () {
@@ -236,6 +247,25 @@ export default {
       this.totalData = null
       this.$refs.table.clearTable()
     },
+    //  导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          reportStockPutOutExport(params).then(res => {
+            const fileName = '收发存报表' + moment().format('YYYYMMDDHHmmss')
+            downloadExcel(res, fileName)
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
+      })
+    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''

+ 8 - 4
src/views/reportData/salesDetailReport/list.vue

@@ -175,9 +175,10 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { hdPrint } from '@/libs/JGPrint'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import { getArea } from '@/api/data'
 import { custTypeFindAllList } from '@/api/custType'
 import { settleStyleFindAllList } from '@/api/customer'
@@ -332,11 +333,14 @@ export default {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          _this.spinning = true
+          const params = _this.queryParam
           _this.exportLoading = true
-          hdPrint('', 'export', reportSalesBillDetailExport, this.queryParam, '销售明细报表', function () {
-            _this.spinning = false
+          _this.spinning = true
+          reportSalesBillDetailExport(params).then(res => {
+            const fileName = '销售明细报表' + moment().format('YYYYMMDDHHmmss')
+            downloadExcel(res, fileName)
             _this.exportLoading = false
+            _this.spinning = false
           })
         } else {
           console.log('error submit!!')

+ 8 - 4
src/views/reportData/salesReport/list.vue

@@ -124,9 +124,10 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { hdPrint } from '@/libs/JGPrint'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import { getArea } from '@/api/data'
 import { custTypeFindAllList } from '@/api/custType'
 import { settleStyleFindAllList } from '@/api/customer'
@@ -251,11 +252,14 @@ export default {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          _this.spinning = true
+          const params = _this.queryParam
           _this.exportLoading = true
-          hdPrint('', 'export', reportSalesBillExport, this.queryParam, '销售报表', function () {
-            _this.spinning = false
+          _this.spinning = true
+          reportSalesBillExport(params).then(res => {
+            const fileName = '销售报表' + moment().format('YYYYMMDDHHmmss')
+            downloadExcel(res, fileName)
             _this.exportLoading = false
+            _this.spinning = false
           })
         } else {
           console.log('error submit!!')

+ 220 - 0
src/views/salesManagement/productPricing/list.vue

@@ -0,0 +1,220 @@
+<template>
+  <a-card size="small" :bordered="false" class="productPricingList-wrap">
+    <!-- 搜索条件 -->
+    <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="productPricingList-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="productPricingList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品品牌">
+              <ProductBrand id="productPricingList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品分类">
+                <ProductType id="productPricingList-productType" @change="changeProductType" v-model="productType"></ProductType>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="原厂编码">
+                <a-input id="productPricingList-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24">
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productPricingList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productPricingList-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 style="margin-bottom: 10px;">
+      <a-checkbox v-model="isCostPrice"><span style="display: inline-block;">成本价</span></a-checkbox>
+      <!-- 特约加盟商不可见市级价 -->
+      <a-checkbox v-model="isCityPrice" v-if="dealerData && dealerData.dealerLevel != 'SPECIAL'"><span style="display: inline-block;">市级价</span></a-checkbox>
+      <!-- 是否展示特约价 -->
+      <a-checkbox v-model="isSpecialPrice" v-if="dealerData && dealerData.isShowSpecialPrice == '1'"><span style="display: inline-block;">特约价</span></a-checkbox>
+      <a-checkbox v-model="isTerminalPrice"><span style="display: inline-block;">终端会员价</span></a-checkbox>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable fixPagination"
+      ref="table"
+      :style="{ height: tableHeight+84.5+'px' }"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ y: tableHeight }"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
+import { getCurrentDealer } from '@/api/product'
+import { dealerProductPriceList } from '@/api/dealerProduct'
+export default {
+  components: { STable, VSelect, ProductType, ProductBrand },
+  data () {
+    return {
+      tableHeight: 0,
+      advanced: true, // 高级搜索 展开/关闭
+      queryParam: { //  查询条件
+        name: '',
+        code: '',
+        origCode: '',
+        productBrandSn: undefined,
+        productTypeSn1: '',
+        productTypeSn2: '',
+        productTypeSn3: ''
+      },
+      productType: [],
+      disabled: false, //  查询、重置按钮是否可操作
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return dealerProductPriceList(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
+          this.spinning = false
+          return data
+        })
+      },
+      isCostPrice: false,
+      isCityPrice: false,
+      isSpecialPrice: false,
+      isTerminalPrice: false,
+      dealerData: null
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'code', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
+        { title: '产品名称', dataIndex: 'name', width: '19%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'origCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'productBrandName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
+        { title: '库存数量', dataIndex: 'stockQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '成本价', dataIndex: 'offerCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '市级价', dataIndex: 'cityPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '特约价', dataIndex: 'specialPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '终端会员价', dataIndex: 'terminalPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '车主价', dataIndex: 'carOwnersPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ]
+      if (this.isCostPrice) {
+        arr.splice(6, 0, { title: '成本价', dataIndex: 'offerCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      if (this.isCityPrice) {
+        const ind = this.isCostPrice ? 7 : 6
+        arr.splice(ind, 0, { title: '市级价', dataIndex: 'cityPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      if (this.isSpecialPrice) {
+        let ind = 0
+        if (this.isCostPrice && this.isCityPrice) {
+          ind = 8
+        } else if ((!this.isCostPrice && this.isCityPrice) || (this.isCostPrice && !this.isCityPrice)) {
+          ind = 7
+        } else if (!this.isCostPrice && !this.isCityPrice) {
+          ind = 6
+        }
+        arr.splice(ind, 0, { title: '特约价', dataIndex: 'specialPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      if (this.isTerminalPrice) {
+        arr.splice(arr.length - 1, 0, { title: '终端会员价', dataIndex: 'terminalPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    //  重置
+    resetSearchForm () {
+      this.queryParam.name = ''
+      this.queryParam.code = ''
+      this.queryParam.origCode = ''
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.productType = []
+      this.$refs.table.refresh(true)
+    },
+    //  产品分类  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] : ''
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      // 获取当前登录用户经销商等级
+      getCurrentDealer().then(res => {
+        if (res.status == 200) {
+          this.dealerData = res.data
+        } else {
+          this.dealerData = null
+        }
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  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>

+ 11 - 0
src/views/user/Login.vue

@@ -150,6 +150,17 @@ export default {
     }
   },
   created () {
+    const userAgent = navigator.userAgent // 取得浏览器的userAgent字符串
+    const isIE = window.ActiveXObject || 'ActiveXObject' in window
+    const isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf('rv:11.0') > -1
+    if (isIE) {
+      const reIE = new RegExp('MSIE (\\d+\\.\\d+);')
+      reIE.test(userAgent)
+      const fIEVersion = parseFloat(RegExp['$1'])
+      if (userAgent.indexOf('MSIE 6.0') != -1 || fIEVersion < 11 || isIE11) {
+        this.$router.push({ name: 'updateBrowser' })
+      }
+    }
     // get2step({ })
     //   .then(res => {
     //     this.requiredTwoStepCaptcha = res.result.stepCode