Commit 5436d2d3 by 黄森林

报表

parent 5216ecdd
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop';
// 智能平台账号实名
let salesOrderInfo = (params) => postAction(prefix + "/salesOrder/salesOrderInfo" , params);
let ysmUserNotThrough = (id,params) => postAction(prefix + "/ysmUser/notThrough/"+id,params);
let ysmUserInsert = (params) => postAction(prefix + "/ysmUser/insert" , params);
let ysmUserUpdate = (params) => postAction(prefix + "/ysmUser/update",params);
export {
salesOrderInfo,
ysmUserNotThrough,
ysmUserInsert,
ysmUserUpdate
}
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="5" :sm="12">
<a-form-item label="放号人:">
<a-input placeholder="放号人" v-model="queryParam.name"></a-input>
</a-form-item>
</a-col>
<a-col :md="5" :sm="12">
<a-form-item label="账号:">
<a-input placeholder="账号" v-model="queryParam.account"></a-input>
</a-form-item>
</a-col>
<a-col :md="5" :sm="12">
<a-form-item label="放号县分:">
<a-input placeholder="放号县分" v-model="queryParam.userName"></a-input>
</a-form-item>
</a-col>
<a-col :md="4" :sm="12">
<a-form-item label="放号学校:">
<a-input placeholder="放号学校" v-model="queryParam.userName"></a-input>
</a-form-item>
</a-col>
<a-col :md="5" :sm="12">
<a-form-item label="职位:">
<a-input placeholder="职位" v-model="queryParam.userName"></a-input>
</a-form-item>
</a-col>
<a-col :md="5" :sm="12">
<a-form-item label="上级领导:">
<a-input placeholder="上级领导" v-model="queryParam.positionSJ"></a-input>
</a-form-item>
</a-col>
<a-col :md="5" :sm="12">
<a-form-item label="所属总经理:">
<a-input placeholder="所属总经理" v-model="queryParam.positionZJL"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="激活时间段:">
<a-range-picker @change="onChange" />
</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="modifyfunction()" type="primary">添加</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="operation" slot-scope="text, record">
<span>
<a @click="modifyfunction(record)">修改</a>
<a-divider type="vertical"/>
<a-popconfirm v-if="record.status == 1" title="是否不通过佣金系统?" @confirm="notThrough(record.id,0)">
<a>不通过佣金系统</a>
</a-popconfirm>
<a-popconfirm v-if="record.status == 0" title="是否通过佣金系统?" @confirm="notThrough(record.id,1)">
<a>通过佣金系统</a>
</a-popconfirm>
</span>
</template>
<template slot="time" slot-scope="text">
{{ text | dayjs}}
</template>
</s-table>
<!----弹框-->
<a-modal :title="add ?'添加预实名账号': '编辑预实名账号'" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="1024px">
<a-form :form="Formtable">
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="账号:">
<a-input placeholder="预实名账号" v-decorator="[ 'userName', {rules: [{ required: true, message: '预实名账号不能为空!' ,validator: 'click'}]} ]"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="签名:">
<a-input placeholder="签名" v-decorator="[ 'sign', {rules: [{ required: true, message: '签名不能为空!' ,validator: 'click'}]} ]"></a-input>
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import STable from '@/components/table';
import {salesOrderInfo} from "@/api/school-center/salesOrder"
import {cloneObject} from '@/utils/util';
export default {
name: "salesOrder",
components: {
STable,
},
data(){
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
add: true,
queryParam: {
name :'',
account :'',
salesSubst :'',
salesSchool :'',
position :'',
positionSJ :'',
positionZJL :'',
activateTimeStart :'',
activateTimeEnd :'',
},
modelData:{
id:'',
userName:'',
sign:''
},
columns: [
{dataIndex: 'orderPhone', width: 200, title: '放号号码'},
{dataIndex: 'salesSubst', width: 100, title: '放号县分'},
{dataIndex: 'salesSchool', width: 200, title: '放号学校'},
{dataIndex: 'name', width: 100, title: '放号人'},
{dataIndex: 'account', width: 200, title: '账号'},
{dataIndex: 'positionZW', width: 150, title: '职位'},
{dataIndex: 'positionSJ', width: 100, title: '上级领导'},
{dataIndex: 'positionZJL', width: 100, title: '总经理'},
{dataIndex: 'createTime', width: 200,scopedSlots: {customRender: 'time'}, title: '上传时间'},
{dataIndex: 'activateTime', width: 200,scopedSlots: {customRender: 'time'}, title: '激活时间'},
/* {
dataIndex: 'operation',
width: 100,
title: '操作',
scopedSlots: {customRender: 'operation'},
fixed: "right"
}*/]
,
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
let obj = cloneObject(this.queryParam)
//表示
return salesOrderInfo(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
})
}
}
},
methods:{
onChange(date, dateString) {
this.queryParam.activateTimeStart=dateString[0]
this.queryParam.activateTimeEnd=dateString[1]
},
search() {
this.$refs.table.refresh({search: true})
},
notThrough(id,status) {
ysmUserNotThrough(id,{status}).then((res) => {
if(res.state=="success"){
this.$notification.success({message: res.data, description: '', duration: 4})
}
this.$refs.table.refresh({search: true})
})
},
modifyfunction(data){
if(data != undefined ){
this.modelData.id=data.id
setTimeout(()=>{
this.Formtable.setFieldsValue({
"userName":data.userName,
"sign":data.sign
})
},0)
this.add=false;
}
this.modifyvisible=true;
},
createfunctionOk(){
let that = this;
that.Formtable.validateFields(['userName','sign'], {force: true}, (err, values) => {
if (err ) {
return;
}
that.modelData.userName=values.userName
that.modelData.sign=values.sign
if(this.add){
let obj= that.modelData;
delete obj.id
let ysmUser= JSON.stringify(obj);
ysmUserInsert({ysmUser}).then((res) => {
this.modifyvisible=false;
this.clearmodel()
if(res.state=="success"){
this.$notification.success({message: res.data, description: '', duration: 4})
}
this.search()
})
}else {
let obj= that.modelData;
let ysmUser= JSON.stringify(obj);
ysmUserUpdate({ysmUser}).then((res) => {
this.modifyvisible=false;
this.clearmodel()
if(res.state=="success"){
this.$notification.success({message: res.data, description: '', duration: 4})
}
this.search()
})
}
})
},
createfunctionCancel(){
this.modifyvisible=false;
this.clearmodel()
this.add=true;
},
//清除弹窗信息
clearmodel() {
this.add=true
let that = this;
that.modelData.id=''
this.Formtable.setFieldsValue({
userName:'',
sign:''
})
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
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