Commit 0dd8bd46 authored by Mac's avatar Mac

1

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