Browse Source

连锁销售明细合计报表、客户销售明细报表

chenrui 3 years ago
parent
commit
50ced9883a

+ 37 - 1
src/api/reportData.js

@@ -337,7 +337,7 @@ export const reportChainReceivingBillDetailCount = (params) => {
 }
 }
 // 客户销售明细报表  列表 分页
 // 客户销售明细报表  列表 分页
 export const reportCustomerSalesBillDetailList = (params) => {
 export const reportCustomerSalesBillDetailList = (params) => {
-  const url = `/report/reportCustomerSalesBillDetail/report`
+  const url = `/report/reportCustomerSalesBillDetail/reportPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageNo
   delete params.pageSize
   delete params.pageSize
   return axios({
   return axios({
@@ -346,6 +346,14 @@ export const reportCustomerSalesBillDetailList = (params) => {
     method: 'post'
     method: 'post'
   })
   })
 }
 }
+// 客户销售明细报表 合计
+export const reportCustomerSalesBillDetailCount = (params) => {
+  return axios({
+    url: '/report/reportCustomerSalesBillDetail/reportCount',
+    data: params,
+    method: 'post'
+  })
+}
 // 客户销售明细报表  导出
 // 客户销售明细报表  导出
 export const reportCustomerSalesBillDetailExport = params => {
 export const reportCustomerSalesBillDetailExport = params => {
   return axios.request({
   return axios.request({
@@ -355,3 +363,31 @@ export const reportCustomerSalesBillDetailExport = params => {
     responseType: 'blob'
     responseType: 'blob'
   })
   })
 }
 }
+// 连锁销售明细合计报表  列表 分页
+export const reportSalesBillDetailTotalList = (params) => {
+  const url = `/report/reportSalesBillDetailTotal/reportPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 连锁销售明细合计报表 合计
+export const reportSalesBillDetailTotalCount = (params) => {
+  return axios({
+    url: '/report/reportSalesBillDetailTotal/reportCount',
+    data: params,
+    method: 'post'
+  })
+}
+// 连锁销售明细合计报表  导出
+export const reportSalesBillDetailTotalExport = params => {
+  return axios.request({
+    url: `/report/reportSalesBillDetailTotal/export`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 75 - 75
src/config/router.config.js

@@ -1797,31 +1797,31 @@ export const asyncRouterMap = [
               }
               }
             ]
             ]
           },
           },
-          // {
-          //   path: '/reportData/storeReceivedSendStorageReport',
-          //   redirect: '/reportData/storeReceivedSendStorageReport/list',
-          //   name: 'storeReceivedSendStorageReport',
-          //   component: BlankLayout,
-          //   meta: {
-          //     title: '门店收发存汇总报表',
-          //     icon: 'profile'
-          //     // permission: 'M_storeReceivedSendStorageReportList'
-          //   },
-          //   hideChildrenInMenu: true,
-          //   children: [
-          //     {
-          //       path: 'list',
-          //       name: 'storeReceivedSendStorageReportList',
-          //       component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/storeReceivedSendStorageReport/list.vue'),
-          //       meta: {
-          //         title: '门店收发存汇总列表',
-          //         icon: 'profile',
-          //         hidden: true
-          //         // permission: 'M_storeReceivedSendStorageReportList'
-          //       }
-          //     }
-          //   ]
-          // },
+          {
+            path: '/reportData/storeReceivedSendStorageReport',
+            redirect: '/reportData/storeReceivedSendStorageReport/list',
+            name: 'storeReceivedSendStorageReport',
+            component: BlankLayout,
+            meta: {
+              title: '门店收发存汇总报表',
+              icon: 'profile'
+              // permission: 'M_storeReceivedSendStorageReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'storeReceivedSendStorageReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/storeReceivedSendStorageReport/list.vue'),
+                meta: {
+                  title: '门店收发存汇总列表',
+                  icon: 'profile',
+                  hidden: true
+                  // permission: 'M_storeReceivedSendStorageReportList'
+                }
+              }
+            ]
+          },
           {
           {
             path: '/reportData/inventoryReport',
             path: '/reportData/inventoryReport',
             redirect: '/reportData/inventoryReport/list',
             redirect: '/reportData/inventoryReport/list',
@@ -1846,57 +1846,57 @@ export const asyncRouterMap = [
                 }
                 }
               }
               }
             ]
             ]
+          },
+          {
+            path: '/reportData/chainSalesDetailsCountReport',
+            redirect: '/reportData/chainSalesDetailsCountReport/list',
+            name: 'chainSalesDetailsCountReport',
+            component: BlankLayout,
+            meta: {
+              title: '连锁销售明细合计报表',
+              icon: 'profile'
+              // permission: 'M_chainSalesDetailsCountReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'chainSalesDetailsCountReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/chainSalesDetailsCountReport/list.vue'),
+                meta: {
+                  title: '连锁销售明细合计列表',
+                  icon: 'profile',
+                  hidden: true
+                  // permission: 'M_chainSalesDetailsCountReportList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/reportData/customerSalesDetailsReport',
+            redirect: '/reportData/customerSalesDetailsReport/list',
+            name: 'customerSalesDetailsReport',
+            component: BlankLayout,
+            meta: {
+              title: '客户销售明细报表',
+              icon: 'profile'
+              // permission: 'M_customerSalesDetailsReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'customerSalesDetailsReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/customerSalesDetailsReport/list.vue'),
+                meta: {
+                  title: '客户销售明细列表',
+                  icon: 'profile',
+                  hidden: true
+                  // permission: 'M_customerSalesDetailsReportList'
+                }
+              }
+            ]
           }
           }
-          // {
-          //   path: '/reportData/chainSalesDetailsCountReport',
-          //   redirect: '/reportData/chainSalesDetailsCountReport/list',
-          //   name: 'chainSalesDetailsCountReport',
-          //   component: BlankLayout,
-          //   meta: {
-          //     title: '连锁销售明细合计报表',
-          //     icon: 'profile'
-          //     // permission: 'M_chainSalesDetailsCountReportList'
-          //   },
-          //   hideChildrenInMenu: true,
-          //   children: [
-          //     {
-          //       path: 'list',
-          //       name: 'chainSalesDetailsCountReportList',
-          //       component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/chainSalesDetailsCountReport/list.vue'),
-          //       meta: {
-          //         title: '连锁销售明细合计列表',
-          //         icon: 'profile',
-          //         hidden: true
-          //         // permission: 'M_chainSalesDetailsCountReportList'
-          //       }
-          //     }
-          //   ]
-          // },
-          // {
-          //   path: '/reportData/customerSalesDetailsReport',
-          //   redirect: '/reportData/customerSalesDetailsReport/list',
-          //   name: 'customerSalesDetailsReport',
-          //   component: BlankLayout,
-          //   meta: {
-          //     title: '客户销售明细报表',
-          //     icon: 'profile'
-          //     // permission: 'M_customerSalesDetailsReportList'
-          //   },
-          //   hideChildrenInMenu: true,
-          //   children: [
-          //     {
-          //       path: 'list',
-          //       name: 'customerSalesDetailsReportList',
-          //       component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/customerSalesDetailsReport/list.vue'),
-          //       meta: {
-          //         title: '客户销售明细列表',
-          //         icon: 'profile',
-          //         hidden: true
-          //         // permission: 'M_customerSalesDetailsReportList'
-          //       }
-          //     }
-          //   ]
-          // }
         ]
         ]
       },
       },
       // 客户管理
       // 客户管理

+ 25 - 24
src/views/reportData/chainSalesDetailsCountReport/list.vue

@@ -63,16 +63,16 @@
             <a-col span="2">合计:</a-col>
             <a-col span="2">合计:</a-col>
             <a-col span="22">
             <a-col span="22">
               <a-row>
               <a-row>
-                <a-col span="4">滤清器:{{ (totalData && (totalData.jpLqqAmount || totalData.jpLqqAmount==0)) ? totalData.jpLqqAmount : '--' }}</a-col>
-                <a-col span="4">雨刮片:{{ (totalData && (totalData.jpYgpAmount || totalData.jpYgpAmount==0)) ? totalData.jpYgpAmount : '--' }}</a-col>
-                <a-col span="4">刹车片:{{ (totalData && (totalData.jpScpAmount || totalData.jpScpAmount==0)) ? totalData.jpScpAmount : '--' }}</a-col>
-                <a-col span="4">蓄电池:{{ (totalData && (totalData.jpGyxAmount || totalData.jpGyxAmount==0)) ? totalData.jpGyxAmount : '--' }}</a-col>
-                <a-col span="4">润滑油:{{ (totalData && (totalData.gpLqqAmount || totalData.gpLqqAmount==0)) ? totalData.gpLqqAmount : '--' }}</a-col>
-                <a-col span="4">火花塞:{{ (totalData && (totalData.gpYgpAmount || totalData.gpYgpAmount==0)) ? totalData.gpYgpAmount : '--' }}</a-col>
-                <a-col span="4">点火线圈:{{ (totalData && (totalData.gpScpAmount || totalData.gpScpAmount==0)) ? totalData.gpScpAmount : '--' }}</a-col>
-                <a-col span="4">稳升LED灯:{{ (totalData && (totalData.hjAmount || totalData.hjAmount==0)) ? totalData.hjAmount : '--' }}</a-col>
-                <a-col span="4">其他:{{ (totalData && (totalData.dlsAmount || totalData.dlsAmount==0)) ? totalData.dlsAmount : '--' }}</a-col>
-                <a-col span="4">合计:{{ (totalData && (totalData.wsAmount || totalData.wsAmount==0)) ? totalData.wsAmount : '--' }}</a-col>
+                <a-col span="4">滤清器:{{ (totalData && (totalData.lqqAmount || totalData.lqqAmount==0)) ? totalData.lqqAmount : '--' }}</a-col>
+                <a-col span="4">雨刮片:{{ (totalData && (totalData.ygpAmount || totalData.ygpAmount==0)) ? totalData.ygpAmount : '--' }}</a-col>
+                <a-col span="4">刹车片:{{ (totalData && (totalData.scpAmount || totalData.scpAmount==0)) ? totalData.scpAmount : '--' }}</a-col>
+                <a-col span="4">蓄电池:{{ (totalData && (totalData.xdcAmount || totalData.xdcAmount==0)) ? totalData.xdcAmount : '--' }}</a-col>
+                <a-col span="4">润滑油:{{ (totalData && (totalData.rhyAmount || totalData.rhyAmount==0)) ? totalData.rhyAmount : '--' }}</a-col>
+                <a-col span="4">火花塞:{{ (totalData && (totalData.hhsAmount || totalData.hhsAmount==0)) ? totalData.hhsAmount : '--' }}</a-col>
+                <a-col span="4">点火线圈:{{ (totalData && (totalData.dhxqAmount || totalData.dhxqAmount==0)) ? totalData.dhxqAmount : '--' }}</a-col>
+                <a-col span="4">稳升LED灯:{{ (totalData && (totalData.ledAmount || totalData.ledAmount==0)) ? totalData.ledAmount : '--' }}</a-col>
+                <a-col span="4">其他:{{ (totalData && (totalData.otherAmount || totalData.otherAmount==0)) ? totalData.otherAmount : '--' }}</a-col>
+                <a-col span="4">合计:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
               </a-row>
               </a-row>
             </a-col>
             </a-col>
           </a-row>
           </a-row>
@@ -86,7 +86,7 @@
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { downloadExcel } from '@/libs/JGPrint.js'
-import { reportChainSalesBillDetailList, linkageGroupList } from '@/api/reportData'
+import { reportSalesBillDetailTotalList, reportSalesBillDetailTotalCount, reportSalesBillDetailTotalExport, linkageGroupList } from '@/api/reportData'
 export default {
 export default {
   components: { STable, VSelect, rangeDate },
   components: { STable, VSelect, rangeDate },
   data () {
   data () {
@@ -109,16 +109,16 @@ export default {
       exportLoading: false,
       exportLoading: false,
       columns: [
       columns: [
         { title: '门店', dataIndex: 'salesTargetName', width: '16%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '门店', dataIndex: 'salesTargetName', width: '16%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '滤清器', dataIndex: 'settleStyleName', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '雨刮片', dataIndex: 'productEntity.code', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '刹车片', dataIndex: 'productEntity.name', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '蓄电池', dataIndex: 'productEntity.unit', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '润滑油', dataIndex: 'productEntity.unsit', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '火花塞', dataIndex: 'productEntity.unsist', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '点火线圈', dataIndex: 'productQty', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '稳升LED灯', dataIndex: 'productCost', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '其他', dataIndex: 'productPrice', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '合计', dataIndex: 'productProfit', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '滤清器', dataIndex: 'lqqAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '雨刮片', dataIndex: 'ygpAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '刹车片', dataIndex: 'scpAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '蓄电池', dataIndex: 'xdcAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '润滑油', dataIndex: 'rhyAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '火花塞', dataIndex: 'hhsAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '点火线圈', dataIndex: 'dhxqAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '稳升LED灯', dataIndex: 'ledAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '其他', dataIndex: 'otherAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '合计', dataIndex: 'totalAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
@@ -126,7 +126,7 @@ export default {
         const params = Object.assign(parameter, this.queryParam)
         const params = Object.assign(parameter, this.queryParam)
         this.spinning = true
         this.spinning = true
         delete params.time
         delete params.time
-        return reportChainSalesBillDetailList(params).then(res => {
+        return reportSalesBillDetailTotalList(params).then(res => {
           let data
           let data
           if (res.status == 200) {
           if (res.status == 200) {
             data = res.data
             data = res.data
@@ -155,7 +155,7 @@ export default {
     },
     },
     // 合计
     // 合计
     getCount (params) {
     getCount (params) {
-      reportRebateCount(params).then(res => {
+      reportSalesBillDetailTotalCount(params).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.totalData = res.data
           this.totalData = res.data
         } else {
         } else {
@@ -181,6 +181,7 @@ export default {
       this.queryParam.time = []
       this.queryParam.time = []
       this.queryParam.beginDate = ''
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.endDate = ''
+      this.totalData = null
       this.$refs.ruleForm.resetFields()
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
       this.$refs.table.clearTable()
     },
     },
@@ -192,7 +193,7 @@ export default {
           const params = _this.queryParam
           const params = _this.queryParam
           _this.exportLoading = true
           _this.exportLoading = true
           _this.spinning = true
           _this.spinning = true
-          reportReceivingBillExport(params).then(res => {
+          reportSalesBillDetailTotalExport(params).then(res => {
             downloadExcel(res, '连锁门店销售明细合计报表')
             downloadExcel(res, '连锁门店销售明细合计报表')
             _this.exportLoading = false
             _this.exportLoading = false
             _this.spinning = false
             _this.spinning = false

+ 36 - 4
src/views/reportData/customerSalesDetailsReport/list.vue

@@ -44,12 +44,30 @@
         class="sTable"
         class="sTable"
         ref="table"
         ref="table"
         size="small"
         size="small"
-        :rowKey="(record) => record.id"
+        :rowKey="(record) => record.targetSn"
         :columns="columns"
         :columns="columns"
         :data="loadData"
         :data="loadData"
         :defaultLoadData="false"
         :defaultLoadData="false"
-        :showPagination="false"
         bordered>
         bordered>
+        <template slot="footer">
+          <a-row>
+            <a-col span="2">合计:</a-col>
+            <a-col span="22">
+              <a-row>
+                <a-col span="4">滤清器:{{ (totalData && (totalData.lqqAmount || totalData.lqqAmount==0)) ? totalData.lqqAmount : '--' }}</a-col>
+                <a-col span="4">雨刮片:{{ (totalData && (totalData.ygpAmount || totalData.ygpAmount==0)) ? totalData.ygpAmount : '--' }}</a-col>
+                <a-col span="4">刹车片:{{ (totalData && (totalData.scpAmount || totalData.scpAmount==0)) ? totalData.scpAmount : '--' }}</a-col>
+                <a-col span="4">蓄电池:{{ (totalData && (totalData.xdcAmount || totalData.xdcAmount==0)) ? totalData.xdcAmount : '--' }}</a-col>
+                <a-col span="4">润滑油:{{ (totalData && (totalData.rhyAmount || totalData.rhyAmount==0)) ? totalData.rhyAmount : '--' }}</a-col>
+                <a-col span="4">火花塞:{{ (totalData && (totalData.hhsAmount || totalData.hhsAmount==0)) ? totalData.hhsAmount : '--' }}</a-col>
+                <a-col span="4">点火线圈:{{ (totalData && (totalData.dhxqAmount || totalData.dhxqAmount==0)) ? totalData.dhxqAmount : '--' }}</a-col>
+                <a-col span="4">稳升LED灯:{{ (totalData && (totalData.ledAmount || totalData.ledAmount==0)) ? totalData.ledAmount : '--' }}</a-col>
+                <a-col span="4">其他:{{ (totalData && (totalData.otherAmount || totalData.otherAmount==0)) ? totalData.otherAmount : '--' }}</a-col>
+                <a-col span="4">合计:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
+              </a-row>
+            </a-col>
+          </a-row>
+        </template>
       </s-table>
       </s-table>
     </a-spin>
     </a-spin>
   </a-card>
   </a-card>
@@ -59,7 +77,7 @@
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { downloadExcel } from '@/libs/JGPrint.js'
-import { reportCustomerSalesBillDetailList, reportCustomerSalesBillDetailExport } from '@/api/reportData'
+import { reportCustomerSalesBillDetailList, reportCustomerSalesBillDetailCount, reportCustomerSalesBillDetailExport } from '@/api/reportData'
 export default {
 export default {
   components: { STable, VSelect, rangeDate },
   components: { STable, VSelect, rangeDate },
   data () {
   data () {
@@ -102,13 +120,16 @@ export default {
           let data
           let data
           if (res.status == 200) {
           if (res.status == 200) {
             data = res.data
             data = res.data
+            // 总计
+            this.getCount(params)
             this.disabled = false
             this.disabled = false
           }
           }
           this.spinning = false
           this.spinning = false
           return data
           return data
         })
         })
       },
       },
-      linkageGroupData: []
+      linkageGroupData: [],
+      totalData: null // 合计
     }
     }
   },
   },
   methods: {
   methods: {
@@ -129,6 +150,16 @@ export default {
         }
         }
       })
       })
     },
     },
+    // 查询总计
+    getCount (params) {
+      reportCustomerSalesBillDetailCount(params).then(res => {
+        if (res.status == 200 && res.data) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
       this.queryParam.salesTargetName = ''
       this.queryParam.salesTargetName = ''
@@ -136,6 +167,7 @@ export default {
       this.queryParam.time = []
       this.queryParam.time = []
       this.queryParam.beginDate = ''
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.endDate = ''
+      this.totalData = null
       this.$refs.ruleForm.resetFields()
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
       this.$refs.table.clearTable()
     },
     },