|
@@ -4,7 +4,7 @@
|
|
|
<div class="squrt"></div>经营报表
|
|
|
</h2>
|
|
|
<div class="m-core">
|
|
|
- <div class="newBand">导入</div>
|
|
|
+ <el-button @click="downloadFile" class="btn-primary">导出</el-button>
|
|
|
<!-- 搜索类型 -->
|
|
|
<el-form :inline="true"
|
|
|
class="searchForm"
|
|
@@ -22,11 +22,18 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-select clearable filterable placeholder="请选择所属学校" v-model="searchForm.schoolName">
|
|
|
- <el-option label="1" value="1"></el-option>
|
|
|
+ <el-select clearable filterable placeholder="请选择所属学校" v-model="searchForm.schoolId">
|
|
|
+ <el-option v-for="(item,index) in cooperations" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="searchForm.month"
|
|
|
+ type="month"
|
|
|
+ placeholder="选择月份">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- <el-form-item>
|
|
|
<el-date-picker style="width:410px;"
|
|
|
v-model.trim="orderDate"
|
|
|
type="daterange"
|
|
@@ -37,7 +44,7 @@
|
|
|
end-placeholder="结束日期"
|
|
|
:picker-options="{ firstDayOfWeek: 1 }">
|
|
|
</el-date-picker>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
<el-form-item>
|
|
|
<el-button @click="search"
|
|
|
type="danger">搜索</el-button>
|
|
@@ -51,56 +58,59 @@
|
|
|
:header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
<el-table-column align='center'
|
|
|
width="150"
|
|
|
- prop="createTime"
|
|
|
- label="分部">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>
|
|
|
- {{scope.row.createTime | dateForMinFormat}}
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ prop="organName"
|
|
|
+ label="分部"></el-table-column>
|
|
|
<el-table-column align='center'
|
|
|
- prop="orderNo"
|
|
|
+ prop="schoolName"
|
|
|
label="学校">
|
|
|
</el-table-column>
|
|
|
<el-table-column align='center'
|
|
|
- prop="studentPaymentOrder.expectAmount"
|
|
|
+ prop="sellAmount"
|
|
|
+ width="150px"
|
|
|
label="销售收入(元)">
|
|
|
</el-table-column>
|
|
|
<el-table-column align='center'
|
|
|
- prop="studentPaymentOrder.actualAmount"
|
|
|
+ prop="serviceAmount"
|
|
|
+ width="150px"
|
|
|
label="服务收入(元)">
|
|
|
</el-table-column>
|
|
|
<el-table-column align='center'
|
|
|
- prop="studentPaymentOrder.actualAmount"
|
|
|
+ prop="refundAmount"
|
|
|
+ width="150px"
|
|
|
label="业务退费(元)">
|
|
|
</el-table-column>
|
|
|
<el-table-column align='center'
|
|
|
- prop="studentPaymentOrder.actualAmount"
|
|
|
+ prop="incomeTotal"
|
|
|
+ width="150px"
|
|
|
label="收入合计(元)">
|
|
|
</el-table-column>
|
|
|
<el-table-column align='center'
|
|
|
- prop="studentPaymentOrder.actualAmount"
|
|
|
+ prop="sellCost"
|
|
|
+ width="150px"
|
|
|
label="销售成本(元)">
|
|
|
</el-table-column>
|
|
|
<el-table-column align='center'
|
|
|
- prop="studentPaymentOrder.actualAmount"
|
|
|
+ prop="expensesAmount"
|
|
|
+ width="150px"
|
|
|
label="固定支出(元)">
|
|
|
</el-table-column>
|
|
|
<el-table-column align='center'
|
|
|
- prop="studentPaymentOrder.actualAmount"
|
|
|
+ prop="variableCost"
|
|
|
+ width="150px"
|
|
|
label="变动支出(元)">
|
|
|
</el-table-column>
|
|
|
<el-table-column align='center'
|
|
|
- prop="studentPaymentOrder.actualAmount"
|
|
|
+ prop="distributionAmount"
|
|
|
+ width="150px"
|
|
|
label="分摊费用(元)">
|
|
|
</el-table-column>
|
|
|
<el-table-column align='center'
|
|
|
- prop="studentPaymentOrder.actualAmount"
|
|
|
+ prop="costAmount"
|
|
|
+ width="150px"
|
|
|
label="成本费用合计(元)">
|
|
|
</el-table-column>
|
|
|
<el-table-column align='center'
|
|
|
- prop="studentPaymentOrder.actualAmount"
|
|
|
+ prop="profit"
|
|
|
label="利润(元)">
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -115,9 +125,11 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import pagination from '@/components/Pagination/index'
|
|
|
-import { studentRefundsQueryPage, applyRefundAudit } from '@/api/orderManager'
|
|
|
-import { getEmployeeOrgan } from '@/api/buildTeam'
|
|
|
+import { Export } from '@/utils/downLoadFile'
|
|
|
+import { getOperatingReport, applyRefundAudit } from '@/api/orderManager'
|
|
|
+import { getEmployeeOrgan, getCooperation } from '@/api/buildTeam'
|
|
|
import store from '@/store'
|
|
|
+import dayjs from 'dayjs'
|
|
|
export default {
|
|
|
components: { pagination },
|
|
|
name: 'backMoney',
|
|
@@ -127,10 +139,13 @@ export default {
|
|
|
searchForm: {
|
|
|
startTime: null,
|
|
|
endTime: null,
|
|
|
- organId: null
|
|
|
+ organId: null,
|
|
|
+ month: '',
|
|
|
+ schoolId: ''
|
|
|
},
|
|
|
tableList: [],
|
|
|
organList: [],
|
|
|
+ cooperations: [],
|
|
|
pageInfo: {
|
|
|
// 分页规则
|
|
|
limit: 10, // 限制显示条数
|
|
@@ -146,6 +161,12 @@ export default {
|
|
|
this.organList = res.data;
|
|
|
}
|
|
|
})
|
|
|
+ getCooperation({ 'rows': 1000, })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.cooperations = res.data.rows;
|
|
|
+ }
|
|
|
+ })
|
|
|
this.getList()
|
|
|
var now = new Date();
|
|
|
var startDate = new Date(Date.UTC(now.getFullYear(), now.getMonth(), now.getDate())).toISOString().slice(0, 10);
|
|
@@ -159,6 +180,16 @@ export default {
|
|
|
this.pageInfo.page = 1;
|
|
|
this.getList()
|
|
|
},
|
|
|
+ downloadFile() {
|
|
|
+ let params = this.searchForm
|
|
|
+ Export(this, {
|
|
|
+ url: '/api-web/operatingReport/export',
|
|
|
+ params: {
|
|
|
+ ...params,
|
|
|
+ month: (params.month ? dayjs(params.month).format('YYYY-MM-DD') : ''),
|
|
|
+ }
|
|
|
+ }, '是否确认导出报表?')
|
|
|
+ },
|
|
|
onTeachingSubmit (formName, status) { // 添加数据
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
@@ -181,7 +212,10 @@ export default {
|
|
|
let params = this.searchForm
|
|
|
params.rows = this.pageInfo.limit
|
|
|
params.page = this.pageInfo.page
|
|
|
- studentRefundsQueryPage(params).then(res => {
|
|
|
+ getOperatingReport({
|
|
|
+ ...params,
|
|
|
+ month: (params.month ? dayjs(params.month).format('YYYY-MM-DD') : ''),
|
|
|
+ }).then(res => {
|
|
|
let result = res.data
|
|
|
if (res.code == 200) {
|
|
|
this.tableList = result.rows
|
|
@@ -202,11 +236,14 @@ export default {
|
|
|
this.orderDate = null
|
|
|
this.searchForm = {
|
|
|
startTime: null,
|
|
|
- endTime: null
|
|
|
+ endTime: null,
|
|
|
+ month: '',
|
|
|
+ schoolId: '',
|
|
|
}
|
|
|
+ this.getList()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
-</style>
|
|
|
+</style>
|