Commit 0dd8bd46 authored by Mac's avatar Mac

1

parent d29114b5
......@@ -77,7 +77,8 @@
<div class="col-2 q-table__title">员工管理</div>
<q-space />
<div class="page-option">
<!-- <q-btn color="accent" size="sm" class="q-mr-md" label="同步到微信" @click="synchronization()" /> -->
<q-btn color="accent" size="sm" class="q-mr-md" label="同步到微信" @click="synchronization()"
v-if="DeptEmpEnable==1" />
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增员工" @click="EditManager(null,0)" />
<q-btn-dropdown outline size="sm" color="dark" label="更多">
......@@ -182,7 +183,7 @@
<q-item-label>重置密码</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="khHandover(props.row)">
<q-item clickable v-close-popup @click="khHandover(props.row)" v-if='DeptEmpEnable==1'>
<q-item-section>
<q-item-label>客户交接</q-item-label>
</q-item-section>
......@@ -228,7 +229,7 @@
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn class="q-mr-md" label="取消" @click="isDetails=false" />
<q-btn color="accent" class="q-mr-md" label="确定" @click="saveOrderInfo()" :loading="jtloading"/>
<q-btn color="accent" class="q-mr-md" label="确定" @click="saveOrderInfo()" :loading="jtloading" />
</q-card-actions>
</q-card>
......@@ -247,7 +248,8 @@
} from '../../api/school/index'
import {
SetSynvEduEmployee,
setUserCoustomerTransfer
setUserCoustomerTransfer,
getWeChatConfigInfo
} from '../../api/system/wechat';
import {
BatchResetUserPassword
......@@ -284,7 +286,7 @@
return {
currentUrl: "",
isDetails: false,
jtloading:false,
jtloading: false,
columns: [{
name: 'desc',
required: true,
......@@ -422,7 +424,8 @@
ChannelTransfer: '1'
},
Employeelist: [],
AllEmployeelist: []
AllEmployeelist: [],
DeptEmpEnable: 0,//是否显示企业微信信息 1 显示
}
},
mounted() {
......@@ -433,7 +436,7 @@
this.queryPostList(0);
this.getLeaveState();
this.queryEmployee()
this.getmicrodeploy()//获取企业微信的配置
},
methods: {
resetSearch() {
......@@ -747,26 +750,38 @@
});
},
synchronization() {
Loading.show({
message: '数据正在同步中,请稍后进入企业微信查看',
spinner: QSpinnerPie
})
SetSynvEduEmployee({}).then(res => {
if (res.Code == 1) {
that.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功',
position: 'top'
this.$q.dialog({
title: '提示信息',
message: '是否同步员工数据到企业微信里?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
Loading.show({
message: '数据正在同步中,请稍后进入企业微信查看',
spinner: QSpinnerPie
})
SetSynvEduEmployee({}).then(res => {
if (res.Code == 1) {
that.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功',
position: 'top'
})
Loading.hide()
}
})
.catch(err => {
Loading.hide()
})
Loading.hide()
}
})
.catch(err => {
Loading.hide()
}).onCancel(() => {
});
})
},
queryEmployee() {//下拉人员列表
......@@ -797,49 +812,56 @@
this.isDetails = true
},
saveOrderInfo() {//保存
if (this.joinMsg.ReceiveUserId == '') {
this.$q.notify({
type: 'negative',
message: `请选择接替人员`,
position: 'top'
})
return
}
if (this.joinMsg.ReceiveUserId == this.joinMsg.TransferUserId) {
this.$q.notify({
type: 'negative',
message: `接替人员不能是本人`,
position: 'top'
})
return
}
if(this.joinMsg.CustomerTransfer ==2 && this.joinMsg.ChannelTransfer==2){
this.$q.notify({
type: 'negative',
message: `转移目标必须选择一项`,
position: 'top'
})
return
}
this.jtloading = true
setUserCoustomerTransfer(this.joinMsg).then(res => {
if(res.Code==1)
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
this.isDetails = false
this.jtloading = false
this.getManager()
if (this.joinMsg.ReceiveUserId == '') {
this.$q.notify({
type: 'negative',
message: `请选择接替人员`,
position: 'top'
})
return
}
if (this.joinMsg.ReceiveUserId == this.joinMsg.TransferUserId) {
this.$q.notify({
type: 'negative',
message: `接替人员不能是本人`,
position: 'top'
})
return
}
if (this.joinMsg.CustomerTransfer == 2 && this.joinMsg.ChannelTransfer == 2) {
this.$q.notify({
type: 'negative',
message: `转移目标必须选择一项`,
position: 'top'
})
return
}
this.jtloading = true
setUserCoustomerTransfer(this.joinMsg).then(res => {
if (res.Code == 1)
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
this.isDetails = false
this.jtloading = false
this.getManager()
})
.catch(err => {
this.jtloading = false
})
},
getmicrodeploy() {
getWeChatConfigInfo({}).then(res => {
if (res.Code == 1) {
this.DeptEmpEnable = res.Data.DeptEmpEnable
}
})
}
},
}
......
......@@ -34,7 +34,7 @@
<div class="col-2 q-table__title">部门信息</div>
<q-space />
<div class="page-option">
<!-- <q-btn color="accent" size="sm" class="q-mr-md" label="同步到微信" @click="synchronization()" /> -->
<q-btn color="accent" size="sm" class="q-mr-md" label="同步到微信" @click="synchronization()" v-if="DeptEmpEnable==1" />
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增部门" @click="EditDept(null)" />
<q-btn color="secondary" flat size="sm" icon="iconfont icon-zuzhijiagou" label="组织机构图"
@click="gotoRelation()" />
......@@ -83,6 +83,7 @@
} from '../../api/system/dept'
import {
setSyncEduDepartment,
getWeChatConfigInfo
} from '../../api/system/wechat';
import {
getSchoolDropdown,
......@@ -196,12 +197,16 @@
schoolList: [], //校区列表
DeptTierList: [], //部门层级
DeptTreeList: [], //部门树形结构列表
DeptEmpEnable: 0,//是否显示企业微信信息 1 显示
}
},
created() {
this.queryDeptTier();
this.queryDeptTree();
this.getSchool();
this.getmicrodeploy()//获取企业微信的配置
},
mounted() {
this.currentUrl = this.$route.path;
......@@ -304,11 +309,19 @@
this.isShowDeptForm = true;
},
synchronization(){
Loading.show({
message: '数据正在同步中,请稍后进入企业微信查看',
spinner:QSpinnerPie
})
setSyncEduDepartment({}).then(res => {
this.$q.dialog({
title: '提示信息',
message: '是否同步部门数据到企业微信里?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
Loading.show({
message: '数据正在同步中,请稍后进入企业微信查看',
spinner: QSpinnerPie
})
setSyncEduDepartment({}).then(res => {
if (res.Code == 1) {
that.$q.notify({
icon: 'iconfont icon-chenggong',
......@@ -320,10 +333,14 @@
Loading.hide()
}
})
.catch(err=>{
Loading.hide()
.catch(err => {
Loading.hide()
})
})
}).onCancel(() => {
});
},
//关闭弹窗
......@@ -370,6 +387,13 @@
returnData(data) {
this.msg.School_Id = data;
this.resetSearch()
},
getmicrodeploy() {
getWeChatConfigInfo({}).then(res => {
if (res.Code == 1) {
this.DeptEmpEnable = res.Data.DeptEmpEnable
}
})
}
}
}
......
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