Commit 072eae72 by 黄森林

Merge remote-tracking branch 'origin/master'

parents 4c4f565e 107c56ae
......@@ -2,7 +2,7 @@ import { axios } from '@/utils/request'
const api = {
user: '/api/user',
role: '/api/role',
role: '/api/role',downFilePost,
service: '/api/service',
permission: '/api/permission',
permissionNoPager: '/api/permission/no-pager'
......
......@@ -17,7 +17,7 @@ let addPartner = (params) => postAction(prefix + "/school/partner/addPartner" ,
// 获取县分下拉列表
let getSubstList = (params) => postAction(prefix + "/school/schoolManagement/substList" , params);
// 获取县分下拉列表
// 获取学校下拉列表
let getSchoolList = (params) => postAction(prefix + "/school/schoolManagement/schoolList" , params);
// 获取学子公司职位下级成员列表
......
......@@ -10,10 +10,13 @@ let addActivity = (params) => postAction(prefix + "/activity/addActivity" , para
// 编辑
let updateActivity = (params) => postAction(prefix + "/activity/updateActivity" , params);
//新增
// 删除
let deleteActivity = (params) => postAction(prefix + "/activity/deleteActivity" , params);
// 上传图片
let uploadImg = (params) => postAction(prefix + "/activity/uploadImg" , params);
export {
getList,addActivity,updateActivity,deleteActivity
getList,addActivity,updateActivity,deleteActivity,uploadImg
}
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop';
// 楼长KPI管理
let initSubstName = (params) => postAction(prefix + "/yxtCoupon/initSubstName" , params);
let getSchoolNames = (params) => postAction(prefix + "/yxtCoupon/getSchoolNames" , params);
let uploadExcel = (params) => downFilePost(prefix + "/yxtCoupon/excelOut" , params);
let downloadMoBan = (params) => downFilePost(prefix + "/yxtCoupon/downloadMoBan" , params);
let yxtCouponList = (params) => postAction(prefix + "/yxtCoupon/list" , params);
let yxtCouponDelete = (params) => postAction(prefix + "/yxtCoupon/delete", params);
let yxtCouponInsert = (params) => postAction(prefix + "/yxtCoupon/insert" , params);
let yxtCouponUpdate = (params) => postAction(prefix + "/yxtCoupon/update",params);
export {
initSubstName,
getSchoolNames,
uploadExcel,
downloadMoBan,
yxtCouponList,
yxtCouponDelete,
yxtCouponInsert,
yxtCouponUpdate,
}
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop';
// 楼长KPI管理
let initSubstName = (params) => postAction(prefix + "/lzKpi/initSubstName" , params);
let getSchoolNames = (params) => postAction(prefix + "/lzKpi/getSchoolNames" , params);
let uploadExcel = (params) => downFilePost(prefix + "/lzKpi/excelOut" , params);
let downloadMoBan = (params) => downFilePost(prefix + "/lzKpi/downloadMoBan" , params);
let lzKpiList = (params) => postAction(prefix + "/lzKpi/list" , params);
let lzKpiDelete = (params) => postAction(prefix + "/lzKpi/delete", params);
let lzKpiInsert = (params) => postAction(prefix + "/lzKpi/insert" , params);
let lzKpiUpdate = (params) => postAction(prefix + "/lzKpi/update",params);
export {
initSubstName,
getSchoolNames,
uploadExcel,
downloadMoBan,
lzKpiList,
lzKpiDelete,
lzKpiInsert,
lzKpiUpdate,
}
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop';
// 楼长KPI管理
let initSubstName = (params) => postAction(prefix + "/lzWage/initSubstName" , params);
let getSchoolNames = (params) => postAction(prefix + "/lzWage/getSchoolNames" , params);
let uploadExcel = (params) => downFilePost(prefix + "/lzWage/excelOut" , params);
let downloadMoBan = (params) => downFilePost(prefix + "/lzWage/downloadMoBan" , params);
let lzSalaryList = (params) => postAction(prefix + "/lzWage/list" , params);
let lzSalaryDelete = (params) => postAction(prefix + "/lzWage/delete", params);
let lzSalaryInsert = (params) => postAction(prefix + "/lzWage/insert" , params);
let lzSalaryUpdate = (params) => postAction(prefix + "/lzWage/update",params);
//生成楼长上月薪酬
let createSalary = (params) => postAction(prefix + "/lzWage/createSalary",params);
export {
initSubstName,
getSchoolNames,
uploadExcel,
downloadMoBan,
lzSalaryList,
lzSalaryDelete,
lzSalaryInsert,
lzSalaryUpdate,
createSalary
}
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop';
// 楼长KPI管理
let uploadExcel = (params) => downFilePost(prefix + "/managerKpi/excelOut" , params);
let downloadMoBan = (params) => downFilePost(prefix + "/managerKpi/downloadMoBan" , params);
let zjlKpiList = (params) => postAction(prefix + "/managerKpi/list" , params);
export {
uploadExcel,
downloadMoBan,
zjlKpiList
}
import {postAction} from '@/api/manage'
const prefix = '/manager/ciop';
// 宽带产品
let regularList = (params) => postAction(prefix + "/regular/list" , params);
let regularDelete = (params) => postAction(prefix + "/regular/delete", params);
let regularInsert = (params) => postAction(prefix + "/regular/insert" , params);
let regularUpdate = (params) => postAction(prefix + "/regular/update",params);
export {
regularList,
regularDelete,
regularInsert,
regularUpdate,
}
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop';
// 楼长KPI管理
let initSubstName = (params) => postAction(prefix + "/yxtOrder/initSubstName" , params);
let getSchoolNames = (params) => postAction(prefix + "/yxtOrder/getSchoolNames" , params);
let uploadExcel = (params) => downFilePost(prefix + "/yxtOrder/excelOut" , params);
let downloadMoBan = (params) => downFilePost(prefix + "/yxtOrder/downloadMoBan" , params);
let yxtOrderList = (params) => postAction(prefix + "/yxtOrder/list" , params);
let yxtOrderDelete = (params) => postAction(prefix + "/yxtOrder/delete", params);
let yxtOrderInsert = (params) => postAction(prefix + "/yxtOrder/insert" , params);
let yxtOrderUpdate = (params) => postAction(prefix + "/yxtOrder/update",params);
let getYxtCard = (params) => postAction(prefix + "/yxtOrder/getYxtCard",params);
export {
initSubstName,
getSchoolNames,
uploadExcel,
downloadMoBan,
yxtOrderList,
yxtOrderDelete,
yxtOrderInsert,
yxtOrderUpdate,
getYxtCard
}
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop';
// 楼长KPI管理
let initSubstName = (params) => postAction(prefix + "/zjlWage/initSubstName" , params);
let getSchoolNames = (params) => postAction(prefix + "/zjlWage/getSchoolNames" , params);
let uploadExcel = (params) => downFilePost(prefix + "/zjlWage/excelOut" , params);
let downloadMoBan = (params) => downFilePost(prefix + "/zjlWage/downloadMoBan" , params);
let zjlSalaryList = (params) => postAction(prefix + "/zjlWage/list" , params);
let zjlSalaryDelete = (params) => postAction(prefix + "/zjlWage/delete", params);
let zjlSalaryInsert = (params) => postAction(prefix + "/zjlWage/insert" , params);
let zjlSalaryUpdate = (params) => postAction(prefix + "/zjlWage/update",params);
//生成楼长上月薪酬
let createSalary = (params) => postAction(prefix + "/zjlWage/createSalary",params);
export {
initSubstName,
getSchoolNames,
uploadExcel,
downloadMoBan,
zjlSalaryList,
zjlSalaryDelete,
zjlSalaryInsert,
zjlSalaryUpdate,
createSalary
}
......@@ -486,8 +486,8 @@
this.$message.error( '身份证不合法', 5);
return null;
}
if(this.addForm.password.length != 8){
this.$message.error( '密码长度不对', 5);
if(this.addForm.password.length <= 8){
this.$message.error( '密码长度必须大于8', 5);
return null;
}
if(this.addForm.password != this.addForm.repassword){
......@@ -611,9 +611,9 @@
changeSubst(type){
let schoolParams = {};
if(type == 1){
schoolParams.subName = this.addForm.subName;
schoolParams.substName = this.addForm.subName;
}else{
schoolParams.subName = this.modifyForm.subName;
schoolParams.substName = this.modifyForm.subName;
}
this.schoolList = [];
......@@ -627,7 +627,7 @@
},
changeSchool(schoolId){
let schoolParams = {};
schoolParams.subName = this.modifyForm.subName;
schoolParams.substName = this.modifyForm.subName;
this.schoolList = [];
getSchoolList(schoolParams).then(res => {
......
......@@ -15,8 +15,8 @@
<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="1">个人活动</a-select-option>
<a-select-option key="2">团队活动</a-select-option>
<a-select-option key="个人活动">个人活动</a-select-option>
<a-select-option key="团队活动">团队活动</a-select-option>
</a-select>
</a-form-item>
</a-col>
......@@ -45,9 +45,16 @@
<!--列表-->
<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="deleteActivity(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical"/>
</template>
</s-table>
......@@ -62,7 +69,7 @@
<a-input placeholder="活动详情" v-decorator="[ 'desc', {rules: [{ required: true, message: '活动详情不能为空!' ,whitespace:true}]} ]"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="活动积分">
<a-input placeholder="活动积分" v-decorator="[ 'integral', {rules: [{ required: true, message: '活动积分不能为空!' ,whitespace:true}]} ]"></a-input>
<a-input placeholder="活动积分" v-decorator="[ 'integral', {rules: [{ required: false, type:'number', message: '活动积分不能为空!' ,transform:(value)=> {return Number(value)} }]} ]"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="活动类型">
<a-radio-group v-decorator="['activityType', {rules: [{ required: true, message: '活动类型不能为空!'}]} ]">
......@@ -81,18 +88,39 @@
</a-select>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="活动封面图片">
<a-upload :beforeUpload="uploadPicture" >
<a-button> <a-icon type="upload" /> 上传图片 </a-button>
</a-upload>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="排序号">
<a-input v-decorator="[ 'sort', {rules: [{ required: true, message: '活动小类不能为空!' ,whitespace:true}]} ]"></a-input>
<a-input v-decorator="[ 'sort', {rules: [{ required: true, type:'number', message: '排序号不能为空!' ,whitespace:true,transform:(value)=> {return Number(value)} }]} ]"></a-input>
</a-form-item>
</a-form>
</a-modal>
<!----弹框-->
<a-drawer
title="活动图片"
placement="right"
:closable="false"
@close="pictureOnClose"
:visible="visiblepicture"
width="30%"
>
<div >
<img class="bg-img" :src="imgInfo">
</div>
</a-drawer>
</div>
</template>
<script>
import STable from '@/components/table';
import {getList,addActivity,updateActivity,deleteActivity} from "@/api/school-center/activityAPI"
import {getList,addActivity,updateActivity,deleteActivity,uploadImg} from "@/api/school-center/activityAPI"
import {cloneObject} from '@/utils/util';
export default {
name: "activity",
......@@ -106,7 +134,7 @@
previewImage: '',
fileList: [
],
apis:'',
fileid:{},
brackgroundurl:"manager/ciop/school/schoolManagement/qrcodeUpload",
// form
......@@ -135,12 +163,15 @@
status: '',
},
modifyvisible: false,
visiblepicture: false,
columns: [
{dataIndex: 'title', width: 200, title: '活动标题', align: "center"},
{dataIndex: 'desc', width: 200, title: '活动详情', align: "center"},
{dataIndex: 'integral', width: 200, title: '活动积分', align: "center"},
{dataIndex: 'imageUrl', title: '图片 ', scopedSlots: {customRender: 'imageUrl'},align: 'center'},
{dataIndex: 'activityType', width: 200, title: '活动类型', align: "center"},
{dataIndex: 'subclass', width: 200, title: '活动小类', align: "center"},
{dataIndex: 'sort', width: 200, title: '排序号', align: "center"},
{dataIndex: 'creator', width: 200, title: '创建人', align: "center"},
{dataIndex: 'createTime', width: 200, title: '创建时间', align: "center"},
{
......@@ -153,6 +184,11 @@
}]
,
rowdata: parameter => {
const env = process.env.NODE_ENV; //获取当前环境
if(env === 'development'){ //测试环境默认添加前缀
this.apis = '/api/';
}
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
......@@ -187,67 +223,60 @@
}
},
methods:{
getuuid() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
},
baseuploadUrl(){
const env = process.env.NODE_ENV; //获取当前环境
let apis = "/";
if(env === 'development'){ //测试环境默认添加前缀
apis = '/api/';
}
return apis
},
uploadUrl(){
return this.baseuploadUrl() + this.brackgroundurl
}
,
//背景图
handleCancel() {
this.previewVisible = false;
},
handlePreview(file) {
this.previewImage = file.url || file.thumbUrl;
this.previewVisible = true;
},
handleChange(obj) {
if (this.fileList.length==2){
this.fileList.splice(0,1)
}else{
this.fileList = obj.fileList;
}
// getuuid() {
// return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
// var r = Math.random() * 16 | 0,
// v = c == 'x' ? r : (r & 0x3 | 0x8);
// return v.toString(16);
// });
// },
// baseuploadUrl(){
// const env = process.env.NODE_ENV; //获取当前环境
// let apis = "/";
// if(env === 'development'){ //测试环境默认添加前缀
// apis = '/api/';
// }
// return apis
// },
// uploadUrl(){
// return this.baseuploadUrl() + this.brackgroundurl
// }
// ,
// //背景图
// handleCancel() {
// this.previewVisible = false;
// },
// handlePreview(file) {
// this.previewImage = file.url || file.thumbUrl;
// this.previewVisible = true;
// },
// handleChange(obj) {
// if (this.fileList.length==2){
// this.fileList.splice(0,1)
// }else{
// this.fileList = obj.fileList;
// }
//
// },
deleteActivity(id){
let params = {};
params.id = id;
},
delet(deletdata){
let status=0;
if(deletdata.status==0){
status=1
}
let parent = {
id: deletdata.id,
status: status
}
hidestatus(parent).then(res=>{
deleteActivity(params).then(res=>{
if (res.state=="success"){
this.$message.success(res.data ? res.data : '修改成功!', 5);
this.$message.success(res.data ? res.data : '删除成功!', 5);
this.search();
return null
}
this.$message.error(res.data ? res.data : '修改失败!', 5);
this.$message.error(res.data ? res.data : '删除失败!', 5);
})
},
chosePagesfunction(data){
this.chosePages=data
},
search() {
this.$refs.table.refresh({search: true})
},
add(){
this.titleName="添加"
this.modifyForm.id = '';
setTimeout(()=>{
this.Formtable.setFieldsValue({
id: '',
......@@ -258,7 +287,7 @@
subclass: '',
imageUrl: '',
range: '',
sort: '',
sort: '666',
})
},0)
this.modifyvisible=true;
......@@ -266,52 +295,21 @@
modifyfunction(data){
//初始化
this.titleName="编辑"
let choosepagespare={
id:data.id
}
this.fileid={
id:data.id
}
// let url=this.baseuploadUrl()+"manager/"+data.serviceQrcode.replace("enclosure","ciop")
// if (!(data.serviceQrcode == null || data.serviceQrcode=="")) {
// //下载图片浏览
// this.fileList.push({
// uid: this.getuuid(),
// name: '找不到图片',
// status: 'done',
// url: url,
// })
// }
// this.modifyForm.id=data.id
// //查询中间表
// choosepages(choosepagespare).then(res=>{
// if (res.state == 'success'){
// let d= res.data.choosepages
// for (let i = 0; i <d.length ; i++) {
// this.chosePages.push(d[i])
// }
// }
// })
// let showband="0"
// if (data.isShowband=="1"){
// showband=data.isShowband
// }
// let isShowrh="0"
// if (data.isShowrh=="1"){
// isShowrh=data.isShowrh
// }
this.modifyForm.id = data.id
setTimeout(()=>{
this.Formtable.setFieldsValue({
title: data.title,
desc: data.title,
integral: data.title,
activityType: data.title,
subclass: data.title,
imageUrl: data.title,
range: data.title,
sort:"",
desc: data.desc,
integral: data.integral,
activityType: data.activityType,
subclass: data.subclass,
imageUrl: data.imgageUrl,
range: data.range,
sort:data.sort,
})
},0)
this.customimg="./img/custom"+data.serviceQrcode
this.modifyvisible=true;
},
......@@ -381,7 +379,59 @@
this.modifyForm.chosePages=""
this.chosePages.splice(0,this.chosePages.length)
this.modifyvisible=false;
}
},
uploadPicture(file) {
let fileSize = file.size/1024/1024
console.log(fileSize)
if(fileSize > this.pictureSize){
this.$message.error('上传失败!图片大小不能超过'+this.pictureSize+'M',5);
return new Promise(resolve => {
console.log(resolve);
})
}else {
return new Promise(resolve => {
console.log(resolve);
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => {
const img = document.createElement('img');
img.src = reader.result;
img.onload = () => {
const limitWidth = arguments[2] ? arguments[2] : 640;
const width = img.width > limitWidth ? limitWidth : img.width;
const height = img.width > limitWidth ? parseInt((img.height * limitWidth) / img.width) : img.height;
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
canvas.width = width
canvas.height = height
ctx.fillStyle = '#fff'
ctx.fillRect(0,0,canvas.width,canvas.height)
ctx.drawImage(img,0,0,width,height)
const picture = canvas.toDataURL('image/jpeg')
console.log(picture.length)
return uploadImg({picture}).then(res => {
if(res == 'error'){
this.$message.error('上传失败!',5);
}
if(res.state == 'success'){
this.modifyForm.imageUrl = res.data;
this.$message.success('上传成功',5);
}
})
};
};
});
}
},
imgClick(res){
this.imgInfo=this.apis + res
this.visiblepicture=true
},
pictureOnClose() {
this.imgInfo=''
this.visiblepicture = false;
},
}
}
</script>
......
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="4" :sm="8">
<a-form-item label="姓名">
<a-input placeholder="姓名" v-model="queryParam.userName" style="width: 8rem;"></a-input>
</a-form-item>
</a-col>
<a-col :md="4" :sm="8">
<a-form-item label="县分">
<a-select v-model="queryParam.substName" @change="getSchoolNames" style="width: 8rem;">
<a-select-option key="">--全部--</a-select-option>
<a-select-option v-for="d in subNames" :key="d.value" :value="d.value">{{d.text}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="学校">
<a-select v-model="queryParam.schoolName" style="width: 15rem;">
<a-select-option key="">--全部--</a-select-option>
<a-select-option v-for="d in schoolNames" :key="d.value" :value="d.value">{{d.text}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="4" :sm="8">
<a-form-item label="KPI月份">
<a-month-picker @change="onChange" v-model="queryParam.month" placeholder="选择KPI月份" style="width: 8rem;"/>
</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-divider type="vertical"/>
<a-button @click="excelInto()" type="primary">KPI数据导入</a-button>
<a-divider type="vertical"/>
<a-button @click="excelOut()" type="primary">KPI数据导出</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<a-modal
title="批量导入"
:visible="kpiModifyvisible"
@ok="createfunctionOk0"
@cancel="createfunctionCancel0"
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="YRYMmoBan">
模板下载:
<a-button type="primary" @click="downloadMoBan">楼长KPI管理信息模板</a-button>
</p>
</a-col>
</a-row>
<a-row :gutter="24" :v-show="KDmoBan">
<a-col :md="24" :sm="12">
<p>说明:</p>
<p>1.批量导入请严格按照模版进行导入;</p>
</a-col>
</a-row>
</a-modal>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text">
{{ text | dayjs}}
</template>
<!--拦截器-->
<template slot="productCreateTime" slot-scope="text">
{{ text | dayjs}}
</template>
<template slot="operation" slot-scope="text,record">
<span>
<a @click="modifyfunction(record)">KPI打分</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="remove(record.id,'')">
<a>删除</a>
</a-popconfirm>
</span>
</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="[ 'sysuName', {rules: [{ required: true, message: '姓名不能为空!' }]} ]" :disabled="isdisabled"/>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="账号:">
<a-input placeholder="账号" v-decorator="[ 'account', {rules: [{ required: true, message: '账号不能为空!' }]} ]" :disabled="isdisabled"/>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="汇总任务量(满分:30):">
<a-input-number
placeholder="汇总任务量"
style="width: 20rem;"
:min="0"
:max="30"
v-decorator="[ 'reportDaily', {rules: [{ required: true, message: '汇总任务量不能为空!' }]} ]"/>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="参与集中营销(满分:30):">
<a-input-number
placeholder="参与集中营销"
:min="0"
:max="30"
v-decorator="[ 'collectiveSales', {rules: [{required: true, message: '参与集中营销不能为空!' }]} ]"
style="width: 20rem;"/>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="组织周例会(满分:10):">
<a-input-number
placeholder="组织周例会"
:min="0"
:max="10"
v-decorator="[ 'weeklyMeeting', {rules: [{ required: true, message: '组织周例会不能为空!' }]} ]"
style="width: 20rem;"/>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="定制扫楼营销方案(满分:10):">
<a-input-number
placeholder="定制扫楼营销方案"
:min="0"
:max="10"
v-decorator="[ 'organTraining', {rules: [{ required: true, message: '定制扫楼营销方案不能为空!' }]} ]"
style="width: 20rem;"/>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="组织培训(满分:20):">
<a-input-number
placeholder="组织培训"
:min="0"
:max="20"
v-decorator="[ 'designPlan', {rules: [{required: true, message: '组织培训不能为空!' }]} ]"
style="width: 20rem;"/>
</a-form-item>
<a-form-item v-show="false" :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="KPI总值:">
<a-input-number
placeholder="KPI总值"
:min="0"
:max="100"
v-decorator="[ 'kpi' ]"
style="width: 20rem;"
disabled/>
</a-form-item>
<a-form-item v-show="add" :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="KPI月份:">
<a-month-picker @change="onChange" placeholder="选择KPI月份" v-decorator="[ 'month' ]" style="width: 20rem;"/>
</a-form-item>
<a-form-item v-show="false" :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="是否删除:">
<a-select v-decorator="['isDel']" style="width: 330px">
<a-select-option key="1"></a-select-option>
<a-select-option key="0"></a-select-option>
</a-select>
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import STable from '@/components/table';
import ImportBtn from "../../../components/sysmanage/ImportBtn";
import {
lzKpiList, lzKpiDelete, lzKpiInsert, lzKpiUpdate,
getSchoolNames, initSubstName, uploadExcel, downloadMoBan
} from "@/api/school-center/louZhangManagerAPI"
import {cloneObject, exportFile} from '@/utils/util';
import Vue from 'vue';
import {DatetimePicker} from 'vant';
import moment from "moment";
import ConstantActivity from "@/constant/ConstantActivity";
Vue.use(DatetimePicker);
export default {
name: "louZhangKPI",
components: {
STable, ImportBtn
},
data() {
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
kpiModifyvisible: false,
title: ConstantActivity.title,
add: true,
isdisabled: true,
queryParam: {
userName: '',
substName: '',
schoolName: '',
month: '',
},
subNames: [],
schoolNames: [],
modelData: {
id: '',
userId: '',
sysuName: '',
account: '',
substName: '',
schoolName: '',
reportDaily: '',
collectiveSales: '',
weeklyMeeting: '',
organTraining: '',
designPlan: '',
kpi: '',
month: '',
isDel: '0'
},
columns: [
{dataIndex: 'sysuName', width: 25, title: '姓名'},
{dataIndex: 'account', width: 40, title: '账号'},
{dataIndex: 'substName', width: 20, title: '县分'},
{dataIndex: 'schoolName', width: 70, title: '学校'},
{dataIndex: 'reportDaily', width: 25, title: '汇总任务量'},
{dataIndex: 'collectiveSales', width: 30, title: '参与集中营销'},
{dataIndex: 'weeklyMeeting', width: 25, title: '组织周例会'},
{dataIndex: 'organTraining', width: 30, title: '定制扫楼营销方案 '},
{dataIndex: 'designPlan', width: 20, title: '组织培训 '},
{dataIndex: 'kpi', width: 20, title: 'KPI总值'},
{dataIndex: 'month', width: 20, title: 'KPI月份 '},
{
dataIndex: 'operation',
width: 30,
title: '操作',
scopedSlots: {customRender: 'operation'},
fixed: "right"
}
],
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
let obj = cloneObject(this.queryParam)
//表示
return lzKpiList(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
})
},
importTile: "",
importUrl: "",
YRYMmoBan: true,
}
},
methods: {
moment,
onChange(date, dateString) {
console.log(dateString);
this.modelData.month = dateString;
},
excelOut() {
let params = {
pageNo: 1,
pageSize: 10
}
let obj = cloneObject(this.queryParam)
let nowdate = moment().format("YYYY-MM-DD");
//导出
exportFile(
uploadExcel(Object.assign(params, obj)),
"楼长KPI管理信息" + nowdate + ".xlsx",
);
},
excelInto() {
this.importTile = "批量导入楼长KPI管理信息";
this.YRYMmoBan = true;
this.importUrl = "manager/ciop/lzKpi/importDate";
this.kpiModifyvisible = true
},
downloadMoBan: function () {
exportFile(downloadMoBan(), "楼长KPI管理信息.xlsx");
},
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 : "上传文件出错!", 10);
return false;
}
this.$message.success("上传成功!" + response.data, 5);
},
createfunctionOk0() {
this.kpiModifyvisible = false;
this.clearmodel0();
},
createfunctionCancel0() {
this.kpiModifyvisible = false;
this.clearmodel0();
},
clearmodel0() {
this.importTile = "";
this.YRYMmoBan = false;
this.importUrl = "";
},
search() {
this.$refs.table.refresh({search: true})
},
remove(id, isdel) {
lzKpiDelete({'id': id, 'isdel': "isdel"}).then((res) => {
if (res.state == "success") {
this.$notification.success({message: res.data, description: '', duration: 4})
}
else{
this.$message.error(res.msg);
return;
}
this.$refs.table.refresh({search: true})
})
},
modifyfunction(data) {
if (data != undefined) {
this.add = false;
this.isdisabled = true;
this.modelData.id = data.id
this.modelData.userId = data.userId
this.modelData.month = data.month
setTimeout(() => {
this.Formtable.setFieldsValue({
"sysuName": data.sysuName,
"account": data.account,
"substName": data.substName,
"schoolName": data.schoolName,
"reportDaily": data.reportDaily,
"collectiveSales": data.collectiveSales,
"weeklyMeeting": data.weeklyMeeting,
"organTraining": data.organTraining,
"designPlan": data.designPlan,
"month": data.month,
"kpi": data.kpi,
"isDel": data.isDel
})
}, 0)
}else{
this.isdisabled = false;
}
this.modifyvisible = true;
},
createfunctionOk() {
let that = this;
that.Formtable.validateFields(['sysuName', 'account', 'substName', 'schoolName', 'reportDaily', 'collectiveSales', 'weeklyMeeting', 'organTraining', 'designPlan', "month", 'kpi', 'isDel'], {force: true}, (err, values) => {
if (err) {
return;
}
that.modelData.sysuName = values.sysuName
that.modelData.account = values.account
that.modelData.reportDaily = values.reportDaily
that.modelData.collectiveSales = values.collectiveSales
that.modelData.weeklyMeeting = values.weeklyMeeting
that.modelData.organTraining = values.organTraining
that.modelData.designPlan = values.designPlan
that.modelData.kpi = values.reportDaily + values.collectiveSales + values.weeklyMeeting + values.organTraining + values.designPlan
that.modelData.isDel = 0
if (this.add) {
let obj = that.modelData;
delete obj.id
let lzKpi = JSON.stringify(obj);
lzKpiInsert({lzKpi}).then((res) => {
this.modifyvisible = false;
this.clearmodel()
if (res.state == "success") {
this.$notification.success({message: res.data, description: '', duration: 4})
}else{
this.$message.error(res.msg);
return;
}
this.search()
})
} else {
let obj = that.modelData;
let lzKpi = JSON.stringify(obj);
lzKpiUpdate({lzKpi}).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
this.modelData.id = ''
this.modelData.month = ''
this.Formtable.setFieldsValue({
"sysuName": '',
"account": '',
"substName": '',
"schoolName": '',
"reportDaily": '',
"collectiveSales": '',
"weeklyMeeting": '',
"organTraining": '',
"designPlan": '',
"kpi": '',
"month": '',
"isDel": 1
})
},
getSchoolNames() {
this.schoolNames = []
this.queryParam.schoolName = ''
getSchoolNames({"substName": this.queryParam.substName}).then((res) => {
if (res.state == "success") {
const result = res.data
result.forEach((r) => {
if (r.schoolName === 'null')
return;
this.schoolNames.push({
value: r.schoolName,
text: r.schoolName
})
})
}
})
},
initSubstName() {
initSubstName().then((res) => {
if (res.state == "success") {
const result = res.data
result.forEach((r) => {
if (r.subName === 'null')
return;
this.subNames.push({
value: r.subName,
text: r.subName
})
})
}
})
}
},
mounted() {
this.initSubstName();
this.getSchoolNames();
}
}
</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="3" :sm="6">
<a-form-item label="姓名">
<a-input placeholder="姓名" v-model="queryParam.userName" style="width: 8rem;"></a-input>
</a-form-item>
</a-col>
<a-col :md="3" :sm="6">
<a-form-item label="县分">
<a-select v-model="queryParam.substName" @change="getSchoolNames" style="width: 8rem;">
<a-select-option key="">--全部--</a-select-option>
<a-select-option v-for="d in subNames" :key="d.value" :value="d.value">{{d.text}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="5" :sm="10">
<a-form-item label="学校">
<a-select v-model="queryParam.schoolName" style="width: 15rem;">
<a-select-option key="">--全部--</a-select-option>
<a-select-option v-for="d in schoolNames" :key="d.value" :value="d.value">{{d.text}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="4" :sm="8">
<a-form-item label="KPI月份">
<a-month-picker @change="onChange" v-model="queryParam.month" placeholder="选择KPI月份" style="width: 8rem;"/>
</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="createSalay()" type="primary">生成楼长上月薪酬</a-button>
<a-divider v-show="false" type="vertical"/>
<a-button v-show="false" @click="modifyfunction()" type="primary">添加</a-button>
<a-divider v-show="false" type="vertical"/>
<a-button v-show="false" @click="excelInto()" type="primary">薪酬数据导入</a-button>
<a-divider type="vertical"/>
<a-button @click="excelOut()" type="primary">薪酬数据导出</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<a-modal
title="生成薪酬"
:visible="createSalaryvisible"
@ok="createfunctionOk1"
@cancel="createfunctionCancel1"
width="400px"
>
<a-row :gutter="24">
<a-col :md="24" :sm="12">
<p style="text-align:center;font-weight: bold;">确定生成楼长上月薪酬吗?</p>
</a-col>
</a-row>
</a-modal>
<a-modal
title="批量导入"
:visible="salaryModifyvisible"
@ok="createfunctionOk0"
@cancel="createfunctionCancel0"
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="YRYMmoBan">
模板下载:
<a-button type="primary" @click="downloadMoBan">楼长薪酬管理信息模板</a-button>
</p>
</a-col>
</a-row>
<a-row :gutter="24" :v-show="KDmoBan">
<a-col :md="24" :sm="12">
<p>说明:</p>
<p>1.批量导入请严格按照模版进行导入;</p>
</a-col>
</a-row>
</a-modal>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text">
{{ text | dayjs}}
</template>
<!--拦截器-->
<template slot="productCreateTime" slot-scope="text">
{{ text | dayjs}}
</template>
<template slot="productState" slot-scope="text">
<p v-if="text=='0'">正常</p>
<p v-else=""></p>
</template>
<template slot="operation" slot-scope="text,record">
<span>
<a v-show="false" @click="modifyfunction(record)">编辑</a>
<a-divider v-show="false" type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="remove(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</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="[ 'sysuName', {rules: [{ required: true, message: '姓名不能为空!' }]} ]" :disabled="isdisabled"/>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="放号充值数:">
<a-input
placeholder="放号充值数"
style="width: 20rem;"
v-decorator="[ 'rechargeNum', {rules: [{ required: true, message: '放号充值数不能为空!' }]} ]"/>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="放号薪酬:">
<a-input
placeholder="放号薪酬"
v-decorator="[ 'rechargeWage', {rules: [{required: true, message: '放号薪酬不能为空!' }]} ]"
style="width: 20rem;"/>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="KPI总值:">
<a-input
placeholder="KPI总值"
v-decorator="[ 'kpi' ]"
style="width: 20rem;"
disabled/>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="kpi薪酬:">
<a-input
placeholder="kpi薪酬"
v-decorator="[ 'kpiWage', {rules: [{ required: true, message: 'kpi薪酬不能为空!' }]} ]"
style="width: 20rem;"/>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="总薪酬:">
<a-input
placeholder="总薪酬"
v-decorator="[ 'wage', {rules: [{ required: true, message: '总薪酬不能为空!' }]} ]"
style="width: 20rem;"/>
</a-form-item>
<a-form-item v-show="add" :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="KPI月份:">
<a-month-picker @change="onChange" placeholder="选择KPI月份" v-decorator="[ 'month' ]" style="width: 20rem;"/>
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import STable from '@/components/table';
import ImportBtn from "../../../components/sysmanage/ImportBtn";
import {
lzSalaryList, lzSalaryDelete, lzSalaryInsert, lzSalaryUpdate,
getSchoolNames, initSubstName, uploadExcel, downloadMoBan
} from "@/api/school-center/lzSalaryManagerAPI"
import {cloneObject, exportFile} from '@/utils/util';
import Vue from 'vue';
import {DatetimePicker} from 'vant';
import moment from "moment";
import ConstantActivity from "@/constant/ConstantActivity";
import {createSalary} from "../../../api/school-center/lzSalaryManagerAPI";
Vue.use(DatetimePicker);
export default {
name: "lzSalary",
components: {
STable, ImportBtn
},
data() {
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
salaryModifyvisible: false,
createSalaryvisible: false,
title: ConstantActivity.title,
add: true,
isdisabled: true,
queryParam: {
userName: '',
substName: '',
schoolName: '',
month: '',
},
subNames: [],
schoolNames: [],
modelData: {
id: '',
userId: '',
month: '',
sysuName: '',
substName: '',
schoolName: '',
rechargeNum: '',
rechargeWage: '',
kpi: '',
kpiWage: '',
wage: '',
},
columns: [
{dataIndex: 'month', width: 20, title: 'KPI月份 '},
{dataIndex: 'sysuName', width: 25, title: '姓名'},
{dataIndex: 'substName', width: 20, title: '县分'},
{dataIndex: 'schoolName', width: 70, title: '学校'},
{dataIndex: 'rechargeNum', width: 25, title: '放号充值数'},
{dataIndex: 'rechargeWage', width: 25, title: '放号薪酬'},
{dataIndex: 'kpi', width: 20, title: 'KPI总值'},
{dataIndex: 'kpiWage', width: 30, title: 'kpi薪酬'},
{dataIndex: 'wage', width: 25, title: '总薪酬'},
{
dataIndex: 'operation',
width: 30,
title: '操作',
scopedSlots: {customRender: 'operation'},
fixed: "right"
}
],
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
let obj = cloneObject(this.queryParam)
//表示
return lzSalaryList(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
})
},
importTile: "",
importUrl: "",
YRYMmoBan: true,
}
},
methods: {
moment,
onChange(date, dateString) {
console.log(dateString);
this.modelData.month = dateString;
},
excelOut() {
let params = {
pageNo: 1,
pageSize: 10
}
let obj = cloneObject(this.queryParam)
let nowdate = moment().format("YYYY-MM-DD");
//导出
exportFile(
uploadExcel(Object.assign(params, obj)),
"楼长薪酬管理信息" + nowdate + ".xlsx",
);
},
excelInto() {
this.importTile = "批量导入楼长薪酬管理信息";
this.YRYMmoBan = true;
this.importUrl = "manager/ciop/lzWage/importDate";
this.createSalaryvisible = true
},
downloadMoBan: function () {
exportFile(downloadMoBan(), "楼长薪酬管理信息.xlsx");
},
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 : "上传文件出错!", 10);
return false;
}
this.$message.success("上传成功!" + response.data, 5);
},
createSalay(){
//生成楼长上月薪酬
this.createSalaryvisible = true
},
createfunctionOk1() { //确定按扭
this.createSalaryvisible = false;
createSalary({}).then((res) => {
if (res.state == "success") {
this.$notification.success({message: res.data, description: '', duration: 4})
}else{
this.$message.error(res.msg);
return;
}
this.search()
})
},
createfunctionCancel1() { //取消按扭
this.createSalaryvisible = false;
},
createfunctionOk0() {
this.salaryModifyvisible = false;
this.clearmodel0();
},
createfunctionCancel0() {
this.salaryModifyvisible = false;
this.clearmodel0();
},
clearmodel0() {
this.importTile = "";
this.YRYMmoBan = false;
this.importUrl = "";
},
search() {
this.$refs.table.refresh({search: true})
},
remove(id) {
lzSalaryDelete({'id': id}).then((res) => {
if (res.state == "success") {
this.$notification.success({message: res.data, description: '', duration: 4})
}
else{
this.$message.error(res.msg);
return;
}
this.$refs.table.refresh({search: true})
})
},
modifyfunction(data) {
if (data != undefined) {
this.add = false;
this.isdisabled = true;
this.modelData.id = data.id
this.modelData.userId = data.userId
this.modelData.month = data.month
setTimeout(() => {
this.Formtable.setFieldsValue({
"sysuName": data.sysuName,
"account": data.account,
"substName": data.substName,
"schoolName": data.schoolName,
"reportDaily": data.reportDaily,
"collectiveSales": data.collectiveSales,
"weeklyMeeting": data.weeklyMeeting,
"organTraining": data.organTraining,
"designPlan": data.designPlan,
"month": data.month,
"kpi": data.kpi,
"isDel": data.isDel
})
}, 0)
}else{
this.isdisabled = false;
}
this.modifyvisible = true;
},
createfunctionOk() {
let that = this;
that.Formtable.validateFields(['sysuName', 'account', 'substName', 'schoolName', 'reportDaily', 'collectiveSales', 'weeklyMeeting', 'organTraining', 'designPlan', "month", 'kpi', 'isDel'], {force: true}, (err, values) => {
if (err) {
return;
}
that.modelData.sysuName = values.sysuName
that.modelData.account = values.account
that.modelData.reportDaily = values.reportDaily
that.modelData.collectiveSales = values.collectiveSales
that.modelData.weeklyMeeting = values.weeklyMeeting
that.modelData.organTraining = values.organTraining
that.modelData.designPlan = values.designPlan
that.modelData.kpi = values.reportDaily + values.collectiveSales + values.weeklyMeeting + values.organTraining + values.designPlan
that.modelData.isDel = 0
if (this.add) {
let obj = that.modelData;
delete obj.id
let lzKpi = JSON.stringify(obj);
lzSalaryInsert({lzKpi}).then((res) => {
this.modifyvisible = false;
this.clearmodel()
if (res.state == "success") {
this.$notification.success({message: res.data, description: '', duration: 4})
}else{
this.$message.error(res.msg);
return;
}
this.search()
})
} else {
let obj = that.modelData;
let lzKpi = JSON.stringify(obj);
lzSalaryUpdate({lzKpi}).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
this.modelData.id = ''
this.modelData.month = ''
this.Formtable.setFieldsValue({
"sysuName": '',
"account": '',
"substName": '',
"schoolName": '',
"reportDaily": '',
"collectiveSales": '',
"weeklyMeeting": '',
"organTraining": '',
"designPlan": '',
"kpi": '',
"month": '',
"isDel": 1
})
},
getSchoolNames() {
this.schoolNames = []
this.queryParam.schoolName = ''
getSchoolNames({"substName": this.queryParam.substName}).then((res) => {
if (res.state == "success") {
const result = res.data
result.forEach((r) => {
if (r.schoolName === 'null')
return;
this.schoolNames.push({
value: r.schoolName,
text: r.schoolName
})
})
}
})
},
initSubstName() {
initSubstName().then((res) => {
if (res.state == "success") {
const result = res.data
result.forEach((r) => {
if (r.subName === 'null')
return;
this.subNames.push({
value: r.subName,
text: r.subName
})
})
}
})
}
},
mounted() {
this.initSubstName();
this.getSchoolNames();
}
}
</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="3" :sm="6">
<a-form-item label="姓名">
<a-input placeholder="姓名" v-model="queryParam.name" style="width: 8rem;"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="月份">
<a-range-picker
:placeholder="['开始月份', '结束月份']"
format="YYYYMM"
:value="queryParam.month"
:mode="tempMode"
@panelChange="handlePanelChange"
style="width: 16rem;"
/>
</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="excelInto()" type="primary">导入总经理KPI数据</a-button>
<a-divider type="vertical"/>
<a-button @click="excelOut()" type="primary">导出所有数据</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<a-modal
title="批量导入"
:visible="zjlkpivisible"
@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="zjlmoBan">
模板下载:
<a-button type="primary" @click="downloadMoBan">总经理KPI信息模板</a-button>
</p>
</a-col>
</a-row>
<a-row :gutter="24" :v-show="KDmoBan">
<a-col :md="24" :sm="12">
<p>说明:</p>
<p>1.批量导入请严格按照模版进行导入;</p>
</a-col>
</a-row>
</a-modal>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text">
{{ text | dayjs}}
</template>
<!--拦截器-->
<template slot="productCreateTime" slot-scope="text">
{{ text | dayjs}}
</template>
<template slot="productState" slot-scope="text">
<p v-if="text=='0'">正常</p>
<p v-else=""></p>
</template>
<!--<template slot="operation" slot-scope="text,record">
<span>
<a v-show="false" @click="modifyfunction(record)">编辑</a>
<a-divider v-show="false" type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="remove(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</template>-->
</s-table>
</div>
</template>
<script>
import STable from '@/components/table';
import ImportBtn from "../../../components/sysmanage/ImportBtn";
import { zjlKpiList, uploadExcel, downloadMoBan } from "@/api/school-center/managerKpiAPI"
import {cloneObject, exportFile} from '@/utils/util';
import Vue from 'vue';
import {DatetimePicker} from 'vant';
import moment from "moment";
import ConstantActivity from "@/constant/ConstantActivity";
Vue.use(DatetimePicker);
export default {
name: "managerKpiAPI",
components: {
STable, ImportBtn
},
data() {
return {
emptyText: {emptyText: '暂无数据'},
title: ConstantActivity.title,
queryParam: {
name: '',
month: ['', ''],
},
modelData: {
month: '',
county: '',
name: '',
totalPerformance: '',
performanceBase: '',
yfPerformance: '',
kpi: '',
rwKpi: '',
wxKpi: '',
yyKpi: '',
workKpi: '',
totalBonus: '',
totalFund: '',
autumnBonus: '',
yfBonus: '',
},
columns: [
{dataIndex: 'month', width: 20, title: '月份 '},
{dataIndex: 'county', width: 20, title: '县分'},
{dataIndex: 'name', width: 25, title: '督导'},
{dataIndex: 'totalPerformance', width: 30, title: '绩效奖金合计'},
{dataIndex: 'performanceBase', width: 25, title: '绩效基数'},
{dataIndex: 'yfPerformance', width: 25, title: '应发绩效'},
{dataIndex: 'kpi', width: 20, title: 'kpi总分'},
{dataIndex: 'rwKpi', width: 25, title: '移动入网'},
{dataIndex: 'wxKpi', width: 30, title: '存量维系'},
{dataIndex: 'yyKpi', width: 25, title: '团队运营'},
{dataIndex: 'workKpi', width: 25, title: '每月工作'},
{dataIndex: 'totalBonus', width: 25, title: '累计佣金'},
{dataIndex: 'totalFund', width: 25, title: '累计分成'},
{dataIndex: 'autumnBonus', width: 25, title: '秋营达标奖'},
{dataIndex: 'yfBonus', width: 25, title: '应发提成'}
],
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
let obj = cloneObject(this.queryParam)
return zjlKpiList(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
})
},
importTile: "",
importUrl: "",
zjlmoBan: true,
KDmoBan: true,
zjlkpivisible: false,
tempMode:['month', 'month'],
}
},
methods: {
moment,
handlePanelChange(value, mode) {
this.queryParam.month = value;
this.tempMode = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]];
//console.log("this.tempMode=================="+this.tempMode);
},
excelOut() {
let params = {
pageNo: 1,
pageSize: 10
}
let obj = cloneObject(this.queryParam)
let nowdate = moment().format("YYYY-MM-DD");
//导出
exportFile(
uploadExcel(Object.assign(params, obj)),
"总经理KPI信息" + nowdate + ".xlsx",
);
},
excelInto() {
this.importTile = "批量导入总经理KPI信息";
this.importUrl = "manager/ciop/managerKpi/importDate";
this.zjlmoBan = true;
this.zjlkpivisible = true
},
downloadMoBan: function () {
exportFile(downloadMoBan(), "总经理KPI信息.xlsx");
},
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 : "上传文件出错!", 10);
return false;
}
this.$message.success("上传成功!" + response.data, 5);
},
createfunctionOk() {
this.zjlkpivisible = false;
this.clearmodel();
},
createfunctionCancel() {
this.zjlkpivisible = false;
this.clearmodel0();
},
clearmodel() {
this.importTile = "";
this.zjlmoBan = false;
this.importUrl = "";
},
search() {
console.log("queryParam.month=================="+this.queryParam);
this.$refs.table.refresh({search: true})
},
},
mounted() {
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
......@@ -363,6 +363,8 @@
netPhone:"0",
isShowrh:"0",
isRecv:"0",
networkCode: '',
networkName: '',
})
},0)
this.modifyvisible=true;
......@@ -415,6 +417,8 @@
netPhone:new String(data.netPhone).toString(),
isShowrh:isShowrh,
isRecv:new String(data.isRecv).toString(),
networkName: data.networkName,
networkCode: data.networkCode
})
},0)
this.customimg="./img/custom"+data.serviceQrcode
......
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="3" :sm="6">
<a-form-item label="姓名">
<a-input placeholder="姓名" v-model="queryParam.name" style="width: 8rem;"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="月份">
<a-range-picker
:placeholder="['开始月份', '结束月份']"
format="YYYYMM"
:value="queryParam.month"
:mode="tempMode"
@panelChange="handlePanelChange"
style="width: 16rem;"
/>
</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 v-show="false" type="vertical"/>-->
<!-- <a-button v-show="false" @click="modifyfunction()" type="primary">添加</a-button>-->
<a-divider type="vertical"/>
<a-button @click="excelInto()" type="primary">薪酬数据导入</a-button>
<a-divider type="vertical"/>
<a-button @click="excelOut()" type="primary">薪酬数据导出</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<a-modal
title="批量导入"
:visible="salaryModifyvisible"
@ok="createfunctionOk0"
@cancel="createfunctionCancel0"
html-type="submit"
width="800px"
>
<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="YRYMmoBan">
模板下载:
<a-button type="primary" @click="downloadMoBan">总经理薪酬管理信息模板</a-button>
</p>
</a-col>
</a-row>
<a-row :gutter="24" :v-show="KDmoBan">
<a-col :md="24" :sm="12">
<p>说明:</p>
<p>1.批量导入请严格按照模版进行导入;</p>
</a-col>
</a-row>
</a-modal>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text">
{{ text | dayjs}}
</template>
<!--拦截器-->
<template slot="productCreateTime" slot-scope="text">
{{ text | dayjs}}
</template>
<template slot="productState" slot-scope="text">
<p v-if="text=='0'">正常</p>
<p v-else=""></p>
</template>
<template slot="operation" slot-scope="text,record">
<span>
<!--<a v-show="false" @click="modifyfunction(record)">编辑</a>
<a-divider v-show="false" type="vertical"/>-->
<a-popconfirm title="确定删除吗?" @confirm="remove(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</template>
</s-table>
</div>
</template>
<script>
import STable from '@/components/table';
import ImportBtn from "../../../components/sysmanage/ImportBtn";
import {
zjlSalaryList, zjlSalaryDelete, uploadExcel, downloadMoBan,createSalary
} from "@/api/school-center/zjlSalaryManagerAPI"
import {cloneObject, exportFile} from '@/utils/util';
import Vue from 'vue';
import {DatetimePicker} from 'vant';
import moment from "moment";
import ConstantActivity from "@/constant/ConstantActivity";
Vue.use(DatetimePicker);
export default {
name: "zjlSalary",
components: {
STable, ImportBtn
},
data() {
return {
emptyText: {emptyText: '暂无数据'},
modifyvisible: false,
salaryModifyvisible: false,
title: ConstantActivity.title,
queryParam: {
name: '',
month: '',
},
columns: [
{dataIndex: 'month', width: 80, title: '月份 '},
{dataIndex: 'department', width: 80, title: '归属'},
{dataIndex: 'name', width: 80, title: '姓名'},
{dataIndex: 'idCard', width: 120, title: '身份证'},
{dataIndex: 'company', width: 80, title: '分公司'},
{dataIndex: 'attribute', width: 80, title: '属性'},
{dataIndex: 'positionWage', width: 80, title: '岗位工资'},
{dataIndex: 'performanceBonus', width: 80, title: '绩效奖金(绩效工资+提成)'},
{dataIndex: 'specialBonus', width: 80, title: '专项奖'},
{dataIndex: 'yearEndBonus', width: 80, title: '年终奖'},
{dataIndex: 'festivalFee', width: 80, title: '高温补贴(6-10月)'},
{dataIndex: 'correspondenceSubsidy', width: 80, title: '通讯补贴'},
{dataIndex: 'tableMoneySubsidy', width: 80, title: '餐费补贴'},
{dataIndex: 'trafficSubsidy', width: 80, title: '交通补贴'},
{dataIndex: 'specialBonusAutumn', width: 87, title: '专项奖(秋营奖励)'},
{dataIndex: 'otherSubsidy', width: 80, title: '其他补扣补退'},
{dataIndex: 'totalYf', width: 80, title: '应发合计'},
{dataIndex: 'endowmentInsurancePersonal', width: 80, title: '个人养老保险'},
{dataIndex: 'unenploymentInsurancePersonal', width: 80, title: '个人缴纳失业保险'},
{dataIndex: 'medicarePersonal', width: 80, title: '个人缴纳医疗保险'},
{dataIndex: 'totalInsurance', width: 80, title: '个人保险小计'},
{dataIndex: 'reservedFund', width: 80, title: '个人缴纳住房公积金'},
{dataIndex: 'reservedFundTax', width: 80, title: '个税'},
{dataIndex: 'yearEndBonusTax', width: 80, title: '年终奖个税'},
{dataIndex: 'otherFeePersonal', width: 80, title: '个人其他补交补退'},
{dataIndex: 'duesPersonal', width: 80, title: '个人工会费'},
{dataIndex: 'totalFeePersonal', width: 80, title: '个人缴交小计'},
{dataIndex: 'totalSf', width: 80, title: '实发合计'},
{dataIndex: 'endowmentInsuranceUnit', width: 80, title: '单位养老保险'},
{dataIndex: 'unenploymentInsuranceUnit', width: 80, title: '单位失业保险'},
{dataIndex: 'medicareUnit', width: 80, title: '单位医疗保险'},
{dataIndex: 'employmentInjuryInsuranceUnit', width: 80, title: '单位工伤保险'},
{dataIndex: 'birthInsuranceUnit', width: 80, title: '单位生育保险'},
{dataIndex: 'illnessInsuranceUnit', width: 80, title: '重大疾病保险'},
{dataIndex: 'reservedFundUnit', width: 80, title: '单位公积金'},
{dataIndex: 'laborUnionFeeUnit', width: 80, title: '工会计提'},
{dataIndex: 'accidentInsuranceUnit', width: 80, title: '商业意外险'},
{dataIndex: 'disabilityInsuranceUnit', width: 80, title: '残保金'},
{dataIndex: 'otherFeeUnit', width: 80, title: '单位其他补交补退'},
{dataIndex: 'totalFeeUnit', width: 80, title: '单位缴交小计'},
{dataIndex: 'totalCastPersonal', width: 80, title: '总个人人工成本合计'},
{dataIndex: 'additionMsg', width: 80, title: '总薪酬'},
{dataIndex: 'manageFee', width: 80, title: '邮电人才服务管理费(200/人)'},
{dataIndex: 'totalCastUnit', width: 80, title: '单位总成本(含支出税点)'},
{dataIndex: 'endowmentInsurancePersonal2', width: 80, title: '个人缴纳养老保险2'},
{dataIndex: 'unenploymentInsurancePersonal2', width: 80, title: '个人缴纳失业保险2'},
{dataIndex: 'medicarePersonal2', width: 80, title: '个人缴纳医疗保险2'},
{dataIndex: 'resveredFundPersonal2', width: 80, title: '个人缴纳住房公积金2'},
{dataIndex: 'endowmentInsuranceUnit2', width: 80, title: '单位养老保险2'},
{dataIndex: 'unenploymentInsuranceUnit2', width: 80, title: '单位失业保险2'},
{dataIndex: 'medicareUnit2', width: 80, title: '单位医疗保险2'},
{dataIndex: 'employmentInjuryInsuranceUnit2', width: 80, title: '单位工伤保险2'},
{dataIndex: 'birthInsuranceUnit2', width: 80, title: '单位生育保险2'},
{dataIndex: 'illnessInsuranceUnit2', width: 80, title: '重大疾病保险企业缴纳2'},
{dataIndex: 'reservedInsuranceUnit2', width: 80, title: '单位住房公积金2'},
{dataIndex: 'totalInsuranceUnit2', width: 80, title: '合并计税'},
{dataIndex: 'wage', width: 80, title: '本月计税工资'},
{dataIndex: 'wageTax', width: 80, title: '本月抵税扣除'},
{dataIndex: 'wageTaxAfter', width: 80, title: '本月工资抵税'},
{dataIndex: 'lastYearEndBonus', width: 80, title: '年终奖应税'},
{dataIndex: 'lastYearEndBonusTax', width: 80, title: '年终奖个税计算'},
{dataIndex: 'bankAccount', width: 80, title: '银行账号'},
{dataIndex: 'managerCast', width: 80, title: '督导成本'},
{dataIndex: 'xzCompanyCast', width: 80, title: '学子公司成本'},
{
dataIndex: 'operation',
width: 60,
title: '操作',
scopedSlots: {customRender: 'operation'},
fixed: "right"
}
],
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
let obj = cloneObject(this.queryParam)
//表示
return zjlSalaryList(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
})
},
importTile: "",
importUrl: "",
YRYMmoBan: true,
tempMode:['month', 'month'],
}
},
methods: {
moment,
handlePanelChange(value, mode) {
this.queryParam.month = value;
this.tempMode = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]];
//console.log("this.tempMode=================="+this.tempMode);
},
excelOut() {
let params = {
pageNo: 1,
pageSize: 10
}
let obj = cloneObject(this.queryParam)
let nowdate = moment().format("YYYY-MM-DD");
//导出
exportFile(
uploadExcel(Object.assign(params, obj)),
"总经理薪酬管理信息" + nowdate + ".xlsx",
);
},
excelInto() {
this.importTile = "批量导入总经理薪酬管理信息";
this.YRYMmoBan = true;
this.importUrl = "manager/ciop/zjlWage/importDate";
this.salaryModifyvisible = true
},
downloadMoBan: function () {
exportFile(downloadMoBan(), "总经理薪酬管理信息.xlsx");
},
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 : "上传文件出错!", 10);
return false;
}
this.$message.success("上传成功!" + response.data, 5);
},
createSalay(){
//生成总经理上月薪酬
this.createSalaryvisible = true
},
createfunctionOk1() { //确定按扭
this.createSalaryvisible = false;
createSalary({}).then((res) => {
if (res.state == "success") {
this.$notification.success({message: res.data, description: '', duration: 4})
}else{
this.$message.error(res.msg);
return;
}
this.search()
})
},
createfunctionCancel1() { //取消按扭
this.createSalaryvisible = false;
},
createfunctionOk0() {
this.salaryModifyvisible = false;
this.clearmodel0();
},
createfunctionCancel0() {
this.salaryModifyvisible = false;
this.clearmodel0();
},
clearmodel0() {
this.importTile = "";
this.YRYMmoBan = false;
this.importUrl = "";
},
search() {
this.$refs.table.refresh({search: true})
},
remove(id) {
zjlSalaryDelete({'id': id}).then((res) => {
if (res.state == "success") {
this.$notification.success({message: res.data, description: '', duration: 4})
}
else{
this.$message.error(res.msg);
return;
}
this.$refs.table.refresh({search: true})
})
},
},
mounted() {
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
......@@ -7,7 +7,7 @@
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="时间选择:">
<a-range-picker @change="onChange" />
<a-range-picker @change="onChange" format="YYYY-MM" />
</a-form-item>
</a-col>
<a-col :md="4" :sm="12">
......@@ -766,11 +766,11 @@ export default {
//时间事件
onChange(date, dateString) {
if (dateString.length == 0) {
this.queryParam.startTime = "";
this.queryParam.endTime = "";
this.queryParam.createTimeStart = "";
this.queryParam.createTimeEnd = "";
} else {
this.queryParam.startTime = dateString[0];
this.queryParam.endTime = dateString[1];
this.queryParam.createTimeStart = dateString[0];
this.queryParam.createTimeEnd = dateString[1];
}
},
handleSubmit() {
......
......@@ -43,8 +43,8 @@
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="4" :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-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>
......
......@@ -6,13 +6,13 @@
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="县分:">
<a-input placeholder="县分" v-model="queryParam.productRegion"></a-input>
<a-form-item label="县分:">
<a-input placeholder="县分" v-model="queryParam.productRegion"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="学校名称">
<a-input placeholder="学校名称" v-model="queryParam.productUniversity" ></a-input>
<a-form-item label="学校名称">
<a-input placeholder="学校名称" v-model="queryParam.productUniversity"></a-input>
</a-form-item>
</a-col>
<a-col :md="12" :sm="12">
......@@ -22,10 +22,11 @@
</a-col>
</a-row>
</a-form>
</div>
</div>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"
:locale="emptyText">
<!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text">
{{ text | dayjs}}
......@@ -35,7 +36,7 @@
{{ text | dayjs}}
</template>
<template slot="text" slot-scope="text">
<p style="white-space: pre-line;">{{text}}</p>
<p style="white-space: pre-line;">{{text}}</p>
</template>
<template slot="productState" slot-scope="text">
<span v-if="text=='0'">正常</span>
......@@ -52,7 +53,7 @@
</template>
</s-table>
<!----弹框-->
<a-modal :title="add ?'添加宽带': '编辑宽带'" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="1024px">
<a-modal :title="add ?'添加宽带': '编辑宽带'" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="1024px">
<a-drawer
title="适用学校详情"
placement="right"
......@@ -73,33 +74,63 @@
<p><span>计费属性:{{chouti.universityChargingAttribute}}</span></p>
<p><span>学校联系号码:{{chouti.universityContactPhone}}</span></p>
</a-drawer>
<a-drawer
title="正则校检详情"
placement="right"
:closable="false"
@close="visibleT2 = false"
:visible="visibleT2"
width=" 40%"
>
<p><span>正则名称:{{regular.name}}</span></p>
<p><span>正则表达示:{{regular.regular}}</span></p>
<p><span>错误提示:{{regular.tips}}</span></p>
<p><span>输入框默认提示:{{regular.placeholder}}</span></p>
</a-drawer>
<a-form :form="Formtable">
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="宽带标题:">
<a-input placeholder="宽带标题" v-decorator="[ 'productTitle', {rules: [{ required: true, message: '宽带标题不能为空!' ,validator: 'click'}]} ]"></a-input>
<a-input placeholder="宽带标题"
v-decorator="[ 'productTitle', {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="[ 'productRegion', {rules: [{ required: true, message: '区域不能为空!' ,validator: 'click'}]} ]"></a-input>
<a-input placeholder="区域"
v-decorator="[ 'productRegion', {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="[ 'productPrice', {rules: [{required: true, message: '资费不能为空!' ,validator: 'click'}]} ]"></a-input>
<a-input placeholder="资费"
v-decorator="[ 'productPrice', {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="[ 'productMeal', {rules: [{ required: true, message: '宽带速率不能为空!' ,validator: 'click'}]} ]"></a-input>
<a-input placeholder="宽带速率"
v-decorator="[ 'productMeal', {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="[ 'productRate', {rules: [{ required: true, message: '包年包月情况不能为空!' ,validator: 'click'}]} ]"></a-input>
<a-input placeholder="包年包月情况"
v-decorator="[ 'productRate', {rules: [{ required: true, message: '包年包月情况不能为空!' ,validator: 'click'}]} ]"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="适用学校:">
<a-select v-model="universityName" style="width: 330px">
<a-select v-model="universityName" style="width: 330px">
<a-select-option @click="universitySchoolName('请选择')" value="请选择">请选择</a-select-option>
<a-select-option @click="universitySchoolName(item)" v-for="item in universitySchool" :value="item.universityId">{{item.universityName}}</a-select-option>
<a-select-option @click="universitySchoolName(item)" v-for="item in universitySchool"
:value="item.universityId">
{{item.universityName}}
</a-select-option>
</a-select>
<a @click="visibleT = true">详情</a>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="套餐情况:">
<a-input :rows="10" v-model="modelData.productMealPrice"/>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="正则验证名:">
<a-select v-model="regularName" style="width: 330px">
<a-select-option @click="regularsName('请选择')" value="请选择">请选择</a-select-option>
<a-select-option @click="regularsName(item)" v-for="item in regulars" :value="item.regularId">
{{item.regularName}}
</a-select-option>
</a-select>
<a @click="visibleT2 = true">详情</a>
</a-form-item>
<div v-show="!add">
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="状态">
<a-select placeholder="状态" v-decorator="[ 'productState']">
......@@ -108,12 +139,13 @@
</a-select>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}" label="产品情况:">
<div v-html="productIntroduction">
</div>
<mavon-editor @save="saveProductIntroduction" ref="editor_a" v-model="productIntroduction"></mavon-editor>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}" label="资费介绍:">
<div v-html="productSetMealIntroduction">
</div>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}" label="单宽资费介绍:">
<mavon-editor @save="saveProductSetMealIntroduction" ref="editor_b" v-model="productSetMealIntroduction"></mavon-editor>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}" label="融合资费介绍:">
<mavon-editor @save="saveProductRf2" ref="editor_c" v-model="productRf2"></mavon-editor>
</a-form-item>
</div>
</a-form>
......@@ -123,42 +155,60 @@
<script>
import STable from '@/components/table';
import {productList,productDelete,productInsert,productUpdate,universitySchool} from "@/api/school-center/productAPI"
import {mavonEditor} from "mavon-editor";
import "mavon-editor/dist/css/index.css";
import {
productList,
productDelete,
productInsert,
productUpdate,
universitySchool
} from "@/api/school-center/productAPI"
import {cloneObject} from '@/utils/util';
export default {
name: "product",
components: {
STable,
STable, mavonEditor,
},
data(){
data() {
return {
universityIdtrue:true,
universityName:'',
visibleT:false,
chouti:{},
universitySchool:[],
universityIdtrue: true,
universityName: '',
regularName: '请选择',
visibleT: false,
visibleT2: false,
chouti: {},
regular: {},
universitySchool: [],
regulars: [],
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
add: true,
productIntroduction:"",
productSetMealIntroduction:'',
productIntroduction: "",
productSetMealIntroduction: '',
productRf2:'',
queryParam: {
productUniversity :'', //适用学校
productRegion :'', // 区域
productTitle :'', //宽带标题
productState :'' // 宽带狀態
productUniversity: '', //适用学校
productRegion: '', // 区域
productTitle: '', //宽带标题
productState: '' // 宽带狀態
},
modelData:{
universityId:'',
productMealPrice:'',
productMeal:'',
productTitle:'',
productUniversity:'',
productPrice:'',
productRegion:'',
productRate:'',
productId:''
modelData: {
universityId: '',
productMealPrice: '',
productMeal: '',
productTitle: '',
productUniversity: '',
productPrice: '',
productRegion: '',
productRate: '',
productId: '',
productIntroduction:'',
productSetMealIntroduction:'',
productRf2:'',
productIntroductionPic2: ''
},
columns: [
{dataIndex: 'productTitle', width: 200, title: '宽带标题 '},
......@@ -166,14 +216,24 @@
{dataIndex: 'productPrice', width: 80, title: '资费 '},
{dataIndex: 'productRegion', width: 80, title: '县分'},
{dataIndex: 'productCreater', width: 80, title: '创建人 '},
{dataIndex: 'productLastUpdateTime', width: 200, title: '更新时间 ' ,scopedSlots: {customRender: 'productLastUpdateTime'}},
{dataIndex: 'productCreateTime', width: 200, title: '创建时间 ', scopedSlots: {customRender: 'productCreateTime'}},
{
dataIndex: 'productLastUpdateTime',
width: 200,
title: '更新时间 ',
scopedSlots: {customRender: 'productLastUpdateTime'}
},
{
dataIndex: 'productCreateTime',
width: 200,
title: '创建时间 ',
scopedSlots: {customRender: 'productCreateTime'}
},
{dataIndex: 'productState', width: 80, title: '状态 ', scopedSlots: {customRender: 'productState'}},
{dataIndex: 'productMealPrice', width: 200, title: '套餐情况 ', scopedSlots: {customRender: 'text'}},
{dataIndex: 'productRate', width: 120, title: '包年包月情况 '},
{dataIndex: 'productMeal', width: 80, title: '宽带速率 '},
/* {dataIndex: 'productIntroduction', width: 200, title: '产品情况 ', scopedSlots: {customRender: 'text'}},
{dataIndex: 'productSetMealIntroduction', width: 200, title: '资费介绍 ', scopedSlots: {customRender: 'text'}},*/
/* {dataIndex: 'productIntroduction', width: 200, title: '产品情况 ', scopedSlots: {customRender: 'text'}},
{dataIndex: 'productSetMealIntroduction', width: 200, title: '资费介绍 ', scopedSlots: {customRender: 'text'}},*/
{
dataIndex: 'operation',
width: 120,
......@@ -189,7 +249,7 @@
}
let obj = cloneObject(this.queryParam)
//表示
return productList(Object.assign(params,obj)).then(res => {
return productList(Object.assign(params, obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
......@@ -201,11 +261,12 @@
totalCount: 0
}
} else {
this.regulars = res.data.regulars;
data = {
data: res.data.records,
data: res.data.page.records,
pageSize: parameter.pageSize,
pageNo: parameter.pageNo,
totalCount: res.data.total
totalCount: res.data.page.total
}
}
return data
......@@ -213,126 +274,169 @@
}
}
},
methods:{
universitySchoolName(item){
if(item == '请选择'){
this.modelData.productUniversity=item
}else {
this.modelData.productUniversity=item.universityName
this.modelData.universityId=item.universityId
this.chouti=item
methods: {
saveProductIntroduction(markdown, html) {
// 此时会自动将 markdown 和 html 传递到这个方法中
console.log("markdown内容:" + markdown);
//alert("html内容:" + html);
this.productIntroduction = html;
},
saveProductSetMealIntroduction(markdown, html) {
// 此时会自动将 markdown 和 html 传递到这个方法中
console.log("markdown内容:" + markdown);
this.productSetMealIntroduction = html
//alert("html内容:" + html);
},
saveProductRf2(markdown, html) {
// 此时会自动将 markdown 和 html 传递到这个方法中
console.log("markdown内容:" + markdown);
this.productRf2 = html
//alert("html内容:" + html);
},
universitySchoolName(item) {
if (item == '请选择') {
this.modelData.universityId = ''
} else {
this.modelData.productUniversity = item.universityName
this.modelData.universityId = item.universityId
this.chouti = item
}
},
regularsName(item) {
if (item == '请选择') {
this.modelData.productIntroductionPic2 = ''
} else {
this.modelData.productIntroductionPic2 = item.id
this.name = item.name
this.regular = item
}
},
search() {
this.$refs.table.refresh({search: true})
},
remove(id) {
productDelete(id).then((res) => {
if(res.state=="success"){
this.$notification.success({message: res.data, description: '', duration: 4})
}
this.$refs.table.refresh({search: true})
})
productDelete(id).then((res) => {
if (res.state == "success") {
this.$notification.success({message: res.data, description: '', duration: 4})
}
this.$refs.table.refresh({search: true})
})
},
modifyfunction(data){
modifyfunction(data) {
universitySchool().then(res => {
this.universitySchool=res.data
res.data.forEach(value=>{
if(data.universityId == value.universityId){
this.chouti = value
this.universitySchool = res.data
res.data.forEach(value => {
if (data.universityId == value.universityId) {
this.chouti = value
}
})
console.log(this.universitySchool)
})
if(data != undefined ){
this.productIntroduction=data.productIntroduction,
this.productSetMealIntroduction=data.productSetMealIntroduction,
this.modelData.productMealPrice=data.productMealPrice
this.modelData.productUniversity=data.productUniversity
this.universityName=data.productUniversity
this.modelData.universityId=data.universityId
this.modelData.productId=data.productId
setTimeout(()=>{
if (data != undefined) {
this.productIntroduction = data.productIntroduction
this.productSetMealIntroduction = data.productSetMealIntroduction
this.productRf2 = data.productRf2
this.modelData.productMealPrice = data.productMealPrice
this.modelData.productUniversity = data.productUniversity
this.universityName = data.productUniversity
for (var i = 0; i < this.regulars.length; i++) {
if (data.productIntroductionPic2 == this.regulars[i].regularId + '') {
this.regularName = this.regulars[i].regularName
this.modelData.productIntroductionPic2 = this.regulars[i].regularId
}
}
this.modelData.universityId = data.universityId
this.modelData.productId = data.productId
setTimeout(() => {
this.Formtable.setFieldsValue({
"productMeal":data.productMeal,
"productTitle":data.productTitle,
"productPrice":data.productPrice,
"productRegion":data.productRegion,
"productRate":data.productRate,
productState:data.productState
"productMeal": data.productMeal,
"productTitle": data.productTitle,
"productPrice": data.productPrice,
"productRegion": data.productRegion,
"productRate": data.productRate,
"productState": data.productState
})
},0)
this.add=false;
}else {
this.universityName='请选择'
}, 0)
this.add = false;
} else {
this.universityName = '请选择'
this.regularName = "请选择";
}
this.modifyvisible=true;
this.modifyvisible = true;
},
createfunctionOk(){
if(this.modelData.universityId == '' || this.modelData.universityId == undefined || this.modelData.productUniversity=='请选择'){
createfunctionOk() {
if (this.modelData.universityId == '' || this.modelData.universityId == undefined || this.modelData.productUniversity == '请选择') {
this.$notification.error({message: '请选择适用学校', duration: 4})
return
}
let that = this;
that.Formtable.validateFields(['productMeal','productTitle','productPrice','productRegion','productRate','productState'], {force: true}, (err, values) => {
if (err ) {
return;
}
that.modelData.productMeal=values.productMeal
that.modelData.productTitle=values.productTitle
that.modelData.productPrice=values.productPrice
that.modelData.productRegion=values.productRegion
that.modelData.productRate=values.productRate
that.modelData.productState=values.productState
if(this.add){
let obj= that.modelData;
delete obj.productId
let product= JSON.stringify(obj);
productInsert({product}).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 product= JSON.stringify(obj);
productUpdate({product}).then((res) => {
this.modifyvisible=false;
this.clearmodel()
if(res.state=="success"){
this.$notification.success({message: res.data, description: '', duration: 4})
}
this.search()
})
}
})
that.Formtable.validateFields(
[
'productMeal', 'productTitle', 'productPrice', 'productRegion', 'productRate',
'productState', "productIntroduction", "productSetMealIntroduction", "productRf2"
], {force: true}, (err, values) => {
if (err) {
return;
}
that.modelData.productMeal = values.productMeal
that.modelData.productTitle = values.productTitle
that.modelData.productPrice = values.productPrice
that.modelData.productRegion = values.productRegion
that.modelData.productRate = values.productRate
that.modelData.productState = values.productState
that.modelData.productIntroduction = this.$refs.editor_a.d_render;
that.modelData.productSetMealIntroduction = this.$refs.editor_b.d_render;
that.modelData.productRf2 = this.$refs.editor_c.d_render;
if (this.add) {
let obj = that.modelData;
delete obj.productId
let product = JSON.stringify(obj);
productInsert({product}).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 product = JSON.stringify(obj);
productUpdate({product}).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;
createfunctionCancel() {
this.modifyvisible = false;
this.clearmodel()
this.add=true;
this.add = true;
},
//清除弹窗信息
clearmodel() {
this.add=true
this.add = true
let that = this;
that.modelData.productMealPrice=''
that.modelData.productId=''
that.modelData.productIntroduction=''
that.modelData.productSetMealIntroduction=''
that.modelData.productUniversity='',
that.modelData.universityId='',
that.modelData.productMealPrice = ''
that.modelData.productId = ''
that.modelData.productIntroduction = ''
that.modelData.productSetMealIntroduction = ''
that.modelData.productUniversity = ''
that.modelData.universityId = ''
that.modelData.productIntroductionPic2 = ''
this.Formtable.setFieldsValue({
productMeal:'',
productTitle:'',
productPrice:'',
productRegion:'',
productRate:'',
productState:'0'
productMeal: '',
productTitle: '',
productPrice: '',
productRegion: '',
productRate: '',
productState: '0'
})
}
}
......
<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 label="正则名称">
<a-input placeholder="正则名称" v-model="queryParam.regularName" ></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="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="productLastUpdateTime" slot-scope="text">
{{ text | dayjs}}
</template>
<!--拦截器-->
<template slot="productCreateTime" slot-scope="text">
{{ text | dayjs}}
</template>
<template slot="productState" slot-scope="text">
<p v-if="text=='0'">正常</p>
<p v-else=""></p>
</template>
<template slot="operation" slot-scope="text,record">
<span>
<a @click="modifyfunction(record)">编辑</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定不显示吗" v-if="record.isShow == 1" @confirm="remove(record.regularId,0)">
<a>隐藏</a>
</a-popconfirm>
<a-popconfirm title="确定显示吗" v-if="record.isShow == 0" @confirm="remove(record.regularId,1)">
<a>显示</a>
</a-popconfirm>
</span>
</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 v-show="false" :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="">
<a-input placeholder="regularId" v-decorator="[ 'regularId', {rules: [{ required: true, message: 'regularId' ,validator: 'click'}]} ]"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="正则名称:">
<a-input placeholder="正则名称" v-decorator="[ 'regularName', {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="[ 'regular', {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="[ 'tips', {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="[ 'placeholder', {rules: [{ required: true, message: '外线方式不能为空!' ,validator: 'click'}]} ]"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="是否显示:">
<a-select v-decorator="[ 'isShow' ]" style="width: 330px">
<a-select-option key="1"></a-select-option>
<a-select-option key="0"></a-select-option>
</a-select>
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import STable from '@/components/table';
import {regularList,regularDelete,regularInsert,regularUpdate} from "@/api/school-center/verCodesAPI"
import {cloneObject} from '@/utils/util';
export default {
name: "codeManage",
components: {
STable,
},
data(){
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
add: true,
queryParam: {
regularName :'',
},
modelData:{
regularId: '',
regularName:'',
regular:'',
tips:'',
placeholder:'',
isShow: '1'
},
columns: [
{dataIndex: 'regularId', width: 20, title: 'regularId',istrue: true},
{dataIndex: 'regularName', width: 70, title: '正则名称'},
{dataIndex: 'regular', width: 100, title: '正则表达示 '},
{dataIndex: 'tips', width: 70, title: '错误提示'},
{dataIndex: 'placeholder', width: 70, title: '输入框默认提示 '},
{
dataIndex: 'operation',
width: 26,
title: '操作',
scopedSlots: {customRender: 'operation'},
fixed: "right"
}]
,
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
let obj = cloneObject(this.queryParam)
//表示
return regularList(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:{
search() {
this.$refs.table.refresh({search: true})
},
remove(regularId,isShow) {
regularDelete({'regularId':regularId,'isShow':isShow}).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.regularId=data.regularId
setTimeout(()=>{
this.Formtable.setFieldsValue({
"regularId":data.regularId,
"regularName":data.regularName,
"regular":data.regular,
"tips":data.tips,
"placeholder":data.placeholder,
"isShow":data.isShow
})
},0)
this.add=false;
}
this.modifyvisible=true;
},
createfunctionOk(){
let that = this;
that.Formtable.validateFields(['regularName','regular','tips','placeholder','isShow'], {force: true}, (err, values) => {
if (err ) {
return;
}
that.modelData.regularName=values.regularName
that.modelData.regular=values.regular
that.modelData.tips=values.tips
that.modelData.placeholder=values.placeholder
that.modelData.isShow=values.isShow
if(this.add){
let obj= that.modelData;
delete obj.id
let regular= JSON.stringify(obj);
regularInsert({regular}).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 regular= JSON.stringify(obj);
regularUpdate({regular}).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
this.modelData.regularId=''
this.Formtable.setFieldsValue({
"regularName":'',
"regular":'',
"tips":'',
"placeholder":'',
"isShow":'',
})
}
}
}
</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="8">
<a-form-item label="兑换券账号">
<a-input placeholder="兑换券账号" v-model="queryParam.card" style="width: 8rem;"></a-input>
</a-form-item>
</a-col>
<a-col :md="4" :sm="8">
<a-form-item label="销售状态">
<a-select v-model="queryParam.state" @change="getSchoolNames" style="width: 8rem;">
<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>
<a-col :md="6" :sm="12" v-show="false">
<a-form-item label="上架状态">
<a-select v-model="queryParam.shelfState" style="width: 15rem;">
<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>
</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-divider type="vertical"/>
<a-button @click="excelInto()" type="primary">兑换券数据导入</a-button>
<a-divider type="vertical"/>
<a-button @click="excelOut()" type="primary">兑换券数据导出</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<a-modal
title="批量导入"
:visible="kpiModifyvisible"
@ok="createfunctionOk0"
@cancel="createfunctionCancel0"
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="YRYMmoBan">
模板下载:
<a-button type="primary" @click="downloadMoBan">兑换券信息模板</a-button>
</p>
</a-col>
</a-row>
<a-row :gutter="24" :v-show="KDmoBan">
<a-col :md="24" :sm="12">
<p>说明:</p>
<p>1.批量导入请严格按照模版进行导入;</p>
</a-col>
</a-row>
</a-modal>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"
:locale="emptyText">
<!--拦截器-->
<template slot="updateDate" slot-scope="text">
{{ text | dayjs}}
</template>
<!--拦截器-->
<template slot="validityPeriod" slot-scope="text">
{{ text | dayjs}}
</template>
<!--<template slot="shelfState" slot-scope="text">
<p v-if="text==1">已上架</p>
<p v-if="text==2">已下架</p>
<p v-else=""></p>
</template>-->
<template slot="state" slot-scope="text">
<p v-if="text==1">未售出</p>
<p v-if="text==2">已售出</p>
<p v-if="text==3">售出中</p>
<p v-else=""></p>
</template>
<template slot="operation" slot-scope="text,record">
<span>
<a-popconfirm title="确定删除吗" v-if="record.state == 1" @confirm="remove(record,1)">
<a>删除</a>
</a-popconfirm>
<a-popconfirm title="确定恢复删除吗" v-if="record.delFlag == 1" @confirm="remove(record,0)">
<a>恢复删除</a>
</a-popconfirm>
</span>
</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="[ 'cardNumber', {rules: [{ required: true, message: '兑换券账号不能为空!' }]} ]"/>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="密码:">
<a-input placeholder="密码"
v-decorator="[ 'password', {rules: [{ required: true, message: '密码不能为空!' }]} ]"/>
</a-form-item>
<a-form-item :labelCol="{span: 5}" :wrapperCol="{span: 9, offset: 1}" label="有效截止日期:">
<a-date-picker @change="onChange" placeholder="有效截止日期"
v-decorator="[ 'validityPeriod', {rules: [{ required: true, message: '有效截止日期不能为空!' }]} ]"
style="width: 20rem;"/>
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import STable from '@/components/table';
import ImportBtn from "../../../components/sysmanage/ImportBtn";
import {
yxtCouponList, yxtCouponDelete, yxtCouponInsert, yxtCouponUpdate,
getSchoolNames, initSubstName, uploadExcel, downloadMoBan
} from "@/api/school-center/exchangeCouponAPI"
import {cloneObject, exportFile} from '@/utils/util';
import Vue from 'vue';
import {DatetimePicker} from 'vant';
import moment from "moment";
import ConstantActivity from "@/constant/ConstantActivity";
Vue.use(DatetimePicker);
export default {
name: "exchangeCoupon",
components: {
STable, ImportBtn
},
data() {
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
kpiModifyvisible: false,
title: ConstantActivity.title,
add: true,
isdisabled: true,
queryParam: {
card: '',
state: '',
shelfState: '',
},
subNames: [],
schoolNames: [],
modelData: {
id: '',
cardNumber: '',
password: '',
validityPeriod: '',
updateDate: '',
state: '',
shelfState: '',
},
columns: [
{dataIndex: 'cardNumber', width: 40, title: '兑换券账号'},
{dataIndex: 'password', width: 20, title: '密码'},
{dataIndex: 'state', width: 20, title: '出售状态 ', scopedSlots: {customRender: 'state'}},
/*{dataIndex: 'shelfState', width: 20, title: '上架状态 ', scopedSlots: {customRender: 'shelfState'}},*/
{
dataIndex: 'validityPeriod',
width: 40,
title: '有效截止日期',
scopedSlots: {customRender: 'validityPeriod'}
},
{dataIndex: 'updateDate', width: 40, title: '上传时间', scopedSlots: {customRender: 'updateDate'}},
{
dataIndex: 'operation',
width: 30,
title: '操作',
scopedSlots: {customRender: 'operation'},
fixed: "right"
}
],
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
let obj = cloneObject(this.queryParam)
//表示
return yxtCouponList(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
})
},
importTile: "",
importUrl: "",
YRYMmoBan: true,
}
},
methods: {
moment,
onChange(date, dateString) {
console.log(dateString);
this.modelData.validityPeriod = dateString;
},
excelOut() {
let params = {
pageNo: 1,
pageSize: 10
}
let obj = cloneObject(this.queryParam)
let nowdate = moment().format("YYYY-MM-DD");
//导出
exportFile(
uploadExcel(Object.assign(params, obj)),
"兑换券信息" + nowdate + ".xlsx",
);
},
excelInto() {
this.importTile = "批量导入兑换券信息";
this.YRYMmoBan = true;
this.importUrl = "manager/ciop/yxtCoupon/importDate";
this.kpiModifyvisible = true
},
downloadMoBan: function () {
exportFile(downloadMoBan(), "兑换券信息模板模板.xlsx");
},
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 : "上传文件出错!", 10);
return false;
}
this.$message.success("上传成功!" + response.data, 5);
},
createfunctionOk0() {
this.kpiModifyvisible = false;
this.clearmodel0();
},
createfunctionCancel0() {
this.kpiModifyvisible = false;
this.clearmodel0();
},
clearmodel0() {
this.importTile = "";
this.YRYMmoBan = false;
this.importUrl = "";
},
search() {
this.$refs.table.refresh({search: true})
},
remove(date, delFlag) {
if(delFlag == 1){
if(date.state == 2){//
this.$message.error("已售出的兑换券不能删除!");
return;
}else if(date.state == 2){//售出中
this.$message.error("售出中的兑换券不能删除!");
return;
}
}
yxtCouponDelete({'id': date.id, 'isdel': delFlag}).then((res) => {
if (res.state == "success") {
this.$notification.success({message: res.data, description: '', duration: 4})
} else {
this.$message.error(res.msg);
return;
}
this.$refs.table.refresh({search: true})
})
},
modifyfunction(data) {
if (data != undefined) {
this.add = false;
this.isdisabled = true;
this.modelData.id = data.id
setTimeout(() => {
this.Formtable.setFieldsValue({
"cardNumber": data.cardNumber,
"password": data.password,
"validityPeriod": data.validityPeriod,
"updateDate": data.updateDate,
"state": data.state,
"shelfState": data.shelfState,
"delFlag": data.delFlag,
})
}, 0)
} else {
this.isdisabled = false;
}
this.modifyvisible = true;
},
createfunctionOk() {
let that = this;
that.Formtable.validateFields(['cardNumber', 'password', 'validityPeriod'], {force: true}, (err, values) => {
if (err) {
return;
}
that.modelData.cardNumber = values.cardNumber
that.modelData.password = values.password
that.modelData.validityPeriod = values.validityPeriod
if (this.add) {
let obj = that.modelData;
delete obj.id
let yxtCoupon = JSON.stringify(obj);
yxtCouponInsert({yxtCoupon}).then((res) => {
this.modifyvisible = false;
this.clearmodel()
if (res.state == "success") {
this.$notification.success({message: res.data, description: '', duration: 4})
} else {
this.$message.error(res.msg);
return;
}
this.search()
})
} else {
let obj = that.modelData;
let yxtCoupon = JSON.stringify(obj);
yxtCouponUpdate({yxtCoupon}).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
this.modelData.id = ''
this.modelData.month = ''
this.Formtable.setFieldsValue({
"cardNumber": '',
"password": '',
"validityPeriod": '',
})
}
},
mounted() {
}
}
</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="5" :sm="8">
<a-form-item label="订单编号:">
<a-input placeholder="订单编号" v-model="queryParam.orderNum" style="width: 12rem;"></a-input>
</a-form-item>
</a-col>
<a-col :md="4" :sm="6">
<a-form-item label="买家账号:">
<a-input placeholder="买家账号" v-model="queryParam.account" style="width:10rem;"></a-input>
</a-form-item>
</a-col>
<a-col :md="4" :sm="6">
<a-form-item label="买家姓名:">
<a-input placeholder="买家姓名" v-model="queryParam.name" style="width: 8rem;"></a-input>
</a-form-item>
</a-col>
<a-col :md="4" :sm="6">
<a-form-item label="付款状态:">
<a-select v-model="queryParam.state" style="width: 8rem;">
<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>
</a-form-item>
</a-col>
<a-col :md="4" :sm="4">
<a-form-item label="县分">
<a-select v-model="queryParam.substName" @change="getSchoolNames" style="width: 6rem;">
<a-select-option key="">--全部--</a-select-option>
<a-select-option v-for="d in subNames" :key="d.value" :value="d.value">{{d.text}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="学校">
<a-select v-model="queryParam.schoolName" style="width: 18rem;">
<a-select-option key="">--全部--</a-select-option>
<a-select-option v-for="d in schoolNames" :key="d.value" :value="d.value">{{d.text}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="6">
<a-form-item label="创建时间">
<a-range-picker @change="onChange" />
<!--<a-range-picker
:placeholder="['开始时间', '结束时间']"
format="YYYY-MM"
:value="queryParam.month"
:mode="tempMode"
@panelChange="handlePanelChange"
style="width: 12rem;"
/>-->
</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-divider type="vertical"/>
<a-button @click="excelInto()" type="primary">院线通订单数据导入</a-button>-->
<a-divider type="vertical"/>
<a-button @click="excelOut()" type="primary">院线通订单数据导出</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<a-modal
title="批量导入"
:visible="kpiModifyvisible"
@ok="createfunctionOk0"
@cancel="createfunctionCancel0"
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="YRYMmoBan">
模板下载:
<a-button type="primary" @click="downloadMoBan">院线通订单信息模板</a-button>
</p>
</a-col>
</a-row>
<a-row :gutter="24" :v-show="KDmoBan">
<a-col :md="24" :sm="12">
<p>说明:</p>
<p>1.批量导入请严格按照模版进行导入;</p>
</a-col>
</a-row>
</a-modal>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<!--拦截器-->
<template slot="updateDate" slot-scope="text">
{{ text | dayjs}}
</template>
<template slot="state" slot-scope="text">
<p v-if="text==1">未付款</p>
<p v-if="text==2">付款成功</p>
<p v-if="text==3">付款失败</p>
<p v-if="text==4">已取消订单</p>
<p v-else=""></p>
</template>
<template slot="operation" slot-scope="text,record">
<span>
<a @click="modifyfunction(record)">查看订单详情</a>
<a-divider v-if="record.state==1" type="vertical"/>
<a-popconfirm title="确定要取消订单吗?" @confirm="remove(record)">
<a v-if="record.state==1">取消订单</a>
</a-popconfirm>
</span>
</template>
</s-table>
<!----弹框-->
<a-modal title="订单详情" :visible="modifyvisible" @ok="createfunctionCancel" @cancel="createfunctionCancel" height="600px" width="1100px">
<a-table :columns="columns2" :data-source="datas" bordered :row-style="{height:'25px'}">
<!--拦截器-->
<template slot="updateDate2" slot-scope="text">
{{ text | dayjs}}
</template>
<!--拦截器-->
<template slot="validityPeriod2" slot-scope="text">
{{ text | dayjs}}
</template>
<template slot="shelfState2" slot-scope="text">
<p v-if="text==1">已上架</p>
<p v-if="text==2">已下架</p>
<p v-else=""></p>
</template>
<template slot="state2" slot-scope="text">
<p v-if="text==1">未售出</p>
<p v-if="text==2">已售出</p>
<p v-if="text==3">售出中</p>
<p v-else=""></p>
</template>
<template v-for="col in ['cardNumber', 'state', 'shelfState','validityPeriod','updateDate']" :slot="col" slot-scope="text, record, index">
<div :key="col">
<a-input v-if="record.editable" style="margin: -5px 0" :value="text" @change="e => handleChange(e.target.value, record.key, col)"/>
<template v-else>
{{ text }}
</template>
</div>
</template>
</a-table>
</a-modal>
</div>
</template>
<script>
import STable from '@/components/table';
import ImportBtn from "../../../components/sysmanage/ImportBtn";
import {
yxtOrderList, yxtOrderDelete, getSchoolNames, initSubstName, uploadExcel, downloadMoBan
} from "@/api/school-center/yxtOrderAPI"
import {cloneObject, exportFile} from '@/utils/util';
import Vue from 'vue';
import {DatetimePicker} from 'vant';
import moment from "moment";
import ConstantActivity from "@/constant/ConstantActivity";
import {getYxtCard} from "../../../api/school-center/yxtOrderAPI";
Vue.use(DatetimePicker);
export default {
name: "louZhangKPI",
components: {
STable, ImportBtn
},
data() {
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
kpiModifyvisible: false,
title: ConstantActivity.title,
add: true,
queryParam: {
orderNum:'',
account:'',
name: '',
state:'',
substName: '',
schoolName: '',
month: '',
},
subNames: [],
schoolNames: [],
modelData: {
id: '',
userId: '',
sysuName: '',
account: '',
substName: '',
schoolName: '',
reportDaily: '',
collectiveSales: '',
weeklyMeeting: '',
organTraining: '',
designPlan: '',
kpi: '',
month: '',
isDel: '0'
},
columns: [
{dataIndex: 'orderNum', width: 40, title: '订单号'},
{dataIndex: 'totalPrice', width: 15, title: '金额'},
{dataIndex: 'state', width: 15, title: '订单状态', scopedSlots: {customRender: 'state'}},
{dataIndex: 'orderType', width: 15, title: '订单类型'},
{dataIndex: 'account', width: 20, title: '账号'},
{dataIndex: 'sysuName', width: 15, title: '姓名'},
{dataIndex: 'schoolName', width: 40, title: '学校'},
{dataIndex: 'substName', width: 10, title: '县分'},
{dataIndex: 'updateDate', width: 25, title: '创建时间', scopedSlots: {customRender: 'updateDate'}},
{
dataIndex: 'operation',
width: 30,
title: '操作',
scopedSlots: {customRender: 'operation'},
fixed: "right"
}
],
columns2: [
{title: '兑换券账号',dataIndex: 'cardNumber',width: 25,scopedSlots: { customRender: 'cardNumber' },},
{title: '售出状态',dataIndex: 'state',width: 15,scopedSlots: { customRender: 'state2' },},
{title: '上架状态',dataIndex: 'shelfState',width: 15,scopedSlots: { customRender: 'shelfState2' },},
{title: '有效截止日期',dataIndex: 'validityPeriod',width: 25,scopedSlots: { customRender: 'validityPeriod2' },},
{title: '上传时间',dataIndex: 'updateDate',width: 25,scopedSlots: { customRender: 'updateDate2' },}
],
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
let obj = cloneObject(this.queryParam)
//表示
return yxtOrderList(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
})
},
importTile: "",
importUrl: "",
YRYMmoBan: true,
tempMode:['month', 'month'],
datas : [],
}
},
methods: {
moment,
onChange(date, dateString) {
this.queryParam.month = dateString;
console.log(date, dateString);
},
excelOut() {
let params = {
pageNo: 1,
pageSize: 10
}
let obj = cloneObject(this.queryParam)
let nowdate = moment().format("YYYY-MM-DD");
//导出
exportFile(
uploadExcel(Object.assign(params, obj)),
"院线通订单信息" + nowdate + ".xlsx",
);
},
excelInto() {
this.importTile = "批量导入院线通订单信息";
this.YRYMmoBan = true;
this.importUrl = "manager/ciop/yxtOrder/importDate";
this.kpiModifyvisible = true
},
downloadMoBan: function () {
exportFile(downloadMoBan(), "院线通订单信息.xlsx");
},
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 : "上传文件出错!", 10);
return false;
}
this.$message.success("上传成功!" + response.data, 5);
},
createfunctionOk0() {
this.kpiModifyvisible = false;
this.clearmodel0();
},
createfunctionCancel0() {
this.kpiModifyvisible = false;
this.clearmodel0();
},
clearmodel0() {
this.importTile = "";
this.YRYMmoBan = false;
this.importUrl = "";
},
search() {
this.$refs.table.refresh({search: true})
},
remove(data) {
yxtOrderDelete({'id': data.id}).then((res) => {
if (res.state == "success") {
this.$notification.success({message: res.data, description: '', duration: 4})
}
else{
this.$message.error(res.msg);
return;
}
this.$refs.table.refresh({search: true})
})
},
modifyfunction(data) {
if (data != undefined) {
getYxtCard({'orderId': data.id,'pageNo': 1,'pageSize': 10}).then((res) => {
if (res.state == "success") {
this.datas = res.data.records
} else{
this.$message.error(res.msg);
return;
}
})
}
this.modifyvisible = true;
},
createfunctionCancel() {
this.modifyvisible = false;
},
getSchoolNames() {
this.schoolNames = []
this.queryParam.schoolName = ''
getSchoolNames({"substName": this.queryParam.substName}).then((res) => {
if (res.state == "success") {
const result = res.data
result.forEach((r) => {
if (r.schoolName === 'null')
return;
this.schoolNames.push({
value: r.schoolName,
text: r.schoolName
})
})
}
})
},
initSubstName() {
initSubstName().then((res) => {
if (res.state == "success") {
const result = res.data
result.forEach((r) => {
if (r.subName === 'null')
return;
this.subNames.push({
value: r.subName,
text: r.subName
})
})
}
})
}
},
mounted() {
this.initSubstName();
this.getSchoolNames();
}
}
</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