Commit 4bf3676c authored by zhengke's avatar zhengke

修改

parent d6b2713e
...@@ -98,8 +98,31 @@ ...@@ -98,8 +98,31 @@
</div> </div>
</div> </div>
<div> <div>
<q-btn label="调岗" color="accent q-px-md" size="10px" style="font-weight:400 !important;margin-right:10px;" /> <q-btn label="调岗" color="accent q-px-md" size="10px" @click="isShowJobPop=true" style="font-weight:400 !important;margin-right:10px;">
<q-btn label="调部门" color="accent q-px-md" size="10px" style="font-weight:400 !important;" /> <q-popup-proxy>
<q-banner v-if="isShowJobPop">
<div style="width:300px;padding-bottom:20px;">
<div style="margin:10px 0 15px 0;">调岗</div>
<q-select filled stack-label option-value="PostId" option-label="PostName" v-model="Post_Id" ref="Post_Id"
:options="PostList" label="岗位" :dense="false" class="col-6 q-pb-lg" emit-value map-options />
<q-btn color="primary" label="确定" style="width:100%;" @click="savePost()" />
</div>
</q-banner>
</q-popup-proxy>
</q-btn>
<q-btn label="调部门" color="accent q-px-md" size="10px" @click="isShowDepPop=true" style="font-weight:400 !important;">
<q-popup-proxy>
<q-banner v-if="isShowDepPop">
<div style="width:300px;padding-bottom:20px;">
<div style="margin:10px 0 15px 0;">调部门</div>
<selectTree :treeData='DeptList' :defaultArray="returnString" nodeKey="DeptId" :multiple="false"
labelKey="DeptName" childrenKey="ChildList" tipText="选择部门" @getChild="getChild"
classStr="col-6 q-pb-lg"></selectTree>
<q-btn color="primary" label="确定" style="width:100%;" @click="saveDepart()" />
</div>
</q-banner>
</q-popup-proxy>
</q-btn>
</div> </div>
</div> </div>
<div class="Emloyee_CompanyInfo"> <div class="Emloyee_CompanyInfo">
...@@ -149,11 +172,23 @@ ...@@ -149,11 +172,23 @@
</template> </template>
<script> <script>
import {
UpdateEmployeeLeave,
UpdateEmployeeDept,
UpdateEmployeePost
} from '../../../api/users/user'
import {
getDeptTree
} from '../../../api/system/dept.js'
import {
queryDeptPostList
} from '../../../api/system/post'
import employeeDetails from '../manager/employee_details'; import employeeDetails from '../manager/employee_details';
import employeeRemark from '../manager/employee-remark'; import employeeRemark from '../manager/employee-remark';
import employeeLog from '../manager/employee_log'; import employeeLog from '../manager/employee_log';
import employeeFile from '../manager/employee_file'; import employeeFile from '../manager/employee_file';
import employeeFinace from '../manager/employee_finace'; import employeeFinace from '../manager/employee_finace';
import selectTree from '../../common/select-tree'
export default { export default {
props: { props: {
saveObj: { saveObj: {
...@@ -166,7 +201,8 @@ ...@@ -166,7 +201,8 @@
employeeRemark, employeeRemark,
employeeLog, employeeLog,
employeeFile, employeeFile,
employeeFinace employeeFinace,
selectTree
}, },
data() { data() {
return { return {
...@@ -174,6 +210,10 @@ ...@@ -174,6 +210,10 @@
tabCheck: 0, //默认选第一个 tabCheck: 0, //默认选第一个
loading: false, loading: false,
checkedIndex:0, checkedIndex:0,
setObj: {
type: 0,
selected: []
},
menuList:[{ menuList:[{
name:'行政备注', name:'行政备注',
id:0 id:0
...@@ -189,12 +229,23 @@ ...@@ -189,12 +229,23 @@
},{ },{
name:'财务单据', name:'财务单据',
id:4 id:4
}] }],
isShowJobPop:false,
PostList:[], //岗位下拉数据
Post_Id: 0, //岗位
isShowDepPop:false,
DeptList:[], //部门数据
returnString: [], //部门默认
departId: -2, // 部门
} }
}, },
created() {}, created() {},
mounted() { mounted() {
console.log("aaa", this.saveObj); console.log("aaa", this.saveObj);
// this.Post_Id = this.saveObj.Post_Id
this.queryPostList();
this.getDepartList();
}, },
methods: { methods: {
closeShenheForm() { closeShenheForm() {
...@@ -206,6 +257,92 @@ ...@@ -206,6 +257,92 @@
this.checkedIndex=index; this.checkedIndex=index;
this.tabCheck=item.id; this.tabCheck=item.id;
}, },
//获取岗位下拉
queryPostList() {
var postMsg = {
QDeptIds: this.saveObj.Dept_Id
};
queryDeptPostList(postMsg).then(res => {
if (res.Code == 1) {
this.PostList = res.Data;
let obj = {
PostName:'不限',
PostId:0
}
this.PostList.unshift(obj);
}
})
},
//保存修改岗位
savePost(){
if (this.Post_Id == 0) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择岗位`
})
return;
}
let obj = {};
if (this.saveObj) {
obj.Id = this.saveObj.Id;
obj.AccountId = this.saveObj.AccountId;
obj.AccountType = this.saveObj.AccountType;
obj.Post_Id = this.Post_Id;
}
UpdateEmployeePost(obj).then(res => {
if (res.Code == 1) {
this.isShowJobPop=false;
this.closeShenheForm=false;
this.$emit('close');
this.$emit('success');
}
})
},
//选择部门
getChild(deptArray) {
if (deptArray && deptArray != '') {
this.departId = deptArray;
}
},
//获取部门下拉数据
getDepartList() {
let msg = {
School_Id: this.saveObj.School_Id
}
getDeptTree(msg).then(res => {
if (res.Code == 1) {
this.DeptList = res.Data;
}
})
},
//保存部门
saveDepart(){
let Msg = [];
if (this.departId == -2) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择部门`
})
return;
}
let obj = {};
if (this.saveObj) {
obj.Id = this.saveObj.Id;
obj.AccountId = this.saveObj.AccountId;
obj.AccountType = this.saveObj.AccountType;
obj.Dept_Id = this.departId;
}
UpdateEmployeeDept(obj).then(res => {
if (res.Code == 1) {
this.isShowDepPop=false;
this.closeShenheForm=false;
this.$emit('success');
this.$emit('close')
}
})
}
}, },
} }
......
...@@ -131,8 +131,8 @@ ...@@ -131,8 +131,8 @@
</div> </div>
</div> </div>
</div> </div>
<div style="text-align:center"> <div style="text-align:left;margin-left:20px;">
<q-btn color="primary" label="确定" @click="saveReuslt()" style="width:400px;" /> <q-btn color="primary" label="确定" @click="saveReuslt()" style="width:300px;" />
</div> </div>
</q-card> </q-card>
<div class="dialog-out-close" @click="closeShenheForm" <div class="dialog-out-close" @click="closeShenheForm"
...@@ -211,7 +211,12 @@ ...@@ -211,7 +211,12 @@
}; };
queryDeptPostList(postMsg).then(res => { queryDeptPostList(postMsg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
let obj = {
PostName:'不限',
PostId:0
}
this.PostList = res.Data; this.PostList = res.Data;
this.PostList.unshift(obj);
} }
}) })
}, },
......
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