瀏覽代碼

准入提交审批添加提交二级单位

huahaiyan 6 年之前
父節點
當前提交
d48b2fe0d9

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

@@ -129,6 +129,7 @@ type OilSupplierView struct {
 	Remark            string    `xorm:"comment('备注') VARCHAR(500)"`
 	ThirdAudit        string    `xorm:"comment('备注') VARCHAR(500)"`
 	IsDelete          int       `xorm:"default 0 comment('删除状态,0正常,1已删除') INT(10)"`
+	CommitComId       string    `xorm:"default '0' comment('提交二级单位Id') VARCHAR(50)"`
 	BusinessKey       string    `xorm:"VARCHAR(255)"`
 	AuditIndex        int       `xorm:"INT(10)"`
 }

+ 1 - 0
src/dashoo.cn/backend/api/business/oilsupplier/suppliercert/oilsuppliercert.go

@@ -56,6 +56,7 @@ type OilSupplierCert struct {
 	ThirdAudit        int       `xorm:"default 0 comment('专业科室审批') INT(10)"`
 	FourthAudit       int       `xorm:"default 0 comment('集中审批') INT(10)"`
 	AuditIndex        int       `xorm:"default 0 comment('审批次数') INT(11)"`
+	CommitComId       string    `xorm:"default '0' comment('提交二级单位Id') VARCHAR(50)"`
 	BusinessKey       string    `xorm:"VARCHAR(255)"`
 	StorageOn         time.Time `xorm:"DATETIME"`
 	CreateOn          time.Time `xorm:"DATETIME"`

+ 6 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -6,6 +6,7 @@ import (
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
 	"dashoo.cn/backend/api/business/paymentinfo"
 	"dashoo.cn/business2/items"
+	"dashoo.cn/backend/api/business/organize"
 	"encoding/json"
 	"fmt"
 	"strconv"
@@ -572,6 +573,9 @@ func (this *OilSupplierCertController) AuditEntity() {
 	var supplierCertEntity suppliercert.OilSupplierCert
 	certSrv.GetEntityById(certId, &supplierCertEntity)
 
+	svc := organize.GetOrganizeService(utils.DBE)
+	unitId := svc.GetMyUnitDepartmentId(this.User.DepartmentId)
+
 	var errinfo ErrorDataInfo
 	defer func() { //finally处理失败的异常
 		if err := recover(); err != nil {
@@ -692,6 +696,7 @@ func (this *OilSupplierCertController) AuditEntity() {
 	supplierCertEntity.SecondAudit,_ = strconv.Atoi(secondAudit)
 	supplierCertEntity.ThirdAudit,_ = strconv.Atoi(thirdAudit)
 	supplierCertEntity.ProcessKey = ActiComplete.ProcessKey
+	supplierCertEntity.CommitComId = unitId
 	cols := []string{
 		"Id",
 		"WorkflowId",
@@ -703,6 +708,7 @@ func (this *OilSupplierCertController) AuditEntity() {
 		"SecondAudit",
 		"ThirdAudit",
 		"ProcessKey",
+		"CommitComId",
 	}
 	certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
 

+ 18 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/bassicoperation.vue

@@ -686,6 +686,24 @@
           return false
         }
       },
+      
+      CheckCompanyBase() {
+        if (!this.formData.Id) {
+          this.$message({
+            type: 'error',
+            message: '无法保存,请先填写企业基本信息'
+          })
+          return false
+        }
+        if (!this.certId) {
+          this.$message({
+            type: 'error',
+            message: '准入类别不清晰,无法保存!'
+          })
+          return false
+        }
+        return true
+      },
 
       updateEntity() {
         console.log("formdata",this.formData)

+ 18 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/goodsoperation.vue

@@ -566,6 +566,24 @@
           this.$refs["GoodsInfo"].UnitRelationAry = this.formData.SpecTypeCode.split(',')
         }
       },
+
+      CheckCompanyBase() {
+        if (!this.formData.Id) {
+          this.$message({
+            type: 'error',
+            message: '无法保存,请先填写企业基本信息'
+          })
+          return false
+        }
+        if (!this.certId) {
+          this.$message({
+            type: 'error',
+            message: '准入类别不清晰,无法保存!'
+          })
+          return false
+        }
+        return true
+      },
       getbuslist() {
         this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
       },

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

@@ -742,6 +742,24 @@
           }
         })
       },
+      
+      CheckCompanyBase() {
+        if (!this.formData.Id) {
+          this.$message({
+            type: 'error',
+            message: '无法保存,请先填写企业基本信息'
+          })
+          return false
+        }
+        if (!this.certId) {
+          this.$message({
+            type: 'error',
+            message: '准入类别不清晰,无法保存!'
+          })
+          return false
+        }
+        return true
+      },
 
       addAnnualAudit() {
         this.$refs['EntityFormref'].validate((valid) => {