|
@@ -11,7 +11,7 @@
|
|
:model="queryParam">
|
|
:model="queryParam">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-model-item label="下推时间">
|
|
+ <a-form-model-item label="出库时间">
|
|
<rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
<rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
@@ -28,11 +28,7 @@
|
|
<template v-if="advanced">
|
|
<template v-if="advanced">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-model-item label="客户名称">
|
|
<a-form-model-item label="客户名称">
|
|
- <a-input
|
|
+ <dealerSubareaScopeList ref="dealerSubareaScopeList" id="tireSalesDealerList-dealerName" @change="custChange" />
|
|
- id="tireSalesDealerList-dealerName"
|
|
|
|
- v-model.trim="queryParam.dealerName"
|
|
|
|
- allowClear
|
|
|
|
- placeholder="请输入客户名称" />
|
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
@@ -40,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
|
|
@@ -53,6 +59,7 @@
|
|
@click="resetSearchForm"
|
|
@click="resetSearchForm"
|
|
:disabled="disabled"
|
|
:disabled="disabled"
|
|
id="tireSalesDealerList-reset">重置</a-button>
|
|
id="tireSalesDealerList-reset">重置</a-button>
|
|
|
|
+ <!-- v-if="$hasPermissions('B_tireSalesReportExport')" -->
|
|
<a-button
|
|
<a-button
|
|
style="margin-left: 10px"
|
|
style="margin-left: 10px"
|
|
type="primary"
|
|
type="primary"
|
|
@@ -60,7 +67,7 @@
|
|
@click="handleExport"
|
|
@click="handleExport"
|
|
:disabled="disabled"
|
|
:disabled="disabled"
|
|
:loading="exportLoading"
|
|
:loading="exportLoading"
|
|
- v-if="$hasPermissions('B_tireSalesDealerReportExport')"
|
|
+
|
|
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 ? '收起' : '展开' }}
|
|
@@ -78,9 +85,9 @@
|
|
class="sTable fixPagination"
|
|
class="sTable fixPagination"
|
|
ref="table"
|
|
ref="table"
|
|
size="small"
|
|
size="small"
|
|
- :rowKey="(record) => record.salesBillNo"
|
|
+ :rowKey="(record) => record.no"
|
|
:style="{ height: tableHeight+70+'px' }"
|
|
:style="{ height: tableHeight+70+'px' }"
|
|
- rowKeyName="salesBillNo"
|
|
+ rowKeyName="no"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
:scroll="{ y: tableHeight-30 }"
|
|
:scroll="{ y: tableHeight-30 }"
|
|
@@ -91,15 +98,17 @@
|
|
</template>
|
|
</template>
|
|
<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)) ? totalData.totalstoreAmount: '--' }}</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.totalsellAmount || totalData.totalsellAmount==0)) ?totalData.totalsellAmount: '--' }}</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>
|
|
|
|
|
|
@@ -111,13 +120,16 @@ 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, celTireOnlineExport } from '@/api/reportData'
|
|
|
|
+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 },
|
|
+ components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
|
|
data () {
|
|
data () {
|
|
|
|
+ const _this = this
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
@@ -133,18 +145,22 @@ export default {
|
|
citySn: undefined,
|
|
citySn: undefined,
|
|
districtSn: undefined,
|
|
districtSn: undefined,
|
|
dealerName: '',
|
|
dealerName: '',
|
|
|
|
+ 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
|
|
@@ -166,13 +182,16 @@ export default {
|
|
{ title: '区域', dataIndex: 'subareaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '区域', dataIndex: 'subareaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '分区', dataIndex: 'subareaAreaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '分区', dataIndex: 'subareaAreaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
- { title: '客户名称', dataIndex: 'dealerName', width: '16%', 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: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
+ { title: '商户类型', dataIndex: 'dealerTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '商户级别', dataIndex: 'dealerLevelDictValue ', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
+ { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '采购数量', dataIndex: 'buyAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
+ { title: '产品编码', dataIndex: 'productcode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '库存数量', dataIndex: 'storeAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
+ { title: '原厂编码', dataIndex: 'storeAmount', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '售出数量', dataIndex: 'sellAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
+ { title: '产品名称', dataIndex: 'productname', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
- { title: '已绑质保单数量', dataIndex: 'warrantyAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
+ { title: '订货数量', dataIndex: 'storeAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '订货金额', dataIndex: 'storeAmount', 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: 'warrantyAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
]
|
|
]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -188,9 +207,13 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ custChange (val) {
|
|
|
|
+ this.queryParam.dealerName = val.name
|
|
|
|
+ this.queryParam.dealerSn = val.key
|
|
|
|
+ },
|
|
// 统计
|
|
// 统计
|
|
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 {
|
|
@@ -214,9 +237,6 @@ export default {
|
|
this.queryParam.beginDate = date[0] || ''
|
|
this.queryParam.beginDate = date[0] || ''
|
|
this.queryParam.endDate = date[1] || ''
|
|
this.queryParam.endDate = date[1] || ''
|
|
},
|
|
},
|
|
- custChange (val) {
|
|
|
|
- this.queryParam.dealerSn = val.key
|
|
|
|
- },
|
|
|
|
subareaChange (val) {
|
|
subareaChange (val) {
|
|
this.queryParam.subareaSn = val[0] ? val[0] : undefined
|
|
this.queryParam.subareaSn = val[0] ? val[0] : undefined
|
|
this.queryParam.subareaAreaSn = val[1] ? val[1] : undefined
|
|
this.queryParam.subareaAreaSn = val[1] ? val[1] : undefined
|
|
@@ -234,13 +254,17 @@ export default {
|
|
this.queryParam.citySn = undefined
|
|
this.queryParam.citySn = undefined
|
|
this.queryParam.districtSn = undefined
|
|
this.queryParam.districtSn = undefined
|
|
this.queryParam.dealerName = ''
|
|
this.queryParam.dealerName = ''
|
|
|
|
+ this.queryParam.dealerSn = ''
|
|
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()
|
|
if (this.advanced) {
|
|
if (this.advanced) {
|
|
|
|
+ this.$refs.dealerSubareaScopeList.resetForm()
|
|
this.$refs.subarea.clearData()
|
|
this.$refs.subarea.clearData()
|
|
- this.$refs.areaList.clearData()
|
|
|
|
}
|
|
}
|
|
this.$refs.table.clearTable()
|
|
this.$refs.table.clearTable()
|
|
},
|
|
},
|
|
@@ -250,8 +274,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(celTireOnlineExport, params, '轮胎统计报表', function () {
|
|
_this.exportLoading = false
|
|
_this.exportLoading = false
|
|
|
|
+ _this.showExport = false
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
})
|
|
})
|
|
},
|
|
},
|