Ver Fonte

Merge branch 'develop_report0517' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_yh05
合并

lilei há 3 anos atrás
pai
commit
1c3a29e86b
35 ficheiros alterados com 3310 adições e 638 exclusões
  1. 118 0
      src/api/reportData.js
  2. 273 78
      src/config/router.config.js
  3. 1 1
      src/store/modules/permission.js
  4. 4 22
      src/views/bulkManagement/bulkReturnGoods/list.vue
  5. 4 21
      src/views/bulkManagement/bulkWarehousingOrder/list.vue
  6. 0 0
      src/views/chainReportData/chainCustomerReport/list.vue
  7. 0 0
      src/views/chainReportData/chainPurchaseReceiptReport/list.vue
  8. 0 0
      src/views/chainReportData/chainPurchaseReceiptReport/purchaseReceiptDetail.vue
  9. 0 0
      src/views/chainReportData/chainPurchaseReceiptReport/purchaseReceiptOrder.vue
  10. 0 0
      src/views/chainReportData/chainReceivedSendStorageReport/list.vue
  11. 146 147
      src/views/chainReportData/chainSalesDetailReport/list.vue
  12. 0 0
      src/views/chainReportData/chainSalesDetailsCountReport/list.vue
  13. 46 0
      src/views/chainReportData/chainSalesReport/index.vue
  14. 112 114
      src/views/chainReportData/chainSalesReport/list.vue
  15. 0 0
      src/views/chainReportData/chainStockExpenditureReport/list.vue
  16. 0 0
      src/views/chainReportData/chainStockIncomeReport/list.vue
  17. 0 0
      src/views/chainReportData/chainStockReport/detailModal.vue
  18. 0 0
      src/views/chainReportData/chainStockReport/list.vue
  19. 78 0
      src/views/common/supplier.js
  20. 274 0
      src/views/reportData/bulkReturnReport/detailList.vue
  21. 46 0
      src/views/reportData/bulkReturnReport/index.vue
  22. 218 0
      src/views/reportData/bulkReturnReport/list.vue
  23. 294 0
      src/views/reportData/bulkWarehousingReport/detailList.vue
  24. 46 0
      src/views/reportData/bulkWarehousingReport/index.vue
  25. 246 0
      src/views/reportData/bulkWarehousingReport/list.vue
  26. 142 143
      src/views/reportData/salesDetailReport/list.vue
  27. 46 0
      src/views/reportData/salesReport/index.vue
  28. 108 110
      src/views/reportData/salesReport/list.vue
  29. 275 0
      src/views/reportData/salesReturnReport/detailList.vue
  30. 46 0
      src/views/reportData/salesReturnReport/index.vue
  31. 220 0
      src/views/reportData/salesReturnReport/list.vue
  32. 286 0
      src/views/reportData/storeTransferOutReport/detailList.vue
  33. 46 0
      src/views/reportData/storeTransferOutReport/index.vue
  34. 233 0
      src/views/reportData/storeTransferOutReport/list.vue
  35. 2 2
      vue.config.js

+ 118 - 0
src/api/reportData.js

@@ -1,4 +1,122 @@
 import { axios } from '@/utils/request'
+
+// 销售退货-分页列表
+export const reportSalesReturnPageList = (params) => {
+  const url = `report/reportSalesReturnBill/reportPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 销售退货-列表合计
+export const reportSalesReturnBillTotal = (params) => {
+  return axios({
+    url: 'report/reportSalesReturnBill/reportCount',
+    data: params,
+    method: 'post'
+  })
+}
+// 销售退货-报表导出
+export const reportSalesReturnExport = params => {
+  return axios.request({
+    url: `/report/reportSalesReturnBill/export`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
+// 销售退货明细-分页列表
+export const reportSalesReturnDetailPageList = (params) => {
+  const url = `report/reportSalesReturnBill/reportDetailPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 销售退货明细-列表合计
+export const reportSalesReturnDetailTotal = (params) => {
+  return axios({
+    url: 'report/reportSalesReturnBill/reportDetailCount',
+    data: params,
+    method: 'post'
+  })
+}
+// 销售退货明细-报表导出
+export const reportSalesReturnDetailExport = params => {
+  return axios.request({
+    url: `/report/reportSalesReturnBill/detailExport`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
+
+// 店内调出-分页列表
+export const reportStoreCallOutPageList = (params) => {
+  const url = `report/reportStoreCallOut/reportPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 店内调出-列表合计
+export const reportStoreCallOutListTotal = (params) => {
+  return axios({
+    url: 'report/reportStoreCallOut/reportCount',
+    data: params,
+    method: 'post'
+  })
+}
+// 店内调出-报表导出
+export const reportStoreCallOutExport = params => {
+  return axios.request({
+    url: `/report/reportStoreCallOut/export`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
+// 店内调出明细-分页列表
+export const reportStoreCallOutDetailList = (params) => {
+  const url = `report/reportStoreCallOut/reportDetailPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 店内调出明细-列表合计
+export const reportStoreCallOutDetailTotal = (params) => {
+  return axios({
+    url: 'report/reportStoreCallOut/reportDetailCount',
+    data: params,
+    method: 'post'
+  })
+}
+// 店内调出明细-报表导出
+export const reportStoreCallOutDetailExport = params => {
+  return axios.request({
+    url: `/report/reportStoreCallOut/detailExport`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
 // 连锁收发存报表-分页列表
 export const linkageReportPageList = (params) => {
   const url = `report/reportStockPutOut/linkageReportPage/${params.pageNo}/${params.pageSize}`

+ 273 - 78
src/config/router.config.js

@@ -1828,16 +1828,27 @@ export const asyncRouterMap = [
         children: [
           {
             path: '/reportData/salesReport',
-            redirect: '/reportData/salesReport/list',
+            redirect: '/reportData/salesReport/index',
             name: 'salesReport',
             component: BlankLayout,
             meta: {
               title: '销售报表',
               icon: 'profile',
-              permission: 'M_salesReportList'
+              permission: 'M_salesReportList,M_salesDetailReportList'
             },
             hideChildrenInMenu: true,
             children: [
+              {
+                path: 'index',
+                name: 'salesReportIndex',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/salesReport/index.vue'),
+                meta: {
+                  title: '销售报表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_salesReportList,M_salesDetailReportList'
+                }
+              },
               {
                 path: 'list',
                 name: 'salesReportList',
@@ -1848,21 +1859,7 @@ export const asyncRouterMap = [
                   hidden: true,
                   permission: 'M_salesReportList'
                 }
-              }
-            ]
-          },
-          {
-            path: '/reportData/salesDetailReport',
-            redirect: '/reportData/salesDetailReport/list',
-            name: 'salesDetailReport',
-            component: BlankLayout,
-            meta: {
-              title: '销售明细报表',
-              icon: 'profile',
-              permission: 'M_salesDetailReportList'
-            },
-            hideChildrenInMenu: true,
-            children: [
+              },
               {
                 path: 'list',
                 name: 'salesDetailReportList',
@@ -1926,6 +1923,53 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/reportData/salesReturnReport',
+            redirect: '/reportData/salesReturnReport/index',
+            name: 'salesReturnReport',
+            component: BlankLayout,
+            meta: {
+              title: '销售退货报表',
+              icon: 'profile',
+              // permission: 'M_salesReturnReportList,M_salesReturnDetailReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'index',
+                name: 'salesReturnReportIndex',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/salesReturnReport/index.vue'),
+                meta: {
+                  title: '销售退货报表',
+                  icon: 'profile',
+                  hidden: true,
+                  // permission: 'M_salesReturnReportList,M_salesReturnDetailReportList'
+                }
+              },
+              {
+                path: 'list',
+                name: 'salesReturnReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/salesReturnReport/list.vue'),
+                meta: {
+                  title: '销售退货报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_salesReturnReportList'
+                }
+              },
+              {
+                path: 'list',
+                name: 'salesReturnDetailReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/salesReturnReport/detailList.vue'),
+                meta: {
+                  title: '销售退货明细报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_salesReturnDetailReportList'
+                }
+              }
+            ]
+          },
           {
             path: '/reportData/stockIncomeReport',
             redirect: '/reportData/stockIncomeReport/list',
@@ -1976,31 +2020,6 @@ export const asyncRouterMap = [
               }
             ]
           },
-          {
-            path: '/reportData/purchaseReceiptReport',
-            redirect: '/reportData/purchaseReceiptReport/list',
-            name: 'purchaseReceiptReport',
-            component: BlankLayout,
-            meta: {
-              title: '采购入库报表',
-              icon: 'profile',
-              permission: 'M_purchaseReceiptReportList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'purchaseReceiptReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/purchaseReceiptReport/list.vue'),
-                meta: {
-                  title: '采购入库报表列表',
-                  icon: 'profile',
-                  hidden: true,
-                  permission: 'M_purchaseReceiptReportList'
-                }
-              }
-            ]
-          },
           {
             path: '/reportData/receivedSendStorageReport',
             redirect: '/reportData/receivedSendStorageReport/list',
@@ -2077,46 +2096,222 @@ export const asyncRouterMap = [
             ]
           },
           {
-            path: '/reportData/chainSalesReport',
-            redirect: '/reportData/chainSalesReport/list',
-            name: 'chainSalesReport',
+            path: '/reportData/purchaseReceiptReport',
+            redirect: '/reportData/purchaseReceiptReport/list',
+            name: 'purchaseReceiptReport',
             component: BlankLayout,
             meta: {
-              title: '连锁销售报表',
+              title: '采购入库报表',
               icon: 'profile',
-              permission: 'M_chainSalesReportList'
+              permission: 'M_purchaseReceiptReportList'
             },
             hideChildrenInMenu: true,
             children: [
               {
                 path: 'list',
-                name: 'chainSalesReportList',
-                component: () => import(/* webpackChunkName: "reportData1" */ '@/views/reportData/chainSalesReport/list.vue'),
+                name: 'purchaseReceiptReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/purchaseReceiptReport/list.vue'),
                 meta: {
-                  title: '连锁销售报表列表',
+                  title: '采购入库报表列表',
                   icon: 'profile',
                   hidden: true,
-                  permission: 'M_chainSalesReportList'
+                  permission: 'M_purchaseReceiptReportList'
                 }
               }
             ]
           },
           {
-            path: '/reportData/chainSalesDetailReport',
-            redirect: '/reportData/chainSalesDetailReport/list',
-            name: 'chainSalesDetailReport',
+            path: '/reportData/bulkWarehousingReport',
+            redirect: '/reportData/bulkWarehousingReport/index',
+            name: 'bulkWarehousingReport',
             component: BlankLayout,
             meta: {
-              title: '连锁销售明细报表',
+              title: '散件入库报表',
               icon: 'profile',
-              permission: 'M_chainSalesDetailReportList'
+              // permission: 'M_bulkWarehousingReportList,M_bulkWarehousingDetailReportList'
             },
             hideChildrenInMenu: true,
             children: [
+              {
+                path: 'index',
+                name: 'bulkWarehousingReportIndex',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/bulkWarehousingReport/index.vue'),
+                meta: {
+                  title: '散件入库报表',
+                  icon: 'profile',
+                  hidden: true,
+                  // permission: 'M_bulkWarehousingReportList,M_bulkWarehousingDetailReportList'
+                }
+              },
+              {
+                path: 'list',
+                name: 'bulkWarehousingReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/bulkWarehousingReport/list.vue'),
+                meta: {
+                  title: '散件入库报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_bulkWarehousingReportList'
+                }
+              },
               {
                 path: 'list',
+                name: 'bulkWarehousingDetailReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/bulkWarehousingReport/detailList.vue'),
+                meta: {
+                  title: '散件入库明细报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_bulkWarehousingDetailReportList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/reportData/bulkReturnReport',
+            redirect: '/reportData/bulkReturnReport/index',
+            name: 'bulkReturnReport',
+            component: BlankLayout,
+            meta: {
+              title: '散件退货报表',
+              icon: 'profile',
+              // permission: 'M_bulkReturnReportList,M_bulkReturnDetailReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'index',
+                name: 'bulkReturnReportIndex',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/bulkReturnReport/index.vue'),
+                meta: {
+                  title: '散件退货报表',
+                  icon: 'profile',
+                  hidden: true,
+                  // permission: 'M_bulkWarehousingReportList,M_bulkWarehousingDetailReportList'
+                }
+              },
+              {
+                path: 'list',
+                name: 'bulkReturnReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/bulkReturnReport/list.vue'),
+                meta: {
+                  title: '散件退货报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_bulkReturnReportList'
+                }
+              },
+              {
+                path: 'list',
+                name: 'bulkReturnDetailReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/bulkReturnReport/detailList.vue'),
+                meta: {
+                  title: '散件退货明细报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_bulkReturnDetailReportList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/reportData/storeTransferOutReport',
+            redirect: '/reportData/storeTransferOutReport/index',
+            name: 'storeTransferOutReport',
+            component: BlankLayout,
+            meta: {
+              title: '店内调出报表',
+              icon: 'profile',
+              // permission: 'M_storeTransferOutReportList,M_storeTransferOutDetailReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'index',
+                name: 'storeTransferOutReportIndex',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/storeTransferOutReport/index.vue'),
+                meta: {
+                  title: '店内调出报表',
+                  icon: 'profile',
+                  hidden: true,
+                  // permission: 'M_bulkWarehousingReportList,M_bulkWarehousingDetailReportList'
+                }
+              },
+              {
+                path: 'list',
+                name: 'storeTransferOutReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/storeTransferOutReport/list.vue'),
+                meta: {
+                  title: '店内调出报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_storeTransferOutReportList'
+                }
+              },
+              {
+                path: 'list',
+                name: 'storeTransferOutDetailReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/storeTransferOutReport/detailList.vue'),
+                meta: {
+                  title: '店内调出明细报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_storeTransferOutDetailReportList'
+                }
+              }
+            ]
+          },
+        ]
+      },
+      // 连锁报表
+      {
+        path: '/chainReportData',
+        redirect: '/chainReportData/chainStockReport',
+        component: PageView,
+        meta: {
+          title: '连锁报表',
+          icon: 'fund',
+          permission: 'M_reportData'
+        },
+        children: [
+          {
+            path: '/chainReportData/chainSalesReport',
+            redirect: '/chainReportData/chainSalesReport/index',
+            name: 'chainSalesReport',
+            component: BlankLayout,
+            meta: {
+              title: '连锁销售报表',
+              icon: 'profile',
+              permission: 'M_chainSalesReportList,M_chainSalesDetailReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'index',
+                name: 'chainSalesReportIndex',
+                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/chainReportData/chainSalesReport/index.vue'),
+                meta: {
+                  title: '连锁销售报表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_chainSalesReportList,M_chainSalesDetailReportList'
+                }
+              },
+              {
+                path: 'list',
+                name: 'chainSalesReportList',
+                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/chainReportData/chainSalesReport/list.vue'),
+                meta: {
+                  title: '连锁销售报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_chainSalesReportList'
+                }
+              },
+              {
+                path: 'detailList',
                 name: 'chainSalesDetailReportList',
-                component: () => import(/* webpackChunkName: "reportData1" */ '@/views/reportData/chainSalesDetailReport/list.vue'),
+                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/chainReportData/chainSalesDetailReport/list.vue'),
                 meta: {
                   title: '连锁销售明细报表列表',
                   icon: 'profile',
@@ -2127,8 +2322,8 @@ export const asyncRouterMap = [
             ]
           },
           {
-            path: '/reportData/chainSalesDetailsCountReport',
-            redirect: '/reportData/chainSalesDetailsCountReport/list',
+            path: '/chainReportData/chainSalesDetailsCountReport',
+            redirect: '/chainReportData/chainSalesDetailsCountReport/list',
             name: 'chainSalesDetailsCountReport',
             component: BlankLayout,
             meta: {
@@ -2141,7 +2336,7 @@ export const asyncRouterMap = [
               {
                 path: 'list',
                 name: 'chainSalesDetailsCountReportList',
-                component: () => import(/* webpackChunkName: "reportData1" */ '@/views/reportData/chainSalesDetailsCountReport/list.vue'),
+                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/chainReportData/chainSalesDetailsCountReport/list.vue'),
                 meta: {
                   title: '连锁销售明细合计列表',
                   icon: 'profile',
@@ -2152,8 +2347,8 @@ export const asyncRouterMap = [
             ]
           },
           {
-            path: '/reportData/chainCustomerReport',
-            redirect: '/reportData/chainCustomerReport/list',
+            path: '/chainReportData/chainCustomerReport',
+            redirect: '/chainReportData/chainCustomerReport/list',
             name: 'chainCustomerReport',
             component: BlankLayout,
             meta: {
@@ -2166,7 +2361,7 @@ export const asyncRouterMap = [
               {
                 path: 'list',
                 name: 'chainCustomerReportList',
-                component: () => import(/* webpackChunkName: "reportData1" */ '@/views/reportData/chainCustomerReport/list.vue'),
+                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/chainReportData/chainCustomerReport/list.vue'),
                 meta: {
                   title: '连锁大客户报表列表',
                   icon: 'profile',
@@ -2177,8 +2372,8 @@ export const asyncRouterMap = [
             ]
           },
           {
-            path: '/reportData/chainStockIncomeReport',
-            redirect: '/reportData/chainStockIncomeReport/list',
+            path: '/chainReportData/chainStockIncomeReport',
+            redirect: '/chainReportData/chainStockIncomeReport/list',
             name: 'chainStockIncomeReport',
             component: BlankLayout,
             meta: {
@@ -2191,7 +2386,7 @@ export const asyncRouterMap = [
               {
                 path: 'list',
                 name: 'chainStockIncomeReportList',
-                component: () => import(/* webpackChunkName: "reportData1" */ '@/views/reportData/chainStockIncomeReport/list.vue'),
+                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/chainReportData/chainStockIncomeReport/list.vue'),
                 meta: {
                   title: '连锁库存总入报表列表',
                   icon: 'profile',
@@ -2202,8 +2397,8 @@ export const asyncRouterMap = [
             ]
           },
           {
-            path: '/reportData/chainStockExpenditureReport',
-            redirect: '/reportData/chainStockExpenditureReport/list',
+            path: '/chainReportData/chainStockExpenditureReport',
+            redirect: '/chainReportData/chainStockExpenditureReport/list',
             name: 'chainStockExpenditureReport',
             component: BlankLayout,
             meta: {
@@ -2216,7 +2411,7 @@ export const asyncRouterMap = [
               {
                 path: 'list',
                 name: 'chainStockExpenditureReportList',
-                component: () => import(/* webpackChunkName: "reportData1" */ '@/views/reportData/chainStockExpenditureReport/list.vue'),
+                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/chainReportData/chainStockExpenditureReport/list.vue'),
                 meta: {
                   title: '连锁库存总出报表列表',
                   icon: 'profile',
@@ -2227,8 +2422,8 @@ export const asyncRouterMap = [
             ]
           },
           {
-            path: '/reportData/chainStockReport',
-            redirect: '/reportData/chainStockReport/list',
+            path: '/chainReportData/chainStockReport',
+            redirect: '/chainReportData/chainStockReport/list',
             name: 'chainStockReport',
             component: BlankLayout,
             meta: {
@@ -2241,7 +2436,7 @@ export const asyncRouterMap = [
               {
                 path: 'list',
                 name: 'chainStockReportList',
-                component: () => import(/* webpackChunkName: "reportData1" */ '@/views/reportData/chainStockReport/list.vue'),
+                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/chainReportData/chainStockReport/list.vue'),
                 meta: {
                   title: '连锁库存总表列表',
                   icon: 'profile',
@@ -2252,8 +2447,8 @@ export const asyncRouterMap = [
             ]
           },
           {
-            path: '/reportData/chainPurchaseReceiptReport',
-            redirect: '/reportData/chainPurchaseReceiptReport/list',
+            path: '/chainReportData/chainPurchaseReceiptReport',
+            redirect: '/chainReportData/chainPurchaseReceiptReport/list',
             name: 'chainPurchaseReceiptReport',
             component: BlankLayout,
             meta: {
@@ -2266,7 +2461,7 @@ export const asyncRouterMap = [
               {
                 path: 'list',
                 name: 'chainPurchaseReceiptReportList',
-                component: () => import(/* webpackChunkName: "reportData1" */ '@/views/reportData/chainPurchaseReceiptReport/list.vue'),
+                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/chainReportData/chainPurchaseReceiptReport/list.vue'),
                 meta: {
                   title: '连锁采购入库报表列表',
                   icon: 'profile',
@@ -2277,8 +2472,8 @@ export const asyncRouterMap = [
             ]
           },
           {
-            path: '/reportData/chainReceivedSendStorageReport',
-            redirect: '/reportData/chainReceivedSendStorageReport/list',
+            path: '/chainReportData/chainReceivedSendStorageReport',
+            redirect: '/chainReportData/chainReceivedSendStorageReport/list',
             name: 'chainReceivedSendStorageReport',
             component: BlankLayout,
             meta: {
@@ -2291,7 +2486,7 @@ export const asyncRouterMap = [
               {
                 path: 'list',
                 name: 'chainReceivedSendStorageReportList',
-                component: () => import(/* webpackChunkName: "reportData1" */ '@/views/reportData/chainReceivedSendStorageReport/list.vue'),
+                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/chainReportData/chainReceivedSendStorageReport/list.vue'),
                 meta: {
                   title: '连锁收发存报表列表',
                   icon: 'profile',

+ 1 - 1
src/store/modules/permission.js

@@ -10,7 +10,7 @@ import { asyncRouterMap, constantRouterMap } from '@/config/router.config'
 function hasPermission (permission, route) {
   if (route.meta && route.meta.permission) {
     let flag = permission.find(item => {
-      return item&&item == route.meta.permission
+      return item&&route.meta.permission.indexOf(item)>=0
     })
     // let flag = false
     // for (let i = 0, len = permission.length; i < len; i++) {

+ 4 - 22
src/views/bulkManagement/bulkReturnGoods/list.vue

@@ -17,16 +17,11 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-                <a-select
+                <supplier
                   id="bulkReturnGoodsList-supplierSn"
                   placeholder="请选择供应商"
-                  allowClear
                   v-model="queryParam.supplierSn"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in supplierList" :key="item.supplierSn" :pyCode="item.pyCode" :value="item.supplierSn">{{ item.supplierName }}</a-select-option>
-                </a-select>
+                ></supplier>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -143,11 +138,11 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import getDate from '@/libs/getDate.js'
 import auditModal from '@/views/common/auditModal.vue'
 import stateIcon from '@/views/common/stateIcon'
-import { supplierAllList } from '@/api/supplier'
+import supplier from '@/views/common/supplier'
 import { sparePartsRetList, sparePartsRetDel, sparePartsRetOutStock, sparePartsRetAudit } from '@/api/sparePartsRet'
 export default {
   name: 'BulkReturnGoodsList',
-  components: { STable, VSelect, basicInfoModal, rangeDate, bulkReturnGoodsDetailModal, auditModal, stateIcon },
+  components: { STable, VSelect, basicInfoModal, rangeDate, bulkReturnGoodsDetailModal, auditModal, stateIcon, supplier },
   mixins: [commonMixin],
   data () {
     return {
@@ -203,7 +198,6 @@ export default {
           return data
         })
       },
-      supplierList: [], //  供应商列表数据
       openModal: false, // 基本信息弹框是否显示
       openDetailModal: false,
       itemSn: null,
@@ -332,23 +326,12 @@ export default {
       this.isGrab = null
       this.openDetailModal = false
     },
-    // 供应商下拉数据
-    getSupplierList () {
-      supplierAllList().then(res => {
-        if (res.status == 200) {
-          this.supplierList = res.data
-        } else {
-          this.supplierList = []
-        }
-      })
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
       this.openModal = false
-      this.getSupplierList()
 
       // 是否打开的页签
       const a = this.$store.state.app.isNewTab
@@ -356,7 +339,6 @@ export default {
       const b = this.$store.state.app.updateList
       // 是否从首页点击进入
       const isHomeNav = this.getIsHomeNav()[this.$route.name]
-      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
 
       // 从首页进入,判断式新建还式待办查询
       if (isHomeNav) {

+ 4 - 21
src/views/bulkManagement/bulkWarehousingOrder/list.vue

@@ -17,16 +17,11 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-                <a-select
+                <supplier
                   id="bulkWarehousingOrderList-supplierSn"
                   placeholder="请选择供应商"
-                  allowClear
                   v-model="queryParam.supplierSn"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in supplierList" :pyCode="item.pyCode" :key="item.supplierSn" :value="item.supplierSn">{{ item.supplierName }}</a-select-option>
-                </a-select>
+                ></supplier>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -157,12 +152,12 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import getDate from '@/libs/getDate.js'
 import basicInfoModal from './basicInfoModal.vue'
 import { sparePartsPurList, sparePartsPurCount, sparePartsPurDel, sparePartsPurPut, sparePartsPurExport } from '@/api/sparePartsPur'
-import { supplierAllList } from '@/api/supplier'
+import supplier from '@/views/common/supplier'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import stateIcon from '@/views/common/stateIcon'
 export default {
   name: 'BulkWarehousingList',
-  components: { STable, VSelect, basicInfoModal, rangeDate, stateIcon },
+  components: { STable, VSelect, basicInfoModal, rangeDate, stateIcon, supplier },
   mixins: [commonMixin],
   data () {
     return {
@@ -171,7 +166,6 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
       openModal: false, // 基本信息弹框是否显示
-      supplierList: [], //  供应商列表数据
       tableHeight: 0,
       time: [
         getDate.getCurrMonthDays().starttime,
@@ -347,23 +341,12 @@ export default {
         }
       })
     },
-    // 供应商下拉数据
-    getSupplierList () {
-      supplierAllList().then(res => {
-        if (res.status == 200) {
-          this.supplierList = res.data
-        } else {
-          this.supplierList = []
-        }
-      })
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
       this.openModal = false
-      this.getSupplierList()
 
       // 是否打开的页签
       const a = this.$store.state.app.isNewTab

+ 0 - 0
src/views/reportData/chainCustomerReport/list.vue → src/views/chainReportData/chainCustomerReport/list.vue


+ 0 - 0
src/views/reportData/chainPurchaseReceiptReport/list.vue → src/views/chainReportData/chainPurchaseReceiptReport/list.vue


+ 0 - 0
src/views/reportData/chainPurchaseReceiptReport/purchaseReceiptDetail.vue → src/views/chainReportData/chainPurchaseReceiptReport/purchaseReceiptDetail.vue


+ 0 - 0
src/views/reportData/chainPurchaseReceiptReport/purchaseReceiptOrder.vue → src/views/chainReportData/chainPurchaseReceiptReport/purchaseReceiptOrder.vue


+ 0 - 0
src/views/reportData/chainReceivedSendStorageReport/list.vue → src/views/chainReportData/chainReceivedSendStorageReport/list.vue


+ 146 - 147
src/views/reportData/chainSalesDetailReport/list.vue → src/views/chainReportData/chainSalesDetailReport/list.vue

@@ -1,164 +1,163 @@
 <template>
-  <a-card size="small" :bordered="false" class="chainSalesDetailReportList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <a-alert :show-icon="false" type="error" message="注:连锁销售单报表包含急件销售数量、售价,连锁销售明细报表不包含急件销售数量、成本、售价" banner style="margin-bottom: 10px;" />
-      <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
-        <a-form-model
-          id="chainSalesDetailReportList-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-spin :spinning="spinning" tip="Loading...">
+    <a-alert :show-icon="false" type="error" message="注:连锁销售单报表包含急件销售数量、售价,连锁销售明细报表不包含急件销售数量、成本、售价" banner style="margin-bottom: 10px;" />
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="chainSalesDetailReportList-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="tenantId">
+              <a-select
+                placeholder="请选择连锁店"
+                id="chainSalesDetailReportList-tenantId"
+                allowClear
+                v-model="queryParam.tenantId"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in linkageGroupData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <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-model-item label="客户名称">
+              <a-input id="chainSalesDetailReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+            </a-form-model-item>
+          </a-col>
+          <template v-if="advanced">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="连锁店" prop="tenantId">
-                <a-select
-                  placeholder="请选择连锁店"
-                  id="chainSalesDetailReportList-tenantId"
-                  allowClear
-                  v-model="queryParam.tenantId"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in linkageGroupData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+              <a-form-model-item label="客户类型">
+                <a-select id="chainSalesDetailReportList-customerType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
+                  <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
                 </a-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="审核时间" prop="time">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+              <a-form-model-item label="收款方式">
+                <a-select id="chainSalesDetailReportList-settleStyleSn" v-model="queryParam.settleStyleSn" allowClear placeholder="请选择收款方式">
+                  <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
+                </a-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="客户名称">
-                <a-input id="chainSalesDetailReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+              <a-form-model-item label="产品品牌">
+                <ProductBrand id="chainSalesDetailReportList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="客户类型">
-                  <a-select id="chainSalesDetailReportList-customerType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
-                    <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="收款方式">
-                  <a-select id="chainSalesDetailReportList-settleStyleSn" v-model="queryParam.settleStyleSn" allowClear placeholder="请选择收款方式">
-                    <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="产品品牌">
-                  <ProductBrand id="chainSalesDetailReportList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="产品分类">
-                  <ProductType id="chainSalesDetailReportList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="产品编码">
-                  <a-input id="chainSalesDetailReportList-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="产品名称">
-                  <a-input id="chainSalesDetailReportList-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="仓库仓位">
-                  <a-cascader
-                    v-model="queryParam.warehouseCascade"
-                    expand-trigger="hover"
-                    :options="warehouseCascadeData"
-                    :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-                    id="chainSalesDetailReportList-warehouseCascade"
-                    placeholder="请选择仓库仓位"
-                    @change="warehouseCascadeChange"
-                    allowClear
-                    style="width: 100%;" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="单号">
-                  <a-input id="chainSalesDetailReportList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入单号"/>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="业务员">
-                  <a-input id="chainSalesDetailReportList-salesManName" v-model.trim="queryParam.salesManName" allowClear placeholder="请输入业务员"/>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品分类">
+                <ProductType id="chainSalesDetailReportList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品编码">
+                <a-input id="chainSalesDetailReportList-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input id="chainSalesDetailReportList-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="仓库仓位">
+                <a-cascader
+                  v-model="queryParam.warehouseCascade"
+                  expand-trigger="hover"
+                  :options="warehouseCascadeData"
+                  :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+                  id="chainSalesDetailReportList-warehouseCascade"
+                  placeholder="请选择仓库仓位"
+                  @change="warehouseCascadeChange"
+                  allowClear
+                  style="width: 100%;" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="单号">
+                <a-input id="chainSalesDetailReportList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入单号"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="业务员">
+                <a-input id="chainSalesDetailReportList-salesManName" v-model.trim="queryParam.salesManName" allowClear placeholder="请输入业务员"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="12" :sm="24">
+              <a-row>
+                <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }" style="margin-bottom: 0!important;">
+                  <a-col span="7">
+                    <a-form-model-item prop="provinceSn" style="margin: 0;">
+                      <a-select v-model="queryParam.provinceSn" @change="getCityList" placeholder="请选择省" allowClear>
+                        <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                  <a-col span="7" offset="1">
+                    <a-form-model-item prop="citySn" style="margin: 0;">
+                      <a-select v-model="queryParam.citySn" @change="getAreaList" placeholder="请选择市" allowClear>
+                        <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                  <a-col span="7" offset="1">
+                    <a-form-model-item prop="countySn" style="margin: 0;">
+                      <a-select v-model="queryParam.countySn" placeholder="请选择区/县" allowClear>
+                        <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                  >>>>>>> 5ecce21f07307a8bedb4226d558b86b26abba9ee:src/views/chainReportData/chainSalesDetailReport/list.vue
                 </a-form-model-item>
-              </a-col>
-              <a-col :md="12" :sm="24">
-                <a-row>
-                  <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }" style="margin-bottom: 0!important;">
-                    <a-col span="7">
-                      <a-form-model-item prop="provinceSn" style="margin: 0;">
-                        <a-select v-model="queryParam.provinceSn" @change="getCityList" placeholder="请选择省" allowClear>
-                          <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-model-item prop="citySn" style="margin: 0;">
-                        <a-select v-model="queryParam.citySn" @change="getAreaList" placeholder="请选择市" allowClear>
-                          <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-model-item prop="countySn" style="margin: 0;">
-                        <a-select v-model="queryParam.countySn" placeholder="请选择区/县" allowClear>
-                          <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                  </a-form-model-item>
-                </a-row>
-              </a-col>
-            </template>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainSalesDetailReportList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainSalesDetailReportList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
+              </a-row>
             </a-col>
-          </a-row>
-        </a-form-model>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainSalesDetailReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainSalesDetailReportList-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.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
+        总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
+        总售价:<strong>{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? '¥'+totalData.totalPrice : '--' }}</strong>;
+        总毛利:<strong>{{ (totalData && (totalData.totalProfit || totalData.totalProfit==0)) ? '¥'+totalData.totalProfit : '--' }}</strong>。
       </div>
-      <!-- 合计 -->
-      <a-alert type="info" style="margin-bottom:10px">
-        <div class="ftext" slot="message">
-          产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
-          总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
-          总售价:<strong>{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? '¥'+totalData.totalPrice : '--' }}</strong>;
-          总毛利:<strong>{{ (totalData && (totalData.totalProfit || totalData.totalProfit==0)) ? '¥'+totalData.totalProfit : '--' }}</strong>。
-        </div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :defaultLoadData="false"
-        bordered>
-      </s-table>
-    </a-spin>
-  </a-card>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
 </template>
 
 <script>

+ 0 - 0
src/views/reportData/chainSalesDetailsCountReport/list.vue → src/views/chainReportData/chainSalesDetailsCountReport/list.vue


+ 46 - 0
src/views/chainReportData/chainSalesReport/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <div class="tabsReportList-wrap">
+    <div style="background-color: #fff;margin-bottom: 5px;">
+      <a-tabs default-active-key="1" v-model="curTab">
+        <a-tab-pane key="1" tab="连锁销售报表" v-if="$hasPermissions('M_chainSalesReportList')"></a-tab-pane>
+        <a-tab-pane key="2" tab="连锁销售明细报表" v-if="$hasPermissions('M_chainSalesDetailReportList')" force-render></a-tab-pane>
+      </a-tabs>
+    </div>
+    <a-card size="small" :bordered="false">
+      <salesReport v-show="curTab==1&&$hasPermissions('M_chainSalesReportList')"></salesReport>
+      <salesDetailReport v-show="curTab==2&&$hasPermissions('M_chainSalesDetailReportList')"></salesDetailReport>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import salesReport from './list.vue'
+import salesDetailReport from '@/views/chainReportData/chainSalesDetailReport/list.vue'
+export default {
+  name: 'ChainSalesReportIndex',
+  components: {
+    salesReport,
+    salesDetailReport
+  },
+  data () {
+    return {
+      curTab: '1'
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .tabsReportList-wrap{
+    display: flex;
+    flex-direction: column;
+    height: 100%;
+    .ant-tabs-bar{
+      margin: 0;
+    }
+    .ant-card{
+      flex-grow: 1;
+      overflow: auto;
+    }
+  }
+</style>

+ 112 - 114
src/views/reportData/chainSalesReport/list.vue → src/views/chainReportData/chainSalesReport/list.vue

@@ -1,131 +1,129 @@
 <template>
-  <a-card size="small" :bordered="false" class="chainSalesReportList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <a-alert :show-icon="false" type="error" message="注:连锁销售单报表包含急件销售数量、售价,连锁销售明细报表不包含急件销售数量、成本、售价" banner style="margin-bottom: 10px;" />
-      <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
-        <a-form-model
-          id="chainSalesReportList-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-spin :spinning="spinning" tip="Loading...">
+    <a-alert :show-icon="false" type="error" message="注:连锁销售单报表包含急件销售数量、售价,连锁销售明细报表不包含急件销售数量、成本、售价" banner style="margin-bottom: 10px;" />
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="chainSalesReportList-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="tenantId">
+              <a-select
+                placeholder="请选择连锁店"
+                id="chainSalesReportList-tenantId"
+                allowClear
+                v-model="queryParam.tenantId"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in linkageGroupData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <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-model-item label="客户名称">
+              <a-input id="chainSalesReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+            </a-form-model-item>
+          </a-col>
+          <template v-if="advanced">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="连锁店" prop="tenantId">
-                <a-select
-                  placeholder="请选择连锁店"
-                  id="chainSalesReportList-tenantId"
-                  allowClear
-                  v-model="queryParam.tenantId"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in linkageGroupData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+              <a-form-model-item label="客户类型">
+                <a-select id="chainSalesReportList-salesTargetType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
+                  <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
                 </a-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="审核时间" prop="time">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+              <a-form-model-item label="收款方式">
+                <a-select id="chainSalesReportList-settleStyleSn" v-model="queryParam.settleStyleSn" allowClear placeholder="请选择收款方式">
+                  <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
+                </a-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="客户名称">
-                <a-input id="chainSalesReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+              <a-form-model-item label="单号">
+                <a-input id="chainSalesReportList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入单号"/>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="客户类型">
-                  <a-select id="chainSalesReportList-salesTargetType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
-                    <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="收款方式">
-                  <a-select id="chainSalesReportList-settleStyleSn" v-model="queryParam.settleStyleSn" allowClear placeholder="请选择收款方式">
-                    <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="单号">
-                  <a-input id="chainSalesReportList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入单号"/>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="业务员">
-                  <a-input id="chainSalesReportList-salesManName" v-model.trim="queryParam.salesManName" allowClear placeholder="请输入业务员"/>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="业务员">
+                <a-input id="chainSalesReportList-salesManName" v-model.trim="queryParam.salesManName" allowClear placeholder="请输入业务员"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="12" :sm="24">
+              <a-row>
+                <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }" style="margin-bottom: 0!important;">
+                  <a-col span="8">
+                    <a-form-model-item prop="provinceSn" style="margin: 0;">
+                      <a-select v-model="queryParam.provinceSn" allowClear @change="getCityList" placeholder="请选择省">
+                        <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                  <a-col span="7" offset="1">
+                    <a-form-model-item prop="citySn" style="margin: 0;">
+                      <a-select v-model="queryParam.citySn" allowClear @change="getAreaList" placeholder="请选择市">
+                        <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                  <a-col span="7" offset="1">
+                    <a-form-model-item prop="countySn" style="margin: 0;">
+                      <a-select v-model="queryParam.countySn" allowClear placeholder="请选择区/县">
+                        <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
                 </a-form-model-item>
-              </a-col>
-              <a-col :md="12" :sm="24">
-                <a-row>
-                  <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }" style="margin-bottom: 0!important;">
-                    <a-col span="8">
-                      <a-form-model-item prop="provinceSn" style="margin: 0;">
-                        <a-select v-model="queryParam.provinceSn" allowClear @change="getCityList" placeholder="请选择省">
-                          <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-model-item prop="citySn" style="margin: 0;">
-                        <a-select v-model="queryParam.citySn" allowClear @change="getAreaList" placeholder="请选择市">
-                          <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-model-item prop="countySn" style="margin: 0;">
-                        <a-select v-model="queryParam.countySn" allowClear placeholder="请选择区/县">
-                          <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                  </a-form-model-item>
-                </a-row>
-              </a-col>
-            </template>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainSalesReportList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainSalesReportList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
+              </a-row>
             </a-col>
-          </a-row>
-        </a-form-model>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainSalesReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainSalesReportList-reset">重置</a-button>
+            <a @click="advanced=!advanced" style="margin-left: 8px">
+              {{ 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.totalRowSize || totalData.totalRowSize==0)) ? totalData.totalRowSize : '--' }}</strong>;
+        产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
+        总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
+        总售价:<strong>{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? '¥'+totalData.totalPrice : '--' }}</strong>;
+        总毛利:<strong>{{ (totalData && (totalData.totalProfit || totalData.totalProfit==0)) ? '¥'+totalData.totalProfit : '--' }}</strong>。
       </div>
-      <!-- 合计 -->
-      <a-alert type="info" style="margin-bottom:10px">
-        <div class="ftext" slot="message">
-          总单数:<strong>{{ (totalData && (totalData.totalRowSize || totalData.totalRowSize==0)) ? totalData.totalRowSize : '--' }}</strong>;
-          产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
-          总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
-          总售价:<strong>{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? '¥'+totalData.totalPrice : '--' }}</strong>;
-          总毛利:<strong>{{ (totalData && (totalData.totalProfit || totalData.totalProfit==0)) ? '¥'+totalData.totalProfit : '--' }}</strong>。
-        </div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :defaultLoadData="false"
-        bordered>
-      </s-table>
-    </a-spin>
-  </a-card>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
 </template>
 
 <script>

+ 0 - 0
src/views/reportData/chainStockExpenditureReport/list.vue → src/views/chainReportData/chainStockExpenditureReport/list.vue


+ 0 - 0
src/views/reportData/chainStockIncomeReport/list.vue → src/views/chainReportData/chainStockIncomeReport/list.vue


+ 0 - 0
src/views/reportData/chainStockReport/detailModal.vue → src/views/chainReportData/chainStockReport/detailModal.vue


+ 0 - 0
src/views/reportData/chainStockReport/list.vue → src/views/chainReportData/chainStockReport/list.vue


+ 78 - 0
src/views/common/supplier.js

@@ -0,0 +1,78 @@
+import { supplierAllList } from '@/api/supplier.js'
+const Employee = {
+  template: `
+      <a-select
+        :placeholder="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.supplierSn" :value="item.supplierSn">
+        {{ item.supplierName }}
+        </a-select-option>
+      </a-select>
+    `,
+  props: {
+    value: {
+      type: String,
+      defatut: ''
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    placeholder: {
+      type: String,
+      default: '请选择供应商'
+    },
+    enableFlag: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      defaultVal: this.value,
+      list: []
+    };
+  },
+  mounted() {
+    this.getList()
+  },
+  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;
+      const item = this.list.find(item => item.supplierSn == value)
+      this.$emit('change', value, item);
+      this.$emit('input', value);
+    },
+    getList () {
+      supplierAllList().then(res => {
+        if (res.status == 200) {
+          if(this.enableFlag!=''){
+            this.list = res.data.filter(item => item.enableFlag == this.enableFlag)
+          }else{
+            this.list = res.data
+          }
+        } else {
+          this.list = []
+        }
+      })
+    },
+  },
+};
+
+export default Employee

+ 274 - 0
src/views/reportData/bulkReturnReport/detailList.vue

@@ -0,0 +1,274 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="bulkInList-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-model-item label="散件退货单号">
+              <a-input id="bulkInList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入单号"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="供应商">
+              <supplier
+                id="bulkInList-supplierSn"
+                placeholder="请选择供应商"
+                v-model="queryParam.supplierSn"
+              ></supplier>
+            </a-form-model-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品编码">
+                <a-input id="bulkInList-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input id="bulkInList-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品品牌">
+                <ProductBrand id="bulkInList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品分类">
+                <ProductType id="bulkInList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="queryParam.productType"></ProductType>
+              </a-form-model-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="bulkInList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="bulkInList-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('B_salesDetailExport')"
+              class="button-warning"
+              id="bulkInList-export-btn">导出</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.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
+        退货总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
+import supplier from '@/views/common/supplier'
+import { reportSalesBillDetailList, reportSalesBillDetailCount, reportSalesBillDetailExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        time: [],
+        beginDate: '',
+        endDate: '',
+        salesTargetName: '',
+        sparePartsPutTypeSn: undefined,
+        supplierSn: undefined,
+        productEntity: {
+          productBrandSn: undefined, //  产品品牌
+          productTypeSn1: '', //  产品一级分类
+          productTypeSn2: '', //  产品二级分类
+          productTypeSn3: '', //  产品三级分类
+          code: '', //  产品编码
+          name: '' //  产品名称
+        },
+        productType: undefined,
+        salesBillNo: '',
+        salesManName: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '散件退货单号', dataIndex: 'salesBillNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商', dataIndex: 'salesTargetName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'productQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本', dataIndex: 'productCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'salesAuditDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        delete params.warehouseCascade
+        return reportSalesBillDetailList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            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
+        })
+      },
+      totalData: null, //  合计
+      sparePartsPutTypeList: [] //  散件入库类型
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportSalesBillDetailCount(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.salesBillNo = ''
+      this.queryParam.salesTargetName = ''
+      this.queryParam.sparePartsPutTypeSn = undefined
+      this.queryParam.supplierSn = undefined
+      this.queryParam.productEntity.productBrandSn = undefined
+      this.queryParam.productEntity.productTypeSn1 = ''
+      this.queryParam.productEntity.productTypeSn2 = ''
+      this.queryParam.productEntity.productTypeSn3 = ''
+      this.queryParam.productEntity.code = ''
+      this.queryParam.productEntity.name = ''
+      this.$refs.ruleForm.resetFields()
+      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
+          reportSalesBillDetailExport(params).then(res => {
+            downloadExcel(res, '散件入库明细报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  产品分类  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] : ''
+    },
+    pageInit () {
+      this.disabled = false
+      this.spinning = false
+    }
+  },
+  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>

+ 46 - 0
src/views/reportData/bulkReturnReport/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <div class="tabsReportList-wrap">
+    <div style="background-color: #fff;margin-bottom: 5px;">
+      <a-tabs default-active-key="1" v-model="curTab">
+        <a-tab-pane key="1" tab="散件退货报表" v-if="$hasPermissions('M_salesReportList')"></a-tab-pane>
+        <a-tab-pane key="2" tab="散件退货明细报表" v-if="$hasPermissions('M_salesDetailReportList')" force-render></a-tab-pane>
+      </a-tabs>
+    </div>
+    <a-card size="small" :bordered="false">
+      <report v-show="curTab==1&&$hasPermissions('M_salesReportList')"></report>
+      <detailReport v-show="curTab==2&&$hasPermissions('M_salesDetailReportList')"></detailReport>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import report from './list.vue'
+import detailReport from './detailList.vue'
+export default {
+  name: 'BulkReturnReportIndex',
+  components: {
+    report,
+    detailReport
+  },
+  data () {
+    return {
+      curTab: '1'
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .tabsReportList-wrap{
+    display: flex;
+    flex-direction: column;
+    height: 100%;
+    .ant-tabs-bar{
+      margin: 0;
+    }
+    .ant-card{
+      flex-grow: 1;
+      overflow: auto;
+    }
+  }
+</style>

+ 218 - 0
src/views/reportData/bulkReturnReport/list.vue

@@ -0,0 +1,218 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="bulkReturn-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-model-item label="散件退货单号">
+              <a-input id="bulkReturn-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入单号"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="供应商">
+              <supplier
+                id="bulkReturn-supplierSn"
+                placeholder="请选择供应商"
+                v-model="queryParam.supplierSn"
+              ></supplier>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="bulkReturn-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="bulkReturn-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('B_salesReportExport')"
+              class="button-warning"
+              id="bulkReturn-export-btn">导出</a-button>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" style="margin-bottom:10px">
+      <div class="ftext" slot="message">
+        总单数:<strong>{{ (totalData && (totalData.totalRowSize || totalData.totalRowSize==0)) ? totalData.totalRowSize : '--' }}</strong>;
+        产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
+        退货总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import supplier from '@/views/common/supplier'
+import { reportSalesBillList, reportSalesBillCount, reportSalesBillExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, supplier },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        time: [],
+        beginDate: '',
+        endDate: '',
+        sparePartsPutTypeSn: undefined,
+        supplierSn: undefined,
+        salesBillNo: '',
+        salesManName: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '散件退货单号', dataIndex: 'salesBillNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商', dataIndex: 'salesTargetName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '款数', dataIndex: 'totalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本', dataIndex: 'totalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'salesAuditDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return reportSalesBillList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            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
+        })
+      },
+      totalData: null //  合计
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportSalesBillCount(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.salesTargetType = undefined
+      this.queryParam.sparePartsPutTypeSn = undefined
+      this.queryParam.salesBillNo = ''
+      this.queryParam.salesManName = ''
+      this.$refs.ruleForm.resetFields()
+      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
+          reportSalesBillExport(params).then(res => {
+            downloadExcel(res, '散件退货报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    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) {
+    next(vm => {})
+  }
+}
+</script>

+ 294 - 0
src/views/reportData/bulkWarehousingReport/detailList.vue

@@ -0,0 +1,294 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="bulkInList-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-model-item label="散件单号">
+              <a-input id="bulkInList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入单号"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="供应商">
+              <supplier
+                id="bulkInList-supplierSn"
+                placeholder="请选择供应商"
+                v-model="queryParam.supplierSn"
+              ></supplier>
+            </a-form-model-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="散件入库类型">
+                <a-select id="bulkInList-sparePartsType" placeholder="请选择散件入库类型" allowClear v-model="queryParam.sparePartsType">
+                  <a-select-option v-for="item in sparePartsPutTypeList" :key="item.sparePartsPutTypeSn" :value="item.sparePartsPutTypeSn">{{ item.name }}</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品编码">
+                <a-input id="bulkInList-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input id="bulkInList-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品品牌">
+                <ProductBrand id="bulkInList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品分类">
+                <ProductType id="bulkInList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="queryParam.productType"></ProductType>
+              </a-form-model-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="bulkInList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="bulkInList-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('B_salesDetailExport')"
+              class="button-warning"
+              id="bulkInList-export-btn">导出</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.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
+        散件总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import { sparePartsPutTypeAllList } from '@/api/sparePartsPutType'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
+import supplier from '@/views/common/supplier'
+import { reportSalesBillDetailList, reportSalesBillDetailCount, reportSalesBillDetailExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        time: [],
+        beginDate: '',
+        endDate: '',
+        salesTargetName: '',
+        sparePartsPutTypeSn: undefined,
+        supplierSn: undefined,
+        productEntity: {
+          productBrandSn: undefined, //  产品品牌
+          productTypeSn1: '', //  产品一级分类
+          productTypeSn2: '', //  产品二级分类
+          productTypeSn3: '', //  产品三级分类
+          code: '', //  产品编码
+          name: '' //  产品名称
+        },
+        productType: undefined,
+        salesBillNo: '',
+        salesManName: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '散件单号', dataIndex: 'salesBillNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商', dataIndex: 'salesTargetName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '散件入库类型', dataIndex: 'settleStyleName', width: '7%', 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: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'productQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本', dataIndex: 'productCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'salesAuditDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        delete params.warehouseCascade
+        return reportSalesBillDetailList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            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
+        })
+      },
+      totalData: null, //  合计
+      sparePartsPutTypeList: [] //  散件入库类型
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportSalesBillDetailCount(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.salesBillNo = ''
+      this.queryParam.salesTargetName = ''
+      this.queryParam.sparePartsPutTypeSn = undefined
+      this.queryParam.supplierSn = undefined
+      this.queryParam.productEntity.productBrandSn = undefined
+      this.queryParam.productEntity.productTypeSn1 = ''
+      this.queryParam.productEntity.productTypeSn2 = ''
+      this.queryParam.productEntity.productTypeSn3 = ''
+      this.queryParam.productEntity.code = ''
+      this.queryParam.productEntity.name = ''
+      this.$refs.ruleForm.resetFields()
+      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
+          reportSalesBillDetailExport(params).then(res => {
+            downloadExcel(res, '散件入库明细报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    // 散件入库类型下拉数据
+    getSparePartsPutTypeList () {
+      sparePartsPutTypeAllList().then(res => {
+        if (res.status == 200) {
+          this.sparePartsPutTypeList = res.data
+        } else {
+          this.sparePartsPutTypeList = []
+        }
+      })
+    },
+    //  产品分类  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] : ''
+    },
+    pageInit () {
+      this.disabled = false
+      this.spinning = false
+      this.getSparePartsPutTypeList()
+    }
+  },
+  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>

+ 46 - 0
src/views/reportData/bulkWarehousingReport/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <div class="tabsReportList-wrap">
+    <div style="background-color: #fff;margin-bottom: 5px;">
+      <a-tabs default-active-key="1" v-model="curTab">
+        <a-tab-pane key="1" tab="散件入库报表" v-if="$hasPermissions('M_salesReportList')"></a-tab-pane>
+        <a-tab-pane key="2" tab="散件入库明细报表" v-if="$hasPermissions('M_salesDetailReportList')" force-render></a-tab-pane>
+      </a-tabs>
+    </div>
+    <a-card size="small" :bordered="false">
+      <report v-show="curTab==1&&$hasPermissions('M_salesReportList')"></report>
+      <detailReport v-show="curTab==2&&$hasPermissions('M_salesDetailReportList')"></detailReport>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import report from './list.vue'
+import detailReport from './detailList.vue'
+export default {
+  name: 'BulkWarehousingReportIndex',
+  components: {
+    report,
+    detailReport
+  },
+  data () {
+    return {
+      curTab: '1'
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .tabsReportList-wrap{
+    display: flex;
+    flex-direction: column;
+    height: 100%;
+    .ant-tabs-bar{
+      margin: 0;
+    }
+    .ant-card{
+      flex-grow: 1;
+      overflow: auto;
+    }
+  }
+</style>

+ 246 - 0
src/views/reportData/bulkWarehousingReport/list.vue

@@ -0,0 +1,246 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="bulkIn-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-model-item label="散件单号">
+              <a-input id="bulkIn-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入单号"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="供应商">
+              <supplier
+                id="bulkIn-supplierSn"
+                placeholder="请选择供应商"
+                v-model="queryParam.supplierSn"
+              ></supplier>
+            </a-form-model-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="散件入库类型">
+                <a-select id="bulkIn-sparePartsType" placeholder="请选择散件入库类型" allowClear v-model="queryParam.sparePartsType">
+                  <a-select-option v-for="item in sparePartsPutTypeList" :key="item.sparePartsPutTypeSn" :value="item.sparePartsPutTypeSn">{{ item.name }}</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="bulkIn-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="bulkIn-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('B_salesReportExport')"
+              class="button-warning"
+              id="bulkIn-export-btn">导出</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.totalRowSize || totalData.totalRowSize==0)) ? totalData.totalRowSize : '--' }}</strong>;
+        产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
+        散件总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import { sparePartsPutTypeAllList } from '@/api/sparePartsPutType'
+import supplier from '@/views/common/supplier'
+import { reportSalesBillList, reportSalesBillCount, reportSalesBillExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, supplier },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        time: [],
+        beginDate: '',
+        endDate: '',
+        sparePartsPutTypeSn: undefined,
+        supplierSn: undefined,
+        salesBillNo: '',
+        salesManName: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '散件单号', dataIndex: 'salesBillNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商', dataIndex: 'salesTargetName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '散件入库类型', dataIndex: 'settleStyleName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '款数', dataIndex: 'totalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本', dataIndex: 'totalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'salesAuditDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return reportSalesBillList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            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
+        })
+      },
+      totalData: null, //  合计
+      sparePartsPutTypeList: [] // 散件入库类型
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportSalesBillCount(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.salesTargetType = undefined
+      this.queryParam.sparePartsPutTypeSn = undefined
+      this.queryParam.salesBillNo = ''
+      this.queryParam.salesManName = ''
+      this.$refs.ruleForm.resetFields()
+      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
+          reportSalesBillExport(params).then(res => {
+            downloadExcel(res, '散件入库报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    // 散件入库类型下拉数据
+    getSparePartsPutTypeList () {
+      sparePartsPutTypeAllList().then(res => {
+        if (res.status == 200) {
+          this.sparePartsPutTypeList = res.data
+        } else {
+          this.sparePartsPutTypeList = []
+        }
+      })
+    },
+    pageInit () {
+      this.getSparePartsPutTypeList()
+    }
+  },
+  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>

+ 142 - 143
src/views/reportData/salesDetailReport/list.vue

@@ -1,159 +1,158 @@
 <template>
-  <a-card size="small" :bordered="false" class="salesDetailReportList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <a-alert :show-icon="false" type="error" message="注:销售单报表包含急件销售数量、售价,销售明细报表不包含急件销售数量、成本、售价" banner style="margin-bottom: 10px;" />
-      <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
-        <a-form-model
-          id="salesDetailReportList-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-spin :spinning="spinning" tip="Loading...">
+    <a-alert :show-icon="false" type="error" message="注:销售单报表包含急件销售数量、售价,销售明细报表不包含急件销售数量、成本、售价" banner style="margin-bottom: 10px;" />
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="salesDetailReportList-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-model-item label="客户名称">
+              <a-input id="salesDetailReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="客户类型">
+              <a-select id="salesDetailReportList-customerType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
+                <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <template v-if="advanced">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="审核时间" prop="time">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+              <a-form-model-item label="收款方式">
+                <a-select id="salesDetailReportList-settleStyleSn" v-model="queryParam.settleStyleSn" allowClear placeholder="请选择收款方式">
+                  <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
+                </a-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="客户名称">
-                <a-input id="salesDetailReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+              <a-form-item label="产品品牌">
+                <ProductBrand id="salesDetailReportList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品分类">
+                <ProductType id="salesDetailReportList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="客户类型">
-                <a-select id="salesDetailReportList-customerType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
-                  <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
-                </a-select>
+              <a-form-model-item label="产品编码">
+                <a-input id="salesDetailReportList-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="收款方式">
-                  <a-select id="salesDetailReportList-settleStyleSn" v-model="queryParam.settleStyleSn" allowClear placeholder="请选择收款方式">
-                    <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="产品品牌">
-                  <ProductBrand id="salesDetailReportList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
-                </a-form-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="产品分类">
-                  <ProductType id="salesDetailReportList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="产品编码">
-                  <a-input id="salesDetailReportList-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="产品名称">
-                  <a-input id="salesDetailReportList-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="仓库仓位">
-                  <a-cascader
-                    v-model="queryParam.warehouseCascade"
-                    expand-trigger="hover"
-                    :options="warehouseCascadeData"
-                    :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-                    id="salesDetailReportList-warehouseCascade"
-                    placeholder="请选择仓库仓位"
-                    @change="warehouseCascadeChange"
-                    allowClear
-                    style="width: 100%;" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="单号">
-                  <a-input id="salesDetailReportList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入单号"/>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="业务员">
-                  <a-input id="salesDetailReportList-salesManName" v-model.trim="queryParam.salesManName" allowClear placeholder="请输入业务员"/>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input id="salesDetailReportList-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="仓库仓位">
+                <a-cascader
+                  v-model="queryParam.warehouseCascade"
+                  expand-trigger="hover"
+                  :options="warehouseCascadeData"
+                  :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+                  id="salesDetailReportList-warehouseCascade"
+                  placeholder="请选择仓库仓位"
+                  @change="warehouseCascadeChange"
+                  allowClear
+                  style="width: 100%;" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="单号">
+                <a-input id="salesDetailReportList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入单号"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="业务员">
+                <a-input id="salesDetailReportList-salesManName" v-model.trim="queryParam.salesManName" allowClear placeholder="请输入业务员"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="12" :sm="24">
+              <a-row>
+                <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }" style="margin-bottom: 0!important;">
+                  <a-col span="7">
+                    <a-form-model-item prop="provinceSn" style="margin: 0;">
+                      <a-select v-model="queryParam.provinceSn" @change="getCityList" placeholder="请选择省" allowClear>
+                        <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                  <a-col span="7" offset="1">
+                    <a-form-model-item prop="citySn" style="margin: 0;">
+                      <a-select v-model="queryParam.citySn" @change="getAreaList" placeholder="请选择市" allowClear>
+                        <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                  <a-col span="7" offset="1">
+                    <a-form-model-item prop="countySn" style="margin: 0;">
+                      <a-select v-model="queryParam.countySn" placeholder="请选择区/县" allowClear>
+                        <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                  >>>>>>> 5ecce21f07307a8bedb4226d558b86b26abba9ee
                 </a-form-model-item>
-              </a-col>
-              <a-col :md="12" :sm="24">
-                <a-row>
-                  <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }" style="margin-bottom: 0!important;">
-                    <a-col span="7">
-                      <a-form-model-item prop="provinceSn" style="margin: 0;">
-                        <a-select v-model="queryParam.provinceSn" @change="getCityList" placeholder="请选择省" allowClear>
-                          <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-model-item prop="citySn" style="margin: 0;">
-                        <a-select v-model="queryParam.citySn" @change="getAreaList" placeholder="请选择市" allowClear>
-                          <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-model-item prop="countySn" style="margin: 0;">
-                        <a-select v-model="queryParam.countySn" placeholder="请选择区/县" allowClear>
-                          <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                  </a-form-model-item>
-                </a-row>
-              </a-col>
-            </template>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesDetailReportList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesDetailReportList-reset">重置</a-button>
-              <a-button
-                type="primary"
-                style="margin-left: 5px"
-                @click="handleExport"
-                :disabled="disabled"
-                :loading="exportLoading"
-                v-if="$hasPermissions('B_salesDetailExport')"
-                class="button-warning"
-                id="salesDetailReportList-export-btn">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
+              </a-row>
             </a-col>
-          </a-row>
-        </a-form-model>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesDetailReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesDetailReportList-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('B_salesDetailExport')"
+              class="button-warning"
+              id="salesDetailReportList-export-btn">导出</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.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
+        总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
+        总售价:<strong>{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? '¥'+totalData.totalPrice : '--' }}</strong>;
+        总毛利:<strong>{{ (totalData && (totalData.totalProfit || totalData.totalProfit==0)) ? '¥'+totalData.totalProfit : '--' }}</strong>。
       </div>
-      <!-- 合计 -->
-      <a-alert type="info" style="margin-bottom:10px">
-        <div class="ftext" slot="message">
-          产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
-          总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
-          总售价:<strong>{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? '¥'+totalData.totalPrice : '--' }}</strong>;
-          总毛利:<strong>{{ (totalData && (totalData.totalProfit || totalData.totalProfit==0)) ? '¥'+totalData.totalProfit : '--' }}</strong>。
-        </div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :defaultLoadData="false"
-        bordered>
-      </s-table>
-    </a-spin>
-  </a-card>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
 </template>
 
 <script>

+ 46 - 0
src/views/reportData/salesReport/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <div class="tabsReportList-wrap">
+    <div style="background-color: #fff;margin-bottom: 5px;">
+      <a-tabs default-active-key="1" v-model="curTab">
+        <a-tab-pane key="1" tab="销售报表" v-if="$hasPermissions('M_salesReportList')"></a-tab-pane>
+        <a-tab-pane key="2" tab="销售明细报表" v-if="$hasPermissions('M_salesDetailReportList')" force-render></a-tab-pane>
+      </a-tabs>
+    </div>
+    <a-card size="small" :bordered="false">
+      <salesReport v-show="curTab==1&&$hasPermissions('M_salesReportList')"></salesReport>
+      <salesDetailReport v-show="curTab==2&&$hasPermissions('M_salesDetailReportList')"></salesDetailReport>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import salesReport from './list.vue'
+import salesDetailReport from '@/views/reportData/salesDetailReport/list.vue'
+export default {
+  name: 'SalesReportIndex',
+  components: {
+    salesReport,
+    salesDetailReport
+  },
+  data () {
+    return {
+      curTab: '1'
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .tabsReportList-wrap{
+    display: flex;
+    flex-direction: column;
+    height: 100%;
+    .ant-tabs-bar{
+      margin: 0;
+    }
+    .ant-card{
+      flex-grow: 1;
+      overflow: auto;
+    }
+  }
+</style>

+ 108 - 110
src/views/reportData/salesReport/list.vue

@@ -1,126 +1,124 @@
 <template>
-  <a-card size="small" :bordered="false" class="salesReportList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <a-alert :show-icon="false" type="error" message="注:销售单报表包含急件销售数量、售价,销售明细报表不包含急件销售数量、成本、售价" banner style="margin-bottom: 10px;" />
-      <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
-        <a-form-model
-          id="salesReportList-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-spin :spinning="spinning" tip="Loading...">
+    <a-alert :show-icon="false" type="error" message="注:销售单报表包含急件销售数量、售价,销售明细报表不包含急件销售数量、成本、售价" banner style="margin-bottom: 10px;" />
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="salesReportList-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-model-item label="客户名称">
+              <a-input id="salesReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="客户类型">
+              <a-select id="salesReportList-salesTargetType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
+                <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <template v-if="advanced">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="审核时间" prop="time">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+              <a-form-model-item label="收款方式">
+                <a-select id="salesReportList-settleStyleSn" v-model="queryParam.settleStyleSn" allowClear placeholder="请选择收款方式">
+                  <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
+                </a-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="客户名称">
-                <a-input id="salesReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+              <a-form-model-item label="单号">
+                <a-input id="salesReportList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入单号"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="客户类型">
-                <a-select id="salesReportList-salesTargetType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
-                  <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
-                </a-select>
+              <a-form-model-item label="业务员">
+                <a-input id="salesReportList-salesManName" v-model.trim="queryParam.salesManName" allowClear placeholder="请输入业务员"/>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="收款方式">
-                  <a-select id="salesReportList-settleStyleSn" v-model="queryParam.settleStyleSn" allowClear placeholder="请选择收款方式">
-                    <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="单号">
-                  <a-input id="salesReportList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入单号"/>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="业务员">
-                  <a-input id="salesReportList-salesManName" v-model.trim="queryParam.salesManName" allowClear placeholder="请输入业务员"/>
+            <a-col :md="12" :sm="24">
+              <a-row>
+                <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }" style="margin-bottom: 0!important;">
+                  <a-col span="8">
+                    <a-form-model-item prop="provinceSn" style="margin: 0;">
+                      <a-select v-model="queryParam.provinceSn" allowClear @change="getCityList" placeholder="请选择省">
+                        <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                  <a-col span="7" offset="1">
+                    <a-form-model-item prop="citySn" style="margin: 0;">
+                      <a-select v-model="queryParam.citySn" allowClear @change="getAreaList" placeholder="请选择市">
+                        <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                  <a-col span="7" offset="1">
+                    <a-form-model-item prop="countySn" style="margin: 0;">
+                      <a-select v-model="queryParam.countySn" allowClear placeholder="请选择区/县">
+                        <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
                 </a-form-model-item>
-              </a-col>
-              <a-col :md="12" :sm="24">
-                <a-row>
-                  <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }" style="margin-bottom: 0!important;">
-                    <a-col span="8">
-                      <a-form-model-item prop="provinceSn" style="margin: 0;">
-                        <a-select v-model="queryParam.provinceSn" allowClear @change="getCityList" placeholder="请选择省">
-                          <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-model-item prop="citySn" style="margin: 0;">
-                        <a-select v-model="queryParam.citySn" allowClear @change="getAreaList" placeholder="请选择市">
-                          <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-model-item prop="countySn" style="margin: 0;">
-                        <a-select v-model="queryParam.countySn" allowClear placeholder="请选择区/县">
-                          <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                  </a-form-model-item>
-                </a-row>
-              </a-col>
-            </template>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesReportList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesReportList-reset">重置</a-button>
-              <a-button
-                type="primary"
-                style="margin-left: 5px"
-                @click="handleExport"
-                :disabled="disabled"
-                :loading="exportLoading"
-                v-if="$hasPermissions('B_salesReportExport')"
-                class="button-warning"
-                id="salesReportList-export-btn">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
+              </a-row>
             </a-col>
-          </a-row>
-        </a-form-model>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesReportList-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('B_salesReportExport')"
+              class="button-warning"
+              id="salesReportList-export-btn">导出</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.totalRowSize || totalData.totalRowSize==0)) ? totalData.totalRowSize : '--' }}</strong>;
+        产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
+        总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
+        总售价:<strong>{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? '¥'+totalData.totalPrice : '--' }}</strong>;
+        总毛利:<strong>{{ (totalData && (totalData.totalProfit || totalData.totalProfit==0)) ? '¥'+totalData.totalProfit : '--' }}</strong>。
       </div>
-      <!-- 合计 -->
-      <a-alert type="info" style="margin-bottom:10px">
-        <div class="ftext" slot="message">
-          总单数:<strong>{{ (totalData && (totalData.totalRowSize || totalData.totalRowSize==0)) ? totalData.totalRowSize : '--' }}</strong>;
-          产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
-          总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
-          总售价:<strong>{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? '¥'+totalData.totalPrice : '--' }}</strong>;
-          总毛利:<strong>{{ (totalData && (totalData.totalProfit || totalData.totalProfit==0)) ? '¥'+totalData.totalProfit : '--' }}</strong>。
-        </div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :defaultLoadData="false"
-        bordered>
-      </s-table>
-    </a-spin>
-  </a-card>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
 </template>
 
 <script>

+ 275 - 0
src/views/reportData/salesReturnReport/detailList.vue

@@ -0,0 +1,275 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="salesDetailReportList-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-model-item label="销售退货单号">
+              <a-input id="salesDetailReportList-salesReturnNo" v-model.trim="queryParam.salesReturnNo" allowClear placeholder="请输入销售退货单号"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="客户名称">
+              <a-input id="salesDetailReportList-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入客户名称"/>
+            </a-form-model-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品编码">
+                <a-input id="salesDetailReportList-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input id="salesDetailReportList-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品品牌">
+                <ProductBrand id="salesDetailReportList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品分类">
+                <ProductType id="salesDetailReportList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="queryParam.productType"></ProductType>
+              </a-form-model-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesDetailReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesDetailReportList-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('B_salesDetailExport')"
+              class="button-warning"
+              id="salesDetailReportList-export-btn">导出</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.qty || totalData.qty==0)) ? totalData.qty : '--' }}</strong>;
+        废品数量:<strong>{{ (totalData && (totalData.celQty || totalData.celQty==0)) ? totalData.celQty : '--' }}</strong>;
+        入库数量:<strong>{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</strong>;
+        退货金额:<strong>{{ (totalData && (totalData.price || totalData.price==0)) ? '¥'+totalData.price : '--' }}</strong>;
+        折扣金额:<strong>{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? '¥'+totalData.discountAmount : '--' }}</strong>;
+        折后退货金额:<strong>{{ (totalData && (totalData.discountedAmount || totalData.discountedAmount==0)) ? '¥'+totalData.discountedAmount : '--' }}</strong>;
+        退货成本:<strong>{{ (totalData && (totalData.cost || totalData.cost==0)) ? '¥'+totalData.cost : '--' }}</strong>。
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
+import { reportSalesReturnDetailPageList, reportSalesReturnDetailTotal, reportSalesReturnDetailExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        time: [],
+        beginDate: '',
+        endDate: '',
+        productType: undefined,
+        buyerName: '',
+        productEntity: {
+          productBrandSn: undefined, //  产品品牌
+          productTypeSn1: '', //  产品一级分类
+          productTypeSn2: '', //  产品二级分类
+          productTypeSn3: '', //  产品三级分类
+          code: '', //  产品编码
+          name: '' //  产品名称
+        },
+        salesReturnNo: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '销售退货单号', dataIndex: 'salesReturnNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'buyerName', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货数量', dataIndex: 'qty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '废品数量', dataIndex: 'celQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库数量', dataIndex: 'inStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货金额', dataIndex: 'price', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折扣金额', dataIndex: 'discountAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折后退货金额', dataIndex: 'discountedAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货成本', dataIndex: 'cost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return reportSalesReturnDetailPageList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].inStockQty = data.list[i].qty
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      totalData: null //  合计
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportSalesReturnDetailTotal(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.salesReturnNo = ''
+      this.queryParam.buyerName = ''
+      this.queryParam.productEntity.productBrandSn = undefined
+      this.queryParam.productEntity.productTypeSn1 = ''
+      this.queryParam.productEntity.productTypeSn2 = ''
+      this.queryParam.productEntity.productTypeSn3 = ''
+      this.queryParam.productEntity.code = ''
+      this.queryParam.productEntity.name = ''
+      this.queryParam.productType = undefined
+      this.productType = []
+      this.$refs.ruleForm.resetFields()
+      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
+          reportSalesReturnDetailExport(params).then(res => {
+            downloadExcel(res, '销售退货明细报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  产品分类  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] : ''
+    },
+    pageInit () {
+      this.disabled = false
+      this.spinning = false
+    }
+  },
+  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>

+ 46 - 0
src/views/reportData/salesReturnReport/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <div class="tabsReportList-wrap">
+    <div style="background-color: #fff;margin-bottom: 5px;">
+      <a-tabs default-active-key="1" v-model="curTab">
+        <a-tab-pane key="1" tab="销售退货报表" v-if="$hasPermissions('M_salesReportList')"></a-tab-pane>
+        <a-tab-pane key="2" tab="销售退货明细报表" v-if="$hasPermissions('M_salesDetailReportList')" force-render></a-tab-pane>
+      </a-tabs>
+    </div>
+    <a-card size="small" :bordered="false">
+      <report v-show="curTab==1&&$hasPermissions('M_salesReportList')"></report>
+      <detailReport v-show="curTab==2&&$hasPermissions('M_salesDetailReportList')"></detailReport>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import report from './list.vue'
+import detailReport from './detailList.vue'
+export default {
+  name: 'SalesReturnReportIndex',
+  components: {
+    report,
+    detailReport
+  },
+  data () {
+    return {
+      curTab: '1'
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .tabsReportList-wrap{
+    display: flex;
+    flex-direction: column;
+    height: 100%;
+    .ant-tabs-bar{
+      margin: 0;
+    }
+    .ant-card{
+      flex-grow: 1;
+      overflow: auto;
+    }
+  }
+</style>

+ 220 - 0
src/views/reportData/salesReturnReport/list.vue

@@ -0,0 +1,220 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="salesReturnReportList-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-model-item label="销售退货单号">
+              <a-input id="salesReturnReportList-salesReturnNo" v-model.trim="queryParam.salesReturnNo" allowClear placeholder="请输入销售退货单号"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="客户名称">
+              <a-input id="salesReturnReportList-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入客户名称"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesReturnReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesReturnReportList-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('B_salesReportExport')"
+              class="button-warning"
+              id="salesReturnReportList-export-btn">导出</a-button>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" style="margin-bottom:10px">
+      <div class="ftext" slot="message">
+        总单数:<strong>{{ (totalData && (totalData.totalCategory || totalData.totalCategory==0)) ? totalData.totalCategory : '--' }}</strong>;
+        总退货数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
+        废品数量:<strong>{{ (totalData && (totalData.totalCelQty || totalData.totalCelQty==0)) ? totalData.totalCelQty : '--' }}</strong>;
+        入库数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
+        退货金额:<strong>{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? '¥'+totalData.totalAmount : '--' }}</strong>;
+        折扣金额:<strong>{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? '¥'+totalData.discountAmount : '--' }}</strong>;
+        折后退货金额:<strong>{{ (totalData && (totalData.discountedAmount || totalData.discountedAmount==0)) ? '¥'+totalData.discountedAmount : '--' }}</strong>;
+        退货成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>。
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import { reportSalesReturnPageList, reportSalesReturnBillTotal, reportSalesReturnExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        time: [],
+        beginDate: '',
+        endDate: '',
+        buyerName: '',
+        salesReturnNo: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '销售退货单号', dataIndex: 'salesReturnNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'buyerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '款数', dataIndex: 'totalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总退货数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '废品数量', dataIndex: 'totalCelQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库数量', dataIndex: 'inStockQty', 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: 'discountAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折后退货金额', dataIndex: 'discountedAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货成本', dataIndex: 'totalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return reportSalesReturnPageList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].inStockQty = data.list[i].totalQty
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      totalData: null //  合计
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportSalesReturnBillTotal(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.salesReturnNo = ''
+      this.queryParam.buyerName = ''
+      this.$refs.ruleForm.resetFields()
+      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
+          reportSalesReturnExport(params).then(res => {
+            downloadExcel(res, '销售退货报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    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) {
+    next(vm => {})
+  }
+}
+</script>

+ 286 - 0
src/views/reportData/storeTransferOutReport/detailList.vue

@@ -0,0 +1,286 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="storeTransOutDetailReport-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="4" :sm="24">
+            <a-form-model-item label="店内调出单号">
+              <a-input id="storeTransOutReport-storeCallOutNo" v-model.trim="queryParam.storeCallOutNo" allowClear placeholder="请输入店内调出单号"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-item label="调往对象">
+              <a-input id="sstoreTransOutReport-putPersonName" v-model.trim="queryParam.putPersonName" allowClear placeholder="请输入调往对象"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-item label="调拨类型">
+              <a-select id="sstoreTransOutReport-callOutType" v-model="queryParam.callOutType" placeholder="请选择调拨类型" allowClear >
+                <a-select-option v-for="item in storeCallOutTypeList" :key="item.storeCallOutTypeSn" :value="item.storeCallOutTypeSn">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="产品编码">
+                <a-input id="storeTransOutDetailReport-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input id="storeTransOutDetailReport-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-item label="产品品牌">
+                <ProductBrand id="storeTransOutDetailReport-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品分类">
+                <ProductType id="storeTransOutDetailReport-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="queryParam.productType"></ProductType>
+              </a-form-model-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="storeTransOutDetailReport-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="storeTransOutDetailReport-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('B_salesDetailExport')"
+              class="button-warning"
+              id="storeTransOutDetailReport-export-btn">导出</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.outQty || totalData.outQty==0)) ? totalData.outQty : '--' }}</strong>;
+        调出总成本:<strong>{{ (totalData && (totalData.outCost || totalData.outCost==0)) ? '¥'+totalData.outCost : '--' }}</strong>;
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
+import supplier from '@/views/common/supplier'
+import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
+import { reportStoreCallOutDetailList, reportStoreCallOutDetailTotal, reportStoreCallOutDetailExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        time: [],
+        beginDate: '',
+        endDate: '',
+        productEntity: {
+          productBrandSn: undefined, //  产品品牌
+          productTypeSn1: '', //  产品一级分类
+          productTypeSn2: '', //  产品二级分类
+          productTypeSn3: '', //  产品三级分类
+          code: '', //  产品编码
+          name: '' //  产品名称
+        },
+        callOutType: undefined,
+        productType: undefined,
+        storeCallOutNo: '',
+        putPersonName: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '店内调出单号', dataIndex: 'storeCallOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调往对象', dataIndex: 'putPersonName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', 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: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'outQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本', dataIndex: 'outCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return reportStoreCallOutDetailList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            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
+        })
+      },
+      totalData: null, //  合计
+      storeCallOutTypeList: [] //  调拨类型
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportStoreCallOutDetailTotal(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.storeCallOutNo = ''
+      this.queryParam.callOutType = undefined
+      this.queryParam.putPersonName = ''
+      this.queryParam.productEntity.productBrandSn = undefined
+      this.queryParam.productEntity.productTypeSn1 = ''
+      this.queryParam.productEntity.productTypeSn2 = ''
+      this.queryParam.productEntity.productTypeSn3 = ''
+      this.queryParam.productEntity.code = ''
+      this.queryParam.productEntity.name = ''
+      this.$refs.ruleForm.resetFields()
+      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
+          reportStoreCallOutDetailExport(params).then(res => {
+            downloadExcel(res, '店内调出明细报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  产品分类  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] : ''
+    },
+    //  调拨类型
+    getStoreCallOutTypeAllList () {
+      storeCallOutTypeAllList().then(res => {
+        if (res.status == 200) {
+          this.storeCallOutTypeList = res.data
+        } else {
+          this.storeCallOutTypeList = []
+        }
+      })
+    },
+    pageInit () {
+      this.disabled = false
+      this.spinning = false
+      this.getStoreCallOutTypeAllList()
+    }
+  },
+  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>

+ 46 - 0
src/views/reportData/storeTransferOutReport/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <div class="tabsReportList-wrap">
+    <div style="background-color: #fff;margin-bottom: 5px;">
+      <a-tabs default-active-key="1" v-model="curTab">
+        <a-tab-pane key="1" tab="店内调出报表" v-if="$hasPermissions('M_salesReportList')"></a-tab-pane>
+        <a-tab-pane key="2" tab="店内调出明细报表" v-if="$hasPermissions('M_salesDetailReportList')" force-render></a-tab-pane>
+      </a-tabs>
+    </div>
+    <a-card size="small" :bordered="false">
+      <report v-show="curTab==1&&$hasPermissions('M_salesReportList')"></report>
+      <detailReport v-show="curTab==2&&$hasPermissions('M_salesDetailReportList')"></detailReport>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import report from './list.vue'
+import detailReport from './detailList.vue'
+export default {
+  name: 'BulkReturnReportIndex',
+  components: {
+    report,
+    detailReport
+  },
+  data () {
+    return {
+      curTab: '1'
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .tabsReportList-wrap{
+    display: flex;
+    flex-direction: column;
+    height: 100%;
+    .ant-tabs-bar{
+      margin: 0;
+    }
+    .ant-card{
+      flex-grow: 1;
+      overflow: auto;
+    }
+  }
+</style>

+ 233 - 0
src/views/reportData/storeTransferOutReport/list.vue

@@ -0,0 +1,233 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="storeTransOutReport-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="4" :sm="24">
+            <a-form-model-item label="店内调出单号">
+              <a-input id="storeTransOutReport-storeCallOutNo" v-model.trim="queryParam.storeCallOutNo" allowClear placeholder="请输入店内调出单号"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-item label="调往对象">
+              <a-input id="sstoreTransOutReport-putPersonName" v-model.trim="queryParam.putPersonName" allowClear placeholder="请输入调往对象"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-item label="调拨类型">
+              <a-select id="sstoreTransOutReport-callOutType" v-model="queryParam.callOutType" placeholder="请选择调拨类型" allowClear >
+                <a-select-option v-for="item in storeCallOutTypeList" :key="item.storeCallOutTypeSn" :value="item.storeCallOutTypeSn">{{ 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="handleSearch" :disabled="disabled" id="storeTransOutReport-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="storeTransOutReport-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('B_salesReportExport')"
+              class="button-warning"
+              id="storeTransOutReport-export-btn">导出</a-button>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" style="margin-bottom:10px">
+      <div class="ftext" slot="message">
+        总单数:<strong>{{ (totalData && (totalData.productTotalCategory || totalData.productTotalCategory==0)) ? totalData.productTotalCategory : '--' }}</strong>;
+        产品总数量:<strong>{{ (totalData && (totalData.productTotalQty || totalData.productTotalQty==0)) ? totalData.productTotalQty : '--' }}</strong>;
+        调出总成本:<strong>{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? '¥'+totalData.productTotalCost : '--' }}</strong>;
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
+import { reportStoreCallOutPageList, reportStoreCallOutListTotal, reportStoreCallOutExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        time: [],
+        beginDate: '',
+        endDate: '',
+        putPersonName: '',
+        callOutType: undefined,
+        storeCallOutNo: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '店内调出单号', dataIndex: 'storeCallOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调往对象', dataIndex: 'putPersonName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本', dataIndex: 'productTotalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return reportStoreCallOutPageList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            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
+        })
+      },
+      totalData: null, //  合计
+      storeCallOutTypeList: [] //  调拨类型
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportStoreCallOutListTotal(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.putPersonName = ''
+      this.queryParam.storeCallOutNo = ''
+      this.queryParam.callOutType = undefined
+      this.$refs.ruleForm.resetFields()
+      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
+          reportStoreCallOutExport(params).then(res => {
+            downloadExcel(res, '店内调出报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  调拨类型
+    getStoreCallOutTypeAllList () {
+      storeCallOutTypeAllList().then(res => {
+        if (res.status == 200) {
+          this.storeCallOutTypeList = res.data
+        } else {
+          this.storeCallOutTypeList = []
+        }
+      })
+    },
+    pageInit () {
+      this.getStoreCallOutTypeAllList()
+    }
+  },
+  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>

+ 2 - 2
vue.config.js

@@ -198,8 +198,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.16.151:8503/qpls-md',
-        target: 'http://p.iscm.360arrow.com/qpls-md',
+        target: 'http://192.168.16.151/qpls-md',
+        // target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,