lilei 2 роки тому
батько
коміт
ec9b6dfe07

+ 1 - 1
public/version.json

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

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

@@ -655,6 +655,30 @@ export const asyncRouterMap = [
               },
             ]
           },
+          {
+            path: '/numsGoodsShelves/vinAnalysis',
+            redirect: '/numsGoodsShelves/vinAnalysis/index',
+            name: 'vinAnalysis',
+            component: BlankLayout,
+            meta: {
+              title: 'VIN分析',
+              icon: 'monitor',
+              // permission: 'M_vinAnalysis'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'index',
+                name: 'vinAnalysisIndex',
+                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/vinAnalysis/index.vue'),
+                meta: {
+                  title: 'VIN分析列表',
+                  icon: 'monitor',
+                  hidden: true
+                }
+              },
+            ]
+          },
           // {
           //   path: '/numsGoodsShelves/accountManagement',
           //   redirect: '/numsGoodsShelves/accountManagement/list',

+ 1 - 1
src/views/common/shelfList.js

@@ -56,8 +56,8 @@ const shelfSList = {
       console.log(value)
       const row = this.shelfList.find(item => item.shelfSn == value)
       this.defaultVal = value
-      this.$emit('change', value, row)
       this.$emit('input', value, row)
+      this.$emit('change', value, row)
     },
     //  货架列表
     getShelf () {

+ 1 - 1
src/views/numsGoodsShelves/customerAnalysis/list.vue

@@ -236,7 +236,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 225
+      this.tableHeight = window.innerHeight - tableSearchH - 250
     }
   },
   watch: {

+ 128 - 0
src/views/numsGoodsShelves/vinAnalysis/detailModal.vue

@@ -0,0 +1,128 @@
+<template>
+  <a-modal
+    centered
+    class="vinRecord-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="VIN详情"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="60%">
+    <!-- 详情 -->
+    <div v-if="detailsData">
+      <a-descriptions :column="2" size="default">
+        <a-descriptions-item label="扫描时间">{{ itemData&&itemData.settleTime || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="VIN">{{ itemData&&itemData.settleNo || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="车型" :span="1">{{ itemData&&itemData.bizNo || '--' }}</a-descriptions-item>
+      </a-descriptions>
+    </div>
+    <!-- 表格 -->
+    <div class="table-body">
+      <table>
+        <tr>
+          <th width="10%">产品分类</th>
+          <th width="10%">产品编码</th>
+          <th width="50%">产品名称</th>
+          <th width="10%">原厂编码</th>
+          <th width="10%">当前是否铺货</th>
+          <th width="10%">当前可用库存数量</th>
+        </tr>
+        <!-- 空调滤清器 -->
+        <tr v-for="(item,index) in 5">
+          <td v-if="index==0" rowspan="5">空调滤清器</td>
+          <td>K-234433</td>
+          <td>撒打发士大夫啊手动阀啊打发案说法</td>
+          <td>--</td>
+          <td>是</td>
+          <td>3</td>
+        </tr>
+        <!-- 空气滤清器 -->
+        <tr v-for="(item,index) in 3">
+          <td v-if="index==0" rowspan="3">空气滤清器</td>
+          <td>K-234433</td>
+          <td>撒打发士大夫啊手动阀啊打发案说法</td>
+          <td>--</td>
+          <td>是</td>
+          <td>3</td>
+        </tr>
+        <!-- 机油滤清器 -->
+        <tr v-for="(item,index) in 6">
+          <td v-if="index==0" rowspan="6">机油滤清器</td>
+          <td>K-234433</td>
+          <td>撒打发士大夫啊手动阀啊打发案说法</td>
+          <td>--</td>
+          <td>是</td>
+          <td>3</td>
+        </tr>
+      </table>
+    </div>
+    <div class="btn-cont"><a-button id="vinRecord-modal-back" @click="isShow = false">关闭</a-button></div>
+  </a-modal>
+</template>
+
+<script>
+export default {
+  name: 'DetailModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemData: {
+      type: Object,
+      default: function () {
+        return []
+      }
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      list: []
+    }
+  },
+  methods: {
+    getDetailList (id) {
+
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      } else {
+        this.getDetailList()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .vinRecord-modal{
+    .ant-modal-body {
+      padding: 40px 40px 24px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+    .table-body{
+      table{
+        th,td{
+          text-align: center;
+          padding: 5px;
+          border:1px solid #ddd;
+        }
+        th{
+          background:#f8f8f8;
+        }
+      }
+    }
+  }
+</style>

+ 46 - 0
src/views/numsGoodsShelves/vinAnalysis/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="VIN扫描记录"></a-tab-pane>
+        <a-tab-pane key="2" tab="适配产品统计" force-render></a-tab-pane>
+      </a-tabs>
+    </div>
+    <a-card size="small" :bordered="false">
+      <vinList v-show="curTab==1"></vinList>
+      <spList v-show="curTab==2"></spList>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import vinList from './vinList.vue'
+import spList from './spList.vue'
+export default {
+  name: 'SalesReportIndex',
+  components: {
+    vinList,
+    spList
+  },
+  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>

+ 292 - 0
src/views/numsGoodsShelves/vinAnalysis/spList.vue

@@ -0,0 +1,292 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="vinAnaly-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="5" :sm="24">
+            <a-form-model-item label="货架名称" prop="shelfSn">
+              <shelfSList v-model="queryParam.shelfSn" @change="shelfChange"></shelfSList>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-model-item label="产品编码">
+              <a-input id="vinAnaly-VIN" v-model.trim="queryParam.vin" allowClear placeholder="请输入产品编码"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-model-item label="产品名称">
+              <a-input id="vinAnaly-VIN" v-model.trim="queryParam.vin" allowClear placeholder="请输入产品名称"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-model-item label="原厂编码">
+              <a-input id="vinAnaly-VIN" v-model.trim="queryParam.vin" allowClear placeholder="请输入VIN"/>
+            </a-form-model-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="5" :sm="24">
+              <a-form-item label="产品品牌">
+                <ProductBrand placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
+              </a-form-item>
+            </a-col>
+            <a-col :md="5" :sm="24">
+              <a-form-item label="产品分类">
+                <ProductType placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
+              </a-form-item>
+            </a-col>
+            <a-col :md="5" :sm="24">
+              <a-form-item label="适配缺货次数">
+                <a-input-group compact>
+                  <a-input-number
+                    :precision="0"
+                    style=" width: 42%; text-align: center"
+                    v-model.trim="queryParam.qhslMin"
+                    allowClear
+                    placeholder="最小值"/>
+                  <a-input
+                    style=" width: 16%; pointer-events: none; backgroundColor: #fff"
+                    placeholder="~"
+                    disabled
+                  />
+                  <a-input-number
+                    :precision="0"
+                    :min="queryParam.qhslMin"
+                    style=" width: 42%; text-align: center"
+                    v-model.trim="queryParam.qhslMax"
+                    allowClear
+                    placeholder="最大值"/>
+                </a-input-group>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="最近VIN扫描时间">
+                <rangeDate ref="rangeDate" v-model="time" @change="dateChange" />
+              </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="vinAnaly-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="vinAnaly-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              class="button-warning"
+              id="vinAnaly-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>
+    <div class="t-title" style="display: flex;align-items: center;justify-content: space-between;padding:5px 0;">
+      <div style="border-left:2px solid #eee;padding:0 5px;font-weight: bold;font-size:14px;">{{ shelfName||'' }}</div>
+      <div></div>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+      <!-- vin -->
+      <template slot="vin" slot-scope="text, record">
+        <div>
+          <span class="table-td-link" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
+        </div>
+      </template>
+    </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 shelfSList from '@/views/common/shelfList'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
+import { reportSalesBillList, reportSalesBillCount, reportSalesBillExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, shelfSList, ProductType, ProductBrand },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      productType: [],
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        shelfSn: undefined,
+        code: '', //  产品编码
+        name: '', //  产品名称
+        origCode: '', //  原厂编码
+        productBrandSn: undefined, //  产品品牌
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
+      },
+      time: [],
+      rules: {
+        'shelfSn': [{ required: true, message: '请选择货架', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 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
+            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
+        })
+      },
+      shelfName: '',
+      filters: [{ text: '有', value: '1' }, { text: '无', value: '0' }, { text: '空(--)', value: '' }]
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '产品编码', dataIndex: 'salesAuditDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'salesAuditDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'salesAuditDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'salesAuditDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', dataIndex: 'salesAuditDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '适配有货次数', dataIndex: 'salesAuditDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
+        { title: '适配缺货次数', dataIndex: 'salesAuditDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
+        { title: '最近VIN扫描时间', dataIndex: 'settleStyleSnDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    shelfChange (v, row) {
+      this.shelfName = row ? row.shelfName : ''
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.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.time = []
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+
+      this.queryParam.salesTargetName = ''
+      this.queryParam.salesTargetType = undefined
+      this.queryParam.provinceSn = undefined
+      this.queryParam.citySn = undefined
+      this.queryParam.countySn = undefined
+      this.queryParam.settleStyleSn = undefined
+      this.queryParam.salesBillNo = ''
+      this.queryParam.salesManName = ''
+      this.$refs.ruleForm.resetFields()
+      this.$refs.table.clearTable()
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
+          _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
+        }
+      })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    handleDetail (row) {
+      this.curItem = row
+      this.showDetail = true
+    },
+    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>

+ 293 - 0
src/views/numsGoodsShelves/vinAnalysis/vinList.vue

@@ -0,0 +1,293 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="vinAnaly-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="shelfSn">
+              <shelfSList v-model="queryParam.shelfSn" @change="shelfChange"></shelfSList>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="扫描时间">
+              <rangeDate ref="rangeDate" v-model="time" @change="dateChange" />
+            </a-form-model-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="vin">
+                <a-input id="vinAnaly-VIN" v-model.trim="queryParam.vin" allowClear placeholder="请输入VIN"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="车辆品牌">
+                <a-input id="vinAnaly-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入车辆品牌"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="车型">
+                <a-input id="vinAnaly-salesManName" v-model.trim="queryParam.salesManName" allowClear placeholder="请输入车型"/>
+              </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="vinAnaly-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="vinAnaly-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              class="button-warning"
+              id="vinAnaly-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">
+        <div>
+          累计扫描VIN:<strong>1000</strong>次;
+        </div>
+        <div>
+          空调滤清器 有适配:<strong>800</strong>次,<strong>80</strong>%;无适配:<strong>800</strong>次,<strong>80</strong>%;空(--):<strong>80</strong>次,<strong>5</strong>%;
+        </div>
+        <div>
+          空气滤清器 有适配:<strong>800</strong>次,<strong>80</strong>%;无适配:<strong>800</strong>次,<strong>80</strong>%;空(--):<strong>80</strong>次,<strong>5</strong>%;
+        </div>
+        <div>
+          机油滤清器 有适配:<strong>800</strong>次,<strong>80</strong>%;无适配:<strong>800</strong>次,<strong>80</strong>%;空(--):<strong>80</strong>次,<strong>5</strong>%;
+        </div>
+      </div>
+    </a-alert>
+    <div class="t-title" style="display: flex;align-items: center;justify-content: space-between;padding:5px 0;">
+      <div style="border-left:2px solid #eee;padding:0 5px;font-weight: bold;font-size:14px;">{{ shelfName||'' }}</div>
+      <div>
+        <a-checkbox-group v-model="showCol" :options="showColItem" />
+      </div>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+      <!-- vin -->
+      <template slot="vin" slot-scope="text, record">
+        <div>
+          <span class="table-td-link" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
+        </div>
+      </template>
+    </s-table>
+    <!-- 详情 -->
+    <detailModal :openModal="showDetail" :itemData="curItem" @close="showDetail=false"></detailModal>
+  </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 shelfSList from '@/views/common/shelfList'
+import detailModal from './detailModal'
+import { reportSalesBillList, reportSalesBillCount, reportSalesBillExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, shelfSList, detailModal },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        shelfSn: undefined
+      },
+      time: [],
+      rules: {
+        'shelfSn': [{ required: true, message: '请选择货架', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 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, //  合计
+      shelfName: '',
+      showColItem: [
+        { label: '空调滤清器', value: 'kt' },
+        { label: '空气滤清器', value: 'kq' },
+        { label: '机油滤清器', value: 'jy' }
+      ],
+      showCol: ['kt', 'kq', 'jy'],
+      filters: [{ text: '有', value: '1' }, { text: '无', value: '0' }, { text: '空(--)', value: '' }],
+      showDetail: false,
+      curItem: null
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '扫描时间', dataIndex: 'salesAuditDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: 'VIN', scopedSlots: { customRender: 'vin' }, width: '15%', align: 'center' },
+        { title: '车辆品牌', dataIndex: 'settleStyleSnDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '车型', dataIndex: 'salesManName', width: '24%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+      ]
+      this.showCol.map(item => {
+        if (item == 'kt') {
+          arr.push({ title: '空调滤清器适配', dataIndex: 'totalCategory', filters: this.filters, width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        }
+        if (item == 'kq') {
+          arr.push({ title: '空气滤清器适配', dataIndex: 'totalProfit', filters: this.filters, width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        }
+        if (item == 'jy') {
+          arr.push({ title: '机油滤清器适配', dataIndex: 'totalCost', filters: this.filters, width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        }
+      })
+      return arr
+    }
+  },
+  methods: {
+    shelfChange (v, row) {
+      this.shelfName = row ? row.shelfName : ''
+    },
+    // 合计
+    getCount (params) {
+      reportSalesBillCount(params).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.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.time = []
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+
+      this.queryParam.salesTargetName = ''
+      this.queryParam.salesTargetType = undefined
+      this.queryParam.provinceSn = undefined
+      this.queryParam.citySn = undefined
+      this.queryParam.countySn = undefined
+      this.queryParam.settleStyleSn = 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
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
+          _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
+        }
+      })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    handleDetail (row) {
+      this.curItem = row
+      this.showDetail = true
+    },
+    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>