10 changed files with 1593 additions and 0 deletions
@ -0,0 +1,30 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export default { |
|||
// 查询分页列表-- 分公司日报表 -- 详细
|
|||
listByBranch: function(params) { |
|||
return request({ |
|||
url: '/reportcenter/v1/DailyReport/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 查询分页列表-- 分公司日报表 -- 统计
|
|||
listByBranch1: function(params) { |
|||
return request({ |
|||
url: '/reportcenter/v1/DailyReport/listPage_1', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 分公司日报表--获取动态列
|
|||
selectListByUseOrgSid: function(params) { |
|||
return request({ |
|||
url: '/reportcenter/v1/DailyReport/selectListByUseOrgSid', |
|||
method: 'get', |
|||
params: params |
|||
}) |
|||
} |
|||
} |
@ -0,0 +1,22 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export default { |
|||
// 查询分页列表-- 事业部日报表 -- 详细
|
|||
listByBusiness: function(params) { |
|||
return request({ |
|||
url: '/reportcenter/v1/DailyReport/listPage2', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 查询分页列表-- 事业部日报表 -- 统计
|
|||
listByBusiness2: function(params) { |
|||
return request({ |
|||
url: '/reportcenter/v1/DailyReport/listPage2_1', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
} |
|||
} |
@ -0,0 +1,22 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export default { |
|||
// 查询分页列表-- 集团日报表--详细
|
|||
listByGroup: function(params) { |
|||
return request({ |
|||
url: '/reportcenter/v1/DailyReport/listPage3', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 查询分页列表-- 集团--统计
|
|||
listByGroup3: function(params) { |
|||
return request({ |
|||
url: '/reportcenter/v1/DailyReport/listPage3_1', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
} |
|||
} |
@ -0,0 +1,204 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--列表页面--> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="日报表列表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<!--Start查询列表部分--> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header"> |
|||
<el-form-item label="生成日期"> |
|||
<el-date-picker v-model="listQuery.params.startTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.endTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<div class="listtop"> |
|||
<div class="tit">日报表列表</div> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;"> |
|||
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/> |
|||
<el-table-column fixed label="操作" align="center" width="80"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="lookBranch(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="date" label="日期" align="center"/> |
|||
<el-table-column prop="saleOfStockRatio" label="存销比" align="center"/> |
|||
<el-table-column prop="stock_subtotal" label="库存小计" align="center"/> |
|||
<el-table-column prop="pcOrder_subtotal" label="排产小计" align="center"/> |
|||
<el-table-column prop="saleOrder_subtotal_day" label="本日销售订单" align="center"/> |
|||
<el-table-column prop="sale_subtotal_day" label="本日销售" align="center"/> |
|||
<el-table-column prop="buyout_day" label="本日买断" align="center"/> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
</div> |
|||
</div> |
|||
<!-- 查看详细分公司日报表 --> |
|||
<branchofficestatistics v-show="viewState == 2" ref="divBranch" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import { getOrgSidByPath } from '@/api/Common/dictcommons' |
|||
import req from '@/api/branchofficestatistics/branchofficestatistics' |
|||
import branchofficestatistics from './branchofficestatistics' |
|||
|
|||
export default { |
|||
name: 'BranchOfficeDailyReport', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar, |
|||
branchofficestatistics |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], // 用于导出的时候保存已选择的SIDs |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
endTime: '', |
|||
orgPath: '', |
|||
startTime: '', |
|||
todayDate: '', |
|||
useOrgSid: '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.init() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
init() { |
|||
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
|||
if (res.success) { |
|||
this.listQuery.params.useOrgSid = res.data |
|||
this.getList() |
|||
} |
|||
}) |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
req.listByBranch1(this.listQuery).then(response => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
endTime: '', |
|||
orgPath: '', |
|||
startTime: '', |
|||
todayDate: '', |
|||
useOrgSid: '' |
|||
} |
|||
} |
|||
this.init() |
|||
}, |
|||
lookBranch(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divBranch'].init(row, this.listQuery.params.useOrgSid) |
|||
}, |
|||
// 修改、编辑、详情返回列表页面 |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,304 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--列表页面--> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="分公司日报表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<!--Start查询列表部分--> |
|||
<div class="main-content"> |
|||
<!-- <div class="searchcon">--> |
|||
<!-- <el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}--> |
|||
<!-- </el-button>--> |
|||
<!-- <div v-show="isSearchShow" class="search">--> |
|||
<!-- <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header">--> |
|||
<!-- <el-form-item label="生成日期">--> |
|||
<!-- <el-date-picker v-model="listQuery.params.startTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>--> |
|||
<!-- <span style="padding: 0 8px">至</span>--> |
|||
<!-- <el-date-picker v-model="listQuery.params.endTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>--> |
|||
<!-- </el-form-item>--> |
|||
<!-- </el-form>--> |
|||
<!-- <div class="btn" style="text-align: center;">--> |
|||
<!-- <el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询--> |
|||
<!-- </el-button>--> |
|||
<!-- <el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置--> |
|||
<!-- </el-button>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!--End查询列表部分--> |
|||
<div class="listtop"> |
|||
<div class="tit">分公司日报表</div> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange" :span-method="rowspanMethod"> |
|||
<el-table-column prop="useOrgName" label="分公司" width="120" align="center"></el-table-column> |
|||
<el-table-column prop="brandName" label="品牌" width="120" align="center"></el-table-column> |
|||
<el-table-column prop="vehModeName" label="车型" width="250" align="center"></el-table-column> |
|||
<el-table-column prop="carColor" label="颜色" width="120" align="center"></el-table-column> |
|||
<el-table-column v-for="(item, index) in title_list" :key="index" :label="item.colText" :prop="item.colName" width="120" align="center"></el-table-column> |
|||
<el-table-column prop="saleOfStockRatio" label="存销比" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="stock_total" label="库存总计" width="100" align="center"></el-table-column> |
|||
<el-table-column label="库存" width="120" align="center"> |
|||
<el-table-column prop="stock_unreserve" label="未定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="stock_reserve" label="已定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="stock_subtotal" label="小计" width="80" align="center"></el-table-column> |
|||
<el-table-column label="其中已买断" width="120" align="center"> |
|||
<el-table-column prop="stock_buyout_unreserve" label="未定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="stock_buyout_reserve" label="已定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="stock_buyout_subtotal" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="排产" width="120" align="center"> |
|||
<el-table-column prop="pcOrder_unreserve" label="未定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="pcOrder_reserve" label="已定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="pcOrder_subtotal" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="订车" width="120" align="center"> |
|||
<el-table-column label="简易订单" width="120" align="center"> |
|||
<el-table-column prop="simpleOrder_day" label="本日" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="simpleOrder_month" label="本月" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="本日销售订单" width="120" align="center"> |
|||
<el-table-column prop="saleOrder_loan_day" label="贷款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="saleOrder_full_day" label="全款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="saleOrder_subtotal_day" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="本月销售订单" width="120" align="center"> |
|||
<el-table-column prop="saleOrder_loan_month" label="贷款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="saleOrder_full_month" label="全款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="saleOrder_subtotal_month" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
</el-table-column> |
|||
<el-table-column prop="saleOrder_waitVeh_total" label="待交车累计总订单" width="140" align="center"></el-table-column> |
|||
<el-table-column label="销售" width="120" align="center"> |
|||
<el-table-column label="本日销售" width="120" align="center"> |
|||
<el-table-column prop="sale_loan_day" label="贷款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_full_day" label="全款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_subtotal_day" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="本月销售" width="120" align="center"> |
|||
<el-table-column prop="sale_loan_month" label="贷款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_full_month" label="全款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_subtotal_month" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="全年销售" width="120" align="center"> |
|||
<el-table-column prop="sale_loan_year" label="贷款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_full_year" label="全款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_subtotal_year" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
</el-table-column> |
|||
<el-table-column prop="manufacturer_invoicing_year" label="全年厂家开票数" width="120" align="center"></el-table-column> |
|||
<el-table-column label="买断" width="120" align="center"> |
|||
<el-table-column prop="buyout_day" label="本日" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="buyout_month" label="本月" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="buyout_year" label="本年" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="欠款出库" width="120" align="center"> |
|||
<el-table-column prop="arrears_carry_veh_count" label="数量" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="arrears_carry_veh_amount" label="金额(万元)" width="100" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="金融未放款" width="120" align="center"> |
|||
<el-table-column prop="loan_not_count" label="数量" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="loan_not_amount" label="金额(万元)" width="100" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column prop="remarks" label="备注" width="120" align="center"></el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import req from '@/api/branchofficestatistics/branchofficestatistics' |
|||
|
|||
export default { |
|||
name: 'BranchOfficeStatistics', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], |
|||
title_list: [], |
|||
multipleSelection: [], |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
useOrgSid: '', |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 5, |
|||
total: 0, |
|||
params: { |
|||
endTime: '', |
|||
orgPath: '', |
|||
startTime: '', |
|||
todayDate: '', |
|||
useOrgSid: '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
// 分公司日报表 -- 统计页面调用 |
|||
init(row, useOrgSid) { |
|||
this.listQuery.params.todayDate = row.date |
|||
this.listQuery.params.useOrgSid = useOrgSid |
|||
req.selectListByUseOrgSid({ useOrgSid: useOrgSid }).then((res) => { |
|||
if (res.success) { |
|||
this.title_list = res.data |
|||
} |
|||
}) |
|||
this.getList() |
|||
}, |
|||
// 分公司日报表 -- 详细页面调用 |
|||
branchInit(date, useOrgSid) { |
|||
this.listQuery.params.todayDate = date |
|||
this.listQuery.params.useOrgSid = useOrgSid |
|||
req.selectListByUseOrgSid({ useOrgSid: useOrgSid }).then((res) => { |
|||
if (res.success) { |
|||
this.title_list = res.data |
|||
} |
|||
}) |
|||
this.getList() |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 信息条数 获取点击时当前的sid |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
this.multipleSelection = row |
|||
row.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
// 合并单元格 |
|||
rowspanMethod({ row, column, rowIndex, columnIndex }) { |
|||
if (columnIndex === 0 || columnIndex === 1) { // 定位到需要合并的列 |
|||
// 获取当前单元格的值 |
|||
const currentValue = row[column.property] |
|||
// 获取上一行相同列的值 |
|||
const preRow = this.list[rowIndex - 1] |
|||
const preValue = preRow ? preRow[column.property] : null |
|||
// 如果当前值和上一行的值相同,则将当前单元格隐藏 |
|||
if (currentValue === preValue) { |
|||
return { rowspan: 0, colspan: 0 } |
|||
} else { |
|||
// 否则计算当前单元格应该跨越多少行 |
|||
let rowspan = 1 |
|||
for (let i = rowIndex + 1; i < this.list.length; i++) { |
|||
const nextRow = this.list[i] |
|||
const nextValue = nextRow[column.property] |
|||
if (nextValue === currentValue) { |
|||
rowspan++ |
|||
} else { |
|||
break |
|||
} |
|||
} |
|||
return { rowspan, colspan: 1 } |
|||
} |
|||
} |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
req.listByBranch(this.listQuery).then(response => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
endTime: '', |
|||
orgPath: '', |
|||
startTime: '', |
|||
todayDate: '', |
|||
useOrgSid: '' |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
// 修改、编辑、详情返回列表页面 |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,196 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--列表页面--> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="日报表列表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<!--Start查询列表部分--> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header"> |
|||
<el-form-item label="生成日期"> |
|||
<el-date-picker v-model="listQuery.params.startTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.endTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<div class="listtop"> |
|||
<div class="tit">日报表列表</div> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;"> |
|||
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/> |
|||
<el-table-column fixed label="操作" align="center" width="80"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="lookBusiness(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="date" label="日期" align="center"/> |
|||
<el-table-column prop="saleOfStockRatio" label="存销比" align="center"/> |
|||
<el-table-column prop="stock_subtotal" label="库存小计" align="center"/> |
|||
<el-table-column prop="pcOrder_subtotal" label="排产小计" align="center"/> |
|||
<el-table-column prop="saleOrder_subtotal_day" label="本日销售订单" align="center"/> |
|||
<el-table-column prop="sale_subtotal_day" label="本日销售" align="center"/> |
|||
<el-table-column prop="buyout_day" label="本日买断" align="center"/> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
</div> |
|||
</div> |
|||
<!-- 查看详情事业部日报表 --> |
|||
<businessdivisionstatistics v-show="viewState == 2" ref="divBusiness" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import req from '@/api/businessdivisionstatistics/businessdivisionstatistics' |
|||
import businessdivisionstatistics from './businessdivisionstatistics' |
|||
|
|||
export default { |
|||
name: 'BusinessDivisionDailyReport', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar, |
|||
businessdivisionstatistics |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], // 用于导出的时候保存已选择的SIDs |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
endTime: '', |
|||
orgPath: '', |
|||
startTime: '', |
|||
todayDate: '', |
|||
useOrgSid: '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.getList() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
req.listByBusiness2(this.listQuery).then(response => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
endTime: '', |
|||
orgPath: '', |
|||
startTime: '', |
|||
todayDate: '', |
|||
useOrgSid: '' |
|||
} |
|||
} |
|||
this.init() |
|||
}, |
|||
lookBusiness(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divBusiness'].init(row) |
|||
}, |
|||
// 修改、编辑、详情返回列表页面 |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,302 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--列表页面--> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="事业部日报表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<!--Start查询列表部分--> |
|||
<div class="main-content"> |
|||
<!-- <div class="searchcon">--> |
|||
<!-- <el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}--> |
|||
<!-- </el-button>--> |
|||
<!-- <div v-show="isSearchShow" class="search">--> |
|||
<!-- <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header">--> |
|||
<!-- <el-form-item label="生成日期">--> |
|||
<!-- <el-date-picker v-model="listQuery.params.startTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>--> |
|||
<!-- <span style="padding: 0 8px">至</span>--> |
|||
<!-- <el-date-picker v-model="listQuery.params.endTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>--> |
|||
<!-- </el-form-item>--> |
|||
<!-- </el-form>--> |
|||
<!-- <div class="btn" style="text-align: center;">--> |
|||
<!-- <el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询--> |
|||
<!-- </el-button>--> |
|||
<!-- <el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置--> |
|||
<!-- </el-button>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!--End查询列表部分--> |
|||
<div class="listtop"> |
|||
<div class="tit">事业部日报表</div> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange" :span-method="rowspanMethod"> |
|||
<el-table-column prop="busOrgName" label="事业部" width="120" align="center"></el-table-column> |
|||
<el-table-column label="分公司" width="120" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span class="bluezi" @click="lookBranch(scope.row)">{{ scope.row.useOrgName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="brandName" label="品牌" width="120" align="center"></el-table-column> |
|||
<el-table-column prop="fuelTypeValue" label="燃料" width="120" align="center"></el-table-column> |
|||
<el-table-column prop="emissionStandardValue" label="排放标准" width="120" align="center"></el-table-column> |
|||
<el-table-column prop="saleOfStockRatio" label="存销比" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="stock_total" label="库存总计" width="100" align="center"></el-table-column> |
|||
<el-table-column label="库存" width="120" align="center"> |
|||
<el-table-column prop="stock_unreserve" label="未定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="stock_reserve" label="已定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="stock_subtotal" label="小计" width="80" align="center"></el-table-column> |
|||
<el-table-column label="其中已买断" width="120" align="center"> |
|||
<el-table-column prop="stock_buyout_unreserve" label="未定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="stock_buyout_reserve" label="已定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="stock_buyout_subtotal" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="排产" width="120" align="center"> |
|||
<el-table-column prop="pcOrder_unreserve" label="未定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="pcOrder_reserve" label="已定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="pcOrder_subtotal" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="订车" width="120" align="center"> |
|||
<el-table-column label="简易订单" width="120" align="center"> |
|||
<el-table-column prop="simpleOrder_day" label="本日" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="simpleOrder_month" label="本月" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="本日销售订单" width="120" align="center"> |
|||
<el-table-column prop="saleOrder_loan_day" label="贷款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="saleOrder_full_day" label="全款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="saleOrder_subtotal_day" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="本月销售订单" width="120" align="center"> |
|||
<el-table-column prop="saleOrder_loan_month" label="贷款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="saleOrder_full_month" label="全款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="saleOrder_subtotal_month" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
</el-table-column> |
|||
<el-table-column prop="saleOrder_waitVeh_total" label="待交车累计总订单" width="140" align="center"></el-table-column> |
|||
<el-table-column label="销售" width="120" align="center"> |
|||
<el-table-column label="本日销售" width="120" align="center"> |
|||
<el-table-column prop="sale_loan_day" label="贷款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_full_day" label="全款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_subtotal_day" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="本月销售" width="120" align="center"> |
|||
<el-table-column prop="sale_loan_month" label="贷款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_full_month" label="全款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_subtotal_month" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="全年销售" width="120" align="center"> |
|||
<el-table-column prop="sale_loan_year" label="贷款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_full_year" label="全款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_subtotal_year" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
</el-table-column> |
|||
<el-table-column prop="manufacturer_invoicing_year" label="全年厂家开票数" width="120" align="center"></el-table-column> |
|||
<el-table-column label="买断" width="120" align="center"> |
|||
<el-table-column prop="buyout_day" label="本日" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="buyout_month" label="本月" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="buyout_year" label="本年" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="欠款出库" width="120" align="center"> |
|||
<el-table-column prop="arrears_carry_veh_count" label="数量" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="arrears_carry_veh_amount" label="金额(万元)" width="100" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="金融未放款" width="120" align="center"> |
|||
<el-table-column prop="loan_not_count" label="数量" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="loan_not_amount" label="金额(万元)" width="100" align="center"></el-table-column> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
</div> |
|||
</div> |
|||
<branchofficestatistics v-show="viewState == 2" ref="divBranch" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import req from '@/api/businessdivisionstatistics/businessdivisionstatistics' |
|||
import branchofficestatistics from '../branchofficestatistics/branchofficestatistics' |
|||
|
|||
export default { |
|||
name: 'BusinessDivisionStatistics', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar, |
|||
branchofficestatistics |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], |
|||
multipleSelection: [], |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 5, |
|||
total: 0, |
|||
params: { |
|||
endTime: '', |
|||
orgPath: '', |
|||
startTime: '', |
|||
todayDate: '', |
|||
useOrgSid: '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
// 事业部日报表 -- 统计页面调用 |
|||
init(row) { |
|||
this.listQuery.params.todayDate = row.date |
|||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.getList() |
|||
}, |
|||
// 集团日报表 -- 详细页面调用 |
|||
groupInit(date, orgPath) { |
|||
this.listQuery.params.todayDate = date |
|||
this.listQuery.params.orgPath = orgPath |
|||
this.getList() |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 信息条数 获取点击时当前的sid |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
this.multipleSelection = row |
|||
row.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
// 合并单元格 |
|||
rowspanMethod({ row, column, rowIndex, columnIndex }) { |
|||
if (columnIndex === 0 || columnIndex === 1 || columnIndex === 2) { // 定位到需要合并的列 |
|||
// 获取当前单元格的值 |
|||
const currentValue = row[column.property] |
|||
// 获取上一行相同列的值 |
|||
const preRow = this.list[rowIndex - 1] |
|||
const preValue = preRow ? preRow[column.property] : null |
|||
// 如果当前值和上一行的值相同,则将当前单元格隐藏 |
|||
if (currentValue === preValue) { |
|||
return { rowspan: 0, colspan: 0 } |
|||
} else { |
|||
// 否则计算当前单元格应该跨越多少行 |
|||
let rowspan = 1 |
|||
for (let i = rowIndex + 1; i < this.list.length; i++) { |
|||
const nextRow = this.list[i] |
|||
const nextValue = nextRow[column.property] |
|||
if (nextValue === currentValue) { |
|||
rowspan++ |
|||
} else { |
|||
break |
|||
} |
|||
} |
|||
return { rowspan, colspan: 1 } |
|||
} |
|||
} |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
req.listByBusiness(this.listQuery).then(response => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
endTime: '', |
|||
orgPath: '', |
|||
startTime: '', |
|||
todayDate: '', |
|||
useOrgSid: '' |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
lookBranch(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divBranch'].branchInit(this.listQuery.params.todayDate, row.useOrgSid) |
|||
}, |
|||
// 修改、编辑、详情返回列表页面 |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,196 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--列表页面--> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="日报表列表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<!--Start查询列表部分--> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header"> |
|||
<el-form-item label="生成日期"> |
|||
<el-date-picker v-model="listQuery.params.startTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.endTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<div class="listtop"> |
|||
<div class="tit">日报表列表</div> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;"> |
|||
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/> |
|||
<el-table-column fixed label="操作" align="center" width="80"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="lookGroup(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="date" label="日期" align="center"/> |
|||
<el-table-column prop="saleOfStockRatio" label="存销比" align="center"/> |
|||
<el-table-column prop="stock_subtotal" label="库存小计" align="center"/> |
|||
<el-table-column prop="pcOrder_subtotal" label="排产小计" align="center"/> |
|||
<el-table-column prop="saleOrder_subtotal_day" label="本日销售订单" align="center"/> |
|||
<el-table-column prop="sale_subtotal_day" label="本日销售" align="center"/> |
|||
<el-table-column prop="arrears_carry_veh_amount" label="欠款出库金额" align="center"/> |
|||
<el-table-column prop="loan_not_amount" label="金融未放款金额" align="center"/> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
</div> |
|||
</div> |
|||
<!--查看详细集团日报表--> |
|||
<groupstatistics v-show="viewState == 2" ref="divGroup" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import req from '@/api/groupstatistics/groupstatistics' |
|||
import groupstatistics from './groupstatistics' |
|||
|
|||
export default { |
|||
name: 'GroupDailyReport', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar, |
|||
groupstatistics |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], // 用于导出的时候保存已选择的SIDs |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
endTime: '', |
|||
orgPath: '', |
|||
startTime: '', |
|||
todayDate: '', |
|||
useOrgSid: '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.getList() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
req.listByGroup3(this.listQuery).then(response => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
endTime: '', |
|||
orgPath: '', |
|||
startTime: '', |
|||
todayDate: '', |
|||
useOrgSid: '' |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
lookGroup(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divGroup'].init(row) |
|||
}, |
|||
// 修改、编辑、详情返回列表页面 |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,289 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--列表页面--> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="集团日报表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<!--Start查询列表部分--> |
|||
<div class="main-content"> |
|||
<!-- <div class="searchcon">--> |
|||
<!-- <el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}--> |
|||
<!-- </el-button>--> |
|||
<!-- <div v-show="isSearchShow" class="search">--> |
|||
<!-- <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header">--> |
|||
<!-- <el-form-item label="生成日期">--> |
|||
<!-- <el-date-picker v-model="listQuery.params.startTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>--> |
|||
<!-- <span style="padding: 0 8px">至</span>--> |
|||
<!-- <el-date-picker v-model="listQuery.params.endTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>--> |
|||
<!-- </el-form-item>--> |
|||
<!-- </el-form>--> |
|||
<!-- <div class="btn" style="text-align: center;">--> |
|||
<!-- <el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询--> |
|||
<!-- </el-button>--> |
|||
<!-- <el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置--> |
|||
<!-- </el-button>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!--End查询列表部分--> |
|||
<div class="listtop"> |
|||
<div class="tit">集团日报表</div> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange" :span-method="rowspanMethod"> |
|||
<el-table-column label="事业部" width="120" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span class="bluezi" @click="lookBusiness(scope.row)">{{ scope.row.busOrgName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="brandName" label="品牌" width="120" align="center"></el-table-column> |
|||
<el-table-column prop="fuelTypeValue" label="燃料" width="120" align="center"></el-table-column> |
|||
<el-table-column prop="emissionStandardValue" label="排放标准" width="120" align="center"></el-table-column> |
|||
<el-table-column prop="saleOfStockRatio" label="存销比" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="stock_total" label="库存总计" width="100" align="center"></el-table-column> |
|||
<el-table-column label="库存" width="120" align="center"> |
|||
<el-table-column prop="stock_unreserve" label="未定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="stock_reserve" label="已定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="stock_subtotal" label="小计" width="80" align="center"></el-table-column> |
|||
<el-table-column label="其中已买断" width="120" align="center"> |
|||
<el-table-column prop="stock_buyout_unreserve" label="未定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="stock_buyout_reserve" label="已定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="stock_buyout_subtotal" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="排产" width="120" align="center"> |
|||
<el-table-column prop="pcOrder_unreserve" label="未定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="pcOrder_reserve" label="已定" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="pcOrder_subtotal" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="订车" width="120" align="center"> |
|||
<el-table-column label="简易订单" width="120" align="center"> |
|||
<el-table-column prop="simpleOrder_day" label="本日" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="simpleOrder_month" label="本月" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="本日销售订单" width="120" align="center"> |
|||
<el-table-column prop="saleOrder_loan_day" label="贷款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="saleOrder_full_day" label="全款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="saleOrder_subtotal_day" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="本月销售订单" width="120" align="center"> |
|||
<el-table-column prop="saleOrder_loan_month" label="贷款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="saleOrder_full_month" label="全款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="saleOrder_subtotal_month" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
</el-table-column> |
|||
<el-table-column prop="saleOrder_waitVeh_total" label="待交车累计总订单" width="140" align="center"></el-table-column> |
|||
<el-table-column label="销售" width="120" align="center"> |
|||
<el-table-column label="本日销售" width="120" align="center"> |
|||
<el-table-column prop="sale_loan_day" label="贷款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_full_day" label="全款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_subtotal_day" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="本月销售" width="120" align="center"> |
|||
<el-table-column prop="sale_loan_month" label="贷款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_full_month" label="全款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_subtotal_month" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="全年销售" width="120" align="center"> |
|||
<el-table-column prop="sale_loan_year" label="贷款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_full_year" label="全款" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="sale_subtotal_year" label="小计" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
</el-table-column> |
|||
<el-table-column prop="manufacturer_invoicing_year" label="全年厂家开票数" width="120" align="center"></el-table-column> |
|||
<el-table-column label="买断" width="120" align="center"> |
|||
<el-table-column prop="buyout_day" label="本日" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="buyout_month" label="本月" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="buyout_year" label="本年" width="80" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="欠款出库" width="120" align="center"> |
|||
<el-table-column prop="arrears_carry_veh_count" label="数量" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="arrears_carry_veh_amount" label="金额(万元)" width="100" align="center"></el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="金融未放款" width="120" align="center"> |
|||
<el-table-column prop="loan_not_count" label="数量" width="80" align="center"></el-table-column> |
|||
<el-table-column prop="loan_not_amount" label="金额(万元)" width="100" align="center"></el-table-column> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
</div> |
|||
</div> |
|||
<!-- 查看详细事业部日报表 --> |
|||
<businessdivisionstatistics v-show="viewState == 2" ref="divBusiness" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import req from '@/api/groupstatistics/groupstatistics' |
|||
import businessdivisionstatistics from '../businessdivisionstatistics/businessdivisionstatistics' |
|||
|
|||
export default { |
|||
name: 'GroupStatistics', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar, |
|||
businessdivisionstatistics |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], |
|||
multipleSelection: [], |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 5, |
|||
total: 0, |
|||
params: { |
|||
createTimeStart: '', |
|||
createTimeEnd: '', |
|||
todayDate: '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
init(row) { |
|||
this.listQuery.params.todayDate = row.date |
|||
this.getList() |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 信息条数 获取点击时当前的sid |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
this.multipleSelection = row |
|||
row.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
// 合并单元格 |
|||
rowspanMethod({ row, column, rowIndex, columnIndex }) { |
|||
if (columnIndex === 0 || columnIndex === 1) { // 定位到需要合并的列 |
|||
// 获取当前单元格的值 |
|||
const currentValue = row[column.property] |
|||
// 获取上一行相同列的值 |
|||
const preRow = this.list[rowIndex - 1] |
|||
const preValue = preRow ? preRow[column.property] : null |
|||
// 如果当前值和上一行的值相同,则将当前单元格隐藏 |
|||
if (currentValue === preValue) { |
|||
return { rowspan: 0, colspan: 0 } |
|||
} else { |
|||
// 否则计算当前单元格应该跨越多少行 |
|||
let rowspan = 1 |
|||
for (let i = rowIndex + 1; i < this.list.length; i++) { |
|||
const nextRow = this.list[i] |
|||
const nextValue = nextRow[column.property] |
|||
if (nextValue === currentValue) { |
|||
rowspan++ |
|||
} else { |
|||
break |
|||
} |
|||
} |
|||
return { rowspan, colspan: 1 } |
|||
} |
|||
} |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
req.listByGroup(this.listQuery).then(response => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
createTimeStart: '', |
|||
createTimeEnd: '' |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
lookBusiness(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divBusiness'].groupInit(this.listQuery.params.todayDate, row.orgPath) |
|||
}, |
|||
// 修改、编辑、详情返回列表页面 |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
Loading…
Reference in new issue