Procházet zdrojové kódy

Merge branch 'develop_szhj05' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into pre-release

# Conflicts:
#	public/version.json
#	src/views/numsGoodsShelves/replenishmentManagement/list.vue
lilei před 2 roky
rodič
revize
688a051860

+ 1 - 0
package.json

@@ -87,6 +87,7 @@
       "parser": "babel-eslint"
     },
     "rules": {
+       "eqeqeq":["off"],
       "generator-star-spacing": "off",
       "no-mixed-operators": 0,
       "vue/max-attributes-per-line": [

+ 34 - 2
src/api/shelf.js

@@ -83,7 +83,7 @@ export const shelfProductParseProducts = params => {
     method: 'post'
   })
 }
- // POST 解析货位的导入模板
+// POST 解析货位的导入模板
 export const shelfPlaceReadExcel = params => {
   return axios({
     url: '/shelf/place/readExcel',
@@ -201,4 +201,36 @@ export const orderBillQueryCount = (params) => {
     data: params,
     method: 'post'
   })
-}
+}
+
+// 客户分析-分页列表
+export const queryShelfOrderReportPage = (params) => {
+  const url = `/shelfOrderReport/queryShelfOrderReportPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 客户分析-统计
+export const queryShelfOrderTotalReport = (params) => {
+  return axios({
+    url: `/shelfOrderReport/queryShelfOrderTotalReport`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 客户分析-导出
+
+export const exportShelfOrderReport = (params) => {
+  return axios({
+    url: `/shelfOrderReport/exportShelfOrderReport`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 61 - 0
src/api/vinLog.js

@@ -0,0 +1,61 @@
+import { axios } from '@/utils/request'
+
+// VIN扫描纪录 - 分页数据
+export const queryPage = (params) => {
+  const url = `/vinLog/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  VIN扫描纪录 - 统计
+export const queryCount = (params) => {
+  return axios({
+    url: `/vinLog/queryCount`,
+    data: params,
+    method: 'post'
+  })
+}
+//  VIN扫描纪录 - 查看详情
+export const queryDetail = (params) => {
+  return axios({
+    url: `/vinLog/queryScanVinLogDetail`,
+    data: params,
+    method: 'post'
+  })
+}
+
+//  VIN扫描纪录 - 导出
+export const exportVinLog = (params) => {
+  return axios({
+    url: `/vinLog/exportVinLog`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
+// 适配产品统计 - 分页数据
+
+export const reportPage = (params) => {
+  const url = `/vinFitReport/reportPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 适配产品统计 - 导出
+export const exportReport = (params) => {
+  return axios({
+    url: `/vinFitReport/exportReport`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

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

@@ -631,6 +631,54 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/numsGoodsShelves/customerAnalysis',
+            redirect: '/numsGoodsShelves/customerAnalysis/list',
+            name: 'customerAnalysis',
+            component: BlankLayout,
+            meta: {
+              title: '客户分析',
+              icon: 'monitor',
+              permission: 'M_customerAnalysis'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'customerAnalysisList',
+                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/customerAnalysis/list.vue'),
+                meta: {
+                  title: '客户分析列表',
+                  icon: 'monitor',
+                  hidden: true
+                }
+              },
+            ]
+          },
+          {
+            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',

+ 10 - 1
src/views/chainReportData/chainSalesDetailsCountReport/list.vue

@@ -33,6 +33,11 @@
                 </a-select>
               </a-form-model-item>
             </a-col>
+            <a-col :md="2" :sm="8" style="margin-top: 6px;">
+              <a-checkbox @change="onChange" :default-checked="queryParam.oosFlag">
+                包含急件
+              </a-checkbox>
+            </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>
@@ -82,7 +87,8 @@ export default {
         tenantId: undefined,
         time: [],
         beginDate: '',
-        endDate: ''
+        endDate: '',
+        oosFlag: true
       },
       rules: {
         'time': [{ required: true, message: '请选择审核日期', trigger: 'change' }]
@@ -157,6 +163,9 @@ export default {
     }
   },
   methods: {
+    onChange (e) {
+      this.queryParam.oosFlag = e.target.checked
+    },
     //  创建时间  change
     dateChange (date) {
       this.queryParam.time = date

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

@@ -19,7 +19,7 @@ const shelfSList = {
     `,
   props: {
     value: {
-      type: [String,Array],
+      type: [String, Array],
       defatut: ''
     },
     id: {
@@ -28,7 +28,7 @@ const shelfSList = {
     },
     mode: {
       type: String,
-      defatut: 'default'
+      default: 'default'
     }
   },
   data () {
@@ -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 () {

+ 309 - 0
src/views/numsGoodsShelves/customerAnalysis/list.vue

@@ -0,0 +1,309 @@
+<template>
+  <div class="userd-baseInfo">
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <div ref="tableSearch" class="table-page-search-wrapper">
+          <a-form-model layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="货架名称" prop="shelfSn">
+                  <shelfSList v-model="queryParam.shelfSn"></shelfSList>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="下单时间">
+                  <rangeDate ref="orderDate" :value="orderTime" @change="orderDateChange" />
+                </a-form-item>
+              </a-col>
+              <!-- <a-col :md="6" :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>
+              <template v-if="advanced">
+                <a-col :md="6" :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.xsslMin"
+                        allowClear
+                        placeholder="请输入最小值"/>
+                      <a-input
+                        style=" width: 16%; pointer-events: none; backgroundColor: #fff"
+                        placeholder="~"
+                        disabled
+                      />
+                      <a-input-number
+                        :precision="0"
+                        :min="queryParam.xsslMin"
+                        style=" width: 42%; text-align: center"
+                        v-model.trim="queryParam.xsslMax"
+                        allowClear
+                        placeholder="请输入最大值"/>
+                    </a-input-group>
+                  </a-form-item>
+                </a-col>
+              </template> -->
+              <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                <a-button type="primary" @click="$refs.table.refresh(true)" id="userd-refresh">查询</a-button>
+                <a-button type="" @click="reset" style="margin-left: 10px;" id="userd-reset">重置</a-button>
+                <a-button
+                  type="primary"
+                  @click="handleExport"
+                  :loading="exportLoading"
+                  class="button-warning"
+                  style="margin-left: 10px;"
+                  id="vinAnaly-export-btn">导出</a-button>
+                <!-- <a @click="advanced=!advanced" style="margin-left: 8px">
+                  {{ advanced ? '收起' : '展开' }}
+                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                </a> -->
+              </a-col>
+            </a-row>
+            </a-form>
+          </a-form-model></div>
+        <div class="table-operator" v-if="statisticsObj">
+          <a-alert type="info">
+            <div slot="message" class="total-bar">
+              <div>
+                货架数量:<strong>{{ statisticsObj.shelfCount }}</strong>;
+                铺货数量合计:<strong>{{ statisticsObj.totalShelfMaxQty }}</strong>;
+                铺货金额合计:<strong>{{ statisticsObj.totalShelfMaxCost }}</strong>;
+                货架取货数量合计:<strong>{{ statisticsObj.totalOrderQty }}</strong>;
+                货架取货金额合计:<strong>{{ statisticsObj.totalOrderAmount }}</strong>;
+              </div>
+              <div>
+                急送数量合计:<strong>{{ statisticsObj.tempOrderQty }}</strong>;
+                急送金额合计:<strong>{{ statisticsObj.tempOrderAmount }}</strong>;
+                销售数量合计:<strong>{{ statisticsObj.saleOrderQty }}</strong>;
+                销售金额合计:<strong>{{ statisticsObj.saleOrderAmount }}</strong>;
+              </div>
+            </div>
+          </a-alert>
+        </div>
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+84.5+'px', wordBreak: 'break-all' }"
+          size="small"
+          rowKey="id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+          <span slot="customTitle">
+            <a-popover>
+              <template slot="content">
+                货架铺货情况为实时数据,<br>与查询条件查询中的下单时间无关
+              </template>
+              <a-icon type="question-circle" theme="twoTone" />
+            </a-popover>
+            货架铺货情况
+          </span>
+        </s-table>
+      </a-spin>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import shelfSList from '@/views/common/shelfList'
+import { toThousands } from '@/libs/tools.js'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import { queryShelfOrderReportPage, queryShelfOrderTotalReport, exportShelfOrderReport } from '@/api/shelf'
+export default {
+  name: 'UserList',
+  components: { STable, VSelect, rangeDate, shelfSList },
+  data () {
+    return {
+      spinning: false,
+      // advanced: false,
+      tableHeight: 0,
+      time: [],
+      orderTime: [],
+      // 查询参数
+      queryParam: {
+        shelfSn: undefined,
+        beginDate: '',
+        endDate: ''
+        // qhslMin: undefined,
+        // qhslMax: undefined,
+        // xsslMin: undefined,
+        // xsslMax: undefined
+      },
+      exportLoading: false,
+      showModal: false,
+      itemData: null, // 编辑行数据
+      openStatusModal: false, // 货架状态弹窗初始状态
+      statisticsObj: null,
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
+        { title: '货架名称', dataIndex: 'shelfName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        {
+          slots: { title: 'customTitle' },
+          children: [
+            { title: '铺货数量', dataIndex: 'totalShelfMaxQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+            { title: '铺货金额', dataIndex: 'totalShelfMaxCost', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } }
+          ]
+        },
+        {
+          title: '货架订单',
+          children: [
+            { title: '取货数量', dataIndex: 'totalOrderQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+            { title: '取货金额', dataIndex: 'totalOrderAmount', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } }
+          ]
+        },
+        {
+          title: '急送订单',
+          children: [
+            { title: '急送数量', dataIndex: 'tempOrderQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+            { title: '急送金额', dataIndex: 'tempOrderAmount', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } }
+          ]
+        },
+        {
+          title: '销售单',
+          children: [
+            { title: '销售数量', dataIndex: 'saleOrderQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+            { title: '销售金额', dataIndex: 'saleOrderAmount', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } }
+          ]
+        }
+      ],
+      rules: {
+        'shelfSn': [{ required: true, message: '请选择货架', trigger: 'change' }]
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.spinning = true
+        return queryShelfOrderReportPage(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (let i = 0; i < data.list.length; i++) {
+              const _item = data.list[i]
+              _item.no = no + i + 1
+            }
+          }
+          this.getStatistics(this.queryParam)
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    handleBack () {
+      this.$router.go(-1)
+    },
+    //  下单时间  change
+    orderDateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    // 重置
+    reset () {
+      this.queryParam = {
+        shelfSn: undefined,
+        beginDate: '',
+        endDate: ''
+        // qhslMin: undefined,
+        // qhslMax: undefined,
+        // xsslMin: undefined,
+        // xsslMax: undefined
+      }
+      this.$refs.orderDate.resetDate()
+      this.$refs.table.refresh(true)
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 250
+    },
+    getStatistics (ajaxData) { // 统计
+      queryShelfOrderTotalReport(ajaxData).then(res => {
+        if (res.status == 200) {
+          this.statisticsObj = res.data
+        } else {
+          this.$message.error(res.message)
+        }
+      })
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      const params = _this.queryParam
+      _this.exportLoading = true
+      _this.spinning = true
+      exportShelfOrderReport(params).then(res => {
+        downloadExcel(res, '客户分析表')
+        _this.exportLoading = false
+        _this.spinning = false
+      })
+    }
+  },
+  watch: {
+    // advanced (newValue, oldValue) {
+    //   const _this = this
+    //   this.$nextTick(() => { // 页面渲染完成后的回调
+    //     _this.setTableH()
+    //   })
+    // },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.reset()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.reset()
+    }
+  }
+}
+</script>
+<style lang="less">
+  .userd-baseInfo{
+    .userd-back{
+      margin-bottom: 6px;
+    }
+  }
+  .ant-select{
+    max-width: 300px !important;
+  }
+</style>

+ 4 - 4
src/views/numsGoodsShelves/replenishmentManagement/list.vue

@@ -263,8 +263,11 @@ export default {
       this.queryByTypeSum(true)
     },
     handleValidate (type, params) {
+      if (type == 'confirm') { // 确认
+        this.confirmFun(params)
+      }
       // this.spinning = true
-      // // 校验产品库存是否足够
+      // 校验产品库存是否足够
       // shelfReplenishDetailStock(params).then(res => {
       //   if (res.status == 200) {
       //     if (res.data && res.data.length > 0) {
@@ -279,9 +282,6 @@ export default {
       //     }
       //   }
       // })
-      if (type == 'confirm') { // 确认
-        this.confirmFun(params)
-      }
     },
     // 提交确认
     confirmFun (params) {

+ 3 - 2
src/views/numsGoodsShelves/shelfSet/basicInfoModal.vue

@@ -18,7 +18,7 @@
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol">
         <a-form-model-item label="货架名称" v-if="type==1" prop="shelfName">
-          <a-input v-model="form.shelfName" placeholder="请输入货架名称"></a-input>
+          <a-input v-model="form.shelfName" :maxLength="30" placeholder="请输入货架名称"></a-input>
         </a-form-model-item>
         <a-form-model-item prop="customerSn">
           <template slot="label">
@@ -64,7 +64,8 @@
 import { commonMixin } from '@/utils/mixin'
 import { VSelect } from '@/components'
 import custList from '@/views/common/custList.vue'
-import { shelfSave, updateShelfPriceShow } from '@/api/shelf'
+// , updateShelfPriceShow
+import { shelfSave } from '@/api/shelf'
 export default {
   name: 'ShelfSetBasicInfoModal',
   components: { VSelect, custList },

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

@@ -0,0 +1,122 @@
+<template>
+  <a-modal
+    centered
+    class="vinRecord-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="VIN详情"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="60%">
+    <!-- 详情 -->
+    <div v-if="itemData">
+      <a-descriptions :column="2" size="default">
+        <a-descriptions-item label="扫描时间">{{ itemData.scanTime || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="VIN">{{ itemData.vinCode || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="车型" :span="1">{{ itemData.carType || '--' }}</a-descriptions-item>
+      </a-descriptions>
+    </div>
+    <!-- 表格 -->
+    <div class="table-body" v-if="itemData">
+      <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 itemData.airConditionerFilter" :key="index">
+          <td v-if="index==0" colSpan="1" :rowSpan="itemData.airConditionerFilter.length">空调滤清器</td>
+          <td>{{ item.productCode|| '--' }}</td>
+          <td>{{ item.productName|| '--' }}</td>
+          <td>{{ item.origCode || '--' }}</td>
+          <td>{{ item.isShelfProduct|| '--' }}</td>
+          <td>{{ (item.qty||item.qty==0) ? item.qty :'--' }}</td>
+        </tr>
+        <!-- 空气滤清器 -->
+        <tr v-for="(item,index) in itemData.airFilterFlag" :key="index">
+          <td v-if="index==0" colSpan="1" :rowSpan="itemData.airFilterFlag.length">空气滤清器</td>
+          <td>{{ item.productCode|| '--' }}</td>
+          <td>{{ item.productName|| '--' }}</td>
+          <td>{{ item.origCode || '--' }}</td>
+          <td>{{ item.isShelfProduct|| '--' }}</td>
+          <td>{{ (item.qty||item.qty==0) ? item.qty :'--' }}</td>
+        </tr>
+        <!-- 机油滤清器 -->
+        <tr v-for="(item,index) in itemData.engineOilFilterFlag" :key="index">
+          <td v-if="index==0" colSpan="1" :rowSpan="itemData.engineOilFilterFlag.length">机油滤清器</td>
+          <td>{{ item.productCode|| '--' }}</td>
+          <td>{{ item.productName|| '--' }}</td>
+          <td>{{ item.origCode || '--' }}</td>
+          <td>{{ item.isShelfProduct|| '--' }}</td>
+          <td>{{ (item.qty||item.qty==0) ? item.qty : '--' }}</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//  是否打开弹框
+    }
+  },
+  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="适配产品统计"></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>

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

@@ -0,0 +1,312 @@
+<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.productCode" 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.productName" 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.origCode" allowClear placeholder="请输入原厂编码"/>
+            </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.brandSn"></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="6" :sm="24">
+              <a-form-model-item label="VIN扫描时间">
+                <rangeDate ref="scanDate" 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 v-show="isSearchFlag">
+      <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>
+        <template slot="type" slot-scope="text, record">
+          <div>
+            {{ record.productTypeName2 }}->{{ record.productTypeName3 }}
+          </div>
+        </template>
+      </s-table>
+    </div>
+    <div class="unChoose" v-show="!isSearchFlag">
+      <a-icon type="exclamation-circle" theme="filled" :style="{ fontSize: '18px', color: '#ff9900', verticalAlign: 'sub', marginRight: '5px' }" />
+      <span>请选择一个货架后点击查询按钮</span>
+    </div>
+    </div>
+  </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 { reportPage, exportReport } from '@/api/vinLog'
+export default {
+  components: { STable, VSelect, rangeDate, shelfSList, ProductType, ProductBrand },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      productType: [],
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        shelfSn: undefined,
+        productCode: undefined, //  产品编码
+        productName: undefined, //  产品名称
+        origCode: undefined, // 原厂编码
+        brandSn: undefined, //  产品品牌
+        productTypeSn1: undefined, //  产品一级分类
+        productTypeSn2: undefined, //  产品二级分类
+        productTypeSn3: undefined //  产品三级分类
+      },
+      isSearchFlag: false,
+      time: [],
+      rules: {
+        'shelfSn': [{ required: true, message: '请选择货架', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      order_by: '',
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.spinning = true
+        this.disabled = true
+        const newParameter = parameter
+        if (newParameter.sortField && newParameter.sortField == 'inStockCount') { // 有货
+          if (newParameter.sortOrder) {
+            if (newParameter.sortOrder != 'ascend') { // 降序
+              newParameter.orderBy = 'xvfp.in_stock_count desc,xp.code asc'
+            } else {
+              newParameter.orderBy = 'xvfp.in_stock_count asc,xp.code asc'
+            }
+            this.order_by = newParameter.orderBy
+          } else {
+            this.order_by = ''
+          }
+        }
+        if (newParameter.sortField && newParameter.sortField == 'notStockCount') { // 无货
+          if (newParameter.sortOrder) {
+            if (newParameter.sortOrder != 'ascend') { // 降序
+              newParameter.orderBy = 'xvfp.not_stock_count desc,xp.code asc'
+            } else {
+              newParameter.orderBy = 'xvfp.not_stock_count asc,xp.code asc'
+            }
+            this.order_by = newParameter.orderBy
+          } else {
+            this.order_by = ''
+          }
+        }
+
+        const params = Object.assign(newParameter, this.queryParam, { orderBy: this.order_by })
+        delete params.time
+        return reportPage(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: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'brandName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', slots: { title: 'type' }, scopedSlots: { customRender: 'type' }, width: '10%', align: 'center' },
+        { title: '适配有货次数', dataIndex: 'inStockCount', width: '10%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' }, sorter: (a, b) => a.inStockCount - b.inStockCount },
+        { title: '适配缺货次数', dataIndex: 'notStockCount', width: '10%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' }, sorter: (a, b) => a.notStockCount - b.notStockCount }
+        // { title: '最近VIN扫描时间', dataIndex: 'scanVinDate', 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.isSearchFlag = true
+          this.$refs.table.refresh(true)
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.isSearchFlag = false
+      this.queryParam = {
+        beginDate: '',
+        endDate: '',
+        shelfSn: undefined,
+        productCode: undefined, //  产品编码
+        productName: undefined, //  产品名称
+        origCode: undefined, // 原厂编码
+        brandSn: undefined, //  产品品牌
+        productTypeSn1: undefined, //  产品一级分类
+        productTypeSn2: undefined, //  产品二级分类
+        productTypeSn3: undefined //  产品三级分类
+      }
+      this.time = []
+      this.productType = []
+      this.$refs.ruleForm.resetFields()
+      this.$refs.table.clearTable()
+      if (this.advanced) {
+        this.$refs.scanDate.resetDate()
+      }
+      this.handleSearch()
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          params.orderBy = this.order_by
+          _this.exportLoading = true
+          _this.spinning = true
+          exportReport(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
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+<style lang="less" scoped>
+  .unChoose {
+    text-align: center;
+    margin: 280px 0 340px;
+    font-size: 16px;
+  }
+</style>

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

@@ -0,0 +1,340 @@
+<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.vinCode" 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.brandName" 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.modelInfo" 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>
+    <div v-show="isSearch">
+      <!-- 合计 -->
+      <a-alert type="info" style="margin-bottom:10px" v-if="queryCountData">
+        <div class="ftext" slot="message">
+          <div>
+            累计扫描VIN:<strong>{{ queryCountData.scanCount }}</strong>次;
+          </div>
+          <div>
+            空调滤清器 有适配:<strong>{{ queryCountData.airConditionerFilterOnShelfCount }}</strong>次,<strong>{{ queryCountData.airConditionerFilterOnShelfRate }}</strong>;无适配:<strong>{{ queryCountData.airConditionerFilterOffShelfCount }}</strong>次,<strong>{{ queryCountData.airConditionerFilterOffShelfRate }}</strong>;空(--):<strong>{{ queryCountData.airConditionerFilterNotExistCount }}</strong>次,<strong>{{ queryCountData.airConditionerFilterNotExistRate }}</strong>;
+          </div>
+          <div>
+            空气滤清器 有适配:<strong>{{ queryCountData.airFilterOnShelfCount }}</strong>次,<strong>{{ queryCountData.airFilterOnShelfRate }}</strong>;无适配:<strong>{{ queryCountData.airFilterOffShelfCount }}</strong>次,<strong>{{ queryCountData.airFilterOffShelfRate }}</strong>;空(--):<strong>{{ queryCountData.airFilterNotExistCount }}</strong>次,<strong>{{ queryCountData.airFilterNotExistRate }}</strong>;
+          </div>
+          <div>
+            机油滤清器 有适配:<strong>{{ queryCountData.engineOilFilterOnShelfCount }}</strong>次,<strong>{{ queryCountData.engineOilFilterOnShelfRate }}</strong>;无适配:<strong>{{ queryCountData.engineOilFilterOffShelfCount }}</strong>次,<strong>{{ queryCountData.engineOilFilterOffShelfRate }}</strong>;空(--):<strong>{{ queryCountData.engineOilFilterNotExistCount }}</strong>次,<strong>{{ queryCountData.engineOilFilterNotExistRate }}</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.vinCode }}</span>
+          </div>
+        </template>
+      </s-table>
+    </div>
+    <div class="unChoose" v-show="!isSearch">
+      <a-icon type="exclamation-circle" theme="filled" :style="{ fontSize: '18px', color: '#ff9900', verticalAlign: 'sub', marginRight: '5px' }" />
+      <span>请选择一个货架后点击查询按钮</span>
+    </div>
+    <!-- 详情 -->
+    <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 { queryPage, queryCount, queryDetail, exportVinLog } from '@/api/vinLog'
+export default {
+  components: { STable, VSelect, rangeDate, shelfSList, detailModal },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        vinCode: undefined,
+        shelfSn: undefined,
+        brandName: undefined,
+        modelInfo: undefined
+      },
+      airConditionerFilterData: null,
+      airFilterFlagData: null,
+      engineOilFilterFlagData: null,
+      isSearch: false,
+      time: [],
+      rules: {
+        'shelfSn': [{ required: true, message: '请选择货架', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: (parameter) => {
+        const dataObj = parameter
+        if (dataObj.airConditionerFilterFlagDesc) {
+          dataObj.airConditionerFilterFlag = dataObj.airConditionerFilterFlagDesc.toString()
+          this.airConditionerFilterData = dataObj.airConditionerFilterFlagDesc.toString()
+          delete dataObj.airConditionerFilterFlagDesc
+        }
+        if (dataObj.airFilterFlagDesc) {
+          dataObj.airFilterFlag = dataObj.airFilterFlagDesc.toString()
+          this.airFilterFlagData = dataObj.airFilterFlagDesc.toString()
+          delete dataObj.airFilterFlagDesc
+        }
+        if (dataObj.engineOilFilterFlagDesc) {
+          dataObj.engineOilFilterFlag = dataObj.engineOilFilterFlagDesc.toString()
+          this.engineOilFilterFlagData = dataObj.engineOilFilterFlagDesc.toString()
+          delete dataObj.engineOilFilterFlagDesc
+        }
+        this.disabled = true
+        const params = Object.assign(dataObj, this.queryParam, { airConditionerFilterFlag: this.airConditionerFilterData,
+          airFilterFlag: this.airFilterFlagData,
+          engineOilFilterFlag: this.engineOilFilterFlagData })
+        this.spinning = true
+
+        return queryPage(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.getQueryCount(params)
+          this.spinning = false
+          return data
+        })
+      },
+      queryCountData: null,
+      shelfName: '',
+      showColItem: [
+        { label: '空调滤清器', value: 'kt' },
+        { label: '空气滤清器', value: 'kq' },
+        { label: '机油滤清器', value: 'jy' }
+      ],
+      showCol: ['kt', 'kq', 'jy'],
+      filters: [{ text: '有', value: 1 }, { text: '无', value: 2 }, { text: '空(--)', value: 0 }],
+      showDetail: false,
+      curItem: null
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '扫描时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: 'VIN', dataIndex: 'vinCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: 'VIN', scopedSlots: { customRender: 'vin' }, width: '15%', align: 'center' },
+        { title: '车辆品牌', dataIndex: 'brandName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '车型', dataIndex: 'modelInfo', width: '24%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+      ]
+      this.showCol.map(item => {
+        if (item == 'kt') {
+          arr.push({ title: '空调滤清器适配', dataIndex: 'airConditionerFilterFlagDesc', filters: this.filters, filterMultiple: false, width: '120px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        }
+        if (item == 'kq') {
+          arr.push({ title: '空气滤清器适配', dataIndex: 'airFilterFlagDesc', filters: this.filters, filterMultiple: false, width: '120px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        }
+        if (item == 'jy') {
+          arr.push({ title: '机油滤清器适配', dataIndex: 'engineOilFilterFlagDesc', filters: this.filters, filterMultiple: false, width: '120px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        }
+      })
+      return arr
+    }
+  },
+  methods: {
+    shelfChange (v, row) {
+      this.shelfName = row ? row.shelfName : ''
+    },
+    // 累积扫描VIN次数统计
+    getQueryCount (ajaxData) {
+      queryCount(ajaxData).then(res => {
+        if (res.status == 200) {
+          this.queryCountData = res.data
+        } else {
+          this.queryCountData = 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)
+          this.isSearch = true
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.isSearch = false
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.vinCode = undefined
+      this.queryParam.shelfSn = undefined
+      this.queryParam.brandName = undefined
+      this.queryParam.modelInfo = undefined
+      this.time = []
+      this.$refs.rangeDate.resetDate(this.time)
+      this.$refs.ruleForm.resetFields()
+      // this.$refs.table.refresh(true)
+      this.handleSearch()
+    },
+
+    // 导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const newFilterObj = {
+            exportAirConditionerFilterFlag: this.showCol.includes('kt') ? 1 : 0,
+            exportAirFilterFlag: this.showCol.includes('kq') ? 1 : 0,
+            exportEngineOilFilterFlag: this.showCol.includes('jy') ? 1 : 0,
+
+            airConditionerFilterFlag: this.airConditionerFilterData,
+            airFilterFlag: this.airFilterFlagData,
+            engineOilFilterFlag: this.engineOilFilterFlagData
+          }
+          const params = Object.assign(this.queryParam, newFilterObj)
+          _this.exportLoading = true
+          _this.spinning = true
+          exportVinLog(params).then(res => {
+            downloadExcel(res, 'VIN扫描记录')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    handleDetail (row) {
+      queryDetail({ id: row.id }).then(res => {
+        if (res.status == 200) {
+          const detailObj = {
+            vinCode: row.vinCode,
+            scanTime: row.createDate,
+            carType: row.modelInfo
+          }
+          Object.assign(res.data, detailObj)
+          this.curItem = res.data
+          this.showDetail = true
+        }
+      })
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+<style  lang="less" scoped>
+  .unChoose {
+    text-align: center;
+    margin: 280px 0 340px;
+    font-size: 16px;
+  }
+  .sTable{
+    min-width:1004px;
+  }
+</style>