Browse Source

统计报表

chenrui 1 year ago
parent
commit
1f3850de67

+ 173 - 136
src/api/reportData.js

@@ -16,8 +16,8 @@ export const salesReportReturnBillList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -47,8 +47,8 @@ export const salesReportReturnList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -78,8 +78,8 @@ export const salesReportReturnRebateList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -100,8 +100,8 @@ export const reportSalesReturnList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -122,8 +122,8 @@ export const reportSalesReturnDetailList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -142,8 +142,8 @@ export const reportSalesReturnDetailExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -156,8 +156,8 @@ export const headRebateDetailReportList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -176,8 +176,8 @@ export const headRebateDetailReportExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -190,8 +190,8 @@ export const reportRebateReportList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -210,8 +210,8 @@ export const reportRebateExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -222,8 +222,8 @@ export const salesReturnsExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -234,8 +234,8 @@ export const salesReturnDetailExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -246,8 +246,8 @@ export const salesSlipExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -258,8 +258,8 @@ export const returnSlipExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -270,8 +270,8 @@ export const salesAmountExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -282,8 +282,8 @@ export const actualSalesExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -294,8 +294,8 @@ export const billingReturnExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -306,8 +306,8 @@ export const salesReturnExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -320,8 +320,8 @@ export const reportSalesBillDetailList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -340,8 +340,8 @@ export const reportSalesBillDetailExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -354,8 +354,8 @@ export const reportSalesBillList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -374,8 +374,8 @@ export const reportSalesBillExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -388,8 +388,8 @@ export const reportStockPutList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -408,8 +408,8 @@ export const reportStockPutExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -422,8 +422,8 @@ export const reportStockPutDetailList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -442,8 +442,8 @@ export const reportStockPutDetailExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -464,8 +464,8 @@ export const reportDispatchReportList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -484,8 +484,8 @@ export const reportDispatchReportExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -498,8 +498,8 @@ export const reportAllocateDbjdReportList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -518,8 +518,8 @@ export const reportAllocateDbjdReportExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -540,8 +540,8 @@ export const reportSalesReturnThjdReportList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -560,8 +560,8 @@ export const reportSalesReturnThjdReportExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -571,8 +571,8 @@ export const realReportSalesByProvince = (params) => {
     url: '/report/realReportSales/subareaArea/reportList',
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -592,8 +592,8 @@ export const realReportSalesByProvinceExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -603,8 +603,8 @@ export const realReportSalesBySubArea = (params) => {
     url: '/report/realReportSales/subarea/reportList',
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -615,8 +615,8 @@ export const subareaReportTitle = (params) => {
     url: url,
     data: params,
     method: 'get',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -627,8 +627,8 @@ export const realReportSalesBySubAreaExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -642,8 +642,8 @@ export const allocateReturnReportQueryPage = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -663,8 +663,8 @@ export const allocateReturnReportExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -677,8 +677,8 @@ export const allocateReturnReportDetailQueryPage = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -698,8 +698,8 @@ export const allocateReturnReportDetailExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -712,8 +712,8 @@ export const expenseCollectReportQueryPageByTarget = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -733,8 +733,8 @@ export const expenseCollectReportExportByTarget = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -748,8 +748,8 @@ export const expenseCollectReportQueryPageByProductType = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -769,8 +769,8 @@ export const expenseCollectReportExportByProductType = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -786,8 +786,8 @@ export const sparePartsReturnReportList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -808,8 +808,8 @@ export const sparePartsReturnReportExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -825,8 +825,8 @@ export const sparePartsReturnDetailReportList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -848,8 +848,8 @@ export const sparePartsReturnReportExportDetail = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -863,8 +863,8 @@ export const rebateQueryList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -886,8 +886,8 @@ export const rebateDetailQueryList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -914,8 +914,8 @@ export const querySupplierPage = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -955,8 +955,8 @@ export const queryBillNoPage = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -985,8 +985,8 @@ export const billNoExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -1003,8 +1003,8 @@ export const queryDetailReportPage = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -1015,8 +1015,8 @@ export const exportDetailReport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-        'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -1027,8 +1027,8 @@ export const queryGroupByprodTypeReportPage = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -1063,8 +1063,8 @@ export const salesPromoReportList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -1084,8 +1084,8 @@ export const exportSalesPromoReport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -1098,8 +1098,8 @@ export const salesPromoRealReportList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -1119,8 +1119,8 @@ export const exportSalesPromoRealReport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -1136,8 +1136,8 @@ export const codeExportImportError = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出错误项')
+    headers: {
+      'module': encodeURIComponent('导出错误项')
     }
   })
 }
@@ -1149,8 +1149,8 @@ export const traceCodeInsertBatch = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('确定导入')
+    headers: {
+      'module': encodeURIComponent('确定导入')
     }
   })
 }
@@ -1164,8 +1164,8 @@ export const traceCodeList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -1187,8 +1187,8 @@ export const excelOnlineList = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }
@@ -1197,8 +1197,8 @@ export const getWarrantyInfo = (params) => {
   return axios({
     url: `/report/warranty/queryById/${params.id}`,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('质保信息')
+    headers: {
+      'module': encodeURIComponent('质保信息')
     }
   })
 }
@@ -1215,8 +1215,8 @@ export const queryTireList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
-          'module': encodeURIComponent('列表查询')
+    headers: {
+      'module': encodeURIComponent('列表查询')
     }
   })
 }
@@ -1236,8 +1236,45 @@ export const excelTireOnlineExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-          'module': encodeURIComponent('导出')
+    headers: {
+      'module': encodeURIComponent('导出')
+    }
+  })
+}
+
+// 促销销售单报表(统计)
+export const brandTypeReportList = (params) => {
+  const url = `/report/brandTypeReport/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+
+// 促销销售单报表(统计)  统计
+export const brandTypeReportCount = (params) => {
+  return axios({
+    url: '/report/brandTypeReport/reportCount',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 促销销售单报表(统计)  导出
+export const brandTypeReportExport = (params) => {
+  return axios({
+    url: '/report/brandTypeReport/excelTireOnlineList ',
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers: {
+      'module': encodeURIComponent('导出')
     }
   })
 }

+ 23 - 0
src/config/router.config.js

@@ -1845,6 +1845,29 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/reportData/promotionSalesOrderReport',
+            redirect: '/reportData/promotionSalesOrderReport/list',
+            name: 'promotionSalesOrderReport',
+            component: BlankLayout,
+            meta: {
+              title: '促销销售单报表(统计)',
+              icon: 'profile'
+              // permission: 'M_promotionSalesOrderReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [{
+              path: 'list',
+              name: 'promotionSalesOrderReportList',
+              component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/promotionSalesOrderReport/list.vue'),
+              meta: {
+                title: '促销销售单报表(统计)列表',
+                icon: 'profile',
+                hidden: true
+                // permission: 'M_promotionSalesOrderReportList'
+              }
+            }]
+          },
           {
             path: '/reportData/tireSalesReport',
             redirect: '/reportData/tireSalesReport/list',

+ 2 - 1
src/views/expenseManagement/expenseReimbursementDetail/list.vue

@@ -304,7 +304,8 @@ export default {
         { title: '财务编码', dataIndex: 'splitObjFnumber', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '费用承担金额', dataIndex: 'splitAmount', width: 120, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '费用承担人', dataIndex: 'childSplitObjName', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '人员平摊费用', dataIndex: 'childSplitAmount', width: 120, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        { title: '人员平摊费用', dataIndex: 'childSplitAmount', width: 120, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '备注', dataIndex: ' remarks', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ]
     }
   },

+ 4 - 4
src/views/promotionRulesManagement/dealerPromotions/lookUpCustomersModal.vue

@@ -79,9 +79,9 @@
             <!-- <a-badge count="未" :number-style="{ zoom:'80%' }"></a-badge> -->
           </template>
           <!-- 客户状态 -->
-          <template slot="dealerState" slot-scope="text, record">
+        <!--  <template slot="dealerState" slot-scope="text, record">
             <a-switch checkedChildren="启用" unCheckedChildren="禁用" :checked="record.isEnable" @change="changeStatus"/>
-          </template>
+          </template> -->
         </s-table>
       </a-card>
       <div style="text-align:right;color:#666;" v-if="showType ==='isEdit' || showType === 'isAudit'"><span v-if="showType === 'isAudit'">待审核,</span>增加的客户显示红色,删除的客户显示绿色</div>
@@ -195,8 +195,8 @@ export default {
         { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '经销商名称', dataIndex: 'dealerName', scopedSlots: { customRender: 'dealerName' }, width: '20%', align: 'center', ellipsis: true },
         { title: '商户类型', dataIndex: 'dealerLevelDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '商户级别', dataIndex: 'dealerTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户状态', scopedSlots: { customRender: 'dealerState' }, width: '10%', align: 'center' }
+        { title: '商户级别', dataIndex: 'dealerTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
+        // { title: '客户状态', scopedSlots: { customRender: 'dealerState' }, width: '10%', align: 'center' }
       ],
       openDealerModal: false, // 修改弹窗
       updateFlag: false

+ 410 - 0
src/views/reportData/promotionSalesOrderReport/list.vue

@@ -0,0 +1,410 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="promotionSalesList-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper newTableSearchName" ref="tableSearch">
+        <a-form-model
+          id="promotionSalesList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :model="form"
+          :rules="rules"
+          @keyup.enter.native="handleSearch">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="统计月份" prop="monthInfo">
+                <div class="monthBox" style="display:flex;align-item:center;">
+                  <a-month-picker
+                    :disabled-date="disabledStartDate"
+                    format="YYYY-MM"
+                    v-model="startValue"
+                    placeholder="开始月份"
+                    @openChange="handleStartOpenChange"
+                    @change="getStartDate"
+                  />
+                  <span>~</span>
+                  <a-month-picker
+                    :disabled-date="disabledEndDate"
+                    format="YYYY-MM"
+                    v-model="endValue"
+                    placeholder="结束月份"
+                    :open="endOpen"
+                    @openChange="handleEndOpenChange"
+                    @change="getEndDate"
+                  />
+                </div>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="区域/分区">
+                <subarea id="promotionSalesList-allocateTypeSn" ref="subarea" @change="subareaChange"></subarea>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="区域负责人">
+                <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+              </a-form-model-item>
+            </a-col>
+            <a-form-model-item label="省份">
+              <Area id="promotionSalesList-provinceSn" v-model="queryParam.provinceSn" placeholder="请选择省"></Area>
+            </a-form-model-item>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户名称">
+                  <dealerSubareaScopeList ref="custList" id="salesAmountReportList-dealerSn" @change="custChange" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="客户类型">
+                  <v-select code="DEALER_TYPE" id="promotionSalesList-dealerType" v-model="queryParam.dealerType" allowClear placeholder="请选择客户类型"></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品品牌">
+                  <ProductBrand id="productInfoList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品分类">
+                  <productTypeAll placeholder="请选择产品分类" :level="2" @change="changeProductType" v-model="productType" id="productInfoList-productType"></productTypeAll>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="24" :sm="24" style="text-align:center;margin-bottom: 10px;">
+              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="promotionSalesList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="promotionSalesList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('B_salesSlip_report')"
+                id="promotionSalesList-export">导出</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-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :defaultLoadData="false"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :pageSize="30"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x:1890,y: tableHeight-136 }"
+          bordered>
+          <!-- 品牌-->
+          <template slot="brandName" slot-scope="text, record">
+            {{ record.allProductBrandFlag?'全品类':record.brandName?record.brandName:'--' }}
+          </template>
+          <!-- 分类 -->
+          <template slot="brandtypeName" slot-scope="text, record">
+            {{ record.allProductTypeFlag?'全分类':record.brandtypeName?record.brandtypeName:'--' }}
+          </template>
+          <template slot="footer" v-if="totalData">
+            <a-row>
+              <a-col span="24">
+                <a-row>
+                  <a-col
+                    span="4">销售额:{{ (totalData.totalSaleAmount || totalData.totalSaleAmount==0) ? toThousands(totalData.totalSaleAmount) : '--' }}</a-col>
+                  <a-col
+                    span="4">促销成本费用:{{ (totalData.promoCostFee || totalData.promoCostFee==0) ? toThousands(totalData.promoCostFee) : '--' }}</a-col>
+                  <a-col
+                    span="4">促销成本费用比:{{ totalData.promoCostFeeRate ? toThousands(totalData.promoCostFeeRate*100)+'%' : '--' }}</a-col>
+                  <a-col
+                    span="4">促销销售费用:{{ (totalData.promoSaleFee || totalData.promoSaleFee==0) ? toThousands(totalData.promoSaleFee) : '--' }}</a-col>
+                  <a-col
+                    span="4">促销销售费用比:{{ totalData.totalRealCost ? toThousands(totalData.promoSaleFeeRate*100)+'%' : '--' }}</a-col>
+                  <a-col
+                    span="4">参与活动销售额:{{ (totalData.promoSaleAmount || totalData.promoSaleAmount==0) ? toThousands(totalData.promoSaleAmount) : '--' }}</a-col>
+                  <a-col
+                    span="4">未参与活动销售额:{{ (totalData.notpromotionSale || totalData.notpromotionSale==0) ? toThousands(totalData.notpromotionSale) : '--' }}</a-col>
+                  <a-col
+                    span="4">调拨物料费用:{{ (totalData.allocateAmount || totalData.allocateAmount==0) ? toThousands(totalData.allocateAmount) : '--' }}</a-col>
+                  <a-col
+                    span="4">促销成本费用+物料费用合计:{{ (totalData.promoCostFeeAndAllocateCost || totalData.promoCostFeeAndAllocateCost==0)? toThousands(totalData.promoCostFeeAndAllocateCost) : '--' }}</a-col>
+                  <a-col
+                    span="4">成本合计占比:{{ totalData.totalCostRate ? toThousands(totalData.totalCostRate*100)+'%' : '--' }}</a-col>
+                  <a-col
+                    span="4">促销销售费用+物料费用合计:{{ (totalData.promoSaleFeeAndAllocateAmount || totalData.promoSaleFeeAndAllocateAmount==0) ? toThousands(totalData.promoSaleFeeAndAllocateAmount) : '--' }}</a-col>
+                  <a-col
+                    span="4">销售合计占比:{{ totalData.totalSaleRate ? toThousands(totalData.totalSaleRate*100)+'%' : '--' }}</a-col>
+                </a-row>
+              </a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import moment from 'moment'
+import { STable, VSelect } from '@/components'
+import ProductBrand from '@/views/common/productBrand.js'
+import productTypeAll from '@/views/common/productType.js'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import subarea from '@/views/common/subarea.js'
+import reportModal from '@/views/common/reportModal.vue'
+import Area from '@/views/common/area.js'
+import BizUser from '@/views/common/bizUser.js'
+import { hdExportExcel } from '@/libs/exportExcel'
+import { brandTypeReportList, brandTypeReportCount, brandTypeReportExport } from '@/api/reportData'
+export default {
+  name: 'PromotionSalesOrderReport',
+  mixins: [commonMixin],
+  components: { STable, VSelect, subarea, dealerSubareaScopeList, reportModal, Area, BizUser, ProductBrand, productTypeAll },
+  data () {
+    return {
+      moment,
+      spinning: false,
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      showExport: false,
+      queryParam: { //  查询条件
+        brandTypeBeginDate: undefined,
+        brandTypeEndDate: undefined,
+        dealerSn: undefined,
+        provinceSn: undefined,
+        subareaArea: {
+          subareaSn: undefined,
+          subareaAreaSn: undefined,
+          bizUserSn: undefined
+        },
+        product_brand: undefined,
+        productTypeSn1: '', //  产品一级分类
+        product_type: '', //  产品二级分类
+        dealerType: undefined
+      },
+      productType: [],
+      form: {
+        monthInfo: []
+      },
+      columns: [
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域负责人', dataIndex: 'bizUserName', width: '90px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '省份', dataIndex: 'dealerInfo.provinceName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerInfo.dealerName', width: '120px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户类型', dataIndex: 'dealerInfo.dealerTypeDictValue', width: '90px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'brandName', width: '90px', align: 'center', scopedSlots: { customRender: 'brandName' } },
+        { title: '二级分类', dataIndex: 'brandtypeName', width: '90px', align: 'center', scopedSlots: { customRender: 'brandtypeName' } },
+        { title: '销售额', dataIndex: 'totalSaleAmount', width: '90px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '促销成本费用', dataIndex: 'promoCostFee', width: '90px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '促销成本费用比', dataIndex: 'promoCostFeeRate', width: '96px', align: 'right', customRender: text => (text ? this.toThousands(text * 100) + '%' : '--') },
+        { title: '促销销售费用', dataIndex: ' promoSaleFee', width: '90px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '促销销售费用比', dataIndex: ' promoSaleFeeRate', width: '96px', align: 'center', customRender: text => (text ? this.toThousands(text * 100) + '%' : '--') },
+        { title: '参与活动销售额', dataIndex: 'promoSaleAmount', width: '96px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '未参与活动销售额', dataIndex: 'notpromotionSale', width: '90px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '调拨物料费用', dataIndex: 'allocateAmount', width: '90px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '促销成本费用+物料费用合计', dataIndex: 'promoCostFeeAndAllocateCost', width: '100px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '成本合计占比', dataIndex: 'totalCostRate', width: '90px', align: 'right', customRender: text => (text ? this.toThousands(text * 100) + '%' : '--') },
+        { title: '促销销售费用+物料费用合计', dataIndex: 'promoSaleFeeAndAllocateAmount', width: '100px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '销售合计占比', dataIndex: 'totalSaleRate', width: '90px', align: 'right', customRender: text => (text ? this.toThousands(text * 100) + '%' : '--') }
+      ],
+      rules: {
+        monthInfo: [{ required: true, message: '请选择统计月份', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      startValue: null, // 统计月份
+      endValue: null,
+      endOpen: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) //  有分页
+        delete paramsPage.productTypeSn1
+        return brandTypeReportList(paramsPage).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.getCount(paramsPage)
+            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
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  methods: {
+    // 统计月份  选择月份限制
+    disabledStartDate (startValue) {
+      const endValue = this.endValue
+      if (!startValue || !endValue) {
+        return startValue.valueOf() > this.moment().month(this.moment().month()).valueOf()
+      }
+      return startValue.valueOf() >= endValue.valueOf()
+    },
+    disabledEndDate (endValue) {
+      const startValue = this.startValue
+      if (!startValue) {
+        return endValue.valueOf() > this.moment().month(this.moment().month()).valueOf()
+      }
+      return endValue.valueOf() < startValue.valueOf() || endValue.valueOf() > this.moment().month(this.moment().month()).valueOf()
+    },
+    // 开始时间
+    handleStartOpenChange (open) {
+      if (!open) {
+        this.endOpen = true
+      }
+    },
+    getStartDate (date, dateString) {
+      this.form.monthInfo[0] = dateString
+      this.queryParam.brandTypeBeginDate = date ? this.moment(dateString).startOf('month').format('YYYYMM') : ''
+    },
+    // 结束时间
+    handleEndOpenChange (open) {
+      this.endOpen = open
+    },
+    getEndDate (date, dateString) {
+      this.form.monthInfo[1] = dateString
+      this.queryParam.brandTypeEndDate = date ? this.moment(dateString).endOf('month').format('YYYYMM') : ''
+    },
+    //  导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.showExport = true
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(brandTypeReportExport, params, '促销销售单报表(统计)', function () {
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    // 总计
+    getCount (params) {
+      brandTypeReportCount(params).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data || null
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    handleSearch () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$refs.table.refresh(true)
+        } else {
+          _this.$message.error('请选择统计月份')
+          return false
+        }
+      })
+    },
+    // 客户名称
+    custChange (val) {
+      this.queryParam.dealerSn = val.key
+    },
+    // 区域分区
+    subareaChange (val) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.product_type = val[1] ? val[1] : ''
+    },
+    //  重置
+    resetSearchForm () {
+      this.form.monthInfo = []
+      this.startValue = null
+      this.endValue = null
+      this.queryParam.brandTypeBeginDate = undefined
+      this.queryParam.brandTypeEndDate = undefined
+      this.queryParam.dealerSn = undefined
+      this.queryParam.provinceSn = undefined
+      this.queryParam.subareaArea.subareaSn = undefined
+      this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.subareaArea.bizUserSn = undefined
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = undefined
+      this.queryParam.product_type = undefined
+      this.queryParam.dealerType = undefined
+
+      this.productType = []
+      this.totalData = null
+      if (this.advanced) {
+        this.$refs.custList.resetForm()
+      }
+      this.$refs.subarea.clearData()
+      this.$refs.ruleForm.resetFields()
+      this.$refs.table.clearTable()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 215
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.setTableH()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.setTableH()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+<style lang="less" scoped>
+  .monthBox{
+    /deep/.ant-calendar-picker-icon{
+      display:none !important;
+    }
+    /deep/.ant-calendar-picker input{
+      text-align:center;
+    }
+  }
+</style>