Commit 5cff0cc1 by 董有沛

销售订单修改

parent 107c56ae
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop';
// 获取活动参与记录列表
let getIntegralList = (params) => postAction(prefix + "/activityRecord/getIntegralList" , params);
// 导出积分记录
let exportIntegral = (params) => downFilePost(prefix + "/activityRecord/exportIntegralRecord" , params);
// 导出积分记录
let download = (params) => downFilePost(prefix + "/activityRecord/download/" , params);
export {
getIntegralList,exportIntegral,download
}
import {postAction,getAotion} from '@/api/manage'
const prefix = '/manager/ciop';
// 获取活动参与记录列表
let getList = (params) => postAction(prefix + "/activityRecord/list" , params);
// 审核活动参与记录
let audit = (params) => postAction(prefix + "/activityRecord/auditActivityRecord" , params);
export {
getList,audit
}
import {postAction,getAotion,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop';
// 获取对账单清单
let getList = (params) => postAction(prefix + "/bill/list" , params);
// 删除
let deleteBill = (params) => postAction(prefix + "/bill/deleteBill" , params);
// 下载上传模板
let downloadTemplate = (params) => downFilePost(prefix + "/bill/downloadTemplate" , params);
// 获取县分下拉列表
let getSubstList = (params) => postAction(prefix + "/school/schoolManagement/substList" , params);
// 获取学校下拉列表
let getSchoolList = (params) => postAction(prefix + "/school/schoolManagement/schoolList" , params);
// 导出对账单
let exportList = (params) => downFilePost(prefix + "/bill/exportList" , params);
// 获取账单汇总数据
let getStatisList = (params) => postAction(prefix + "/bill/statisList" , params);
// 导出账单汇总
let exportStatisList = (params) => downFilePost(prefix + "/bill/exportStatisList" , params);
// 获取账单汇总(总经理)数据
let getStatisManagerList = (params) => postAction(prefix + "/bill/statisManagerList" , params);
// 导出账单汇总(总经理)数据
let exportStatisManagerList = (params) => downFilePost(prefix + "/bill/exportStatisManagerList" , params);
// // 获取账单汇总(县分)数据
// let getStatisSubstList = (params) => postAction(prefix + "/bill/statisSubstList" , params);
//
// // 导出账单汇总(县分)数据
// let exportStatisSubstList = (params) => downFilePost(prefix + "/bill/exportStatisSubstList" , params);
// // 获取账单汇总(学校)数据
// let getStatisSchoolList = (params) => postAction(prefix + "/bill/statisSchoolList" , params);
//
// // 导出账单汇总(学校)数据
// let exportStatisSchoolList = (params) => downFilePost(prefix + "/bill/exportStatisSchoolList" , params);
export {
getList,deleteBill,downloadTemplate,exportList,getSubstList,getSchoolList,
getStatisList,exportStatisList,getStatisManagerList,exportStatisManagerList,
// getStatisSubstList,exportStatisSubstList,getStatisSchoolList,exportStatisSchoolList
}
import {postAction,getAotion,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop';
// 获取佣金申请数据
let applyDataList = (params) => postAction(prefix + "/bonus/applyDataList" , params);
// 发起申请生成订单
let productOrder = (params) => postAction(prefix + "/bonus/productOrder" , params);
// 获取佣金申请单
let applyOrderList = (params) => postAction(prefix + "/bonus/applyOrderList" , params);
// 再次申请
let updateState = (params) => postAction(prefix + "/bonus/updateState" , params);
// 获取申请单审核列表
let auditOrderList = (params) => postAction(prefix + "/bonus/auditOrderList" , params);
// 审核申请
let auditApply = (params) => postAction(prefix + "/bonus/auditApply" , params);
// 获取县分下拉列表
let getSubstList = (params) => postAction(prefix + "/school/schoolManagement/substList" , params);
// 获取学校下拉列表
let getSchoolList = (params) => postAction(prefix + "/school/schoolManagement/schoolList" , params);
// 审核申请
let bonusList = (params) => postAction(prefix + "/bonus/bonusList" , params);
// 审核申请
let sendBonus = (params) => postAction(prefix + "/bonus/sendBonus" , params);
// 导出结算结果
let exportResult = (params) => downFilePost(prefix + "/bonus/exportResult" , params);
// 导出奖励结算清单
let exportSettlementList = (params) => downFilePost(prefix + "/bonus/exportSettlementList" , params);
export {
applyDataList,productOrder,applyOrderList,updateState,auditOrderList,auditApply,
getSubstList,getSchoolList,exportSettlementList,bonusList,sendBonus,exportResult
}
import {postAction,getAotion,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop';
// 获取活动列表
let getList = (params) => postAction(prefix + "/salesOrder/list" , params);
// 删除
let deleteOrder = (params) => postAction(prefix + "/salesOrder/deleteOrder" , params);
// 下载放号上传模板
let downloadTemplateFH = (params) => downFilePost(prefix + "/salesOrder/downloadTemplateFH" , params);
// 下载充值审核模板
let downloadTemplateCZ = (params) => downFilePost(prefix + "/salesOrder/downloadTemplateCZ" , params);
// 上传图片
// let uploadImg = (params) => postAction(prefix + "/salesOrder/uploadImg" , params);
// 获取县分下拉列表
let getSubstList = (params) => postAction(prefix + "/school/schoolManagement/substList" , params);
// 获取学校下拉列表
let getSchoolList = (params) => postAction(prefix + "/school/schoolManagement/schoolList" , params);
// 下载导入结果清单
let downloadResult = (params) => downFilePost(prefix + "/salesOrder/exportResult" , params);
// 导出订单
let exportList = (params) => downFilePost(prefix + "/salesOrder/exportOrderList" , params);
export {
getList,deleteOrder,getSubstList,getSchoolList,downloadTemplateFH,downloadTemplateCZ,
downloadResult,exportList
}
import {postAction,getAotion} from '@/api/manage'
const prefix = '/manager/ciop';
// 获取学校分配列表
let getList = (params) => postAction(prefix + "/school/schoolAllocation/findByList" , params);
//新增
let addAllocation = (params) => postAction(prefix + "/school/schoolAllocation/addSchoolAllocation" , params);
// 删除
let deleteAllocation = (params) => postAction(prefix + "/school/schoolAllocation/deleteSchoolAllocation" , params);
// 获取县分下拉列表
let getSubstList = (params) => postAction(prefix + "/school/schoolManagement/substList" , params);
// 获取学校下拉列表
let getSchoolList = (params) => postAction(prefix + "/school/schoolManagement/schoolList" , params);
export {
getList,addAllocation,deleteAllocation,getSubstList,getSchoolList
}
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}" label="积分类型">
<a-select placeholder="请选择" v-model="queryParam.activityType">
<a-select-option key="">请选择</a-select-option>
<a-select-option key="个人活动">个人活动</a-select-option>
<a-select-option key="团队活动">团队活动</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}" label="积分小类">
<a-select placeholder="请选择" v-model="queryParam.subclass">
<a-select-option key="">请选择</a-select-option>
<a-select-option key="部长考核">部长考核</a-select-option>
<a-select-option key="前置营销">前置营销</a-select-option>
<a-select-option key="线上活动">线上活动</a-select-option>
<a-select-option key="线下活动">线下活动</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="4" :sm="12">
<a-form-item label="姓名:">
<a-input placeholder="" v-model="queryParam.name"></a-input>
</a-form-item>
</a-col>
<a-col :md="4" :sm="12">
<a-form-item label="账号:">
<a-input placeholder="" v-model="queryParam.account"></a-input>
</a-form-item>
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button>
<a-button v-show="!callback" @click="handleSubmit" style="margin-left: 10px">导出</a-button>
<a-button v-show="callback" style="margin-left: 10px">导出中<a-spin style="margin-left: 5px" size="small"/></a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<template slot="operation" slot-scope="text,record">
<a @click="modifyfunction(record)">审核</a>
</template>
</s-table>
<!--编辑----弹框-->
<!-- <a-modal :title="titleName" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="840px">
<a-form :form="Formtable">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="审核状态">
<a-radio-group v-decorator="['status', {rules: [{ required: true, message: '审核状态不能为空!'}]} ]">
<a-radio value="2">通过</a-radio>
<a-radio value="3">不通过</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="所得积分">
<a-input placeholder="所得积分" v-decorator="[ 'integral', {rules: [{ required: true,type:'number', message: '所得积分不能为空!' ,whitespace:true,transform:(value)=> {return Number(value)} }]} ]"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="审核备注">
<a-input placeholder="审核备注" v-decorator="[ 'remark', {rules: [{ required: false }]} ]"></a-input>
</a-form-item>
</a-form>
</a-modal>-->
</div>
</template>
<script>
import STable from '@/components/table';
import {getIntegralList,exportIntegral,download} from "@/api/school-center/activityIntegralAPI"
import {cloneObject,exportFile} from '@/utils/util';
import moment from "moment";
export default {
name: "activityIntegral",
components: {
STable,
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
previewVisible: false,
callback:false,
previewImage: '',
fileList: [
],
fileid:{},
// form
Formtable: this.$form.createForm(this, {name: 'Formtable'}),
titleName:"",
modifyForm: {
id: '',
status: '',
integral: '',
remark: ''
},
subNameList: [],
packageName:[],
chosePages:[],
products:[],
//输入框列表
queryParam: {
title: '',
activityType: '',
subclass: '',
name: '',
account: '',
startTime :'',
endTime :'',
orderseq :'',
orderUniversityName :'',
status :'',
ordername :''
},
modifyvisible: false,
columns: [
{dataIndex: 'name', width: 200, title: '姓名', align: "center"},
{dataIndex: 'account', width: 200, title: '账号', align: "center"},
{dataIndex: 'recordIntegral', width: 200, title: '所得积分', align: "center"},
{dataIndex: 'activityType', width: 200, title: '积分类型', align: "center"},
{dataIndex: 'subclass', width: 200, title: '积分小类', align: "center"},
{dataIndex: 'substName', width: 200, title: '县分', align: "center"},
{dataIndex: 'schoolName', width: 200, title: '学校', align: "center"},
{dataIndex: 'createTime', width: 200, title: '创建时间', align: "center"},
{
dataIndex: 'operation',
width: 200,
title: '操作',
align: "center",
scopedSlots: {customRender: 'operation'},
fixed: "right"
}]
,
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
//表示
let obj = cloneObject(this.queryParam)
return getIntegralList(Object.assign(params, obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.emptyText.emptyText = '查询失败!'
this.$message.error("查询失败!", 5);
data = {
data: [],
pageSize: parameter.pageSize,
pageNo: 1,
totalCount: 0
}
} else {
if (res.data.records.length==0){
return data
}
data = {
data: res.data.records,
pageSize: parameter.pageSize,
pageNo: parameter.pageNo,
totalCount: res.data.total
}
}
return data
})
}
}
},
methods:{
chosePagesfunction(data){
this.chosePages=data
},
search() {
this.$refs.table.refresh({search: true})
},
handleSubmit() {
let downqueryParam=this.queryParam
let nowdate = moment().format('YYYY-MM-DD');
this.callback=true;
exportFile(exportIntegral(downqueryParam), "积分记录清单.xls",this.downloadstatu);
//exportFile(download(downqueryParam), "宽带订单清单" + nowdate + ".xls",this.downloadstatu);
},
downloadstatu(){
this.callback=false;
}
}
}
</script>
<style scoped>
</style>
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}" label="积分类型">
<a-select placeholder="请选择" v-model="queryParam.activityType">
<a-select-option key="">请选择</a-select-option>
<a-select-option key="个人活动">个人活动</a-select-option>
<a-select-option key="团队活动">团队活动</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}" label="积分小类">
<a-select placeholder="请选择" v-model="queryParam.subclass">
<a-select-option key="">请选择</a-select-option>
<a-select-option key="部长考核">部长考核</a-select-option>
<a-select-option key="前置营销">前置营销</a-select-option>
<a-select-option key="线上活动">线上活动</a-select-option>
<a-select-option key="线下活动">线下活动</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="4" :sm="12">
<a-form-item label="姓名:">
<a-input placeholder="" v-model="queryParam.name"></a-input>
</a-form-item>
</a-col>
<a-col :md="4" :sm="12">
<a-form-item label="账号:">
<a-input placeholder="" v-model="queryParam.account"></a-input>
</a-form-item>
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button>
<a-button v-show="!callback" @click="handleSubmit" style="margin-left: 10px">导出</a-button>
<a-button v-show="callback" style="margin-left: 10px">导出中<a-spin style="margin-left: 5px" size="small"/></a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<template slot="operation" slot-scope="text,record">
<a @click="modifyfunction(record)">审核</a>
</template>
</s-table>
<!--编辑----弹框-->
<!-- <a-modal :title="titleName" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="840px">
<a-form :form="Formtable">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="审核状态">
<a-radio-group v-decorator="['status', {rules: [{ required: true, message: '审核状态不能为空!'}]} ]">
<a-radio value="2">通过</a-radio>
<a-radio value="3">不通过</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="所得积分">
<a-input placeholder="所得积分" v-decorator="[ 'integral', {rules: [{ required: true,type:'number', message: '所得积分不能为空!' ,whitespace:true,transform:(value)=> {return Number(value)} }]} ]"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="审核备注">
<a-input placeholder="审核备注" v-decorator="[ 'remark', {rules: [{ required: false }]} ]"></a-input>
</a-form-item>
</a-form>
</a-modal>-->
</div>
</template>
<script>
import STable from '@/components/table';
import {getIntegralList,exportIntegral,download} from "@/api/school-center/activityIntegralAPI"
import {cloneObject,exportFile} from '@/utils/util';
import moment from "moment";
export default {
name: "activityIntegral",
components: {
STable,
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
previewVisible: false,
callback:false,
previewImage: '',
fileList: [
],
fileid:{},
// form
Formtable: this.$form.createForm(this, {name: 'Formtable'}),
titleName:"",
modifyForm: {
id: '',
status: '',
integral: '',
remark: ''
},
subNameList: [],
packageName:[],
chosePages:[],
products:[],
//输入框列表
queryParam: {
title: '',
activityType: '',
subclass: '',
name: '',
account: '',
startTime :'',
endTime :'',
orderseq :'',
orderUniversityName :'',
status :'',
ordername :''
},
modifyvisible: false,
columns: [
{dataIndex: 'name', width: 200, title: '姓名', align: "center"},
{dataIndex: 'account', width: 200, title: '账号', align: "center"},
{dataIndex: 'recordIntegral', width: 200, title: '所得积分', align: "center"},
{dataIndex: 'activityType', width: 200, title: '积分类型', align: "center"},
{dataIndex: 'subclass', width: 200, title: '积分小类', align: "center"},
{dataIndex: 'substName', width: 200, title: '县分', align: "center"},
{dataIndex: 'schoolName', width: 200, title: '学校', align: "center"},
{dataIndex: 'createTime', width: 200, title: '创建时间', align: "center"},
{
dataIndex: 'operation',
width: 200,
title: '操作',
align: "center",
scopedSlots: {customRender: 'operation'},
fixed: "right"
}]
,
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
//表示
let obj = cloneObject(this.queryParam)
return getIntegralList(Object.assign(params, obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.emptyText.emptyText = '查询失败!'
this.$message.error("查询失败!", 5);
data = {
data: [],
pageSize: parameter.pageSize,
pageNo: 1,
totalCount: 0
}
} else {
if (res.data.records.length==0){
return data
}
data = {
data: res.data.records,
pageSize: parameter.pageSize,
pageNo: parameter.pageNo,
totalCount: res.data.total
}
}
return data
})
}
}
},
methods:{
chosePagesfunction(data){
this.chosePages=data
},
search() {
this.$refs.table.refresh({search: true})
},
handleSubmit() {
let downqueryParam=this.queryParam
let nowdate = moment().format('YYYY-MM-DD');
this.callback=true;
exportFile(exportIntegral(downqueryParam), "积分记录清单.xls",this.downloadstatu);
//exportFile(download(downqueryParam), "宽带订单清单" + nowdate + ".xls",this.downloadstatu);
},
downloadstatu(){
this.callback=false;
}
}
}
</script>
<style scoped>
</style>
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="5" :sm="16">
<a-form-item label="月份:">
<a-month-picker :format="dateFormat" @change="monthChange" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}" label="项目类型">
<a-select placeholder="请选择" defaultValue="佣金部分" v-model="queryParam.expenseType">
<a-select-option key="佣金支出">佣金部分</a-select-option>
<a-select-option key="佣金+成本">佣金+成本</a-select-option>
</a-select>
</a-form-item>
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button>
<a-divider type="vertical"/>
<a-button @click="exportList()" style="margin-left: 10px">导出</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
</s-table>
</div>
</template>
<script>
import STable from '@/components/table';
import {
getStatisList,exportStatisList
} from "@/api/school-center/billAPI";
import {cloneObject,exportFile} from '@/utils/util';
export default {
name: "billStatis",
components: {
STable
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
fileList: [
],
fileid:{},
modifyvisible: false,
dateFormat: 'YYYYMM',
//输入框列表
queryParam: {
dataType: 'month',
month: '',
statisType: 'month',
expenseType: '佣金部分'
},
columns: [
{dataIndex: 'billType', width: 100, title: '项目类型', align: "center"},
{dataIndex: 'month', width: 100, title: '月份', align: "center"},
{dataIndex: 'billDetail', width: 100, title: '收支详情', align: "center"},
{dataIndex: 'amount', width: 100, title: '金额', align: "center"},
{dataIndex: 'billTypeExpense', width: 100, title: '项目类型', align: "center"},
{dataIndex: 'monthExpense', width: 100, title: '月份', align: "center"},
{dataIndex: 'billDetailExpense', width: 100, title: '收支详情', align: "center"},
{dataIndex: 'amountExpense', width: 100, title: '不含税金额', align: "center"},
{dataIndex: 'taxAmount', width: 100, title: '含税金额', align: "center"},
]
,
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
//表示
let obj = cloneObject(this.queryParam)
return getStatisList(Object.assign(params, obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.emptyText.emptyText = '查询失败!'
this.$message.error("查询失败!", 5);
data = {
data: [],
pageSize: parameter.pageSize,
pageNo: 1,
totalCount: 0
}
} else {
if (res.data.records.length==0){
return data
}
data = {
data: res.data.records,
pageSize: parameter.pageSize,
pageNo: parameter.pageNo,
totalCount: res.data.total
}
}
return data
})
}
}
},
created() {
this.queryParam.expenseType = "佣金部分"
},
methods:{
search() {
this.$refs.table.refresh({search: true})
},
exportList() {
exportFile(exportStatisList(this.queryParam),'账单汇总清单.xlsx');
},
monthChange(date, dateString) {
if(dateString == ""){
this.queryParam.month = "";
}else{
this.queryParam.month = dateString;
}
},
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
}
}
</script>
<style scoped>
</style>
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="4" :sm="12">
<a-form-item label="总经理:">
<a-input placeholder="" v-model="queryParam.userName"></a-input>
</a-form-item>
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button>
<a-divider type="vertical"/>
<a-button @click="exportList()" style="margin-left: 10px">导出</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
</s-table>
</div>
</template>
<script>
import STable from '@/components/table';
import {
getStatisManagerList,exportStatisManagerList
} from "@/api/school-center/billAPI";
import {cloneObject,exportFile} from '@/utils/util';
export default {
name: "billStatisManager",
components: {
STable
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
fileList: [
],
fileid:{},
modifyvisible: false,
dateFormat: 'YYYYMM',
//输入框列表
queryParam: {
statisType: 'name',
userName: '',
expenseType: '佣金支出'
},
columns: [
{dataIndex: 'userName', width: 100, title: '总经理', align: "center"},
{dataIndex: 'month', width: 100, title: '月份', align: "center"},
{dataIndex: 'billType', width: 100, title: '项目类型', align: "center"},
{dataIndex: 'billDetail', width: 100, title: '收支详情', align: "center"},
{dataIndex: 'amount', width: 100, title: '金额', align: "center"},
{dataIndex: 'userNameExpense', width: 100, title: '总经理', align: "center"},
{dataIndex: 'monthExpense', width: 100, title: '月份', align: "center"},
{dataIndex: 'billTypeExpense', width: 100, title: '项目类型', align: "center"},
{dataIndex: 'billDetailExpense', width: 100, title: '收支详情', align: "center"},
{dataIndex: 'amountExpense', width: 100, title: '不含税金额', align: "center"},
{dataIndex: 'taxAmount', width: 100, title: '含税金额', align: "center"},
]
,
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
//表示
let obj = cloneObject(this.queryParam)
return getStatisManagerList(Object.assign(params, obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.emptyText.emptyText = '查询失败!'
this.$message.error("查询失败!", 5);
data = {
data: [],
pageSize: parameter.pageSize,
pageNo: 1,
totalCount: 0
}
} else {
if (res.data.records.length==0){
return data
}
data = {
data: res.data.records,
pageSize: parameter.pageSize,
pageNo: parameter.pageNo,
totalCount: res.data.total
}
}
return data
})
}
}
},
methods:{
search() {
this.$refs.table.refresh({search: true})
},
exportList() {
exportFile(exportStatisManagerList(this.queryParam),'账单汇总清单(总经理).xlsx');
},
// monthChange(date, dateString) {
// if(dateString == ""){
// this.queryParam.month = "";
// }else{
// this.queryParam.month = dateString;
// }
// },
// filterOption(input, option) {
// return (
// option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
// );
// },
}
}
</script>
<style scoped>
</style>
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="5" :sm="16">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="县分">
<a-select placeholder="请选择" @change="changeSubst()" v-model="queryParam.substName" >
<a-select-option key="">请选择</a-select-option>
<a-select-option v-for="data in substList" :value="data">
{{ data}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="学校名称">
<a-select showSearch placeholder="请选择" v-model="queryParam.schoolName" :value="schoolSelect" :filterOption="filterOption"
:allowClear="allowStatus">
<a-select-option key="">请选择</a-select-option>
<a-select-option v-for="data in schoolList" :value="data.school_name">
{{ data.school_name}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button>
<a-divider type="vertical"/>
<a-button @click="exportList()" style="margin-left: 10px">导出</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
</s-table>
</div>
</template>
<script>
import STable from '@/components/table';
import {
getStatisList,exportStatisList,getSubstList,getSchoolList
} from "@/api/school-center/billAPI";
import {cloneObject,exportFile} from '@/utils/util';
export default {
name: "billStatis",
components: {
STable
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
fileList: [
],
fileid:{},
modifyvisible: false,
dateFormat: 'YYYYMM',
substList: [],
allowStatus: true,
schoolList: [],
//输入框列表
queryParam: {
dataType: 'schoolName',
month: '',
statisType: 'schoolName',
expenseType: '佣金支出',
},
columns: [
{dataIndex: 'schoolName', width: 140, title: '学校', align: "center"},
{dataIndex: 'month', width: 60, title: '月份', align: "center"},
{dataIndex: 'billType', width: 60, title: '项目类型', align: "center"},
{dataIndex: 'billDetail', width: 100, title: '收支详情', align: "center"},
{dataIndex: 'amount', width: 100, title: '金额', align: "center"},
{dataIndex: 'schoolNameExpense', width: 140, title: '学校', align: "center"},
{dataIndex: 'monthExpense', width: 60, title: '月份', align: "center"},
{dataIndex: 'billTypeExpense', width: 60, title: '项目类型', align: "center"},
{dataIndex: 'billDetailExpense', width: 100, title: '收支详情', align: "center"},
{dataIndex: 'amountExpense', width: 100, title: '不含税金额', align: "center"},
{dataIndex: 'taxAmount', width: 100, title: '含税金额', align: "center"},
]
,
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
if(this.substList == '') {
let param = {};
getSubstList(Object.assign(param, obj)).then(res => {
if (res.state == 'success') {
res.data.forEach((key) => {
this.substList.push(key.sub_name)
})
}
})
}
//表示
let obj = cloneObject(this.queryParam)
return getStatisList(Object.assign(params, obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.emptyText.emptyText = '查询失败!'
this.$message.error("查询失败!", 5);
data = {
data: [],
pageSize: parameter.pageSize,
pageNo: 1,
totalCount: 0
}
} else {
if (res.data.records.length==0){
return data
}
data = {
data: res.data.records,
pageSize: parameter.pageSize,
pageNo: parameter.pageNo,
totalCount: res.data.total
}
}
return data
})
}
}
},
methods:{
search() {
this.$refs.table.refresh({search: true})
},
exportList() {
exportFile(exportStatisList(this.queryParam),'账单汇总清单(学校).xlsx');
},
changeSubst() {
let param = {};
param.substName = this.queryParam.substName;
this.schoolList = [];
getSchoolList(param).then(res => {
if(res.state == "success"){
res.data.forEach(key => {
this.schoolList.push(key);
})
}
})
},
}
}
</script>
<style scoped>
</style>
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="5" :sm="16">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="县分">
<a-select placeholder="请选择" @change="changeSubst()" v-model="queryParam.substName" >
<a-select-option key="">请选择</a-select-option>
<a-select-option v-for="data in substList" :value="data">
{{ data}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button>
<a-divider type="vertical"/>
<a-button @click="exportList()" style="margin-left: 10px">导出</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
</s-table>
</div>
</template>
<script>
import STable from '@/components/table';
import {
getStatisList,exportStatisList,getSubstList
} from "@/api/school-center/billAPI";
import {cloneObject,exportFile} from '@/utils/util';
export default {
name: "billStatisSubst",
components: {
STable
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
fileList: [
],
fileid:{},
modifyvisible: false,
substList: [],
dateFormat: 'YYYYMM',
//输入框列表
queryParam: {
dataType: 'substName',
substName: '',
statisType: 'substName',
expenseType: '佣金支出',
},
columns: [
{dataIndex: 'substName', width: 100, title: '县分', align: "center"},
{dataIndex: 'month', width: 100, title: '月份', align: "center"},
{dataIndex: 'billType', width: 100, title: '项目类型', align: "center"},
{dataIndex: 'billDetail', width: 100, title: '收支详情', align: "center"},
{dataIndex: 'amount', width: 100, title: '金额', align: "center"},
{dataIndex: 'substNameExpense', width: 100, title: '县分', align: "center"},
{dataIndex: 'monthExpense', width: 100, title: '月份', align: "center"},
{dataIndex: 'billTypeExpense', width: 100, title: '项目类型', align: "center"},
{dataIndex: 'billDetailExpense', width: 100, title: '收支详情', align: "center"},
{dataIndex: 'amountExpense', width: 100, title: '不含税金额', align: "center"},
{dataIndex: 'taxAmount', width: 100, title: '含税金额', align: "center"},
]
,
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
if(this.substList == '') {
let param = {};
getSubstList(Object.assign(param, obj)).then(res => {
if (res.state == 'success') {
res.data.forEach((key) => {
this.substList.push(key.sub_name)
})
}
})
}
//表示
let obj = cloneObject(this.queryParam)
return getStatisList(Object.assign(params, obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.emptyText.emptyText = '查询失败!'
this.$message.error("查询失败!", 5);
data = {
data: [],
pageSize: parameter.pageSize,
pageNo: 1,
totalCount: 0
}
} else {
if (res.data.records.length==0){
return data
}
data = {
data: res.data.records,
pageSize: parameter.pageSize,
pageNo: parameter.pageNo,
totalCount: res.data.total
}
}
return data
})
}
}
},
methods:{
search() {
this.$refs.table.refresh({search: true})
},
exportList() {
exportFile(exportStatisList(this.queryParam),'账单汇总清单(县分).xlsx');
},
changeSubst() {
let param = {};
param.substName = this.queryParam.substName;
this.schoolList = [];
this.queryParam.substSchool = "";
getSchoolList(param).then(res => {
if(res.state == "success"){
res.data.forEach(key => {
this.schoolList.push(key);
})
}
})
},
}
}
</script>
<style scoped>
</style>
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="4" :sm="12">
<a-form-item label="申请人:">
<a-input v-model="queryParam.applicant"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="申请单号:">
<a-input v-model="queryParam.applyNum"></a-input>
</a-form-item>
</a-col>
<a-col :md="4" :sm="12">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="状态">
<a-select showSearch v-model="queryParam.state" >
<a-select-option key="">请选择</a-select-option>
<a-select-option key="1">未审核</a-select-option>
<a-select-option key="2">初审不通过</a-select-option>
<a-select-option key="3">待复审</a-select-option>
<a-select-option key="4">复审通过</a-select-option>
<a-select-option key="5">复审不通过</a-select-option>
</a-select>
</a-form-item>
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button>
<a-divider type="vertical"/>
<a-button @click="openAudit(1)" type="primary">初审</a-button>
<a-button @click="openAudit(2)" type="primary" style="left:10px">复审</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"
:row-selection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
<!--拦截器-->
<template slot="createTime" slot-scope="text">
{{ text | dayjs}}
</template>
<template slot="orderState" slot-scope="text">
<span v-if="text == '1'">未审核</span>
<span v-if="text == '2'">初审不通过</span>
<span v-if="text == '3'">待复审</span>
<span v-if="text == '4'">复审通过</span>
<span v-if="text == '5'">复审不通过</span>
</template>
</s-table>
<!--编辑----弹框-->
<a-modal :title="titleName" :visible="auditVisible" @ok="auditOk" @cancel="auditCancel" html-type="submit" width="440px">
<a-form :form="Formtable">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="审核">
<a-select placeholder="请选择" v-model="state">
<a-select-option key="1">审核通过</a-select-option>
<a-select-option key="2" >审核不通过</a-select-option>
</a-select>
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import STable from '@/components/table';
import {auditOrderList,updateState} from "@/api/school-center/bonusAPI"
import {cloneObject} from '@/utils/util';
export default {
name: "auditApply",
components: {
STable,
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
fileList: [
],
// form
Formtable: this.$form.createForm(this, {name: 'Formtable'}),
auditVisible:false,
applyNums:'',
state: '',
selectedState: [],
selectedRowKeys: [],
titleName: '',
//输入框列表
queryParam: {
applicant: '',
applyNum: '',
state: '',
},
columns: [
{dataIndex: 'applyNum', width: 200, title: '申请单号', align: "center"},
{dataIndex: 'state', width: 100, title: '状态', align: "center",scopedSlots:{customRender: 'orderState'}},
{dataIndex: 'createDate', width: 200, title: '创建时间', align: "center",scopedSlots: {customRender: 'createTime'}},
{dataIndex: 'applicant', width: 100, title: '申请人', align: "center"},
{dataIndex: 'bonus', width: 100, title: '总佣金', align: "center"},
]
,
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
//表示
let obj = cloneObject(this.queryParam)
return auditOrderList(Object.assign(params, obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.emptyText.emptyText = '查询失败!'
this.$message.error("查询失败!", 5);
data = {
data: [],
pageSize: parameter.pageSize,
pageNo: 1,
totalCount: 0
}
} else {
if (res.data.records.length==0){
return data
}
data = {
data: res.data.records,
pageSize: parameter.pageSize,
pageNo: parameter.pageNo,
totalCount: res.data.total
}
}
return data
})
}
}
},
methods:{
search() {
this.$refs.table.refresh({search: true})
},
openAudit(type){
if(this.selectedRowKeys == ''){
this.$message.info("请勾选数据!",2);
return null;
}
if(type == 1){
this.titleName = "初审";
for(let i = 0; i < this.selectedState.length; i++){
let theState = this.selectedState[i];
if(theState != 1 && theState != 2){
this.$message.info("初审只能审核未审核和初审不通过的申请单",2);
return false;
}
}
}else{
this.titleName = "复审";
for(let i = 0; i < this.selectedState.length; i++){
let theState = this.selectedState[i];
if(theState != 3 && theState != 5){
this.$message.info("复审只能审核待复审和复审不通过的申请单",2);
return false;
}
}
}
this.auditVisible = true;
},
auditOk(){
let params = {};
params.applyNums = this.applyNums;
if(this.titleName == "初审"){
params.state = this.state == 1 ? 3 : 2;
}else{
params.state = this.state == 1 ? 4 : 5;
}
updateState(params).then(res => {
if(res.state == "success"){
this.$message.success("审核成功",2);
this.search();
this.auditVisible = false;
// 重置记录选中的状态
this.selectedState = [];
this.selectedState.push(params.state );
return null;
}
this.$message.error("审核失败",2);
})
},
auditCancel(){
this.auditVisible = false;
},
onSelectChange(selectedRowKeys,selectedRows) {
this.selectedRowKeys = selectedRowKeys;
this.applyNums = '';
this.selectedState = [];
selectedRows.forEach(data => {
this.applyNums += data.applyNum +",";
this.selectedState.push(data.state);
})
this.applyNums = this.applyNums.substring(0,this.applyNums.length-1);
},
}
}
</script>
<style scoped>
</style>
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="4" :sm="12">
<a-form-item label="放号人:">
<a-input v-model="queryParam.userName"></a-input>
</a-form-item>
</a-col>
<a-col :md="5" :sm="12">
<a-form-item label="放号人账号:">
<a-input v-model="queryParam.account"></a-input>
</a-form-item>
</a-col>
<a-col :md="4" :sm="12">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="县分">
<a-select placeholder="请选择" @change="changeSubst" v-model="queryParam.substName" >
<a-select-option key="">请选择</a-select-option>
<a-select-option v-for="data in substList" :value="data">
{{ data}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="学校名称">
<a-select showSearch placeholder="请选择" v-model="queryParam.schoolName"
>
<a-select-option key="">请选择</a-select-option>
<a-select-option v-for="data in schoolList" :key="data.school_name" :value="data.school_name">
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button>
<a-divider type="vertical"/>
<a-button @click="apply()" type="primary">提成申请</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
<!-- <template slot="operation" slot-scope="text,record">-->
<!-- <a @click="modifyfunction(record)">编辑</a>-->
<!-- <a-divider type="vertical"/>-->
<!-- <a-popconfirm title="是否要删除此行?" @confirm="deleteActivity(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
<!-- <a-divider type="vertical"/>-->
<!-- </template>-->
</s-table>
</div>
</template>
<script>
import STable from '@/components/table';
import {applyDataList,productOrder,getSubstList,getSchoolList} from "@/api/school-center/bonusAPI"
import {cloneObject} from '@/utils/util';
export default {
name: "bonusApply",
components: {
STable,
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
fileList: [
],
// form
Formtable: this.$form.createForm(this, {name: 'Formtable'}),
substList: [],
schoolList:[],
chosePages:[],
selectedRowKeys:[],
applyIds:'',
products:[],
//输入框列表
queryParam: {
userName: '',
account: '',
substName: '',
schoolName: '',
isBind: '',
},
columns: [
{dataIndex: 'substName', width: 200, title: '县分', align: "center"},
{dataIndex: 'schoolName', width: 200, title: '学校', align: "center"},
{dataIndex: 'account', width: 200, title: '账号', align: "center"},
{dataIndex: 'userName', width: 200, title: '放号人', align: "center"},
{dataIndex: 'bonus', width: 200, title: '佣金', align: "center"},
{dataIndex: 'isBind', width: 200, title: '是否绑定微信', align: "center"},
// {
// dataIndex: 'operation',
// width: 200,
// title: '操作',
// align: "center",
// scopedSlots: {customRender: 'operation'},
// fixed: "right"
// }
//
]
,
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
if(this.substList == '') {
let param = {};
getSubstList(Object.assign(param, obj)).then(res => {
if (res.state == 'success') {
res.data.forEach((key) => {
this.substList.push(key.sub_name)
})
}
})
}
//表示
let obj = cloneObject(this.queryParam)
return applyDataList(Object.assign(params, obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.emptyText.emptyText = '查询失败!'
this.$message.error("查询失败!", 5);
data = {
data: [],
pageSize: parameter.pageSize,
pageNo: 1,
totalCount: 0
}
} else {
if (res.data.records.length==0){
return data
}
data = {
data: res.data.records,
pageSize: parameter.pageSize,
pageNo: parameter.pageNo,
totalCount: res.data.total
}
}
return data
})
}
}
},
methods:{
search() {
this.$refs.table.refresh({search: true})
},
apply(){
if(this.selectedRowKeys == ''){
this.$message.info("请勾选数据!",2);
return null;
}
let params = {};
params.ids = this.applyIds;
params.status = "1";
productOrder(params).then(res => {
if(res.state == "success"){
this.$message.success("提交成功",2);
this.search();
return null;
}
this.$message.error("提交失败",2);
})
},
changeSubst() {
let param = {};
param.substName = this.queryParam.substName;
this.schoolList = [];
this.queryParam.substSchool = "请选择";
getSchoolList(param).then(res => {
if(res.state == "success"){
res.data.forEach(key => {
this.schoolList.push(key);
})
}
})
},
onSelectChange(selectedRowKeys,selectedRows) {
this.selectedRowKeys = selectedRowKeys;
this.applyIds = '';
selectedRows.forEach(data => {
this.applyIds += data.userId +",";
})
this.applyIds = this.applyIds.substring(0,this.applyIds.length-1);
},
}
}
</script>
<style scoped>
</style>
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="4" :sm="12">
<a-form-item label="放号人:">
<a-input v-model="queryParam.userName"></a-input>
</a-form-item>
</a-col>
<a-col :md="5" :sm="12">
<a-form-item label="放号人账号:">
<a-input v-model="queryParam.account"></a-input>
</a-form-item>
</a-col>
<a-col :md="5" :sm="12">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="佣金状态">
<a-select showSearch v-model="queryParam.state" >
<a-select-option key="">请选择</a-select-option>
<a-select-option key="4">未结算</a-select-option>
<a-select-option key="6">结算成功</a-select-option>
<a-select-option key="7">结算失败</a-select-option>
</a-select>
</a-form-item>
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button>
<a-divider type="vertical"/>
<a-button @click="sendBonus()" type="primary">结算</a-button>
<a-button @click="exportList()" style="left: 10px;" type="primary">导出</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
<template slot="orderState" slot-scope="text">
<span v-if="text == '4'">待结算</span>
<span v-if="text == '6'">结算成功</span>
<span v-if="text == '7'">结算失败</span>
</template>
<!-- <template slot="operation" slot-scope="text,record">-->
<!-- <a @click="modifyfunction(record)">编辑</a>-->
<!-- <a-divider type="vertical"/>-->
<!-- <a-popconfirm title="是否要删除此行?" @confirm="deleteActivity(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
<!-- <a-divider type="vertical"/>-->
<!-- </template>-->
</s-table>
</div>
</template>
<script>
import STable from '@/components/table';
import {bonusList,sendBonus,exportSettlementList,exportResult,getSubstList,getSchoolList} from "@/api/school-center/bonusAPI"
import {cloneObject,exportFile} from '@/utils/util';
export default {
name: "settlement",
components: {
STable,
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
fileList: [
],
//输入框列表
queryParam: {
userName: '',
account: '',
state: '',
},
bonusNums: [],
selectedRowKeys: [],
columns: [
{dataIndex: 'account', width: 100, title: '账号', align: "center"},
{dataIndex: 'userName', width: 100, title: '姓名', align: "center"},
{dataIndex: 'substName', width: 100, title: '县分', align: "center"},
{dataIndex: 'schoolName', width: 200, title: '学校', align: "center"},
{dataIndex: 'bonus', width: 100, title: '金额', align: "center"},
{dataIndex: 'state', width: 100, title: '佣金状态', align: "center", scopedSlots: {customRender: 'orderState'}},
{dataIndex: 'isBind', width: 100, title: '微信绑定', align: "center"},
// {
// dataIndex: 'operation',
// width: 200,
// title: '操作',
// align: "center",
// scopedSlots: {customRender: 'operation'},
// fixed: "right"
// }
//
]
,
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
//表示
let obj = cloneObject(this.queryParam)
return bonusList(Object.assign(params, obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.emptyText.emptyText = '查询失败!'
this.$message.error("查询失败!", 5);
data = {
data: [],
pageSize: parameter.pageSize,
pageNo: 1,
totalCount: 0
}
} else {
if (res.data.records.length==0){
return data
}
data = {
data: res.data.records,
pageSize: parameter.pageSize,
pageNo: parameter.pageNo,
totalCount: res.data.total
}
}
return data
})
}
}
},
methods:{
search() {
this.$refs.table.refresh({search: true})
},
sendBonus(){
if(this.selectedRowKeys == ''){
this.$message.info("请勾选数据!",2);
return null;
}
let params = {};
params.bonusNums = this.bonusNums;
sendBonus(params).then(res => {
if(res.state == "success"){
this.$message.success(res.data,2);
if(res.data.indexOf("结算失败") > -1){
exportFile(exportResult(this.queryParam),'结算结果清单.xlsx');
}
this.search();
return null;
}
this.$message.error("结算失败",2);
})
},
onSelectChange(selectedRowKeys,selectedRows) {
this.selectedRowKeys = selectedRowKeys;
this.bonusNums = '';
selectedRows.forEach(data => {
this.bonusNums += data.bonusNum +",";
})
this.bonusNums = this.bonusNums.substring(0,this.bonusNums.length-1);
},
exportList(){
exportFile(exportSettlementList(this.queryParam),'账单清单.xlsx');
}
}
}
</script>
<style scoped>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment