|
@@ -36,6 +36,16 @@
|
|
<BizUser v-model="queryParam.bizUserSn"></BizUser>
|
|
<BizUser v-model="queryParam.bizUserSn"></BizUser>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-model-item label="产品编码/原厂编码">
|
|
|
|
+ <a-input id="tireSalesDealerList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-model-item label="产品名称">
|
|
|
|
+ <a-input id="tireSalesDealerList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
</template>
|
|
</template>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-button
|
|
<a-button
|
|
@@ -56,7 +66,7 @@
|
|
@click="handleExport"
|
|
@click="handleExport"
|
|
:disabled="disabled"
|
|
:disabled="disabled"
|
|
:loading="exportLoading"
|
|
:loading="exportLoading"
|
|
- v-if="$hasPermissions('B_tireSalesDealerReportExport')"
|
|
|
|
|
|
+ v-if="$hasPermissions('B_tireSalesReportExport')"
|
|
id="tireSalesDealerList-export">导出</a-button>
|
|
id="tireSalesDealerList-export">导出</a-button>
|
|
<a @click="advanced=!advanced" style="margin-left: 5px">
|
|
<a @click="advanced=!advanced" style="margin-left: 5px">
|
|
{{ advanced ? '收起' : '展开' }}
|
|
{{ advanced ? '收起' : '展开' }}
|
|
@@ -88,14 +98,16 @@
|
|
<template slot="footer">
|
|
<template slot="footer">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="4" :sm="24">订货数量:{{ (totalData && (totalData.totalbuyAmount || totalData.totalbuyAmount==0)) ? totalData.totalbuyAmount : '--' }}</a-col>
|
|
<a-col :md="4" :sm="24">订货数量:{{ (totalData && (totalData.totalbuyAmount || totalData.totalbuyAmount==0)) ? totalData.totalbuyAmount : '--' }}</a-col>
|
|
- <a-col :md="4" :sm="24">订货金额:{{ (totalData && (totalData.totalstoreAmount || totalData.totalstoreAmount==0)) ? toThousands(totalData.totalstoreAmount): '--' }}</a-col>
|
|
|
|
- <a-col :md="4" :sm="24">库存数量:{{ (totalData && (totalData.totalsellAmount || totalData.totalsellAmount==0)) ?totalData.totalsellAmount: '--' }}</a-col>
|
|
|
|
|
|
+ <a-col :md="4" :sm="24">订货金额:{{ (totalData && (totalData.totalbuyPriceAmount || totalData.totalbuyPriceAmount==0)) ? toThousands(totalData.totalbuyPriceAmount): '--' }}</a-col>
|
|
|
|
+ <a-col :md="4" :sm="24">库存数量:{{ (totalData && (totalData.totalstoreAmount || totalData.totalstoreAmount==0)) ?totalData.totalstoreAmount: '--' }}</a-col>
|
|
<a-col :md="4" :sm="24">已绑质保单数量:{{ (totalData && (totalData.totalwarrantyAmount || totalData.totalwarrantyAmount==0)) ?totalData.totalwarrantyAmount: '--' }}</a-col>
|
|
<a-col :md="4" :sm="24">已绑质保单数量:{{ (totalData && (totalData.totalwarrantyAmount || totalData.totalwarrantyAmount==0)) ?totalData.totalwarrantyAmount: '--' }}</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
</a-spin>
|
|
</a-spin>
|
|
</a-card>
|
|
</a-card>
|
|
|
|
+ <!-- 导出提示框 -->
|
|
|
|
+ <reportModal :visible="showExport" @close="showExport=false"></reportModal>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -107,13 +119,14 @@ import rangeDate from '@/views/common/rangeDate.vue'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import AreaList from '@/views/common/areaList.js'
|
|
import AreaList from '@/views/common/areaList.js'
|
|
import BizUser from '@/views/common/bizUser.js'
|
|
import BizUser from '@/views/common/bizUser.js'
|
|
|
|
+import reportModal from '@/views/common/reportModal.vue'
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
-import { querySaleDealercount, excelSaleOnlineExport, querybyDealerList } from '@/api/reportData'
|
|
|
|
|
|
+import { queryTireList, queryTireCount, excelTireOnlineExport } from '@/api/reportData'
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
export default {
|
|
export default {
|
|
name: 'TireSalesDealerList',
|
|
name: 'TireSalesDealerList',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
- components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList },
|
|
|
|
|
|
+ components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
|
|
data () {
|
|
data () {
|
|
const _this = this
|
|
const _this = this
|
|
return {
|
|
return {
|
|
@@ -134,16 +147,19 @@ export default {
|
|
dealerSn: '',
|
|
dealerSn: '',
|
|
subareaSn: undefined,
|
|
subareaSn: undefined,
|
|
subareaAreaSn: undefined,
|
|
subareaAreaSn: undefined,
|
|
- bizUserSn: undefined
|
|
|
|
|
|
+ bizUserSn: undefined,
|
|
|
|
+ queryWord: '', // 产品编码
|
|
|
|
+ productName: ''// 产品名称
|
|
},
|
|
},
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
exportLoading: false,
|
|
exportLoading: false,
|
|
|
|
+ showExport: false,
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
- return querybyDealerList(params).then(res => {
|
|
|
|
|
|
+ return queryTireList(params).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
@@ -168,12 +184,12 @@ export default {
|
|
{ title: '客户名称', dataIndex: 'dealerName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '客户名称', dataIndex: 'dealerName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '商户类型', dataIndex: 'dealerTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '商户类型', dataIndex: 'dealerTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '产品编码', dataIndex: 'buyAmount', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '原厂编码', dataIndex: 'storeAmount', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品名称', dataIndex: 'sellAmount', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '订货数量', dataIndex: 'sellAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '订货金额', dataIndex: 'sellAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '客户现有库存数量', dataIndex: 'sellAmount', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '原厂编码', dataIndex: 'productOrgiCode', 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: 'buyAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '订货金额', dataIndex: 'buyPriceAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ { title: '客户现有库存数量', dataIndex: 'storeAmount', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '已绑质保单数量', dataIndex: 'warrantyAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
{ title: '已绑质保单数量', dataIndex: 'warrantyAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
]
|
|
]
|
|
}
|
|
}
|
|
@@ -196,7 +212,7 @@ export default {
|
|
},
|
|
},
|
|
// 统计
|
|
// 统计
|
|
getCount (params) {
|
|
getCount (params) {
|
|
- querySaleDealercount(params).then(res => {
|
|
|
|
|
|
+ queryTireCount(params).then(res => {
|
|
if (res.status == 200 && res.data) {
|
|
if (res.status == 200 && res.data) {
|
|
this.totalData = res.data
|
|
this.totalData = res.data
|
|
} else {
|
|
} else {
|
|
@@ -241,6 +257,8 @@ export default {
|
|
this.queryParam.subareaSn = undefined
|
|
this.queryParam.subareaSn = undefined
|
|
this.queryParam.subareaAreaSn = undefined
|
|
this.queryParam.subareaAreaSn = undefined
|
|
this.queryParam.bizUserSn = undefined
|
|
this.queryParam.bizUserSn = undefined
|
|
|
|
+ this.queryParam.queryWord = undefined
|
|
|
|
+ this.queryParam.productName = undefined
|
|
this.totalData = null
|
|
this.totalData = null
|
|
this.$refs.areaList.clearData()
|
|
this.$refs.areaList.clearData()
|
|
if (this.advanced) {
|
|
if (this.advanced) {
|
|
@@ -255,8 +273,10 @@ export default {
|
|
const params = _this.queryParam
|
|
const params = _this.queryParam
|
|
_this.exportLoading = true
|
|
_this.exportLoading = true
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
- hdExportExcel(excelSaleOnlineExport, params, '轮胎销售报表(客户)', function () {
|
|
|
|
|
|
+ _this.showExport = true
|
|
|
|
+ hdExportExcel(excelTireOnlineExport, params, '轮胎统计报表', function () {
|
|
_this.exportLoading = false
|
|
_this.exportLoading = false
|
|
|
|
+ _this.showExport = false
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -269,7 +289,7 @@ export default {
|
|
},
|
|
},
|
|
setTableH () {
|
|
setTableH () {
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
- this.tableHeight = window.innerHeight - tableSearchH - 245
|
|
|
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 198
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|