2
3
lining 6 rokov pred
rodič
commit
564a7d1b8a

+ 4 - 0
src/dashoo.cn/backend/api/business/oilsupplier/supplier/oilsupplier.go

@@ -427,3 +427,7 @@ type OilSupplierInte struct {
 	JFsub        []OilSupplierCertSubInte // 技术服务类
 	JSsub        []OilSupplierCertSubInte // 基建类
 }
+const (
+	// 管理单位
+	MGRUNIT string = "大港油田分公司"
+	)

+ 4 - 0
src/dashoo.cn/backend/api/business/workflow/workflow.go

@@ -105,11 +105,15 @@ const (
 	OIL_ENUSER_SUPPLIER_APPLY string = "oil_enuser_supplier_apply"
 	//企业用户二级物资准入流程图
 	OIL_SECOND_ENUSER_SUPPLIER_APPLY string = "oil_second_enuser_supplier_apply"
+	//企业用户二级物资准入流程图(除大港油田以外的)
+	OIL_SECOND_OTHER_SUPPLIER_APPLY string = "oil_second_other_supplier_apply"
 
 	//企业用户一级物资增项流程图
 	OIL_FIRST_ENUSER_APPEND_APPLY string = "oil_first_enuser_append_apply"
 	//企业用户二级物资增项流程图
 	OIL_SECOND_ENUSER_APPEND_APPLY string = "oil_second_enuser_append_apply"
+	//企业用户二级物资增项流程图(除大港油田以外的)
+	OIL_SECOND_OTHER_APPEND_APPLY string = "oil_second_other_append_apply"
 	//企业用户增项流程图
 	OIL_ENUSER_APPEND_APPLY string = "oil_enuser_append_apply"
 

+ 10 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -1318,6 +1318,7 @@ func (this *OilSupplierController) GetDictListByStatus() {
 	//status := this.Ctx.Input.Param(":status")
 	status := this.GetString("status")
 	majorAduit := this.GetString("majorAduit")
+	addId := this.GetString("addId")
 	dictList := make(map[string]interface{})
 	dictSvc := items.GetItemsService(utils.DBE)
 	userSvc := baseUser.GetBaseUserService(utils.DBE)
@@ -1407,6 +1408,15 @@ func (this *OilSupplierController) GetDictListByStatus() {
 	orgsvc.GetEntities(&allunitorglist, where)
 	dictList["Allunitorglist"] = allunitorglist
 
+	// 管理单位
+	var suppliermode supplier.OilSupplier
+	orgsvc.GetEntityById(addId, &suppliermode)
+	if suppliermode.MgrUnit == supplier.MGRUNIT {
+		dictList["MgrUnit"] = true
+	} else {
+		dictList["MgrUnit"] = false
+	}
+
 
 	var datainfo DataInfo
 	datainfo.Items = dictList

+ 35 - 3
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -684,10 +684,13 @@ func (this *OilSupplierCertController) AuditEntity() {
 		// 1 评审准入  2 一级物资备案准入  3  二级物资备案准入  4 战略合作准入  5 内部多元准入  6 外部市场准入
 		if supplierCertEntity.InStyle == "2" || supplierCertEntity.InStyle == "4" || supplierCertEntity.InStyle == "6" {
 			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, businessKey, this.User.Id, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
-		} else if supplierCertEntity.InStyle == "3" {
+		} else if supplierCertEntity.InStyle == "3" && supplierEntity.MgrUnit == supplier.MGRUNIT {
 			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, businessKey, this.User.Id, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
 		} else if supplierCertEntity.InStyle == "1" || supplierCertEntity.InStyle == "5" {
 			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_ENUSER_SUPPLIER_APPLY, businessKey, this.User.Id, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
+		} else if supplierCertEntity.InStyle == "3" && supplierEntity.MgrUnit != supplier.MGRUNIT {
+			// 二级物资准入(除大港油田外的其他公司)
+			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_SECOND_OTHER_SUPPLIER_APPLY, businessKey, this.User.Id, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
 		}
 		//if this.User.IsCompanyUser == 1 { // 企业用户
 		//	// 1 评审准入  2 一级物资备案准入  3  二级物资备案准入  4 战略合作准入  5 内部多元准入  6 外部市场准入
@@ -729,10 +732,12 @@ func (this *OilSupplierCertController) AuditEntity() {
 	var ActiComplete workflow.ActiCompleteVM
 	if supplierCertEntity.InStyle == "2" || supplierCertEntity.InStyle == "4" || supplierCertEntity.InStyle == "6" {
 		ActiComplete.ProcessKey = workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY
-	} else if supplierCertEntity.InStyle == "3" {
+	} else if supplierCertEntity.InStyle == "3" && supplierEntity.MgrUnit == supplier.MGRUNIT {
 		ActiComplete.ProcessKey = workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY
 	} else if supplierCertEntity.InStyle == "1" || supplierCertEntity.InStyle == "5" {
 		ActiComplete.ProcessKey = workflow.OIL_ENUSER_SUPPLIER_APPLY
+	} else if supplierCertEntity.InStyle == "3" && supplierEntity.MgrUnit != supplier.MGRUNIT {
+		ActiComplete.ProcessKey = workflow.OIL_SECOND_OTHER_SUPPLIER_APPLY
 	}
 	//if this.User.IsCompanyUser == 1 {
 	//	if supplierCertEntity.InStyle == "2" || supplierCertEntity.InStyle == "4" || supplierCertEntity.InStyle == "6" {
@@ -945,7 +950,7 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 		var setting auditsetting.Base_OilAuditSetting
 		usvc := userRole.GetUserService(utils.DBE)
 
-		if supplierCertEntity.InStyle == "3" {
+		if supplierCertEntity.InStyle == "3" && supplierEntity.MgrUnit == supplier.MGRUNIT {
 			status = suppliercert.THIRD_TRIAL_STATUS
 			where := "AuditStepCode='" + workflow.PROF_RECE + "'"
 			usvc.GetEntity(&setting, where)
@@ -958,6 +963,33 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 				usvc.GetEntities(&userlist, where)
 			}
 
+		} else if supplierCertEntity.InStyle == "3" && supplierEntity.MgrUnit != supplier.MGRUNIT {
+			status = suppliercert.CENT_AUDIT_STATUS
+			step = 2
+			backstatus = suppliercert.NO_PROF_AUDIT_STATUS
+
+			paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
+			topid := paramSvc.GetBaseparameterMessage("", "paramset", "CENT_AUDIT")
+
+			var userlist []userRole.Base_User
+			var setting auditsetting.Base_OilAuditSetting
+			usvc := userRole.GetUserService(utils.DBE)
+			where := "AuditStepCode='" + workflow.PROF_REGULATION + "'"
+			usvc.GetEntity(&setting, where)
+
+			ids := usvc.GetUserIdsByRoleId(strconv.Itoa(setting.RoleId))
+			tempstr := strings.Join(ids, ",")
+			uids := strings.Replace(tempstr, "uid_", "", -1)
+			uids = strings.Trim(uids, ",")
+			if uids != "" {
+				where := "Id in (" + uids + ")" + " and UnitId=" + topid
+				usvc.GetEntities(&userlist, where)
+			}
+			for _, tmpUser := range userlist {
+				userIds += strconv.Itoa(tmpUser.Id) + ","
+			}
+
+			userIds = strings.Trim(userIds, ",")
 		} else if supplierCertEntity.InStyle == "2" || supplierCertEntity.InStyle == "4" || supplierCertEntity.InStyle == "6" {
 
 			svcActiviti := workflow.GetActivitiService(utils.DBE)

+ 37 - 3
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappend.go

@@ -531,6 +531,8 @@ func (this *OilSupplierCertAppendController) AuditEntity() {
 	certSrv := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
 	var supplierCertAppendEntity suppliercertappend.OilSupplierCertAppend
 	certSrv.GetEntityById(certappendId, &supplierCertAppendEntity)
+	var supplierEntity supplier.OilSupplier
+	certSrv.GetEntityById(supplierCertAppendEntity.SupplierId, &supplierEntity)
 	var historworkflowid string
 	historworkflowid = supplierCertAppendEntity.WorkFlowId
 	var errinfo ErrorDataInfo
@@ -567,20 +569,25 @@ func (this *OilSupplierCertAppendController) AuditEntity() {
 		businessKey = certappendId + "-" +  strconv.Itoa(supplierCertAppendEntity.AuditIndex)
 		if supplierCertAppendEntity.InStyle == "2" || supplierCertAppendEntity.InStyle == "4" || supplierCertAppendEntity.InStyle == "6" {
 			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_FIRST_ENUSER_APPEND_APPLY, businessKey, this.User.Id, result, supplierCertAppendEntity.AppendType, supplierCertAppendEntity.SupplierName)
-		} else if supplierCertAppendEntity.InStyle == "3" {
+		} else if supplierCertAppendEntity.InStyle == "3" && supplierEntity.MgrUnit == supplier.MGRUNIT  {
 			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_SECOND_ENUSER_APPEND_APPLY, businessKey, this.User.Id, result, supplierCertAppendEntity.AppendType, supplierCertAppendEntity.SupplierName)
 		} else if supplierCertAppendEntity.InStyle == "1" || supplierCertAppendEntity.InStyle == "5" {
 			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_ENUSER_APPEND_APPLY, businessKey, this.User.Id, result, supplierCertAppendEntity.AppendType, supplierCertAppendEntity.SupplierName)
+		} else if supplierCertAppendEntity.InStyle == "3" && supplierEntity.MgrUnit != supplier.MGRUNIT {
+			// 二级物资准入(除大港油田外的其他公司)
+			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_SECOND_OTHER_APPEND_APPLY, businessKey, this.User.Id, result, supplierCertAppendEntity.AppendType, supplierCertAppendEntity.SupplierName)
 		}
 
 	}
 	var ActiComplete workflow.ActiCompleteVM
 	if supplierCertAppendEntity.InStyle == "2" || supplierCertAppendEntity.InStyle == "4" || supplierCertAppendEntity.InStyle == "6" {
 		ActiComplete.ProcessKey = workflow.OIL_FIRST_ENUSER_APPEND_APPLY
-	} else if supplierCertAppendEntity.InStyle == "3" {
+	} else if supplierCertAppendEntity.InStyle == "3" && supplierEntity.MgrUnit == supplier.MGRUNIT {
 		ActiComplete.ProcessKey = workflow.OIL_SECOND_ENUSER_APPEND_APPLY
 	} else if supplierCertAppendEntity.InStyle == "1" || supplierCertAppendEntity.InStyle == "5" {
 		ActiComplete.ProcessKey = workflow.OIL_ENUSER_APPEND_APPLY
+	} else if supplierCertAppendEntity.InStyle == "3" && supplierEntity.MgrUnit != supplier.MGRUNIT {
+		ActiComplete.ProcessKey = workflow.OIL_SECOND_OTHER_APPEND_APPLY
 	}
 
 	ActiComplete.BusinessKey = businessKey
@@ -718,7 +725,7 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
 		var userlist []userRole.Base_User
 		var setting auditsetting.Base_OilAuditSetting
 		usvc := userRole.GetUserService(utils.DBE)
-		if supplierCertAppendEntity.InStyle == "3" {
+		if supplierCertAppendEntity.InStyle == "3" && supplierEntity.MgrUnit == supplier.MGRUNIT {
 			status = suppliercert.CENT_AUDIT_STATUS
 			where := "AuditStepCode='" + workflow.PROF_REGULATION + "'"
 			usvc.GetEntity(&setting, where)
@@ -732,6 +739,33 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
 				where := "Id in (" + uids + ")" + " and UnitId=" + topid
 				usvc.GetEntities(&userlist, where)
 			}
+		} else if supplierCertAppendEntity.InStyle == "3" && supplierEntity.MgrUnit != supplier.MGRUNIT {
+			status = suppliercert.CENT_AUDIT_STATUS
+			step = 2
+			backstatus = suppliercert.NO_PROF_AUDIT_STATUS
+
+			paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
+			topid := paramSvc.GetBaseparameterMessage("", "paramset", "CENT_AUDIT")
+
+			var userlist []userRole.Base_User
+			var setting auditsetting.Base_OilAuditSetting
+			usvc := userRole.GetUserService(utils.DBE)
+			where := "AuditStepCode='" + workflow.PROF_REGULATION + "'"
+			usvc.GetEntity(&setting, where)
+
+			ids := usvc.GetUserIdsByRoleId(strconv.Itoa(setting.RoleId))
+			tempstr := strings.Join(ids, ",")
+			uids := strings.Replace(tempstr, "uid_", "", -1)
+			uids = strings.Trim(uids, ",")
+			if uids != "" {
+				where := "Id in (" + uids + ")" + " and UnitId=" + topid
+				usvc.GetEntities(&userlist, where)
+			}
+			for _, tmpUser := range userlist {
+				userIds += strconv.Itoa(tmpUser.Id) + ","
+			}
+
+			userIds = strings.Trim(userIds, ",")
 		} else if supplierCertAppendEntity.InStyle == "2" || supplierCertAppendEntity.InStyle == "4" || supplierCertAppendEntity.InStyle == "6" {
 			step = 2
 			status = suppliercert.ALL_PASE_STATUS

+ 7 - 5
src/dashoo.cn/backend/api/controllers/oilsupplier/todolist.go

@@ -29,14 +29,14 @@ func (this *TodoListController) GetMyTaskEntityList() {
 
 	page := this.GetPageInfoForm()
 
-	stype := this.GetString("Type")
+	stype := this.GetString("Type") // 1 准入 2 增项 3 年审 4 信息变更 5 注册 6 待入库
 	supplierTypeCode := this.GetString("SupplierTypeCode")
 	supplierName := this.GetString("SupplierName")
 	wfNames := ""
 	if stype == "1" {
-		wfNames = workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY  + "," + workflow.OIL_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_SUPPLIER_INSTORE
+		wfNames = workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY  + "," + workflow.OIL_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_SUPPLIER_INSTORE + "," + workflow.OIL_SECOND_OTHER_SUPPLIER_APPLY
 	} else if stype == "2" {
-		wfNames = workflow.OIL_ENUSER_APPEND_APPLY + "," + workflow.OIL_FIRST_ENUSER_APPEND_APPLY + "," + workflow.OIL_SECOND_ENUSER_APPEND_APPLY
+		wfNames = workflow.OIL_ENUSER_APPEND_APPLY + "," + workflow.OIL_FIRST_ENUSER_APPEND_APPLY + "," + workflow.OIL_SECOND_ENUSER_APPEND_APPLY + "," + workflow.OIL_SECOND_OTHER_APPEND_APPLY
 	} else if stype == "3" {
 		wfNames = workflow.OIL_AUDIT_APPLY
 	} else if stype == "4" {
@@ -66,7 +66,8 @@ func (this *TodoListController) GetMyTaskEntityList() {
 		//工作流名称
 		has := false
 		wfName := strings.Split(item.ProcessDefinitionId, ":")[0] //如:oil_enuser_supplier_apply:2:2543
-		if (item.TaskName != "集中评审") && (wfName == workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY || wfName == workflow.OIL_ENUSER_SUPPLIER_APPLY || wfName == workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY || wfName == workflow.OIL_SUPPLIER_INSTORE) {
+		if (item.TaskName != "集中评审") && (wfName == workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY || wfName == workflow.OIL_ENUSER_SUPPLIER_APPLY ||
+			wfName == workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY || wfName == workflow.OIL_SUPPLIER_INSTORE || wfName ==  workflow.OIL_SECOND_OTHER_SUPPLIER_APPLY) {
 			//准入
 			where := " 1=1 "
 			where = where + " and b.Id = '" + id + "'"
@@ -84,7 +85,8 @@ func (this *TodoListController) GetMyTaskEntityList() {
 				todoliststemp = append(todoliststemp, todo)
 			}
 
-		} else if wfName == workflow.OIL_ENUSER_APPEND_APPLY || wfName == workflow.OIL_FIRST_ENUSER_APPEND_APPLY || wfName == workflow.OIL_SECOND_ENUSER_APPEND_APPLY {
+		} else if (item.TaskName != "增项-集中评审") && (wfName == workflow.OIL_ENUSER_APPEND_APPLY || wfName == workflow.OIL_FIRST_ENUSER_APPEND_APPLY ||
+			wfName == workflow.OIL_SECOND_ENUSER_APPEND_APPLY || wfName == workflow.OIL_SECOND_OTHER_APPEND_APPLY) {
 			//增项
 			where := " 1=1 "
 			where = where + " and b.Id = '" + id + "'"

+ 7 - 4
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/goodsdataopera.vue

@@ -196,7 +196,7 @@
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="专业处室" v-if="inStyle != '2' && inStyle != '4' && inStyle != '6' ">
+            <el-form-item label="专业处室" v-if="(inStyle != '2' && inStyle != '4' && inStyle != '6') && (inStyle == '3' && MgrUnit ) ">
               <!--<el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable-->
               <!--style="width: 100%" v-model="majorDept" placeholder="请选择专业处室">-->
               <!--</el-cascader>-->
@@ -283,6 +283,7 @@
       return {
         backRemark: '',
         inStyle: '',
+        MgrUnit: true,
         textplaceholder: '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)',
         chooseAuditorVisible: false,
         audithistoryshow: false,
@@ -557,12 +558,14 @@
       getDictOptions () {
         let params = {
           status: this.formData.Status,
-          majorAduit: this.formData.ThirdAudit
+          majorAduit: this.formData.ThirdAudit,
+          addId: this.formData.SupplierId
         }
         suppapi.getDictListByStatus(params, this.$axios).then(res => {
           this.dictData = res.data.items
           this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
           this.allorgunitOptions = res.data.items['Allunitorglist']
+          this.MgrUnit = res.data.items['MgrUnit']
           // this.auditerOptions = res.data.items['Auditer']
           // this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
@@ -669,7 +672,7 @@
               })
               return
             }
-            if (this.formData.InStyle != '2' && this.formData.InStyle != '6' && this.formData.InStyle != '4') {
+            if ((this.formData.InStyle != '2' && this.formData.InStyle != '6' && this.formData.InStyle != '4') && (this.formData.inStyle == '3' && this.MgrUnit)) {
               if (this.selectDept === 0 || this.selectDept == '') {
                 this.$message({
                   type: 'warning',
@@ -678,7 +681,7 @@
                 return
               }
             }
-            if (this.formData.InStyle != '2' && this.formData.InStyle != '6' && this.formData.InStyle != '4') {
+            if ((this.formData.InStyle != '2' && this.formData.InStyle != '6' && this.formData.InStyle != '4') && (this.formData.inStyle == '3' && this.MgrUnit)) {
               if (this.userOptions == null || this.userOptions.length === 0) {
                 this.$message({
                   type: 'warning',

+ 12 - 14
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/goodsedit.vue

@@ -22,7 +22,8 @@
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity"
             v-if="auditBtn && this.formData.Status == '4' && this.formData.InStyle != '2'">专业审核</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity"
-            v-if="auditBtn && this.formData.Status == '5' && this.formData.InStyle != '3'">集中评审</el-button>
+            v-if="auditBtn && this.formData.Status == '5'">集中评审</el-button>
+          <!--&& this.formData.InStyle != '3'-->
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity"
             v-if="this.formData.Status == '10'">分办</el-button>
           <!--<router-link>-->
@@ -423,18 +424,16 @@
         allorgunitOptions: [],
         secorgtreelist: [],
         userOptions: [],
-        auditer: "",
-        auditerName: '',
-        fushenauditer: '', //复审人员
-        majorDept: [100000000, 100000001,100000071],
+        fushenauditer: '', // 复审人员
+        majorDept: [100000000, 100000001, 100000071],
         selectDept: 100000071,
         orgauditOptions: [],
         auditform: {
-          FirstAuditName: "",
-          SecondAudit: "",
-          ThirdAudit: "",
-          CertId: "",
-          AuditRemark: ""
+          FirstAuditName: '',
+          SecondAudit: '',
+          ThirdAudit: '',
+          CertId: '',
+          AuditRemark: ''
         },
         serviceId: '',
         certId: '',
@@ -444,7 +443,7 @@
         dialogMakeSure2: false,
         dialogAllocation: false,
         add_flat: false,
-        delete_flat:true,
+        delete_flat: true,
         aduitlabel: '审核人',
         auditTitle: '审批',
         atitle: '审核',
@@ -461,7 +460,6 @@
           AuditorRemark: '',
           AnnualId: 0
         },
-
         formData: {
           Id: '',
           SupplierName: '',
@@ -975,7 +973,7 @@
               })
               return
             }
-            if (this.inStyle != '2' && this.inStyle != '4' && this.inStyle != '6') {
+            if ((this.inStyle != '2' && this.inStyle != '4' && this.inStyle != '6')) {
               if (this.userOptions == null || this.userOptions.length === 0) {
                 this.$message({
                   type: 'warning',
@@ -1000,7 +998,7 @@
               })
               return
             }
-            if (this.inStyle != '2' && this.inStyle != '4' && this.inStyle != '6') {
+            if (this.inStyle != '2' && this.inStyle != '4' && this.inStyle != '6'){
               if (this.userOptions == null || this.userOptions.length === 0) {
                 this.$message({
                   type: 'warning',