| | |
| | | size="small" |
| | | icon="el-icon-edit" |
| | | v-if="permission.traincompany_addTrain" |
| | | :disabled="auditStatus" |
| | | @click="handleTrainApply(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, |
| | |
| | | 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, |
| | |
| | | }, |
| | | 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(){ |