From b8dfc98b089e47fdb3e269941bbd2de3f7fb7de1 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 13 Sep 2021 17:14:57 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/zhba_enterprises
---
src/views/traincompany/index.vue | 112 ++++++++++++++++++++++++++++---------------------------
1 files changed, 57 insertions(+), 55 deletions(-)
diff --git a/src/views/traincompany/index.vue b/src/views/traincompany/index.vue
index 86882d7..9c6095c 100644
--- a/src/views/traincompany/index.vue
+++ b/src/views/traincompany/index.vue
@@ -35,6 +35,7 @@
size="small"
icon="el-icon-edit"
v-if="permission.traincompany_addTrain"
+ :disabled="auditStatus"
@click="handleTrainApply(row)"
>报名
</el-button>
@@ -71,12 +72,13 @@
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,
@@ -116,7 +118,7 @@
display: false,
},
{
- label: "法定代表人",
+ label: "校长",
prop: "representative",
display: false,
search: true,
@@ -125,37 +127,18 @@
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,
@@ -271,10 +254,23 @@
},
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;
@@ -318,34 +314,40 @@
},
//未持证保安人员报名
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(){
--
Gitblit v1.9.3