|
@@ -20,23 +20,23 @@
|
|
|
</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-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.vin" allowClear placeholder="请输入产品名称"/>
|
|
|
+ <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.vin" allowClear placeholder="请输入VIN"/>
|
|
|
+ <a-input id="vinAnaly-VIN" v-model.trim="queryParam.origCode" 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>
|
|
|
+ <ProductBrand placeholder="请选择产品品牌" v-model="queryParam.brandSn"></ProductBrand>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="5" :sm="24">
|
|
@@ -44,33 +44,9 @@
|
|
|
<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" />
|
|
|
+ <rangeDate ref="scanDate" v-model="time" @change="dateChange" />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
@@ -125,7 +101,7 @@ 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'
|
|
|
+import { reportPage, exportReport } from '@/api/vinLog'
|
|
|
export default {
|
|
|
components: { STable, VSelect, rangeDate, shelfSList, ProductType, ProductBrand },
|
|
|
mixins: [commonMixin],
|
|
@@ -140,14 +116,14 @@ export default {
|
|
|
queryParam: { // 查询条件
|
|
|
beginDate: '',
|
|
|
endDate: '',
|
|
|
- shelfSn: undefined,
|
|
|
- code: '', // 产品编码
|
|
|
- name: '', // 产品名称
|
|
|
- origCode: '', // 原厂编码
|
|
|
- productBrandSn: undefined, // 产品品牌
|
|
|
- productTypeSn1: '', // 产品一级分类
|
|
|
- productTypeSn2: '', // 产品二级分类
|
|
|
- productTypeSn3: '' // 产品三级分类
|
|
|
+ shelfSn: '',
|
|
|
+ productCode: undefined, // 产品编码
|
|
|
+ productName: undefined, // 产品名称
|
|
|
+ origCode: undefined, // 原厂编码
|
|
|
+ brandSn: undefined, // 产品品牌
|
|
|
+ productTypeSn1: undefined, // 产品一级分类
|
|
|
+ productTypeSn2: undefined, // 产品二级分类
|
|
|
+ productTypeSn3: undefined // 产品三级分类
|
|
|
},
|
|
|
time: [],
|
|
|
rules: {
|
|
@@ -157,11 +133,12 @@ export default {
|
|
|
exportLoading: false,
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
+ this.spinning = true
|
|
|
this.disabled = true
|
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
|
- this.spinning = true
|
|
|
+
|
|
|
delete params.time
|
|
|
- return reportSalesBillList(params).then(res => {
|
|
|
+ return reportPage(params).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
@@ -183,14 +160,14 @@ export default {
|
|
|
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 }
|
|
|
+ { 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: 'brandSn', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品分类', dataIndex: 'type', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '适配有货次数', dataIndex: 'cishu', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
|
|
|
+ { title: '适配缺货次数', dataIndex: 'que', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
|
|
|
+ { title: '最近VIN扫描时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true }
|
|
|
]
|
|
|
return arr
|
|
|
}
|
|
@@ -224,21 +201,25 @@ export default {
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
- this.$refs.rangeDate.resetDate()
|
|
|
+ this.queryParam = {
|
|
|
+ beginDate: '',
|
|
|
+ endDate: '',
|
|
|
+ shelfSn: '',
|
|
|
+ productCode: undefined, // 产品编码
|
|
|
+ productName: undefined, // 产品名称
|
|
|
+ origCode: undefined, // 原厂编码
|
|
|
+ brandSn: undefined, // 产品品牌
|
|
|
+ productTypeSn1: undefined, // 产品一级分类
|
|
|
+ productTypeSn2: undefined, // 产品二级分类
|
|
|
+ productTypeSn3: undefined // 产品三级分类
|
|
|
+ }
|
|
|
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()
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ if (this.advanced) {
|
|
|
+ this.$refs.scanDate.resetDate()
|
|
|
+ }
|
|
|
},
|
|
|
// 导出
|
|
|
handleExport () {
|
|
@@ -246,11 +227,10 @@ export default {
|
|
|
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, '销售报表')
|
|
|
+ exportReport(params).then(res => {
|
|
|
+ downloadExcel(res, '适配产品统计报表')
|
|
|
_this.exportLoading = false
|
|
|
_this.spinning = false
|
|
|
})
|