lining 6 years ago
parent
commit
934e1b1700

+ 72 - 65
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -1137,71 +1137,78 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 					payinfo.CreateBy = supplierCertEntity.CreateBy
 					payinfo.CreateOn = time.Now()
 
-					wheresup := " SupplierCertId=" + strconv.Itoa(supplierCertEntity.Id)
-					var sup []suppliercertsub.OilSupplierCertSub
-					total := paysvc.GetPagingEntitiesWithOrder(1, 10, "Id", true, &sup, wheresup)
-
-					if supplierCertEntity.SupplierTypeCode == "01" && total <= 50 {
-						status = suppliercert.STOREING_STATUS
-
-						svcActiviti := workflow.GetActivitiService(utils.DBE)
-						businessKey := strconv.Itoa(supplierCertEntity.Id)
-						result := "1"
-
-						userIds := ""
-						var userlist []userRole.Base_User
-						var setting auditsetting.Base_OilAuditSetting
-						usvc := userRole.GetUserService(utils.DBE)
-						where := "AuditStepCode='" + workflow.PROF_REGULATION + "'"
-						paysvc.GetEntity(&setting, where)
-						ids := usvc.GetUserIdsByRoleId(strconv.Itoa(setting.RoleId))
-						tempstr := strings.Join(ids, ",")
-						uids := strings.Replace(tempstr, "uid_", "", -1)
-						uids = strings.Trim(uids, ",")
-						paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
-						topid := paramSvc.GetBaseparameterMessage("", "paramset", "CENT_AUDIT")
-						if uids != "" {
-							where := "Id in (" + uids + ")" + " and UnitId=" + topid
-							paramSvc.GetEntities(&userlist, where)
-						}
-
-						for _, tmpUser := range userlist {
-							userIds += strconv.Itoa(tmpUser.Id) + "," //strconv.FormatInt(tmpUser.Id, 10) + ","
-						}
-						userIds = strings.Trim(userIds, ",")
-
-						processInstanceId := svcActiviti.StartProcess2(workflow.OIL_SUPPLIER_INSTORE, businessKey, userIds, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
-
-						//var ActiComplete workflow.ActiCompleteVM
-						//ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
-						//ActiComplete.BusinessKey = businessKey
-						//ActiComplete.UserNames = userIds
-						//ActiComplete.UserId = this.User.Id
-						//ActiComplete.Result = "1"
-						//ActiComplete.Remarks = ""
-						//ActiComplete.CallbackUrl = ""
-						//
-						//res := svcActiviti.TaskComplete(ActiComplete)
-						//fmt.Println(res)
-
-						var activity oilactivity.OilActivity
-						activity.EntityId = supplierCertEntity.Id
-						activity.ActType = oilactivity.STORAGE
-						activity.WorkflowId = processInstanceId
-						activity.BusinessKey = businessKey
-						activity.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
-						activity.CreateOn = time.Now()
-
-						paysvc.InsertEntityBytbl(OilActivityName, &activity)
-
-					} else {
-						paysvc.InsertEntity(&payinfo)
-						//发短信
-						toMobile := supplierEntity.Mobile
-						msg := "您的" + supplierCertEntity.SupplierTypeName + "准入审核通过,请及时确认交费信息!"
-						msgService := msg2.GetMsgService(utils.DBE)
-						msgService.HandleMsg(toMobile, msg, "3-1", supplierCertEntity.CreateBy, supplierEntity.ContactName, strconv.Itoa(supplierCertEntity.CreateUserId), this.User.Username)
-					}
+					//wheresup := " SupplierCertId=" + strconv.Itoa(supplierCertEntity.Id)
+					//var sup []suppliercertsub.OilSupplierCertSub
+					//total := paysvc.GetPagingEntitiesWithOrder(1, 10, "Id", true, &sup, wheresup)
+
+					//if supplierCertEntity.SupplierTypeCode == "01" && total <= 50 {
+					//	status = suppliercert.STOREING_STATUS
+					//
+					//	svcActiviti := workflow.GetActivitiService(utils.DBE)
+					//	businessKey := strconv.Itoa(supplierCertEntity.Id)
+					//	result := "1"
+					//
+					//	userIds := ""
+					//	var userlist []userRole.Base_User
+					//	var setting auditsetting.Base_OilAuditSetting
+					//	usvc := userRole.GetUserService(utils.DBE)
+					//	where := "AuditStepCode='" + workflow.PROF_REGULATION + "'"
+					//	paysvc.GetEntity(&setting, where)
+					//	ids := usvc.GetUserIdsByRoleId(strconv.Itoa(setting.RoleId))
+					//	tempstr := strings.Join(ids, ",")
+					//	uids := strings.Replace(tempstr, "uid_", "", -1)
+					//	uids = strings.Trim(uids, ",")
+					//	paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
+					//	topid := paramSvc.GetBaseparameterMessage("", "paramset", "CENT_AUDIT")
+					//	if uids != "" {
+					//		where := "Id in (" + uids + ")" + " and UnitId=" + topid
+					//		paramSvc.GetEntities(&userlist, where)
+					//	}
+					//
+					//	for _, tmpUser := range userlist {
+					//		userIds += strconv.Itoa(tmpUser.Id) + "," //strconv.FormatInt(tmpUser.Id, 10) + ","
+					//	}
+					//	userIds = strings.Trim(userIds, ",")
+					//
+					//	processInstanceId := svcActiviti.StartProcess2(workflow.OIL_SUPPLIER_INSTORE, businessKey, userIds, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
+					//
+					//	//var ActiComplete workflow.ActiCompleteVM
+					//	//ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
+					//	//ActiComplete.BusinessKey = businessKey
+					//	//ActiComplete.UserNames = userIds
+					//	//ActiComplete.UserId = this.User.Id
+					//	//ActiComplete.Result = "1"
+					//	//ActiComplete.Remarks = ""
+					//	//ActiComplete.CallbackUrl = ""
+					//	//
+					//	//res := svcActiviti.TaskComplete(ActiComplete)
+					//	//fmt.Println(res)
+					//
+					//	var activity oilactivity.OilActivity
+					//	activity.EntityId = supplierCertEntity.Id
+					//	activity.ActType = oilactivity.STORAGE
+					//	activity.WorkflowId = processInstanceId
+					//	activity.BusinessKey = businessKey
+					//	activity.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
+					//	activity.CreateOn = time.Now()
+					//
+					//	paysvc.InsertEntityBytbl(OilActivityName, &activity)
+					//
+					//} else {
+					//	paysvc.InsertEntity(&payinfo)
+					//	//发短信
+					//	toMobile := supplierEntity.Mobile
+					//	msg := "您的" + supplierCertEntity.SupplierTypeName + "准入审核通过,请及时确认交费信息!"
+					//	msgService := msg2.GetMsgService(utils.DBE)
+					//	msgService.HandleMsg(toMobile, msg, "3-1", supplierCertEntity.CreateBy, supplierEntity.ContactName, strconv.Itoa(supplierCertEntity.CreateUserId), this.User.Username)
+					//}
+
+					paysvc.InsertEntity(&payinfo)
+					//发短信
+					toMobile := supplierEntity.Mobile
+					msg := "您的" + supplierCertEntity.SupplierTypeName + "准入审核通过,请及时确认交费信息!"
+					msgService := msg2.GetMsgService(utils.DBE)
+					msgService.HandleMsg(toMobile, msg, "3-1", supplierCertEntity.CreateBy, supplierEntity.ContactName, strconv.Itoa(supplierCertEntity.CreateUserId), this.User.Username)
 
 					//paysvc.AddPaymentinfo(supplierCertEntity.SupplierId, supplierCertEntity.Id, Amount, "1")
 					supplierCertEntity.Status = status

+ 7 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -1448,6 +1448,13 @@ export default {
           return
         }
       }
+      if (this.formData.InStyle === '3' && this.formData.MgrUnit === '大港油田分公司') {
+        this.$message({
+          type: 'warning',
+          message: '二级物资准入不能选择大港油田分公司!'
+        })
+        return
+      }
 
       /** 2019.05.16 - 16 准入申请中,若选择了“管理单位”,“中石油准入证编号”应自动改为必填项 */
       // if (this.formData.MgrUnit != null) {

+ 0 - 3
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -803,7 +803,6 @@ export default {
       // }).catch(err => {
       //   console.error(err)
       // })
-      console.log('A')
       this.inputCompany(this.authUser.Profile.Realname)
     } else {
       this.initDatas()
@@ -977,10 +976,8 @@ export default {
       })
     },
     inputCompany (val) {
-      console.log('B')
       if (!this.certId) {
         api.getEntityByName(val, '03', this.$axios).then(res => {
-          console.log(res.data, 'res.data')
           if (res.data.code === 0) {
             this.SetFormData(res.data.item)
           } else if (res.data.code === -1) {

+ 0 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/goodslist.vue

@@ -1027,7 +1027,6 @@ export default {
 
     isCanApply () {
       api.isCanApply('01', this.$axios).then(res => {
-        console.log(res)
         if (res.data.code === 0) {
           this.canApply = true
         } else if (res.data.code === -2) {

+ 0 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/techlist.vue

@@ -929,7 +929,6 @@ export default {
     getDictOptions () {
       api.getDictList(this.$axios).then(res => {
         this.dictData = res.data.items
-        console.log(this.dictData)
         this.OperTypeOptions = this.dictData['OperType']
         this.UnitRelationOptions = this.dictData['UnitRelation']
         this.InOptions = this.dictData['InOptions']
@@ -1031,7 +1030,6 @@ export default {
 
     isCanApply () {
       api.isCanApply('03', this.$axios).then(res => {
-        console.log(res)
         if (res.data.code === 0) {
           this.canApply = true
         } else if (res.data.code === -2) {