mo 4 年之前
父節點
當前提交
209533d752
共有 3 個文件被更改,包括 110 次插入23 次删除
  1. 17 10
      src/api/systemManage.js
  2. 91 11
      src/views/categroyManager/insideSetting/staffManager.vue
  3. 2 2
      vue.config.js

+ 17 - 10
src/api/systemManage.js

@@ -247,7 +247,7 @@ export function getSchool (data) {
 }
 
 // 分页查询支付配置列表
-export function paymentConfigQueryPage(data) {
+export function paymentConfigQueryPage (data) {
   return request({
     url: api + '/paymentConfig/queryPage',
     method: 'get',
@@ -256,7 +256,7 @@ export function paymentConfigQueryPage(data) {
 }
 
 // 根据支付配置编号查询支付配置
-export function paymentConfigGet(data) {
+export function paymentConfigGet (data) {
   return request({
     url: api + '/paymentConfig/get/' + data.id,
     method: 'get',
@@ -264,7 +264,7 @@ export function paymentConfigGet(data) {
 }
 
 // 新增支付配置
-export function paymentConfigAdd(data) {
+export function paymentConfigAdd (data) {
   return request({
     url: api + '/paymentConfig/add',
     method: 'post',
@@ -273,7 +273,7 @@ export function paymentConfigAdd(data) {
 }
 
 // 修改支付配置
-export function paymentConfigUpdate(data) {
+export function paymentConfigUpdate (data) {
   return request({
     url: api + '/paymentConfig/update',
     method: 'post',
@@ -282,7 +282,7 @@ export function paymentConfigUpdate(data) {
 }
 
 // 删除支付配置
-export function paymentConfigDel(data) {
+export function paymentConfigDel (data) {
   return request({
     url: api + '/paymentConfig/del/' + data.id,
     method: 'post'
@@ -290,7 +290,7 @@ export function paymentConfigDel(data) {
 }
 
 // 根据分部查询老师
-export function findTeacherByOrganId(data) {
+export function findTeacherByOrganId (data) {
   return request({
     url: api + '/teacher/findTeacherByOrganId',
     method: 'get',
@@ -299,7 +299,7 @@ export function findTeacherByOrganId(data) {
 }
 
 // 获取版本控制列表
-export function appVersionInfo(data) {
+export function appVersionInfo (data) {
   return request({
     url: api + '/appVersionInfo/list',
     method: 'get',
@@ -308,7 +308,7 @@ export function appVersionInfo(data) {
 }
 
 // 新增版本管理
-export function addAppVersionInfo(data) {
+export function addAppVersionInfo (data) {
   return request({
     url: api + '/appVersionInfo/add',
     method: 'post',
@@ -317,7 +317,7 @@ export function addAppVersionInfo(data) {
 }
 
 // 修改版本管理
-export function resetAppVersionInfo(data) {
+export function resetAppVersionInfo (data) {
   return request({
     url: api + '/appVersionInfo/update',
     method: 'post',
@@ -325,4 +325,11 @@ export function resetAppVersionInfo(data) {
   })
 }
 
-// 
+// 判断该用户是否是教务老师关联的学生乐团 employee/hasCourseGroupRelation
+export function hasCourseGroupRelation (data) {
+  return request({
+    url: api + '/employee/hasCourseGroupRelation',
+    method: 'post',
+    data: qs.stringify(data)
+  })
+}

+ 91 - 11
src/views/categroyManager/insideSetting/staffManager.vue

@@ -230,13 +230,13 @@
                           placeholder="选择日期">
           </el-date-picker>
         </el-form-item>
-          <el-form-item label="通讯地址"
+        <el-form-item label="通讯地址"
                       prop="contactAddress"
                       :label-width="formLabelWidth">
           <el-input v-model.trim="form.contactAddress"
                     autocomplete="off"></el-input>
         </el-form-item>
-          <el-form-item label="邮政编码"
+        <el-form-item label="邮政编码"
                       prop="postalCode"
                       :label-width="formLabelWidth">
           <el-input v-model.trim="form.postalCode"
@@ -250,12 +250,48 @@
                    type="primary">确 定</el-button>
       </span>
     </el-dialog>
+    <el-dialog title="教务交接"
+               width="400px"
+               destroy-on-close
+               close-on-click-modal
+               :visible.sync="educationViseble">
+      <el-form :model="educationForm"
+               :inline="true"
+               ref="educationForm">
+        <el-form-item label="教务老师"
+                      :rules="[{
+                      required:
+                      true,
+                      message: '请选择教务老师'
+                      ,
+                      trigger: 'blur'
+                      }]">
+          <el-select v-model.trim="
+                      educationForm.targetUserId"
+                     clearable
+                     filterable>
+            <el-option v-for="item in educationList"
+                       :key="item.userId"
+                       :label="item.userName"
+                       :value="item.userId"></el-option>
+          </el-select>
+
+        </el-form-item>
+      </el-form>
+      <span slot="footer"
+            class="dialog-footer">
+        <el-button @click="educationViseble = false">取 消</el-button>
+        <el-button @click="submitEducation"
+                   type="primary">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script>
 import pagination from '@/components/Pagination/index'
-import { queryEmployByOrganId, employeeOperate, getUserRole, employeeAdd, employeeUpdate } from '@/api/systemManage'
+import { queryEmployByOrganId, employeeOperate, getUserRole, employeeAdd, employeeUpdate, hasCourseGroupRelation } from '@/api/systemManage'
 import { branchQueryPage } from '@/api/specialSetting'
+import { findEducationUsers } from '@/api/buildTeam'
 import store from '@/store'
 import { isvalidPhone } from '@/utils/validate'
 let validPhone = (rule, value, callback) => {
@@ -273,6 +309,12 @@ export default {
   data () {
     return {
       tableList: [],
+      educationList: [],
+      educationForm: {
+        targetUserId: ''
+      },
+      educationViseble: false,
+      activeRow: null,
       pageInfo: {
         // 分页规则
         limit: 10, // 限制显示条数
@@ -297,13 +339,13 @@ export default {
         organIdLists: [],
         jobNature: null,
         entryDate: null,
-        contactAddress:null,
-        postalCode:null
+        contactAddress: null,
+        postalCode: null
       },
       rules: {
         realName: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
         gender: [{ required: true, message: '请选择性别', trigger: 'change' }],
-        phone: [{ type: 'number', required: true, validator: validPhone, trigger: 'blur' },{pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号',trigger: 'blur' }],
+        phone: [{ type: 'number', required: true, validator: validPhone, trigger: 'blur' }, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }],
         roleIds: [{ type: 'array', required: true, message: '请选择分类', trigger: 'change' }],
         organIdLists: [{ type: 'array', required: true, message: '请选择所属部门', trigger: 'change' }],
         jobNature: [{ required: true, message: '请选择工作类型', trigger: 'change' }],
@@ -319,14 +361,27 @@ export default {
     }
   },
   mounted () {
+
+  },
+  activated () {
     this.getList()
     this.getRoleList()
-
-
+    this.getEducationUsers()
   },
   methods: {
+    submitEducation () {
+      console.log('来了')
+    },
+    getEducationUsers () {
+      findEducationUsers().then(res => {
+        if (res.code === 200) {
+          this.educationList = res.data;
+        }
+      })
+    },
     onBranchCheckAll () {
       this.form.organIdLists = []
+
       this.branchList.forEach(item => {
         this.form.organIdLists.push(item.value)
       })
@@ -383,6 +438,8 @@ export default {
       })
     },
     getRoleList () { // 获取角色
+      this.roleList = []
+      this.branchList = []
       getUserRole({ delFlag: 0, rows: 9999 }).then(res => {
         let result = res.data
         if (res.code == 200 && result && result.rows.length > 0) {
@@ -423,8 +480,8 @@ export default {
           organIdLists: data.organIdList ? data.organIdList : [],
           jobNature: data.jobNature,
           entryDate: data.entryDate,
-          contactAddress:data.contactAddress,
-          postalCode:data.postalCode
+          contactAddress: data.contactAddress,
+          postalCode: data.postalCode
         }
       }
     },
@@ -448,7 +505,22 @@ export default {
         return reuslt[row.lockFlag]
       }
     },
-    onStaffOperation (type, data) {
+    async onStaffOperation (type, data) {
+      if (type === 'DEMISSION' && !data.demissionDate) {
+        this.activeRow = data;
+        // 1.点击的是离职按钮
+        // 2.判断该考级是否存在教务老师
+        await hasCourseGroupRelation({ employeeId: data.id }).then(res => {
+          if (res.code === 200) {
+            if (res.deta === 0) {
+              return
+            } else {
+              this.educationViseble = true;
+            }
+          }
+        })
+        return
+      }
       employeeOperate({
         employeeId: data.id,
         operate: type
@@ -462,6 +534,14 @@ export default {
         }
       })
     }
+  },
+  watch: {
+    educationViseble (val) {
+      if (!val) {
+        this.educationForm.targetUserId = ''
+        this.$refs['educationForm'].resetFields()
+      }
+    }
   }
 }
 </script>

+ 2 - 2
vue.config.js

@@ -19,9 +19,9 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'https://online.dayaedu.com' //线上
 // let target = 'http://dyme.utools.club' //test环境
 // let target = 'http://192.168.3.139:8000' // 箭河
-// let target = 'http://192.168.3.28:8000' //邹璇
+let target = 'http://192.168.3.28:8000' //邹璇
 // let target = 'http://192.168.3.8:8000' //勇哥
-let target = 'http://dev.dayaedu.com' // 测试服
+// let target = 'http://dev.dayaedu.com' // 测试服
 // let target = 'http://192.168.3.196:8080' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {