lilei 2 yıl önce
ebeveyn
işleme
ed41fec3ae

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1663661689027
+  "version": 1663667141489
 }

+ 20 - 3
src/api/reportData.js

@@ -172,8 +172,6 @@ export const reportSalesReturnDetailExport = params => {
     responseType: 'blob'
   })
 }
-
-
 // 店内调出-分页列表
 export const reportStoreCallOutPageList = (params) => {
   const url = `report/reportStoreCallOut/reportPage/${params.pageNo}/${params.pageSize}`
@@ -202,7 +200,6 @@ export const reportStoreCallOutExport = params => {
     responseType: 'blob'
   })
 }
-
 // 店内调出明细-分页列表
 export const reportStoreCallOutDetailList = (params) => {
   const url = `report/reportStoreCallOut/reportDetailPage/${params.pageNo}/${params.pageSize}`
@@ -214,6 +211,7 @@ export const reportStoreCallOutDetailList = (params) => {
     method: 'post'
   })
 }
+
 // 店内调出明细-列表合计
 export const reportStoreCallOutDetailTotal = (params) => {
   return axios({
@@ -614,6 +612,25 @@ export const reportSalesBillDetailTotalExport = params => {
     responseType: 'blob'
   })
 }
+// 连锁销售退货合计报表  列表 不分页
+export const reportSalesReturnBillDetailTotalList = (params) => {
+  const url = `/report/reportSalesReturnBillDetailTotal/reportList`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 连锁销售退货合计报表  导出
+export const reportSalesReturnBillDetailTotalExport = params => {
+  return axios.request({
+    url: `/report/reportSalesReturnBillDetailTotal/export`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
 // 门店收发存汇总报表  列表 不分页
 export const reportStockPutOutMonthList = (params) => {
   const url = `/report/reportStockPutOutMonth/report`

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

@@ -2361,6 +2361,31 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/chainReportData/chainSalesReturnDetailReport',
+            redirect: '/chainReportData/chainSalesReturnDetailReport/list',
+            name: 'chainSalesReturnDetailReport',
+            component: BlankLayout,
+            meta: {
+              title: '连锁销售退货合计报表',
+              icon: 'profile',
+              // permission: 'M_chainSalesReturnDetailReport_list'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'chainSalesReturnDetailReportList',
+                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/chainReportData/chainSalesReturnDetailReport/list.vue'),
+                meta: {
+                  title: '连锁销售退货合计列表',
+                  icon: 'profile',
+                  hidden: true,
+                  // permission: 'M_chainSalesReturnDetailReport_list'
+                }
+              }
+            ]
+          },
           {
             path: '/chainReportData/chainCustomerReport',
             redirect: '/chainReportData/chainCustomerReport/list',

+ 246 - 0
src/views/chainReportData/chainSalesReturnDetailReport/list.vue

@@ -0,0 +1,246 @@
+<template>
+  <a-card size="small" :bordered="false" class="chainSalesDetailsCountReportList-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form-model
+          id="chainSalesDetailsCountReportList-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="连锁店" prop="tenantId">
+                <a-select
+                  placeholder="请选择连锁店"
+                  id="chainSalesDetailsCountReportList-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" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainSalesDetailsCountReportList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainSalesDetailsCountReportList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 5px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="chainSalesDetailsCountReportList-export">导出</a-button>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :defaultLoadData="false"
+        :showPagination="false"
+        bordered>
+      </s-table>
+    </a-spin>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import { reportSalesReturnBillDetailTotalList, reportSalesReturnBillDetailTotalExport, linkageGroupList } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate },
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        tenantId: undefined,
+        time: [],
+        beginDate: '',
+        endDate: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择审核日期', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '门店', dataIndex: 'salesTargetName', width: '16%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '箭牌、冠牌',
+          children: [
+            { title: '滤清器', dataIndex: 'lqqAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+          ]
+        },
+        {
+          title: '所有品牌',
+          children: [
+            { title: '雨刮片', dataIndex: 'ygpAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+          ]
+        },
+        {
+          title: 'TBU、布雷博',
+          children: [
+            { title: '刹车制动系统', dataIndex: 'scpAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+          ]
+        },
+        {
+          title: '汇箭、布瑞斯',
+          children: [
+            { title: '蓄电池', dataIndex: 'xdcAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+          ]
+        },
+        {
+          title: '德路斯',
+          children: [
+            { title: '润滑油', dataIndex: 'rhyAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+          ]
+        },
+        {
+          title: '所有品牌',
+          children: [
+            { title: '火花塞', dataIndex: 'hhsAmount', width: '8.4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+          ]
+        },
+        {
+          title: '稳升',
+          children: [
+            { 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 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return reportSalesReturnBillDetailTotalList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      linkageGroupData: [],
+      totalData: null
+    }
+  },
+  methods: {
+    //  创建时间  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.queryParam.tenantId = undefined
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.time = []
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.totalData = null
+      this.$refs.ruleForm.resetFields()
+      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
+          reportSalesReturnBillDetailTotalExport(params).then(res => {
+            downloadExcel(res, '连锁销售退货合计报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    // 连锁店
+    getLinkageGroup () {
+      linkageGroupList({}).then(res => {
+        if (res.status == 200) {
+          const data = res.data || []
+          if (data.length > 0) {
+            this.linkageGroupData = data
+          } else {
+            this.linkageGroupData = []
+          }
+        } else {
+          this.linkageGroupData = []
+        }
+      })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    pageInit () {
+      this.getLinkageGroup()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 1 - 1
vue.config.js

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