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="4" :sm="12">
<a-form-item label="活动标题:">
<a-input placeholder="活动标题" v-model="queryParam.title"></a-input>
</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.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.creator"></a-input>
</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.status">
<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>
</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-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 {getList,audit} from "@/api/school-center/activityRecordAPI"
import {cloneObject} from '@/utils/util';
export default {
name: "activityRecord",
components: {
STable,
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
previewVisible: 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: '',
status: '',
creator: '',
},
modifyvisible: false,
columns: [
{dataIndex: 'title', width: 200, title: '活动标题', align: "center"},
{dataIndex: 'desc', width: 200, title: '活动详情', align: "center"},
{dataIndex: 'activityType', width: 200, title: '活动类型', align: "center"},
{dataIndex: 'subclass', width: 200, title: '活动小类', align: "center"},
{dataIndex: 'integral', width: 200, title: '活动积分', align: "center"},
{dataIndex: 'status', width: 200, title: '审核状态', align: "center"},
{dataIndex: 'remark', width: 200, title: '审核备注', align: "center"},
{dataIndex: 'recordIntegral', width: 200, title: '所得积分', align: "center"},
{dataIndex: 'creator', width: 200, title: '参与者', align: "center"},
{dataIndex: 'message', width: 200, title: '活动留言', align: "center"},
{dataIndex: 'createTime', width: 200, title: '参与时间', align: "center"},
{dataIndex: 'isRepeal', 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 getList(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})
},
modifyfunction(data){
//初始化
this.titleName="审核"
alert(data.id);
this.modifyForm.id = data.id
this.modifyvisible=true;
},
//提交表单
createfunctionOk(){
this.Formtable.validateFields(['status', "integral","remark"], {force: true}, (err, values)=>{
if (!err){
this.modifyForm.status=values.status
this.modifyForm.remark=values.remark
this.modifyForm.integral=values.integral
//修改数据
audit(this.modifyForm).then(res=>{
if (res.state=="success") {
this.$message.success(res.data ? res.data : '审核成功!', 5);
this.search();
this.modifyvisible=false
return null;
}
this.$message.error(res.data ? res.data : '审核失败!', 5);
})
}
})
},
createfunctionCancel(){
this.Formtable.setFieldsValue({
status: '',
remark: '',
integral: ''
})
this.modifyForm.id=""
this.modifyvisible=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="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" :key="data.school_name" :value="data.school_name">
</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.billType" :defaultValue="billTypeList[0]" @change="changeBillType"
:allowClear="allowStatus">
<a-select-option v-for="billType in billTypeList" :key="billType">
{{billType}}
</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.billDetail" :allowClear="allowStatus">
<a-select-option v-for="billDetail in billDetailList" :key="billDetail">{{ billDetail }}</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-button @click="openImport()" 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">
<template slot="operation" slot-scope="text,record">
<a-divider type="vertical"/>
<a-popconfirm title="是否要删除此行?" @confirm="deleteBill(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical"/>
</template>
</s-table>
<a-modal
title="批量导入"
:visible="modifyvisible"
@ok="createfunctionOk"
@cancel="createfunctionCancel"
html-type="submit"
width="400px"
>
<a-row :gutter="24">
<a-col :md="24" :sm="12">
<p style="text-align:center">{{ importTitle }}</p>
</a-col>
</a-row>
<import-btn :url="importUrl" :responseFun="doPush">
<a-tooltip placement="topLeft" title="导入文件" arrowPointAtCenter>
<a-row :gutter="24">
<a-col :md="24" :sm="12">
<p>
选择文件:
<a-button type="primary">选择文件</a-button>
</p>
</a-col>
</a-row>
</a-tooltip>
</import-btn>
<a-row :gutter="24">
<a-col :md="24" :sm="12">
<p >
模板下载:
<a-button type="primary" @click="downloadTemplate">账单导入模板</a-button>
</p>
</a-col>
</a-row>
</a-modal>
</div>
</template>
<script>
import STable from '@/components/table';
import {
getList,
deleteBill,getSubstList,getSchoolList,
downloadTemplate,exportList
} from "@/api/school-center/billAPI"
import {cloneObject,exportFile} from '@/utils/util';
import ImportBtn from "../../../components/sysmanage/ImportBtn";
export default {
name: "billRecord",
components: {
STable,ImportBtn
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
fileList: [
],
fileid:{},
// form
Formtable: this.$form.createForm(this, {name: 'Formtable'}),
importUrl: "",
importTitle: "",
modifyvisible: false,
substList: [],
allowStatus: true,
schoolList: [],
schoolSelect: '',
packageName:[],
products:[],
billTypeList:['佣金入账','佣金支出','外包成本','营销成本'],
billDetailList: [],
billDetailData:{
佣金入账 : ['佣金','学生补贴'],
佣金支出 : ['督导提成','楼长底薪','学生激励','花费补贴'],
外包成本 : ['督导底薪'],
营销成本 : ['活动执行费','日常用品采购','营销物料采购']
},
dateFormat: 'YYYYMM',
//输入框列表
queryParam: {
substName: '',
schoolId: '',
billType: '',
billDetail: '',
month: '',
},
columns: [
{dataIndex: 'month', width: 200, title: '月份', align: "center"},
{dataIndex: 'billType', width: 200, title: '项目类型', align: "center"},
{dataIndex: 'billDetail', width: 200, title: '收支详情', align: "center"},
{dataIndex: 'substName', width: 200, title: '县分', align: "center"},
{dataIndex: 'schoolName', width: 200, title: '学校', align: "center"},
{dataIndex: 'campus', width: 200, title: '校区', align: "center"},
{dataIndex: 'networkName', width: 200, title: '网点名称', align: "center"},
{dataIndex: 'networkCode', width: 200, title: '网点编码', align: "center"},
// {dataIndex: 'createTime', width: 200, title: '上传时间', align: "center"},
{dataIndex: 'amount', width: 200, title: '不含税金额', align: "center"},
{dataIndex: 'taxAmount', width: 200, title: '含税金额', align: "center"},
{dataIndex: 'taxPoint', 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 getList(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:{
onLoad(){
let param = {};
getSubstList(Object.assign(params,obj)).then(res => {
if (res.state == 'success') {
res.data.forEach((key)=>{
this.substList.push(key.sub_name)
})
}
})
},
search() {
this.$refs.table.refresh({search: true})
},
openImport() {
this.importTitle = "账单上传";
this.importUrl = "manager/ciop/bill/importBill";
this.modifyvisible = true;
},
downloadTemplate: function() {
exportFile(downloadTemplate(), "账单导入模板.xlsx");
},
createfunctionOk() {
this.modifyvisible = false;
this.clearmodel();
},
createfunctionCancel() {
this.modifyvisible = false;
this.clearmodel();
},
clearmodel() {
this.importTitle = "";
this.importUrl = "";
},
// 执行上传
doPush(res) {
console.log(res);
if (!res || !res.response) {
this.$message.error("上传文件出错!", 10);
return false;
}
const response = res.response;
if (response.state !== "success") {
this.$message.error(response.msg ? response.msg : "上传文件出错!", 5);
return false;
}
this.$message.success("上传成功!" + response.data, 5);
this.createfunctionCancel();
this.search();
},
deleteBill(id){
let params = {};
params.id = id;
deleteBill(params).then(res => {
if(res.state == "success"){
this.$message.success(res.data ? res.data : '删除成功', 5)
this.search();
return null;
}
this.$message.success(res.data ? res.data : '删除失败', 5);
})
},
exportList() {
exportFile(exportList(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);
})
}
})
},
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
);
},
changeBillType(value){
this.billDetailList = this.billDetailData[value];
}
}
}
</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.userName"></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>
<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>
<a-col :md="6" :sm="12">
<a-form-item label="申请单号:">
<a-input v-model="queryParam.applyNum"></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="applyAgain()" 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="{ 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>
</div>
</template>
<script>
import STable from '@/components/table';
import {applyOrderList,updateState,getSubstList,getSchoolList} from "@/api/school-center/bonusAPI"
import {cloneObject} from '@/utils/util';
export default {
name: "applyOrder",
components: {
STable,
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
fileList: [
],
// form
Formtable: this.$form.createForm(this, {name: 'Formtable'}),
substList: [],
schoolList:[],
chosePages:[],
selectedState: [],
applyNums:'',
products:[],
//输入框列表
queryParam: {
userName: '',
account: '',
substName: '',
schoolName: '',
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: 'substName', width: 100, title: '放号人县分', align: "center"},
{dataIndex: 'schoolName', width: 200, title: '放号人学校', align: "center"},
{dataIndex: 'userName', width: 100, title: '放号人', align: "center"},
{dataIndex: 'bonus', 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 applyOrderList(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})
},
applyAgain(){
if(this.selectedRowKeys == ''){
this.$message.info("请勾选数据!",2);
return null;
}
for(let i = 0; i < this.selectedState.length; i++){
let theState = this.selectedState[i];
if(theState != 2 && theState != 5){
this.$message.info("再次申请只能选择初审不通过和复审不通过的申请单",2);
return false;
}
}
let params = {};
let applyNumArray = this.applyNums.split(",");
if(applyNumArray.length > 1){
let theApplyNum = applyNumArray[0];
this.applyNums = theApplyNum;
applyNumArray.forEach(data => {
if(theApplyNum != data){
this.applyNums += "," + theApplyNum;
theApplyNum = data;
}
})
}
params.applyNums = this.applyNums;
params.state = "1";
updateState(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.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.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>
<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.name"></a-input>
</a-form-item>
</a-col>
<a-col :md="4" :sm="12">
<a-form-item label="县分">
<a-input placeholder="县分" v-model="queryParam.substName"></a-input>
</a-form-item>
</a-col>
<a-col :md="4" :sm="12">
<a-form-item label="学校">
<a-input placeholder="学校" v-model="queryParam.schoolName"></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 @click="openAllocation()" style="margin-left: 8px" icon="plus" type="primary">新增</a-button>
</a-col>
</span>
</a-row>
</a-form>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="operation" slot-scope="text, record">
<a-divider type="vertical"/>
<a-popconfirm title="是否要删除此行?" @confirm="deleteAllocation(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical"/>
</template>
</s-table>
<!--编辑----弹框-->
<a-modal :title="titleName" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="720px">
<a-form :form="Formtable">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="账号">
<a-input placeholder="账号" v-decorator="[ 'account', {rules: [{ required: true, message: '账号不能为空!' ,whitespace:true}]} ]"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="县分">
<a-select placeholder="请选择" @change="changeSubst()" v-model="modifyForm.subName" >
<a-select-option key="">请选择</a-select-option>
<a-select-option v-for="data in subNameList" :value="data">
{{ data}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="学校名称">
<a-select placeholder="请选择" v-model="modifyForm.schoolId">
<a-select-option key="">请选择</a-select-option>
<a-select-option v-for="data in schoolList" :value="data.id">
{{ data.school_name}}
</a-select-option>
</a-select>
</a-form-item>
</a-form>
</a-modal>
</div>
</div>
</template>
<script>
import STable from '@/components/table';
import {
getList,addAllocation,
deleteAllocation,getSubstList,getSchoolList
} from "@/api/school-center/schoolAllocationAPI"
import {cloneObject} from '@/utils/util'
import treecheck from '@/components/sysmanage/treeCheck'
import treeList from '@/components/sysmanage/treeList'
export default {
name: "schoolAllocation",
components: {
STable,
treeList,
treecheck,
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this, {name: 'Formtable'}),
queryParam: {
account: '',
name: '',
substName:'',
schoolName:''
},
titleName: '',
modifyvisible:false,
modifyForm: {
id: '',
account: '',
schoolId: '',
},
autoCompleteResult:[],
subNameList: [],
schoolList:[],
addSubName:'',
columns: [
{dataIndex: 'name', width: 100, title: '姓名 ', align: "center"},
{dataIndex: 'account', width: 100, title: '账号', align: "center"},
{dataIndex: 'substName', width: 100, title: '管辖学校所属县分 ', align: "center"},
{dataIndex: 'schoolName', width: 200, title: '管辖学校 ', align: "center"},
{
dataIndex: 'operation',
width: 100,
title: '操作',
align: "center",
scopedSlots: {customRender: 'operation'},
fixed: "right"
}]
,
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
//表示
let obj = cloneObject(this.queryParam)
this.subNameList = [];
// 获取县分下拉清单
getSubstList(Object.assign(params,obj)).then(res => {
if (res.state == 'success') {
res.data.forEach((key)=>{
this.subNameList.push(key.sub_name)
})
}
})
return getList(Object.assign(params,obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
pageNo: 1,
totalCount: 0
}
} else {
data = {
data: res.data.records,
pageSize: parameter.pageSize,
pageNo: parameter.pageNo,
totalCount: res.data.total
}
}
return data
})
},
keyRecord: '',
recordId: '',
addUser: false,
}
},
methods:{
onLoad(){
alert();
// 获取县分下拉清单
getSubstList(Object.assign(params,obj)).then(res => {
if (res.state == 'success') {
res.data.forEach((key)=>{
this.subNameList.push(key.sub_name)
})
}
})
},
search() {
this.$refs.table.refresh({search: true})
},
openAllocation() {
this.titleName = "添加学校分配";
this.modifyvisible = true;
},
//提交表单
createfunctionOk(){
this.Formtable.validateFields(["account"], {force: true}, (err, values)=>{
if (!err){
this.modifyForm.account=values.account
addAllocation(this.modifyForm).then(res=>{
if (res.state=="success") {
this.$message.success(res.data ? res.data : '添加成功!', 5);
this.search();
this.modifyvisible = false;
return null;
}
this.$message.error(res.data ? res.data : '添加失败!', 5);
})
}
})
},
createfunctionCancel(){
this.modifyvisible=false
this.autoCompleteResult=[]
this.Formtable.setFieldsValue({
account: ''
})
this.addForm.subName = '';
},
deleteAllocation(id){
let params = {};
params.id = id;
deleteAllocation(params).then(res=>{
if (res.state=="success") {
this.$message.success(res.data ? res.data : '删除成功!', 5);
this.search();
this.modifyvisible = false;
return null;
}
this.$message.error(res.data ? res.data : '删除失败!', 5);
})
},
changeSubst(type){
let schoolParams = {};
schoolParams.subName = this.modifyForm.subName;
this.schoolList = [];
getSchoolList(schoolParams).then(res => {
if (res.state == 'success') {
res.data.forEach((key) => {
this.schoolList.push(key)
})
}
})
},
changeSchool(schoolId){
let schoolParams = {};
schoolParams.subName = this.modifyForm.subName;
this.schoolList = [];
getSchoolList(schoolParams).then(res => {
if (res.state == 'success') {
res.data.forEach((key) => {
this.schoolList.push(key)
})
this.modifyForm.schoolId = schoolId;
}
})
},
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
<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.title"></a-input>
</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>
<a-col :md="6" :sm="12">
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}" label="审核状态">
<a-select placeholder="请选择" v-model="queryParam.status">
<a-select-option key="">请选择</a-select-option>
<a-select-option key="0">重复放号</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>
</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.orderType">
<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>
</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 v-show="!callback" @click="exportList()" style="margin-left: 10px">导出</a-button>
<a-dropdown>
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="1">
<a-icon type="arrow-up" />放号上传
</a-menu-item>
<a-menu-item key="2">
<a-icon type="arrow-up" />充值审核
</a-menu-item>
<a-menu-item key="3">
<a-icon type="arrow-up" />累计充值导入
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
导入
<a-icon type="down" />
</a-button>
</a-dropdown>
</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="imageUrl" slot-scope="text">
<img style="width: 20%" :src="apis + text" @click="imgClick(text)">
</template>
<template slot="operation" slot-scope="text,record">
<!-- <a @click="modifyfunction(record)">编辑</a>-->
<a-divider type="vertical"/>
<a-popconfirm title="是否要删除此行?" @confirm="deleteOrder(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical"/>
</template>
<template slot="orderTypeScope" slot-scope="text">
<p v-if="text=='1'">放号登记</p>
<p v-if="text=='2'">新用户办卡</p>
<p v-if="text=='3'">存量升级</p>
</template>
<template slot="statusScope" slot-scope="text">
<p v-if="text=='0'">重复放号</p>
<p v-if="text=='1'">未审核</p>
<p v-if="text=='2'">系统审核不通过</p>
<p v-if="text=='3'">充值审核通过</p>
<p v-if="text=='4'">系统审核不通过</p>
</template>
</s-table>
<a-modal
title="批量导入"
:visible="modifyvisible"
@ok="createfunctionOk"
@cancel="createfunctionCancel"
html-type="submit"
width="400px"
>
<a-row :gutter="24">
<a-col :md="24" :sm="12">
<p style="text-align:center">{{ importTile }}</p>
</a-col>
</a-row>
<import-btn :url="importUrl" :responseFun="doPush">
<a-tooltip placement="topLeft" title="导入文件" arrowPointAtCenter>
<a-row :gutter="24">
<a-col :md="24" :sm="12">
<p>
选择文件:
<a-button type="primary">选择文件</a-button>
</p>
</a-col>
</a-row>
</a-tooltip>
</import-btn>
<a-row :gutter="24">
<a-col :md="24" :sm="12">
<p v-show="FHTemplate">
模板下载:
<a-button type="primary" @click="downloadTemplateFH">放号上传模板</a-button>
</p>
<p v-show="CZTemplate">
模板下载:
<a-button type="primary" @click="downloadTemplateCZ">充值审核模板</a-button>
</p>
<!-- <p v-show="LJTemplate">-->
<!-- 模板下载:-->
<!-- <a-button type="primary" @click="downloadTemplateLJ">累计审核模板</a-button>-->
<!-- </p>-->
</a-col>
</a-row>
</a-modal>
</div>
</template>
<script>
import STable from '@/components/table';
import {
getList,
deleteOrder,getSubstList,getSchoolList,
downloadTemplateFH,downloadTemplateCZ,
downloadResult,exportList
} from "@/api/school-center/salesOrderAPI"
import {cloneObject,exportFile} from '@/utils/util';
import ImportBtn from "../../../components/sysmanage/ImportBtn";
export default {
name: "salesOrder",
components: {
STable,ImportBtn
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
previewVisible: false,
previewImage: '',
fileList: [
],
apis:'',
fileid:{},
brackgroundurl:"manager/ciop/school/schoolManagement/qrcodeUpload",
// form
Formtable: this.$form.createForm(this, {name: 'Formtable'}),
FHTemplate: false,
CZTemplate: false,
importUrl: "",
importTile: "",
modifyvisible: false,
modifyForm: {
id: '',
title: '',
desc: '',
integral: '',
activityType: '',
subclass: '',
imageUrl: '',
range: '',
sort: '',
},
subNameList: [],
packageName:[],
chosePages:[],
products:[],
//输入框列表
queryParam: {
orderPhone: '',
name: '',
account: '',
status: '',
orderType: '',
createTimeStart: '',
createTimeEnd: '',
activateTimeStart: '',
activateTimeEnd: '',
},
columns: [
{dataIndex: 'salesSchool', width: 200, title: '销售学校', align: "center"},
{dataIndex: 'salesSubst', width: 200, title: '销售县分', align: "center"},
{dataIndex: 'orderPhone', width: 200, title: '电信激活号码', align: "center"},
{dataIndex: 'name', width: 200, title: '放号人', align: "center"},
{dataIndex: 'account', width: 200, title: '放号人账号', align: "center"},
{dataIndex: 'createTime', width: 200, title: '上传时间', align: "center"},
{
dataIndex: 'orderType', width: 200, title: '订单类型', align: "center",
scopedSlots: {customRender: "orderTypeScope"}
},
{dataIndex: 'networkName', width: 200, title: '所属网点', align: "center"},
{dataIndex: 'networkCode', width: 200, title: '网点编码', align: "center"},
{
dataIndex: 'status', width: 200, title: '审核状态', align: "center",
scopedSlots: {customRender: "statusScope"}
},
{dataIndex: 'remark', width: 200, title: '审核备注', align: "center"},
{dataIndex: 'auditTime', width: 200, title: '审核时间', align: "center"},
{dataIndex: 'activateTime', width: 200, title: '激活时间', align: "center"},
{dataIndex: 'recentlyAmount', width: 200, title: '最近充值', align: "center"},
{dataIndex: 'recentlyBonus', width: 200, title: '最近充值激励', align: "center"},
{dataIndex: 'capitalBonus', width: 200, title: '本金佣金', align: "center"},
{dataIndex: 'monthAmount', width: 200, title: '累计充值金额', align: "center"},
{dataIndex: 'monthBonus', width: 200, title: '累计充值激励', align: "center"},
{dataIndex: 'allBonus', width: 200, title: '应发总激励', align: "center"},
{dataIndex: 'nonSendBonus', width: 200, title: '未发激励', align: "center"},
{dataIndex: 'sendBonus', width: 200, title: '已发激励', align: "center"},
{dataIndex: 'oldCombo', width: 200, title: '原套餐', align: "center"},
{dataIndex: 'upgradeCombo', width: 200, title: '升级套餐', align: "center"},
{
dataIndex: 'operation',
width: 200,
title: '操作',
align: "center",
scopedSlots: {customRender: 'operation'},
fixed: "right"
}]
,
rowdata: parameter => {
const env = process.env.NODE_ENV; //获取当前环境
if(env === 'development'){ //测试环境默认添加前缀
this.apis = '/api/';
}
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
//表示
let obj = cloneObject(this.queryParam)
return getList(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})
},
handleMenuClick(e) {
if (e.key == "1") {
this.handleSubmit1();
}
if (e.key == "2") {
this.handleSubmit2();
}
},
handleSubmit1() {
this.importTile = "放号上传";
this.FHTemplate = true;
this.importUrl = "manager/ciop/salesOrder/importOrder";
this.modifyvisible = true;
},
handleSubmit2() {
this.importTile = "充值审核";
this.CZTemplate = true;
this.importUrl = "manager/ciop/salesOrder/importRechargeData";
this.modifyvisible = true;
},
downloadTemplateFH: function() {
exportFile(downloadTemplateFH(), "放号上传清单.xlsx");
},
downloadTemplateCZ: function() {
exportFile(downloadTemplateCZ(), "充值审核清单.xlsx");
},
// downloadTemplateLJ: function() {
// exportFile(downloadMoBanKD(), "累计充值审核清单.xlsx");
// },
createfunctionOk() {
this.modifyvisible = false;
this.clearmodel();
},
createfunctionCancel() {
this.modifyvisible = false;
this.clearmodel();
},
clearmodel() {
this.importTile = "";
this.FHTemplate = false;
this.CZTemplate = false;
this.importUrl = "";
},
// 执行上传
doPush(res) {
console.log(res);
if (!res || !res.response) {
this.$message.error("上传文件出错!", 10);
return false;
}
const response = res.response;
if (response.state !== "success") {
this.$message.error(response.msg ? response.msg : "上传文件出错!", 5);
return false;
}
this.$message.success("上传成功!" + response.data, 5);
if(response.data.indexOf("返回导入结果清单") > -1){
exportFile(downloadResult(), "导入结果清单.xlsx");
}
this.createfunctionCancel();
this.search();
},
deleteOrder(id){
let params = {};
params.id = id;
deleteOrder(params).then(res => {
if(res.state == "success"){
this.$message.success(res.data ? res.data : '删除成功', 5)
this.search();
return null;
}
this.$message.success(res.data ? res.data : '删除失败', 5);
})
},
exportList(){
exportFile(exportList(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