2
3
huahaiyan 6 роки тому
батько
коміт
c1e42b782f

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

@@ -503,5 +503,63 @@ func (this *AnnualAuditController) QianfaReport() {
 			this.Data["json"] = &errinfo
 			this.ServeJSON()
 		}
+	}else if dataother.SuccessStatus == 3 {
+		var entityempty annualaudit.OilAnnualAudit
+		var errinfo ErrorInfo
+		var cols []string = []string{"Status", "Remark"}
+		entityempty.Status = dataother.SuccessStatus
+		entityempty.Remark = dataother.AuditorRemark
+		//多实例工作流
+		svcActiviti := workflow.GetActivitiService(utils.DBE)
+		//多实例提交给下一步
+		res := svcActiviti.TaskComplete(workflow.OIL_AUDIT_APPLY, utils.ToStr(dataother.AnnualId), "" , this.User.Id, "1", "业务处室审核通过")
+		if res == "true" {
+			err := svc.UpdateEntityBytbl(""+OilAnnualAuditName, list.Id, entityempty, cols)
+			if err == nil {
+				errinfo.Message = "审核通过!"
+				errinfo.Code = 0
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+			} else {
+				errinfo.Message = "审核错误!"
+				errinfo.Code = -1
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+			}
+		}else {
+			errinfo.Message = "工作流异常,请联系管理员!"
+			errinfo.Code = -1
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+		}
+	}else if dataother.SuccessStatus == 4 {
+		var entityempty annualaudit.OilAnnualAudit
+		var errinfo ErrorInfo
+		var cols []string = []string{"Status", "Remark"}
+		entityempty.Status = dataother.SuccessStatus
+		entityempty.Remark = dataother.AuditorRemark
+		//多实例工作流
+		svcActiviti := workflow.GetActivitiService(utils.DBE)
+		//多实例提交给下一步
+		res := svcActiviti.TaskComplete(workflow.OIL_AUDIT_APPLY, utils.ToStr(dataother.AnnualId), "", this.User.Id, "0", "业务处室审核未通过")
+		if res == "true" {
+			err := svc.UpdateEntityBytbl(""+OilAnnualAuditName, list.Id, entityempty, cols)
+			if err == nil {
+				errinfo.Message = "审核未通过!"
+				errinfo.Code = 0
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+			} else {
+				errinfo.Message = "审核错误!"
+				errinfo.Code = -1
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+			}
+		}else {
+			errinfo.Message = "工作流异常,请联系管理员!"
+			errinfo.Code = -1
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+		}
 	}
 }

+ 31 - 26
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/auditoperation.vue

@@ -7,11 +7,12 @@
     </el-breadcrumb>
     <el-card class="box-card">
       <div slot="header" class="clearfix">
-              <span>年审基本信息表</span>
-              <span style="float: right;">
-                <el-button type="primary" size="mini" @click="annualAudit()"  v-if="AnnualStatus == 0 ||AnnualStatus == 1">审核</el-button>
-              </span>
-            </div>
+        <span>年审基本信息表</span>
+        <span style="float: right;">
+          <el-button type="primary" size="mini" @click="annualAudit()" v-if="AnnualStatus == 0 ||AnnualStatus == 1">审核
+          </el-button>
+        </span>
+      </div>
       <el-tabs tab-position="right" style="margin-top: 10px">
         <el-tab-pane label="企业信息">
           <el-card class="box-card">
@@ -21,13 +22,14 @@
                 <el-button type="primary" size="mini" @click="saveEntity">保存基本信息</el-button>
               </span> -->
             </div>
-            <tech-info ref="TechInfo" :formData.sync="formData" :dictData.sync="dictData" :authUser="authUser" :disabled ="true"
-              :canUpdateSupplier="canUpdateSupplier" @selectcompany="changeFormData" @inputcompany="inputCompany">
+            <tech-info ref="TechInfo" :formData.sync="formData" :dictData.sync="dictData" :authUser="authUser"
+              :disabled="true" :canUpdateSupplier="canUpdateSupplier" @selectcompany="changeFormData"
+              @inputcompany="inputCompany">
             </tech-info>
           </el-card>
         </el-tab-pane>
 
-        <el-tab-pane label="企业情况" >
+        <el-tab-pane label="企业情况">
           <el-card class="box-card">
             <div slot="header" class="clearfix">
               <span>企业人员结构情况</span>
@@ -36,7 +38,7 @@
               </span> -->
             </div>
 
-            <el-form label-width="220px" ref="EntityFormNumber" :model="formDataCert" :disabled ="true" >
+            <el-form label-width="220px" ref="EntityFormNumber" :model="formDataCert" :disabled="true">
               <el-row>
                 <el-col :span="8">
                   <el-form-item label="企业员工总数">
@@ -125,7 +127,7 @@
               <span>近三年主要工程业绩</span>
               <!-- <el-button style="float: right; padding: 3px 0" type="text" @click="performancedialog">添加</el-button> -->
             </div>
-            <performance-list ref="performanceList" :data="performanceList" :SupplierCertId="certId" :disabled ="true"
+            <performance-list ref="performanceList" :data="performanceList" :SupplierCertId="certId" :disabled="true"
               :SupplierTypeCode="classId" height="360px" style="margin-top: 20px"></performance-list>
           </el-card>
 
@@ -174,11 +176,11 @@
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
         <el-form-item label="审核状态">
           <template>
-            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1" >通过</el-radio>
-            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2" >未通过</el-radio>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1">通过</el-radio>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2">未通过</el-radio>
           </template>
         </el-form-item>
-        <el-form-item label="意见"> 
+        <el-form-item label="意见">
           <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核说明"></el-input>
         </el-form-item>
       </el-form>
@@ -207,7 +209,7 @@
   import BusinessList from '@/components/oilsupplier/businesslist'
   import TechInfo from '@/components/oilsupplier/techinfo'
 
-   
+
   export default {
     computed: {
       ...mapGetters({
@@ -241,7 +243,7 @@
         serviceId: '',
         certId: '',
         classId: '',
-        annualId:'',
+        annualId: '',
         WorkflowId: '',
         formData: {
           Id: '',
@@ -325,7 +327,7 @@
         },
         AnnualStatus: '',
         dialogMakeSure: false,
-        shenheForm:  {
+        shenheForm: {
           SuccessStatus: 3,
           AuditorRemark: '',
           AnnualId: 0
@@ -362,7 +364,7 @@
       this.getDictOptions()
       this.formData.Id = this.serviceId
       this.initDatas();
-      console.log("---this.AnnualStatusa---",this.AnnualStatus)
+      console.log("---this.AnnualStatusa---", this.AnnualStatus)
     },
     methods: {
       inputCompany(val) {
@@ -462,13 +464,13 @@
       winningdialog() {
         this.$refs["winningList"].showDialog()
       },
-       initDatas() {
+      initDatas() {
         this.isCanUpdateSupplier(this.formData.Id)
         if (this.formData.Id) {
-          console.log("---this.certId----",this.certId)
+          console.log("---this.certId----", this.certId)
           api.getEntityAndCert(this.certId, this.$axios).then(res => {
             this.formData = res.data
-            console.log("---res.data----",res.data)
+            console.log("---res.data----", res.data)
             this.formDataCert.WorkerTotal = this.formData.WorkerTotal
             this.formDataCert.ContractNum = this.formData.ContractNum
             this.formDataCert.UniversityNum = this.formData.UniversityNum
@@ -499,7 +501,7 @@
             if (this.certId && this.WorkflowId) {
               this.$refs['WfHistory'].getHistoryTask() /*刷新工作流*/
             }
-            console.log("---this.entrydetail----",this.entrydetail)
+            console.log("---this.entrydetail----", this.entrydetail)
 
           }).catch(err => {
             console.error(err)
@@ -518,19 +520,22 @@
         })
       },
 
-      annualAudit(){
+      annualAudit() {
         this.shenheForm.AnnualId = parseInt(this.annualId)
         this.dialogMakeSure = true
       },
       //审核通过
-      makeSure() {        
+      makeSure() {
         //审核通过的具体操作(未编写)
-         this.$confirm("确认审核结果!", "提示", {
+        this.$confirm("确认审核结果!", "提示", {
             confirmButtonText: "确定",
             cancelButtonText: "取消",
             type: "warning"
           })
           .then(() => {
+            if (this.AnnualStatus === '1') {
+              this.shenheForm.SuccessStatus = parseInt(this.shenheForm.SuccessStatus) + 2
+            }
             this.dialogMakeSure = false
             this.checkstatus()
           })
@@ -538,7 +543,7 @@
       },
       checkstatus() {
         let params = this.shenheForm
-        console.log("---this.shenheForm----",this.shenheForm)
+        console.log("---this.shenheForm----", this.shenheForm)
         this.$axios.put('/annualaudit/auditfirst/', params)
           .then(res => {
             // response
@@ -587,5 +592,5 @@
       }
     }
   }
-</script>
 
+</script>