浏览代码

菜单管理树,注册页面去掉弹框

huahaiyan 6 年之前
父节点
当前提交
9663418c00

+ 4 - 4
src/dashoo.cn/backend/api/controllers/casbin/module.go

@@ -29,7 +29,7 @@ type ModuleModel struct {
 // @Success 200 {object} business.device.DeviceChannels
 // @router /list [get]
 func (this *ModuleController) List() {
-	page := this.GetPageInfoForm()
+	//page := this.GetPageInfoForm()
 	svc := module.GetModuleService(utils.DBE)
 	//permissionsvc := permission.GetPermissionService(utils.DBE)
 	//ztreecurrentusernodesmodu := permissionsvc.GetModuleAll(this.User.Id, "30")
@@ -43,11 +43,11 @@ func (this *ModuleController) List() {
 		ids := svc.GetChildByTopId(parentid)
 		where = where + " and Id in ( " + ids + " )"
 	}
-	list := make([]module.Base_Module, 0)
-	total := svc.GetPagingEntitiesWithSortCode(page.CurrentPage, page.Size, "ParentId, CreateOn desc", &list, where)
+	var list []module.Base_Module
+	svc.GetEntities(&list, where)
 	var datainfo DataInfo
 	datainfo.Items = list
-	datainfo.CurrentItemCount = total
+	//datainfo.CurrentItemCount = total
 	this.Data["json"] = &datainfo
 	this.ServeJSON()
 }

+ 35 - 18
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/operation.vue

@@ -44,7 +44,7 @@
             <div slot="header" class="clearfix">
               <span>供方基本信息表</span>
               <span style="float: right;">
-                <el-button type="primary" size="mini" @click="saveEntity" v-if="Status <= 1">保存基本信息
+                <el-button type="primary" size="mini" @click="saveEntity" v-if="Status <= 0">保存基本信息
                 </el-button>
               </span>
             </div>
@@ -60,7 +60,7 @@
             <div slot="header" class="clearfix">
               <span>企业人员结构情况</span>
               <span style="float: right;">
-                <el-button type="primary" size="mini" @click="updateNumberEntity()" v-if="Status <= 1">
+                <el-button type="primary" size="mini" @click="updateNumberEntity()" v-if="Status <= 0">
                   保存人员结构情况</el-button>
               </span>
             </div>
@@ -143,53 +143,53 @@
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>企业主要情况</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="equipmentdialog" v-if="Status <= 1">添加
+              <el-button style="float: right; padding: 3px 0" type="text" @click="equipmentdialog" v-if="Status <= 0">添加
               </el-button>
             </div>
             <equipment-list ref="equipmentList" :data="equipmentList" :SupplierCertId="certId"
-              :SupplierTypeCode="classId" height="360px" style="margin-top: 20px"></equipment-list>
+              :SupplierTypeCode="classId" :canadd="add_flat" height="360px" style="margin-top: 20px"></equipment-list>
           </el-card>
 
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>近三年主要业绩</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="performancedialog" v-if="Status <= 1">
+              <el-button style="float: right; padding: 3px 0" type="text" @click="performancedialog" v-if="Status <= 0">
                 添加</el-button>
             </div>
             <performance-list ref="performanceList" :data="performanceList" :SupplierCertId="certId" :disabled="true"
-              :SupplierTypeCode="classId" height="360px" style="margin-top: 20px"></performance-list>
+              :SupplierTypeCode="classId" :canadd="add_flat" height="360px" style="margin-top: 20px"></performance-list>
           </el-card>
 
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>拥有专利、专有技术及工法</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="patentdialog" v-if="Status <= 1">添加
+              <el-button style="float: right; padding: 3px 0" type="text" @click="patentdialog" v-if="Status <= 0">添加
               </el-button>
             </div>
-            <patent-list ref="patentList" :data="patentList" :SupplierCertId="certId" :SupplierTypeCode="classId"
-              height="360px" style="margin-top: 20px">
+            <patent-list ref="patentList" :canadd="add_flat" :data="patentList" :SupplierCertId="certId"
+              :SupplierTypeCode="classId" height="360px" style="margin-top: 20px">
             </patent-list>
           </el-card>
 
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>近三年获得省部级及以上主要技术、管理成果、获奖项目</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="winningdialog" v-if="Status <= 1">添加
+              <el-button style="float: right; padding: 3px 0" type="text" @click="winningdialog" v-if="Status <= 0">添加
               </el-button>
             </div>
-            <winning-list ref="winningList" :data="winningList" :SupplierCertId="certId" :SupplierTypeCode="classId"
-              height="360px" style="margin-top: 20px">
+            <winning-list ref="winningList" :canadd="add_flat" :data="winningList" :SupplierCertId="certId"
+              :SupplierTypeCode="classId" height="360px" style="margin-top: 20px">
             </winning-list>
           </el-card>
         </el-tab-pane>
 
         <el-tab-pane label="准入范围" :disabled="!certId">
-          <business-list ref="businessList" :data.sync="businessList" :canadd="add_flat" height="360px"
+          <business-list ref="businessList" :data.sync="businessList" :canadd="false" height="360px"
             style="margin-top: 20px"></business-list>
         </el-tab-pane>
 
         <el-tab-pane label="企业资质" :disabled="!certId">
-          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" height="360px"
+          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="false" height="360px"
             style="margin-top: 20px"></subfile-list>
         </el-tab-pane>
 
@@ -318,7 +318,7 @@
           FirstAuditName: "",
           SecondAudit: "",
           ThirdAudit: "",
-          AnnualId:'',
+          AnnualId: '',
         },
         orgtreeprops: {
           value: 'id',
@@ -337,7 +337,7 @@
         addshow: false,
         canUpdateSupplier: true,
         dictData: null,
-        add_flat: false,
+        add_flat: true,
         applyLoading: false,
         equipmentList: [], //企业主要情况
         performanceList: [], //近三年主要业绩
@@ -355,6 +355,7 @@
           SupplierTypeName: '',
           Remark: ''
         },
+        formannData: {},
         formData: {
           Id: '',
           SupplierName: '',
@@ -474,21 +475,36 @@
       if (this.$route.query.certid) {
         this.certId = this.$route.query.certid + ''
       }
+      this.annualId = this.$route.query.annualId
+      this.getstatus(this.annualId)
       this.Status = this.$route.query.Status + ''
       this.Step = parseInt(this.$route.query.Step)
-      this.annualId = this.$route.query.annualId
       this.WorkflowId = this.$route.query.WorkflowId + ''
       this.getDictOptions()
       this.formData.Id = this.serviceId
       this.initDatas()
       this.backhistroy.certId = this.annualId
       this.backhistroy.workflowId = this.WorkflowId
-      if (this.Status <= 1) {
+      if (this.Status <= 0) {
         this.savebtn = false
         this.canUpdateSupplier = true
       }
+      if (this.Status > 0) {
+        this.add_flat = false
+      }
     },
     methods: {
+      getstatus(annid) {
+        annualapi.getEntity(annid, this.$axios)
+          .then(res => {
+            this.formannData = res.data;
+            console.log("--forann-", this.formannData.Status)
+            this.Status = this.formannData.Status
+          })
+          .catch(err => {
+            console.error(err);
+          });
+      },
       inputCompany(val) {
         if (!this.certId) {
           api.getEntityByName(val, this.$axios).then(res => {
@@ -848,6 +864,7 @@
                 this.entityForm.Id = res.data.item;
                 //this.initDatas();
                 this.addshow = false
+                this.getstatus(this.annualId)
                 this.$message({
                   type: 'success',
                   message: res.data.message

+ 18 - 54
src/dashoo.cn/frontend_web/src/pages/signup.vue

@@ -173,9 +173,7 @@
           if (this.supplierNameList) {
             for (let i = 0; i < this.supplierNameList.length; i++) {
               if (value == this.supplierNameList[i].SupplierName) {
-                this.$alert('该公司已注册!', '提示:', {
-                  confirmButtonText: '确定',
-                })
+                callback(new Error('该公司已注册!'));
               } else {
                 callback();
               }
@@ -189,9 +187,7 @@
         } else {
           let re4 = /^[0-9A-Z]\d{17}$/
           if (!re4.test(this.formData.CommercialNo)) {
-            this.$alert('请填写正确的统一社会信用代码!', '提示', {
-              confirmButtonText: '确定',
-            })
+            callback(new Error('请填写18位统一社会信用代码!'));
           } else {
             callback();
           }
@@ -203,9 +199,7 @@
         } else {
           let re1 = /(^\d{18}$)|(^\d{17}(\d|X|x)$)/
           if (!re1.test(this.formData.LegalPersonId)) {
-            this.$alert('请输入正确格式的法定代表人身份证号!', '提示', {
-              confirmButtonText: '确定',
-            })
+            callback(new Error('请输入正确格式的法定代表人身份证号!'));
           } else {
             callback();
           }
@@ -217,9 +211,7 @@
         } else {
           let re1 = /(^\d{18}$)|(^\d{17}(\d|X|x)$)/
           if (!re1.test(this.formData.ContactId)) {
-            this.$alert('请输入正确格式的联系人身份证号!', '提示', {
-              confirmButtonText: '确定',
-            })
+            callback(new Error('请输入正确格式的联系人身份证号!'));
           } else {
             callback();
           }
@@ -238,9 +230,7 @@
         } else {
           this.checkUserNameIsExist()
           if (this.userIsExist) {
-            this.$alert('该登录账号已注册!', '提示:', {
-              confirmButtonText: '确定',
-            })
+            callback(new Error('该登录账号已注册!!'));
           } else {
             callback();
           }
@@ -252,9 +242,7 @@
         } else {
           let re3 = /^[1][3456789]\d{9}$/
           if (!re3.test(this.formData.UserTelephone)) {
-            this.$alert('请填写正确格式的手机号!', '提示', {
-              confirmButtonText: '确定',
-            })
+            callback(new Error('请填写正确格式的手机号!'));
           } else {
             callback();
           }
@@ -266,9 +254,7 @@
         } else {
           let re2 = /^(?=.*[0-9])[0-9A-Za-z]{8,20}$/g
           if (!re2.test(this.formData.UserPass)) {
-            this.$alert('请输入正确格式的密码(8——20位,包含英文字母、数字)!', '提示', {
-              confirmButtonText: '确定',
-            })
+            callback(new Error('请输入正确格式的密码(8——20位,包含英文字母、数字)!'));
           } else {
             callback();
           }
@@ -279,9 +265,7 @@
           callback(new Error('请输入确认密码!'));
         } else {
           if (this.formData.UserPass != this.formData.UserPass2) {
-            this.$alert('两次输入的密码不一致,请重新输入!', '提示', {
-              confirmButtonText: '确定',
-            })
+            callback(new Error('两次输入的密码不一致,请重新输入'));
           } else {
             callback();
           }
@@ -445,9 +429,7 @@
         if (_this.supplierNameList) {
           for (let i = 0; i < _this.supplierNameList.length; i++) {
             if (_this.formData.SupplierName == _this.supplierNameList[i].SupplierName) {
-              this.$alert('该公司已注册!', '提示:', {
-                confirmButtonText: '确定',
-              })
+              callback(new Error('该公司已注册!'));
               return
             }
           }
@@ -456,32 +438,24 @@
         //统一社会信用代码验证
         let re4 = /^[0-9A-Z]\d{17}$/
         if (!re4.test(_this.formData.CommercialNo)) {
-          this.$alert('请填写正确的统一社会信用代码!', '提示', {
-            confirmButtonText: '确定',
-          })
+          callback(new Error('请填写18位统一社会信用代码!'));
           return
         }
 
         //身份证号验证
         let re1 = /(^\d{18}$)|(^\d{17}(\d|X|x)$)/
         if (!re1.test(_this.formData.LegalPersonId)) {
-          this.$alert('请填写正确的法定代表人身份证号!', '提示', {
-            confirmButtonText: '确定',
-          })
+          callback(new Error('请填写正确的法定代表人身份证号!'));
           return
         }
         if (!re1.test(_this.formData.ContactId)) {
-          this.$alert('请填写正确的联系人身份证号!', '提示', {
-            confirmButtonText: '确定',
-          })
+          callback(new Error('请填写正确的联系人身份证号!'));
           return
         }
 
         // 判断法定代表人身份证文件上传是否完成
         if (!_this.checkSuccess(_this.$refs.LegalPersonUpload.uploadFiles)) {
-          this.$alert('上传文件失败,请重新上传法定代表人身份证文件! ', '提示', {
-            confirmButtonText: '确定',
-          })
+          callback(new Error('上传文件失败,请重新上传法定代表人身份证文件!'));
           return
         }
         let URL = []
@@ -490,9 +464,7 @@
 
         // 判断联系人身份证文件上传是否完成
         if (!_this.checkSuccess(_this.$refs.ContactUpload.uploadFiles)) {
-          this.$alert('上传文件失败,请重新上传联系人身份证文件! ', '提示', {
-            confirmButtonText: '确定',
-          })
+          callback(new Error('上传文件失败,请重新上传联系人身份证文件!'));
           return
         }
         let URL2 = []
@@ -502,33 +474,25 @@
         //手机号验证
         let re3 = /^[1][3456789]\d{9}$/
         if (!re3.test(_this.formData.UserTelephone)) {
-          this.$alert('请填写正确的手机号!', '提示', {
-            confirmButtonText: '确定',
-          })
+          callback(new Error('请填写正确的手机号!'));
           return
         }
 
         //判断登录账号是否存在
         _this.checkUserNameIsExist()
         if (_this.userIsExist) {
-          _this.$alert('该登录账号已注册!', '提示:', {
-            confirmButtonText: '确定',
-          })
+          callback(new Error('该登录账号已注册!'));
           return
         }
 
         //密码验证 字母数字组成8-20位 正向断言
         let re2 = /^(?=.*[0-9])[0-9A-Za-z]{8,20}$/g
         if (!re2.test(_this.formData.UserPass)) {
-          this.$alert('请输入正确格式的密码(8——20位,包含英文字母、数字)!', '提示', {
-            confirmButtonText: '确定',
-          })
+          callback(new Error('请输入正确格式的密码(8——20位,包含英文字母、数字)!'));
           return
         }
         if (_this.formData.UserPass != _this.formData.UserPass2) {
-          this.$alert('两次输入的密码不一致,请重新输入!', '提示', {
-            confirmButtonText: '确定',
-          })
+          callback(new Error('两次输入的密码不一致,请重新输入!'));
           return
         }