Kaynağa Gözat

用户companyid

huahaiyan 6 yıl önce
ebeveyn
işleme
204eba5b92

+ 2 - 1
src/dashoo.cn/backend/api/business/oilsupplier/annualaudit/annualaudit.go

@@ -7,7 +7,8 @@ import (
 type OilAnnualAudit struct {
 	Id               int       `xorm:"not null pk autoincr INT(10)"`
 	RecUnitId        string    `xorm:"comment('推荐单位编码') VARCHAR(10)"`
-	CerId            int    `xorm:"comment('准入ID') INT(10)"`
+	CerId            int       `xorm:"comment('准入ID') INT(10)"`
+	Step             int       `xorm:"comment('页面上第几步') INT(10)"`
 	AccessCardNo     string    `xorm:"comment('准入证号') VARCHAR(50)"`
 	SupplierTypeName string    `xorm:"comment('准入类别') VARCHAR(50)"`
 	SupplierName     string    `xorm:"comment('企业名称') VARCHAR(50)"`

+ 9 - 7
src/dashoo.cn/backend/api/controllers/casbin/user.go

@@ -217,8 +217,11 @@ func (this *UserController) AddUser() {
 	//	获取组织名称
 	svcorg := organize.GetOrganizeService(utils.DBE)
 	model.DepartmentName = svcorg.GetNameById(model.DepartmentId)
-
+	//获取组织上级组织
+	var orginizeentity organize.Base_Organize
+	svcorg.GetEntityById(model.DepartmentId, &orginizeentity)
 	var userentity userRole.Base_User
+	userentity.Companyid = orginizeentity.Parentid
 	userentity.Roleid, _ = utils.StrTo(model.Role).Int()
 	if userentity.Roleid == 0 {
 		//userentity.Roleid = 10000123 //普通用户
@@ -312,11 +315,10 @@ func (this *UserController) EditUser() {
 		//获取组织名称
 		svcorg := organize.GetOrganizeService(utils.DBE)
 		model.DepartmentName = svcorg.GetNameById(model.DepartmentId)
-		//		roleid, _ := utils.StrTo(model.Role).Int()
-		//		if userentity.Roleid != roleid {
-		//			svc.ClearUserRole(id)
-		//			svc.AddUserToRole(id, model.Role, userentity)
-		//		}
+		//获取组织上级组织
+		var orginizeentity organize.Base_Organize
+		svcorg.GetEntityById(model.DepartmentId, &orginizeentity)
+		userentity.Companyid = orginizeentity.Parentid
 		userentity.Realname = model.Realname
 		userentity.Telephone = model.Telephone
 		userentity.Mobile = model.Mobile
@@ -332,7 +334,7 @@ func (this *UserController) EditUser() {
 		userentity.Departmentid = model.DepartmentId
 		userentity.Departmentname = model.DepartmentName
 
-		var cols []string = []string{"Realname", "DepartmentId", "DepartmentName", "Telephone", "Mobile", "Description", "Photo", "Modifieduserid", "Modifiedby"}
+		var cols []string = []string{"Realname", "CompanyId", "DepartmentId", "DepartmentName", "Telephone", "Mobile", "Description", "Photo", "Modifieduserid", "Modifiedby"}
 
 		err := svc.UpdateEntityAndBackupByCols(id, &userentity, &userentityempty, cols, utils.ToStr(this.User.Id), this.User.Realname)
 

+ 3 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/annualaudit.go

@@ -281,6 +281,7 @@ func (this *AnnualAuditController) AddEntity() {
 	model.RecUnitId = suppliermodel.RecUnitId
 	model.CerId, _ = strconv.Atoi(suppliermodel.CertId)
 	model.Status = 0
+	model.Step = 2
 	model.BackReason = suppliermodel.BackReason
 	model.CreateOn = time.Now()
 	model.CreateBy = this.User.Realname
@@ -544,9 +545,11 @@ func (this *AnnualAuditController) AnnualAudit() {
 		receiveVal := svcActiviti.TaskComplete(ActiComplete)
 		var auditmodel annualaudit.OilAnnualAudit
 		auditmodel.Status = 4
+		auditmodel.Step = 3
 		cols := []string{
 			"Id",
 			"Status",
+			"Step",
 		}
 		if receiveVal == "true" {
 			_, err := svc.UpdateEntityByIdCols(dataother.AnnualId, auditmodel, cols)

+ 7 - 6
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/operation.vue

@@ -13,12 +13,11 @@
               </span>
             </div>
 
-      <el-steps :active="formData.Step" simple align-center finish-status="success">
-        <el-step title="企业信息"></el-step>
-        <el-step title="企业情况"></el-step>
-        <el-step title="企业资质"></el-step>
+      <el-steps :active="Step" simple align-center finish-status="success">
+        <el-step title="填写信息"></el-step>
         <el-step title="提交审批"></el-step>
-        <el-step title="审批完成"></el-step>
+        <el-step title="供方交费"></el-step>
+        <el-step title="完成"></el-step>
       </el-steps>
 
       <el-tabs tab-position="right" style="margin-top: 20px">
@@ -263,6 +262,7 @@
           label: 'Fullname',
           children: 'children'
         },
+        Step:'',
         organizeOption: [], // 审批部门
         auditerOption: [],
         addshow: false,
@@ -407,6 +407,7 @@
         this.certId = this.$route.query.certid + ''
       }
       this.Status = this.$route.query.Status +''
+      this.Step = this.$route.query.Step
       this.WorkflowId = this.$route.query.WorkflowId + ''
       this.getDictOptions();
       this.getorgtreelist()
@@ -665,7 +666,7 @@
       },
 
       nexStepCB() {
-        this.formData.Step += 1
+        this.Step += 1
       },
       jstimehandle(val) {
         if (val === '') {

+ 2 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/index.vue

@@ -40,7 +40,7 @@
         <el-table-column label="操作" min-width="180" align="center" fixed>
           <template slot-scope="scope">
             <router-link
-              :to="'/oilsupplier/annualaudit/' + scope.row.SupplierId + '/operation?certid=' + scope.row.CerId +'&WorkflowId='+scope.row.WorkflowId+'&Status='+scope.row.Status">
+              :to="'/oilsupplier/annualaudit/' + scope.row.SupplierId + '/operation?certid=' + scope.row.CerId +'&WorkflowId='+scope.row.WorkflowId+'&Status='+scope.row.Status+'&Step='+scope.row.Step">
               <el-button type="primary" plain title="查看详情" size="mini">打开</el-button>
             </router-link>
             <el-dropdown @command="MoreCmdClick">
@@ -270,6 +270,7 @@
           SupplierTypeName: '',
           FirstAudit: '',
           auditer: '',
+          Step: 0,
         },
         searchForm: {
           Id: '',