|
@@ -9,7 +9,6 @@
|
|
|
class="form-model-con"
|
|
|
layout="inline"
|
|
|
:model="queryParam"
|
|
|
- :rules="rules"
|
|
|
@keyup.enter.native="handleSearch">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -71,88 +70,46 @@
|
|
|
bordered>
|
|
|
<template slot="footer">
|
|
|
<a-row :gutter="15">
|
|
|
- <a-col :md="4" :sm="24">采购数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
|
|
|
- <a-col :md="4" :sm="24">库存数量:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? totalData.totalRealAmount: '--' }}</a-col>
|
|
|
- <a-col :md="4" :sm="24">已售出数量:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ?totalData.totalAmount: '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24">采购数量:{{ (totalData && (totalData.buyAmount || totalData.buyAmount==0)) ? totalData.buyAmount : '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24">库存数量:{{ (totalData && (totalData.storeAmount || totalData.storeAmount==0)) ? totalData.storeAmount: '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24">已售出数量:{{ (totalData && (totalData.sellAmount || totalData.sellAmount==0)) ?totalData.sellAmount: '--' }}</a-col>
|
|
|
</a-row>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
|
- <!-- 导出提示框 -->
|
|
|
- <reportModal :visible="showExport" @close="showExport=false"></reportModal>
|
|
|
</a-card>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {
|
|
|
- commonMixin
|
|
|
-} from '@/utils/mixin'
|
|
|
+import { commonMixin } from '@/utils/mixin'
|
|
|
import getDate from '@/libs/getDate.js'
|
|
|
-import {
|
|
|
- STable,
|
|
|
- VSelect
|
|
|
-} from '@/components'
|
|
|
+import { STable } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import subarea from '@/views/common/subarea.js'
|
|
|
-import custList from '@/views/common/custList.vue'
|
|
|
-import reportModal from '@/views/common/reportModal.vue'
|
|
|
-import AreaList from '@/views/common/areaList.js'
|
|
|
import BizUser from '@/views/common/bizUser.js'
|
|
|
-import {
|
|
|
- hdExportExcel
|
|
|
-} from '@/libs/exportExcel'
|
|
|
-import {
|
|
|
- userQueryList
|
|
|
-} from '@/api/power-user'
|
|
|
-import {
|
|
|
- reportSalesBillList,
|
|
|
- reportSalesBillCount,
|
|
|
- reportSalesBillExport,
|
|
|
- querySaleAreaPage
|
|
|
-} from '@/api/reportData'
|
|
|
+import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
+import { reportSalesBillCount, reportSalesBillExport, querySaleAreaPage } from '@/api/reportData'
|
|
|
export default {
|
|
|
- name: 'SalesOrderTotalList',
|
|
|
+ name: 'TireSalesSubareaList',
|
|
|
mixins: [commonMixin],
|
|
|
- components: {
|
|
|
- STable,
|
|
|
- VSelect,
|
|
|
- rangeDate,
|
|
|
- custList,
|
|
|
- subarea,
|
|
|
- reportModal,
|
|
|
- AreaList,
|
|
|
- BizUser
|
|
|
- },
|
|
|
+ components: { STable, rangeDate, subarea, BizUser },
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
- advanced: true, // 高级搜索 展开/关闭
|
|
|
tableHeight: 0,
|
|
|
- showExport: false,
|
|
|
+ time: [
|
|
|
+ getDate.getThreeMonthDays().starttime,
|
|
|
+ getDate.getCurrMonthDays().endtime
|
|
|
+ ],
|
|
|
queryParam: { // 查询条件
|
|
|
- time: [
|
|
|
- getDate.getCurrMonthDays().starttime,
|
|
|
- getDate.getCurrMonthDays().endtime
|
|
|
- ],
|
|
|
- beginDate: getDate.getCurrMonthDays().starttime,
|
|
|
+ beginDate: getDate.getThreeMonthDays().starttime,
|
|
|
endDate: getDate.getCurrMonthDays().endtime,
|
|
|
- salesBillNo: '',
|
|
|
- dealerName: '',
|
|
|
- dealerLevel: undefined,
|
|
|
- operatorSn: undefined,
|
|
|
subareaArea: {
|
|
|
subareaSn: undefined,
|
|
|
subareaAreaSn: undefined
|
|
|
},
|
|
|
- dealerProvinceSn: undefined
|
|
|
- },
|
|
|
- rules: {
|
|
|
- 'time': [{
|
|
|
- required: true,
|
|
|
- message: '请选择销售日期',
|
|
|
- trigger: 'change'
|
|
|
- }]
|
|
|
+ bizUserSn: undefined
|
|
|
},
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
exportLoading: false,
|
|
@@ -165,7 +122,7 @@ export default {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
|
- this.getCount(params)
|
|
|
+ // 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
|
|
@@ -177,36 +134,19 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
totalData: null,
|
|
|
- operatorList: [], // 操作员下拉数据
|
|
|
- addrProvinceList: [], // 省下拉
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
- { title: '区域', dataIndex: 'createDate', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '分区', dataIndex: 'auditDate', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '区域负责人', dataIndex: 'giftQty1', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '采购数量', dataIndex: 'salesBillNo', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '库存数量', dataIndex: 'dealerName', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') }, ellipsis: true },
|
|
|
- { title: '已售出数量', dataIndex: 'dealerLevelDictValue', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
+ { title: '区域', dataIndex: 'subareaAreaName', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '分区', dataIndex: 'subareaName', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '采购数量', dataIndex: 'buyAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '库存数量', dataIndex: 'storeAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '已售出数量', dataIndex: 'sellAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
- watch: {
|
|
|
- advanced (newValue, oldValue) {
|
|
|
- const _this = this
|
|
|
- this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
- _this.setTableH()
|
|
|
- })
|
|
|
- },
|
|
|
- '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
- this.setTableH()
|
|
|
- }
|
|
|
- },
|
|
|
methods: {
|
|
|
- // 盘点库存日期
|
|
|
- handleStock () {
|
|
|
- this.$message.info('无盘点区间的起始/终止时间,请自行选择日期区间查询!')
|
|
|
- },
|
|
|
- // 总计
|
|
|
+ // 统计
|
|
|
getCount (params) {
|
|
|
reportSalesBillCount(params).then(res => {
|
|
|
if (res.status == 200 && res.data) {
|
|
@@ -217,54 +157,36 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
handleSearch () {
|
|
|
- const _this = this
|
|
|
- this.$refs.ruleForm.validate(valid => {
|
|
|
- if (valid) {
|
|
|
- _this.$refs.table.refresh(true)
|
|
|
- } else {
|
|
|
- _this.$message.error('请选择销售日期')
|
|
|
- return false
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- // 创建时间 change
|
|
|
+ // 下推时间 change
|
|
|
dateChange (date) {
|
|
|
if (date[0] && date[1]) {
|
|
|
- this.queryParam.time = date
|
|
|
+ this.time = date
|
|
|
} else {
|
|
|
- this.queryParam.time = []
|
|
|
+ this.time = []
|
|
|
}
|
|
|
this.queryParam.beginDate = date[0] || ''
|
|
|
this.queryParam.endDate = date[1] || ''
|
|
|
},
|
|
|
- custChange (val) {
|
|
|
- this.queryParam.dealerSn = val.key
|
|
|
- },
|
|
|
subareaChange (val) {
|
|
|
this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
|
|
|
this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
- this.queryParam.time = [
|
|
|
- getDate.getCurrMonthDays().starttime,
|
|
|
+ this.time = [
|
|
|
+ getDate.getThreeMonthDays().starttime,
|
|
|
getDate.getCurrMonthDays().endtime
|
|
|
]
|
|
|
- this.$refs.rangeDate.resetDate(this.queryParam.time)
|
|
|
- this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
|
|
|
+ this.$refs.rangeDate.resetDate(this.time)
|
|
|
+ this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
|
|
|
this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
|
- this.queryParam.salesBillNo = ''
|
|
|
- this.queryParam.dealerName = ''
|
|
|
- this.queryParam.dealerLevel = undefined
|
|
|
- this.queryParam.operatorSn = undefined
|
|
|
this.queryParam.subareaArea.subareaSn = undefined
|
|
|
this.queryParam.subareaArea.subareaAreaSn = undefined
|
|
|
- this.queryParam.dealerProvinceSn = undefined
|
|
|
+ this.queryParam.bizUserSn = undefined
|
|
|
this.totalData = null
|
|
|
- if (this.advanced) {
|
|
|
- this.$refs.subarea.clearData()
|
|
|
- }
|
|
|
- this.$refs.ruleForm.resetFields()
|
|
|
+ this.$refs.subarea.clearData()
|
|
|
this.$refs.table.clearTable()
|
|
|
},
|
|
|
// 导出
|
|
@@ -277,7 +199,7 @@ export default {
|
|
|
_this.showExport = true
|
|
|
_this.exportLoading = true
|
|
|
_this.spinning = true
|
|
|
- hdExportExcel(reportSalesBillExport, params, '销售(开单统计)报表', function () {
|
|
|
+ hdExportExcel(reportSalesBillExport, params, '轮胎销售报表(区域/分区)', function () {
|
|
|
_this.exportLoading = false
|
|
|
_this.spinning = false
|
|
|
_this.$store.state.app.curActionPermission = ''
|
|
@@ -287,24 +209,8 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- filterOption (input, option) {
|
|
|
- return (
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
- )
|
|
|
- },
|
|
|
- // 操作员
|
|
|
- getUserList () {
|
|
|
- userQueryList({}).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- this.operatorList = res.data
|
|
|
- } else {
|
|
|
- this.operatorList = []
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
|
- _this.getUserList()
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
_this.setTableH()
|
|
|
})
|