Commit ca2d3129 authored by guoyou's avatar guoyou

钱包

parent 22ad0472
......@@ -110,8 +110,9 @@
<el-row v-if="dialogFrom.type==88">
<el-col :span="12">
<el-form-item label="提现方式" prop="withdrawWay">
<el-radio v-model="dialogFrom.withdrawWay" label="1">线上</el-radio>
<el-radio v-model="dialogFrom.withdrawWay" label="2">线下</el-radio>
<el-radio v-model="dialogFrom.withdrawWay" label="3">线上</el-radio>
<el-radio v-model="dialogFrom.withdrawWay" label="1">线下自动</el-radio>
<el-radio v-model="dialogFrom.withdrawWay" label="2">线下手动</el-radio>
</el-form-item>
</el-col>
</el-row>
......
......@@ -23,17 +23,28 @@
placeholder="请选择分公司"
@select="handleSelectPark"
></el-autocomplete>
</el-form-item> -->
</el-form-item>-->
<el-form-item label="分公司">
<el-select v-model="listQuery.companyId" clearable filterable placeholder="请选择" @change="handleSelectPark">
<el-select
v-model="listQuery.companyId"
clearable
filterable
placeholder="请选择"
@change="handleSelectPark"
>
<el-option v-for="item in companyList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="身份">
<el-select class="filter-item" v-model="listQuery.positionId" filterable placeholder="请选员工身份">
<el-select
class="filter-item"
v-model="listQuery.positionId"
filterable
placeholder="请选员工身份"
>
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option
v-for="(item,index) in statusList"
......@@ -247,11 +258,13 @@
<p class="title" style="margin-top:20px">人事变动记录</p>
<p v-for="(item,index) in staffInfo.record" :key="index">
<b v-show="!!item.jobRemark">{{item.relTime}}</b>
<b v-show="!!item.jobRemark">{{item.relTime}}</b>
<span v-if="item.jobRemark == 1" v-show="!!item.relTime">入职</span>
<span v-else-if="item.jobRemark == 4">(人事调动) {{item.oldCompanyName}} => {{item.newCompanyName}}</span>
<span v-else-if="item.jobRemark == 2">(职位变更) {{item.oldJobName}} => {{item.newJobName}}</span>
<span v-else-if="item.jobRemark == 3">(身份变更) {{item.oldPositionName}} => {{item.newPositionName}}</span>
<span v-else-if="item.jobRemark == 4">(人事调动) {{item.oldCompanyName}} => {{item.newCompanyName}}</span>
<span v-else-if="item.jobRemark == 2">(职位变更) {{item.oldJobName}} => {{item.newJobName}}</span>
<span
v-else-if="item.jobRemark == 3"
>(身份变更) {{item.oldPositionName}} => {{item.newPositionName}}</span>
<span v-else-if="item.jobRemark == 5">离职</span>
<span v-else-if="item.jobRemark == 6">复职</span>
<!-- <span v-else></span> -->
......@@ -274,13 +287,8 @@
<el-date-picker v-model="amendCompany.relTime" type="datetime" placeholder="选择日期时间"></el-date-picker>
</el-form-item>
<el-form-item label="分公司" prop="companyId">
<el-select v-model="amendCompany.companyId" clearable filterable placeholder="请选择">
<el-option
v-for="item in companyList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
<el-select v-model="amendCompany.companyId" clearable filterable placeholder="请选择">
<el-option v-for="item in companyList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-button type="primary" @click="compantBtn">确定</el-button>
......@@ -290,7 +298,13 @@
<div v-else-if="isShow == 3">
<el-form :model="amendIdentity" label-width="80px">
<el-form-item label="身份">
<el-select class="filter-item" v-model="amendIdentity.positionId" filterable placeholder="请选择身份" style="width:250px">
<el-select
class="filter-item"
v-model="amendIdentity.positionId"
filterable
placeholder="请选择身份"
style="width:250px"
>
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option
v-for="(item,index) in postionsList "
......@@ -301,7 +315,12 @@
</el-select>
</el-form-item>
<el-form-item label="变更日期">
<el-date-picker v-model="amendIdentity.relTime" type="datetime" placeholder="选择日期时间" style="width:250px"></el-date-picker>
<el-date-picker
v-model="amendIdentity.relTime"
type="datetime"
placeholder="选择日期时间"
style="width:250px"
></el-date-picker>
</el-form-item>
<el-button type="primary" @click="amendIdentityBtn">确定</el-button>
<el-button type="primary" @click="amendPop = false">取消</el-button>
......@@ -310,7 +329,12 @@
<div v-else-if="isShow == 5">
<el-form :model="isJobForm" label-width="80px">
<el-form-item :label="amendContent">
<el-date-picker v-model="isJobForm.relTime" type="datetime" placeholder="选择日期时间" style="width:250px"></el-date-picker>
<el-date-picker
v-model="isJobForm.relTime"
type="datetime"
placeholder="选择日期时间"
style="width:250px"
></el-date-picker>
</el-form-item>
<el-button type="primary" @click="isJobBtn(amendContent)">确定</el-button>
<el-button type="primary" @click="amendPop = false">取消</el-button>
......@@ -319,11 +343,7 @@
<div v-else-if="isShow == 2">
<el-form :model="position" label-width="80px">
<el-form-item label="职位">
<el-select
class="filter-item"
v-model="position.jobId"
placeholder="请选择职位"
>
<el-select class="filter-item" v-model="position.jobId" placeholder="请选择职位">
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option
v-for="(item,index) in jobsList "
......@@ -334,7 +354,12 @@
</el-select>
</el-form-item>
<el-form-item label="变更日期">
<el-date-picker v-model="position.relTime" type="datetime" placeholder="选择日期时间" style="width:250px"></el-date-picker>
<el-date-picker
v-model="position.relTime"
type="datetime"
placeholder="选择日期时间"
style="width:250px"
></el-date-picker>
</el-form-item>
<el-button type="primary" @click="positionBtn()">确定</el-button>
<el-button type="primary" @click="amendPop = false">取消</el-button>
......@@ -407,12 +432,12 @@ export default {
data() {
return {
//职位
position:{
position: {
relTime: null, //修改时间
jobId:null,//职位
jobId: null //职位
},
loading:true,
amendStatus:0,//0人事调动 1信息修改
loading: true,
amendStatus: 0, //0人事调动 1信息修改
//修改分公司
amendCompany: {
companyId: null, //公司id
......@@ -420,11 +445,11 @@ export default {
},
amendIdentity: {
positionId: null, //身份id
relTime:null,//变更日期
relTime: null //变更日期
},
//入职离职
isJobForm:{
relTime:null,//变更日期
isJobForm: {
relTime: null //变更日期
},
amendPop: false, //修改弹窗
amendContent: '', //修改标题
......@@ -476,14 +501,14 @@ export default {
rules: {},
staffInfo: {
info: {},
record:[],
record: []
}
}
},
methods: {
//修改弹窗关闭
closeAmend(){
this.$refs.amendCompany.resetFields();
closeAmend() {
this.$refs.amendCompany.resetFields()
},
//修改员工弹窗
amend(val) {
......@@ -491,29 +516,32 @@ export default {
if (val == 4) {
this.amendContent = '修改所属公司'
this.isShow = val
this.amendCompany= {
this.amendCompany = {
companyId: null, //公司id
relTime: null //修改时间
}
} else if (val == 3) {
this.amendContent = '修改身份'
this.isShow = val
this.amendIdentity= {
this.amendIdentity = {
positionId: null, //身份id
relTime:null,//变更日期
relTime: null //变更日期
}
} else if (val == 5) {
this.amendContent = this.staffTitleFrom.isQuit == '在职' ? '离职时间' : '入职时间'
this.amendContent =
this.staffTitleFrom.isQuit == '在职'
? '离职时间'
: '入职时间'
this.isShow = val
this.isJobForm={
relTime:null,//变更日期
this.isJobForm = {
relTime: null //变更日期
}
}else if(val == 2){
} else if (val == 2) {
this.amendContent = '职位修改'
this.isShow = val
this.position={
this.position = {
relTime: null, //修改时间
jobId:null,//职位
jobId: null //职位
}
}
},
......@@ -527,19 +555,27 @@ export default {
this.$message('调动日期不能为空')
return false
} else {
this.amendCompany.relTime = formatDate(this.amendCompany.relTime, 'yyyy-MM-dd hh:mm:ss')
let name = this.companyList.filter(item => item.id == this.amendCompany.companyId)
this.amendCompany.relTime = formatDate(
this.amendCompany.relTime,
'yyyy-MM-dd hh:mm:ss'
)
let name = this.companyList.filter(
item => item.id == this.amendCompany.companyId
)
this.amendCompany.companyName = name[0].name
this.amendCompany.jobId = this.staffTitleFrom.jobId
this.amendCompany.positionId = this.staffTitleFrom.positionId
this.amendCompany.changeStatus = 4
this.amendCompany.isQuit = this.staffTitleFrom.isQuit == '在职' ? 0 : 1
this.amendCompany.isQuit =
this.staffTitleFrom.isQuit == '在职' ? 0 : 1
this.setApi(this.amendCompany)
}
} else {
//信息修改
let params = {};
let name = this.companyList.filter(item => item.id == this.amendCompany.companyId)
let params = {}
let name = this.companyList.filter(
item => item.id == this.amendCompany.companyId
)
params.companyName = name[0].name
params.companyId = name[0].id
params.positionId = this.staffTitleFrom.positionId
......@@ -547,19 +583,19 @@ export default {
params.phone = this.staffTitleFrom.phone
params.id = this.staffTitleFrom.id
params.userId = this.staffTitleFrom.userId
editorUpd(params).then(data=>{
editorUpd(params).then(data => {
if (data.status == 200) {
this.$message.success('编辑成功')
this.amendPop = false;
this.amendPop = false
this.bulkUploadMember = false
this.getList()
}else{
} else {
this.$message.error(data.message)
}
})
}
},
setApi(params){
setApi(params) {
params.phone = this.staffTitleFrom.phone
params.id = this.staffTitleFrom.id
params.name = this.staffTitleFrom.name
......@@ -567,10 +603,10 @@ export default {
updUserChange(params).then(data => {
if (data.status == 200) {
this.$message.success('编辑成功')
this.amendPop = false;
this.amendPop = false
this.bulkUploadMember = false
this.getList()
}else{
} else {
this.$message.error(data.message)
}
})
......@@ -578,58 +614,68 @@ export default {
//身份修改
amendIdentityBtn() {
this.amendIdentity.changeStatus = 3
if (!this.amendIdentity.positionId || !this.amendIdentity.relTime ) {
if (!this.amendIdentity.positionId || !this.amendIdentity.relTime) {
this.$message('身份和变更日期不能为空')
return false
}else{
this.amendIdentity.relTime = formatDate(this.amendIdentity.relTime, 'yyyy-MM-dd hh:mm:ss')
} else {
this.amendIdentity.relTime = formatDate(
this.amendIdentity.relTime,
'yyyy-MM-dd hh:mm:ss'
)
this.amendIdentity.companyName = this.staffTitleFrom.companyName
this.amendIdentity.jobId = this.staffTitleFrom.jobId
this.amendIdentity.companyId = this.staffTitleFrom.companyId
this.amendIdentity.isQuit = this.staffTitleFrom.isQuit == '在职' ? 0 : 1
this.amendIdentity.isQuit =
this.staffTitleFrom.isQuit == '在职' ? 0 : 1
this.setApi(this.amendIdentity)
}
},
//离职在职
isJobBtn(val){
if(!this.isJobForm.relTime){
isJobBtn(val) {
if (!this.isJobForm.relTime) {
this.$message('日期不能为空')
return false
}else{
this.isJobForm.relTime = formatDate(this.isJobForm.relTime, 'yyyy-MM-dd hh:mm:ss')
} else {
this.isJobForm.relTime = formatDate(
this.isJobForm.relTime,
'yyyy-MM-dd hh:mm:ss'
)
// val == '离职时间' ? this.isJobForm.job_remark = 5 : this.isJobForm.job_remark = 1
this.isJobForm.companyName = this.staffTitleFrom.companyName
this.isJobForm.positionId = this.staffTitleFrom.positionId
this.isJobForm.companyId = this.staffTitleFrom.companyId
this.isJobForm.isQuit = 1
this.isJobForm.isQuit = 1
this.isJobForm.changeStatus = 5
this.isJobForm.jobId = this.staffTitleFrom.jobId
if(val == '离职时间'){
if (val == '离职时间') {
this.setApi(this.isJobForm)
}else{//复职
} else {
//复职
// this.isJobForm.isQuit = 2
// this.isJobForm.changeStatus = 6
// this.setApi(this.isJobForm)
let params = {}
params.phone = this.staffTitleFrom.phone
params.relTime = formatDate(new Date(this.isJobForm.relTime), 'yyyy-MM-dd hh:mm:ss')
params.relTime = formatDate(
new Date(this.isJobForm.relTime),
'yyyy-MM-dd hh:mm:ss'
)
params.id = this.staffTitleFrom.id
params.companyName = this.staffTitleFrom.companyName
params.positionId = this.staffTitleFrom.positionId
params.companyId = this.staffTitleFrom.companyId
params.isQuit = 0
params.isQuit = 0
params.changeStatus = 6
params.jobId = this.staffTitleFrom.jobId
params.name = this.staffTitleFrom.name
params.userId = this.staffTitleFrom.userId
updAddPositionChangeRecord(params).then(data=>{
updAddPositionChangeRecord(params).then(data => {
if (data.status == 200) {
this.$message.success('编辑成功')
this.amendPop = false;
this.amendPop = false
this.bulkUploadMember = false
this.getList()
}else{
} else {
this.$message.error(data.message)
}
})
......@@ -637,24 +683,30 @@ export default {
}
},
//职位变更
positionBtn(){
if(!this.position.jobId || !this.position.relTime){
positionBtn() {
if (!this.position.jobId || !this.position.relTime) {
this.$message('身份和变更日期不能为空')
return false
}else{
} else {
this.position.changeStatus = 2
this.position.relTime = formatDate(this.position.relTime, 'yyyy-MM-dd hh:mm:ss')
this.position.relTime = formatDate(
this.position.relTime,
'yyyy-MM-dd hh:mm:ss'
)
this.position.companyName = this.staffTitleFrom.companyName
this.position.positionId = this.staffTitleFrom.positionId
this.position.companyId = this.staffTitleFrom.companyId
this.position.isQuit = this.staffTitleFrom.isQuit == '在职' ? 0 : 1
this.position.isQuit =
this.staffTitleFrom.isQuit == '在职' ? 0 : 1
this.setApi(this.position)
}
},
handleSelectPark(val) {
console.log(val);
this.listQuery.companyName = this.companyList.filter(item=>item.id == val)[0].name
console.log(val)
this.listQuery.companyName = this.companyList.filter(
item => item.id == val
)[0].name
},
handleSelectParks(item) {
this.staffTitleFrom.companyId = item.id
......@@ -785,7 +837,7 @@ export default {
})
setTimeout(() => {
this.loading = false
}, 300);
}, 300)
},
handleSizeChange(val) {
this.listQuery.limit = val
......@@ -860,9 +912,9 @@ export default {
companyId: row.companyId,
companyName: row.companyName,
relTime: row.relTime,
id:row.id,
userId:row.userId,
jobId:row.jobId ==0 ? null : row.jobId,
id: row.id,
userId: row.userId,
jobId: row.jobId == 0 ? null : row.jobId,
isQuit: row.isQuit == 1 ? '离职' : '在职'
}
},
......@@ -871,7 +923,7 @@ export default {
this.infoPop = true
this.staffInfo.info = row
findPositionChangeRecord({ id: row.id }).then(data => {
if(data.status == 200){
if (data.status == 200) {
this.staffInfo.record = data.data
}
})
......@@ -879,11 +931,15 @@ export default {
//确定
confirm(formName) {
if (this.staffTitle == '新增员工') {
if(!this.staffTitleFrom.jobId){
if (!this.staffTitleFrom.jobId) {
this.$message('职位不能为空')
}else{
if (!!this.staffTitleFrom.relTime) this.staffTitleFrom.relTime = formatDate(new Date(this.staffTitleFrom.relTime),'yyyy-MM-dd hh:mm:ss')
} else {
if (!!this.staffTitleFrom.relTime)
this.staffTitleFrom.relTime = formatDate(
new Date(this.staffTitleFrom.relTime),
'yyyy-MM-dd hh:mm:ss'
)
addEditor(this.staffTitleFrom).then(data => {
if (data.status == 200) {
this.$notify({
......
<template>
<div class="app-container calendar-list-container" v-loading.body="showLoadingBody">
<div class="app-container calendar-list-container" v-loading="showLoadingBody">
<div>
<div class="filter-container" ref="filter-container">
<el-form ref="queryForm" :inline="inline" :model="listQuery" label-width="100px">
......@@ -25,12 +25,22 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="付款方式" prop="type">
<el-select class="filter-item" v-model="listQuery.withdrawWay" placeholder="请输入状态">
<el-option
v-for="(item,index) in withdrawWayArr"
:key="index"
:label="item.name"
:value="item.val"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="提现时间">
<el-date-picker v-model="time" type="datetimerange" placeholder="选择时间范围"></el-date-picker>
</el-form-item>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="clearSearch">清空搜索</el-button>
</el-form>
</div>
<el-table :key="tableKey" :data="list" border fit highlight-current-row style="width: 100%;">
......@@ -82,6 +92,11 @@
<p>{{scope.row.finishTimeStr}}</p>
</template>
</el-table-column>
<el-table-column align="center" label="付款方式">
<template scope="scope">
<p>{{scope.row.withdrawWay == 1 ? '线下自动' : scope.row.withdrawWay == 2 ? '线下手动' : '线上'}}</p>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="65" fixed="right">
<template scope="scope">
<el-button
......@@ -155,8 +170,18 @@ export default {
},
data() {
return {
withdrawWayArr:[{
name:'线上',
val:'3'
},{
name:'线下自动',
val:'1'
},{
name:'线下手动',
val:'2'
}],
submitBtn:false,
time:[],//提现时间
time:[],//提现时间
typeOptions: [
{
name: '全部',
......@@ -183,9 +208,10 @@ export default {
limit: 20,
phone: '', //手机号
username: '', //姓名
state: '', //状态
startTime:null,
endTime:null,
withdrawWay:'',
state: '', //状态
startTime:null,
endTime:null,
orderNo: '', //提现单号
},
inline: true,
......@@ -204,10 +230,25 @@ export default {
...mapGetters(['elements'])
},
methods: {
clearSearch(){
this.listQuery= {
page: 1,
limit: 20,
phone: '', //手机号
username: '', //姓名
withdrawWay:'',
state: '', //状态
startTime:null,
endTime:null,
orderNo: '', //提现单号
}
this.getList()
},
/**
* 获取提现列表
* */
getList() {
this.showLoadingBody = true
this.listLoading = true
discountList(this.listQuery).then(response => {
let totalCountRs = undefined
......@@ -229,6 +270,9 @@ export default {
this.list = listRs
this.total = totalCountRs
})
setTimeout(() => {
this.showLoadingBody = false
}, 300);
},
handleFilter() {
this.listQuery.page = 1
......@@ -256,7 +300,7 @@ export default {
},
handleUpdate(row) {
this.dialogFrom.cathId = row.id
this.activeOfflineWay = row.offlineWay
this.activeOfflineWay = row.withdrawWay
this.dialogVisible = true
},
edit(formName) {
......
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