mo 3 years ago
parent
commit
a5c588c3f3

+ 1 - 0
src/constant/index.js

@@ -151,6 +151,7 @@ export const journalType = {
 export const jobNature = {
   PART_TIME: "兼职",
   FULL_TIME: "全职",
+  LABOUR:'劳务'
   // TEMPORARY: "临时工"
 }
 

+ 1 - 0
src/utils/searchArray.js

@@ -46,6 +46,7 @@ export const attendance = [
 export const jobNature = [
   { label: '兼职', value: 'PART_TIME' },
   { label: '全职', value: 'FULL_TIME' },
+  {  label:'劳务',value:'LABOUR'}
   // { label: '临时工', value: 'TEMPORARY' }
 ]
 

+ 1 - 1
src/views/accompanyManager/accompanyList.vue

@@ -672,7 +672,7 @@ export default {
       cancelGroup({
         groupId: this.activeRow.id,
         groupType: "PRACTICE",
-        refundAmount: this.closeForm.money,
+        amount: this.closeForm.money,
       }).then((res) => {
         if (res.code == 200) {
           this.$message.success("关闭成功");

+ 7 - 3
src/views/backManager/index.vue

@@ -28,6 +28,8 @@
             v-model.trim="searchForm.organId"
             filterable
             clearable
+            multiple
+            collapse-tags
             placeholder="请选择分部"
           >
             <el-option
@@ -263,7 +265,7 @@ export default {
       searchForm: {
         search: null,
         returnFeeType: null,
-        organId: null,
+        organId: [],
         backTime: [],
         payTime: [],
       },
@@ -296,11 +298,12 @@ export default {
       this.getList();
     },
     async getList() {
-      let { backTime, payTime, ...rest } = this.searchForm;
+      let { backTime, payTime,organId, ...rest } = this.searchForm;
       let params = {
         ...rest,
         page: this.rules.page,
         rows: this.rules.limit,
+        organId:organId.join(','),
         ...getTimes(backTime, ["createStartTime", "createEndTime"]),
         ...getTimes(payTime, ["payStartTime", "payEndTime"]),
       };
@@ -340,11 +343,12 @@ export default {
       });
     },
     exportBack() {
-      let { backTime, payTime, ...rest } = this.searchForm;
+      let { backTime, payTime,organId, ...rest } = this.searchForm;
       let params = {
         ...rest,
         page: this.rules.page,
         rows: this.rules.limit,
+         organId:organId.join(','),
         ...getTimes(backTime, ["createStartTime", "createEndTime"]),
         ...getTimes(payTime, ["payStartTime", "payEndTime"]),
       };

+ 5 - 2
src/views/businessManager/orderManager/backMoney.vue

@@ -21,6 +21,8 @@
             v-model.trim="searchForm.organId"
             clearable
             filterable
+            multiple
+            collapse-tags
             placeholder="请选择分部"
           >
             <el-option
@@ -203,7 +205,7 @@ export default {
       searchForm: {
         startTime: null,
         endTime: null,
-        organId: null,
+        organId: [],
         orderDate: [],
       },
       tableList: [],
@@ -278,9 +280,10 @@ export default {
     },
     getList() {
        (this.searchForm.orderDate);
-      let { orderDate, ...rest } = this.searchForm;
+      let { orderDate,organId, ...rest } = this.searchForm;
       let params = {
         ...rest,
+        organId:organId.join(','),
         page: this.pageInfo.page,
         rows: this.pageInfo.limit,
         ...getTimes(orderDate, ["startTime", "endTime"]),

+ 7 - 2
src/views/businessManager/orderManager/businessStatement.vue

@@ -13,12 +13,14 @@
       >
       <!-- 搜索类型 -->
       <save-form :inline="true" class="searchForm" :model="searchForm" @submit="search" @reset="onReSet">
-        <el-form-item prop="organId">
+        <el-form-item prop="organIdList">
           <el-select
             class="multiple"
             v-model.trim="searchForm.organIdList"
             clearable
             filterable
+            multiple
+            collapse-tags
             placeholder="请选择分部"
           >
             <el-option
@@ -254,7 +256,7 @@ export default {
       searchForm: {
         startTime: null,
         endTime: null,
-        organId: null,
+        organId: [],
         month: "",
         cooperationOrganId: "",
         organIdList: [],
@@ -319,6 +321,7 @@ export default {
           url: "/api-web/operatingReport/export",
           params: {
             ...params,
+            organIdList:this.searchForm.organIdList.join(','),
             month: params.month ? dayjs(params.month).format("YYYY-MM-DD") : "",
           },
         },
@@ -350,6 +353,7 @@ export default {
       params.page = this.pageInfo.page;
       getOperatingReport({
         ...params,
+         organIdList:this.searchForm.organIdList.join(','),
         month: params.month ? dayjs(params.month).format("YYYY-MM-DD") : "",
         type: "organ",
       }).then((res) => {
@@ -377,6 +381,7 @@ export default {
         month: dayjs().format("YYYY-MM"),
         cooperationOrganId: "",
         organIdList: [],
+        organId:[]
       };
       this.getList();
     },

+ 5 - 2
src/views/businessManager/orderManager/expend.vue

@@ -14,6 +14,8 @@
                      v-model.trim="searchForm.organId"
                      filterable
                      clearable
+                     multiple
+                     collapse-tags
                      placeholder="请选择分部">
             <el-option v-for="(item,index) in selects.branchs"
                        :key="index"
@@ -152,7 +154,7 @@ export default {
   data () {
     return {
       searchForm: {
-        organId: null
+        organId: []
       },
       tableList: [],
       organList: [],
@@ -175,9 +177,10 @@ export default {
       this.getList()
     },
     getList () {
-      let params = this.searchForm
+      let params = {...this.searchForm}
       params.rows = this.pageInfo.limit
       params.page = this.pageInfo.page
+      params.organId = this.searchForm.organId.join(',')
       studentWithdraw(params).then(res => {
         let result = res.data
         if (res.code == 200) {

+ 2 - 0
src/views/businessManager/orderManager/financeManager.vue

@@ -136,6 +136,8 @@
             v-model.trim="searchForm.routingOrganId"
             filterable
             clearable
+            multiple
+            collapse-tags
             @clear="onClear('routingOrganId')"
             placeholder="请选择分部"
           >

+ 5 - 2
src/views/businessManager/orderManager/payRecord.vue

@@ -45,6 +45,8 @@
             v-model.trim="searchForm.organId"
             clearable
             filterable
+            multiple
+            collapse-tags
             placeholder="请选择所属分部"
           >
             <el-option
@@ -324,7 +326,7 @@ export default {
       searchForm: {
         startTime: null,
         endTime: null,
-        organId: null,
+        organId: [],
         search: "",
         dingtalkProcessNo: "",
         financialProcessNo: "",
@@ -449,11 +451,12 @@ export default {
       });
     },
     getList() {
-      let { orderDate, ...ruset } = this.searchForm;
+      let { orderDate,organId, ...ruset } = this.searchForm;
       let params = {
         ...ruset,
         page: this.pageInfo.page,
         rows: this.pageInfo.limit,
+        organId:this.searchForm.organId.join(','),
         ...getTimes(orderDate, ["startTime", "endTime"]),
       };
       getFinancialExpenditure(params).then((res) => {

+ 9 - 0
src/views/categroyManager/insideSetting/api.js

@@ -26,3 +26,12 @@ export const employeeFindEmployeeByRole = data => {
     params: data
   })
 }
+
+// 获取当前登录人编辑的角色
+export const userRole = data => {
+  return request2({
+    url: '/api-auth/user/getRole',
+    method: 'get',
+    params: data
+  })
+}

+ 42 - 3
src/views/categroyManager/insideSetting/staffManager.vue

@@ -195,7 +195,7 @@
                      filterable
                      collapse-tags
                      multiple>
-            <el-option v-for="item in roleList"
+            <el-option v-for="item in roleResetList"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"></el-option>
@@ -407,6 +407,7 @@
 import pagination from '@/components/Pagination/index'
 import { permission } from "@/utils/directivePage";
 import { queryEmployByOrganId, employeeOperate, getUserRole, employeeAdd, employeeUpdate, hasCourseGroupRelation, updateEducationTeacherId, queryEmployeeOrganByUser, getDepts, getPosts } from '@/api/systemManage'
+import { userRole } from './api'
 import { findEducationTeacher } from '@/api/specialSetting'
 import deepClone from '@/helpers/deep-clone'
 import { findEducationUsers } from '@/api/buildTeam'
@@ -451,7 +452,9 @@ export default {
       handoverVisible: false,
       roleStatus: false,
       formActionTitle: 'create',
-      roleList: [], // 角色列表
+      roleList: [], // 角色列表,
+      roleBaseList:[], // 登陆人角色
+      roleResetList:[],
       formTitle: {
         create: '添加员工',
         update: '修改员工'
@@ -499,6 +502,7 @@ export default {
   mounted () {
     this.getList()
     this.getRoleList()
+
   },
   methods: {
     permission,
@@ -611,7 +615,7 @@ export default {
       }
       return temp
     },
-    getRoleList () { // 获取角色
+   async getRoleList () { // 获取角色
       getUserRole({ delFlag: 0, rows: 9999 }).then(res => {
         let result = res.data
         if (res.code == 200 && result && result.rows.length > 0) {
@@ -625,6 +629,22 @@ export default {
           })
         }
       })
+      // 获取可编辑角色
+      try {
+        const res= await userRole()
+          this.rolerulesList  = []
+          res.data.forEach(item => {
+            this.roleBaseList.push({
+              label: item.roleName,
+              value: item.id,
+              disabled: false,
+            })
+          })
+      res.data
+      }catch(e){
+        console.log(e)
+      }
+
       getDepts({ rows: 9999 }).then(res => {
         if(res.code == 200 && res.data && res.data.length > 0) {
           const depts = res.data || []
@@ -698,8 +718,24 @@ export default {
       })
       this.formActionTitle = type
       this.roleStatus = true
+
+      //  格式化 可选角色
+
       // 修改的时候
       if (type == 'update') {
+        let roleIdList = [...data.roleIds]
+        this.roleBaseList.forEach(item=>{
+          if(roleIdList.indexOf(item.id) == -1){
+            roleIdList.push(item.id)
+          }
+        })
+        this.roleResetList = []
+        this.roleList.forEach(role=>{
+          console.log(role)
+          if(roleIdList.indexOf(role.value) != -1){
+            this.roleResetList.push(role)
+          }
+        })
         // 初始化数据
         let postDeptArr = []
         const postDept = data.postDeptIds ? JSON.parse(data.postDeptIds) : []
@@ -721,6 +757,7 @@ export default {
             postId: null,
             deptIds: []
           }]
+
         }
 
         const deptIds = data.deptIds ? eval(data.deptIds) : []
@@ -746,6 +783,8 @@ export default {
           postDeptIds: postDeptArr,
           deptIds: tempDeptIds
         }
+      }else{
+        this.roleResetList = [...this.roleBaseList]
       }
     },
     formatParentId(id, list, ids = []) {

+ 6 - 6
src/views/reportForm/index.vue

@@ -420,7 +420,7 @@
       <div class="m-core">
         <div class="m-wrap">
           <div class="title">vip网管课导出:</div>
-          <el-select
+          <select-all
             v-model.trim="vipOrganId"
             class="organSelect"
             style="width: 100%"
@@ -434,7 +434,7 @@
               :label="item.name"
               :value="item.id"
             ></el-option>
-          </el-select>
+          </select-all>
           <el-button
             style="margin-left: 10px"
             type="primary"
@@ -479,7 +479,7 @@ export default {
       AccountDetailTimer: [],
       trainOrganId: null,
       questionActiveType: 'CLOUD_TEACHER_FEEDBACK',
-      vipOrganId:null
+      vipOrganId:[]
     };
   },
   mounted() {
@@ -913,7 +913,7 @@ export default {
       );
     },
     exportVip(){
-      if (!this.vipOrganId) {
+      if (!this.vipOrganId.length<0) {
         this.$message.error("请选择分部");
         return;
       }
@@ -924,10 +924,10 @@ export default {
           fileName: "vip网管课.xls",
           method: "post",
           params: qs.stringify({
-            organId: this.vipOrganId
+            organId: this.vipOrganId.join(',')
           }),
         },
-        "您确定导出学员vip课统计?"
+        "您确定导出vip网管课?"
       );
     }
   },

+ 10 - 6
src/views/studentManager/studentList.vue

@@ -34,6 +34,8 @@
             class="multiple"
             filterable
             v-model.trim="searchForm.organId"
+            multiple
+            collapse-tags
             clearable
             placeholder="请选择分部"
           >
@@ -893,7 +895,7 @@ export default {
     return {
       studentVisible: false,
       searchForm: {
-        organId: null,
+        organId: [],
         search: null,
         studentName: null,
         isActive: null,
@@ -982,7 +984,9 @@ export default {
       this.searchForm.hasTeacher = this.$route.params.hasTeacher;
     }
     if (this.$route.params.organId) {
-      this.searchForm.organId = this.$route.params.organId;
+      this.searchForm.organId = []
+
+      this.searchForm.organId = this.searchForm.organId.push(this.$route.params.organId);
     }
     this.$store.dispatch("setBranchs");
     this.$store.dispatch("setTeachers");
@@ -1010,10 +1014,10 @@ export default {
       return str;
     },
     getList() {
-      let params = this.searchForm;
+      let params = {...this.searchForm};
       params.rows = this.pageInfo.limit;
       params.page = this.pageInfo.page;
-      params.organId ? params.organId : (params.organId = null);
+      params.organId = this.searchForm.organId.join(',') ;
       queryStudentList(params).then((res) => {
         if (res.code == 200) {
           this.tableList = res.data.rows;
@@ -1023,7 +1027,7 @@ export default {
     },
     onReSet() {
       this.searchForm = {
-        organId: null,
+        organId: [],
         search: null,
         studentName: null,
         isActive: null,
@@ -1059,7 +1063,7 @@ export default {
         isRecord: null,
        */
       let data = {
-        organId: searchForm.organId+'' ? searchForm.organId : null,
+        organId: searchForm.organId.join(','),
         search: searchForm.search+'' ? searchForm.search : null,
         isActive: searchForm.isActive+'' ? searchForm.isActive : null,
         hasCourse: searchForm.hasCourse == "" ? null : searchForm.hasCourse,

+ 1 - 0
src/views/teacherManager/teacherDetail/components/teacherInfo.vue

@@ -265,6 +265,7 @@ export default {
       let template = {
         PART_TIME: "兼职",
         FULL_TIME: "全职",
+        LABOUR:'劳务'
         // TEMPORARY: "零时工"
       }
       return template[value]

+ 8 - 4
src/views/teacherManager/teacherList.vue

@@ -87,6 +87,8 @@
             v-model.trim="searchForm.organId"
             filterable
             clearable
+            multiple
+            collapse-tags
             placeholder="请选择分部"
           >
             <el-option
@@ -388,7 +390,7 @@ export default {
         isProbationPeriod: null,
         jobNature: null,
         subjectId: null,
-        organId: null,
+        organId: [],
         search: null, // 老师姓名或电话
         isSupportExtraPracticeLesson: null,
       },
@@ -462,7 +464,7 @@ export default {
       );
     },
     downLoadTeacher() {
-      let params = this.searchForm;
+      let params = {...this.searchForm};
       params.lockFlag ? params.lockFlag : (params.lockFlag = null);
       params.isProbationPeriod
         ? params.isProbationPeriod
@@ -471,6 +473,7 @@ export default {
       // params.subjectId?params.subjectId:params.subjectId = null
       params.subjectId ? params.subjectId : (params.subjectId = null);
       params.search ? params.search : (params.search = null);
+      params.organId = this.searchForm.organId.join(',')
       params.isSupportExtraPracticeLesson
         ? params.isSupportExtraPracticeLesson
         : (params.isSupportExtraPracticeLesson = null);
@@ -487,7 +490,7 @@ export default {
       );
     },
     getList() {
-      let params = this.searchForm;
+      let params = {...this.searchForm};
       // params.organId = this.organId
       // searchForm: {
       //   lockFlag: null,
@@ -511,6 +514,7 @@ export default {
         : (params.isSupportExtraPracticeLesson = null);
       params.rows = this.pageInfo.limit;
       params.page = this.pageInfo.page;
+      params.organId = this.searchForm.organId.join(',')
       teacherQueryPage(params).then((res) => {
         if (res.code == 200) {
           //  (res)
@@ -552,7 +556,7 @@ export default {
         lockFlag: null,
         isProbationPeriod: null,
         jobNature: null,
-        organId: null,
+        organId: [],
         subjectId: null,
         search: null,
       };

+ 14 - 6
src/views/teamDetail/teamList.vue

@@ -40,6 +40,8 @@
             class="multiple"
             v-model.trim="topForm.orgin"
             filterable
+            multiple
+            collapse-tags
             clearable
             placeholder="请选择分部"
             @change="onBranchChange"
@@ -55,7 +57,7 @@
         <el-form-item prop="cooperationOrganId">
           <el-select
             class="multiple"
-            :disabled="!topForm.orgin"
+            :disabled="!topForm.orgin.length>0"
             v-model.trim="topForm.cooperationOrganId"
             filterable
             clearable
@@ -477,7 +479,7 @@ export default {
         status: "",
         payType: "",
         word: "",
-        orgin: "",
+        orgin: [],
         courseViewType: "",
         billTimer: [],
         createTimer: [],
@@ -509,11 +511,17 @@ export default {
   mounted() {
     const { query } = this.$route;
     if (query.organId) {
-      this.topForm.orgin = query.organId;
+      this.topForm.orgin = []
+       this.topForm.orgin.push(query.organId)
+      // this.topForm.orgin = query.organId;
     }
     if (query.search) {
       this.topForm.search = query.search;
     }
+    if(this.topForm.orgin.length >0){
+      this.onBranchChange(this.topForm.orgin)
+    }
+
     this.init();
   },
   activated() {
@@ -560,7 +568,7 @@ export default {
       getTeamList({
         rows: this.rules.limit,
         page: this.rules.page,
-        organId: this.topForm.orgin || null,
+        organId: this.topForm.orgin.join(','),
         chargeTypeId: this.topForm.payType || null,
         search: this.topForm.search || null,
         musicGroupStatus: this.topForm.status || null,
@@ -1110,7 +1118,7 @@ export default {
       let { createTimer, billTimer, ...reset } = this.topForm;
       let obj = {
         ...reset,
-        organId: this.topForm.orgin || null,
+        organId: this.topForm.orgin.join(',') || null,
         ...getTimes(
           createTimer,
           ["createStartDate", "createEndDate"],
@@ -1136,7 +1144,7 @@ export default {
         return;
       }
       // 合作单位
-      await queryByOrganId({ organId: value }).then((res) => {
+      await queryByOrganId({ organId: value.join(',') }).then((res) => {
         if (res.code == 200) {
           this.cooperationList = res.data;
           this.topForm.cooperationOrganId = null;