| | |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-edit" |
| | | v-if="permission.traincompany_addTrain" |
| | | :disabled="auditStatus" |
| | | @click="handleTrainApply(row)" |
| | | >报名 |
| | | </el-button> |
| | |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-edit" |
| | | v-if="permission.traincompany_batchAddTrain" |
| | | @click="handleTrainApplyBatch(row)" |
| | | >批量报名 |
| | | </el-button> |
| | |
| | | import {adddata,batchTrain} from "@/api/trainingRegistration/trainingRegistration"; |
| | | import { mapGetters } from "vuex"; |
| | | import { mapState } from 'vuex'; |
| | | |
| | | import {getUser} from "@/api/system/user"; |
| | | export default { |
| | | |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | auditStatus:false, |
| | | formTrainApply: {}, |
| | | query: {}, |
| | | deptId:null, |
| | |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "公司名称", |
| | | label: "学校", |
| | | prop: "deptName", |
| | | search: true, |
| | | searchSpan: 4, |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "法定代表人", |
| | | label: "校长", |
| | | prop: "representative", |
| | | display: false, |
| | | search: true, |
| | |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "注册时间", |
| | | prop: "establishtime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | mock: { |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd", |
| | | }, |
| | | display: false, |
| | | width: 180, |
| | | label: "负责人", |
| | | prop: "contacts", |
| | | display: false |
| | | }, |
| | | { |
| | | label: "注册资金", |
| | | prop: "registeredcapital", |
| | | label: "联系方式", |
| | | prop: "contactscell", |
| | | display: false, |
| | | width: 130, |
| | | }, |
| | | { |
| | | label: "实缴资金", |
| | | prop: "capital", |
| | | display: false, |
| | | width: 130, |
| | | }, |
| | | { |
| | | label: "公司类型", |
| | | prop: "enterprises", |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "注册地址", |
| | | label: "联系地址", |
| | | prop: "address", |
| | | display: false, |
| | | width: 280, |
| | |
| | | labelWidth:110, |
| | | column: [ |
| | | { |
| | | label: "培训公司名称", |
| | | label: "学校", |
| | | prop: "trainingUnitId", |
| | | dicUrl: "/api/blade-system/dept/lazy-tree-type?parentId=1418458374477549569", |
| | | cascaderItem: ["trainExamId"], |
| | |
| | | disabled:true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入培训公司名称", |
| | | message: "请输入学校", |
| | | trigger: "blur" |
| | | }], |
| | | hide:true, |
| | |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.post_add, false), |
| | | viewBtn: this.vaildData(this.permission.post_view, false), |
| | | delBtn: this.vaildData(this.permission.post_delete, false), |
| | | editBtn: this.vaildData(this.permission.post_edit, false), |
| | | addBtn: this.vaildData(null, false), |
| | | viewBtn: this.vaildData(null, false), |
| | | delBtn: this.vaildData(null, false), |
| | | editBtn: this.vaildData(null, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | |
| | | }, |
| | | created() { |
| | | this.optionTrainApply.column[1].dicUrl = |
| | | "/api/blade-user/security-apply-tree?deptId=" + |
| | | "/api/blade-user/security-apply-tree?examType=2&deptId=" + |
| | | this.userInfo.dept_id; |
| | | |
| | | this.getUserDetail(); |
| | | }, |
| | | methods: { |
| | | //获取用户信息 |
| | | getUserDetail(){ |
| | | var that = this; |
| | | getUser(this.userInfo.Id).then((res)=>{ |
| | | var status = res.data.data.examinationType; |
| | | if(status=='1'){ |
| | | that.auditStatus = true; |
| | | } |
| | | console.log(that.auditStatus,3333); |
| | | }) |
| | | }, |
| | | //保安公司批量报名 |
| | | handleTrainApplyBatch(row){ |
| | | this.dialogDisable = true; |
| | |
| | | }, |
| | | //未持证保安人员报名 |
| | | handleTrainApply(row,done,loading){ |
| | | row['userId'] = this.userInfo.user_id; |
| | | row['trainingUnitId'] = row.departmentid; |
| | | adddata(row).then( |
| | | (res) => { |
| | | // this.onLoad(this.page); |
| | | if(res.data.data==201){ |
| | | this.$message({ |
| | | type: "warning", |
| | | message:"已报名,不能重复报名", |
| | | }); |
| | | }else if(res.data.data==201){ |
| | | this.$message({ |
| | | type: "warning", |
| | | message:"报名失败", |
| | | }); |
| | | }else{ |
| | | this.$message({ |
| | | type: "success", |
| | | message:"报名成功", |
| | | }); |
| | | this.$confirm("是否确定报名?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | row['userId'] = this.userInfo.user_id; |
| | | row['trainingUnitId'] = row.departmentid; |
| | | adddata(row).then( |
| | | (res) => { |
| | | // this.onLoad(this.page); |
| | | if(res.data.data==201){ |
| | | this.$message({ |
| | | type: "warning", |
| | | message:"已报名,不能重复报名", |
| | | }); |
| | | }else if(res.data.data==201){ |
| | | this.$message({ |
| | | type: "warning", |
| | | message:"报名失败", |
| | | }); |
| | | }else{ |
| | | this.$message({ |
| | | type: "success", |
| | | message:"报名成功", |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | ); |
| | | }) |
| | | }, |
| | | //关闭窗口清除数据 |
| | | closeDialog(){ |