Bladeren bron

准入审批

lining 6 jaren geleden
bovenliggende
commit
61f418b709

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

@@ -72,6 +72,8 @@ const (
 	FIRST_TRIAL_STATUS string = "1" //二级单位初审
 	SECOND_TRIAL_STATUS string = "2" //二级单位复审
 	THIRD_TRIAL_STATUS string = "3" //专业处接收
-	PROF_AUDIT_STATUS string = "2" //专业科室审核
+	PROF_AUDIT_STATUS string = "4" //专业科室审核
+	CENT_AUDIT_STATUS string = "5" // 集中审批
+	PAYING_AUDIT_STATUS string = "6" //待缴费
 )
 

+ 62 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -1016,9 +1016,70 @@ func (this *OilSupplierController) GetDictList() {
 	var users []userRole.Base_RoleList
 	var auditWorkflow auditsetting.Base_OilAuditSetting
 	rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
+
 	rsvc.GetAuditStepRoleEntity(OilAuditSettingName, this.User.DepartmentId, workflow.SECOND_TRIAL, &auditWorkflow)
 	users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), this.User.AccCode) //
-	dictList["SecondAudit"] = users
+	dictList["Auditer"] = users
+
+	var datainfo DataInfo
+	datainfo.Items = dictList
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取字典列表By Status
+// @Description get user by token
+// @Success 200 {object} map[string]interface{}
+// @router /dictlistbystatus/:status [get]
+func (this *OilSupplierController) GetDictListByStatus() {
+	status := this.Ctx.Input.Param(":status")
+	dictList := make(map[string]interface{})
+	dictSvc := items.GetItemsService(utils.DBE)
+	userSvc := baseUser.GetBaseUserService(utils.DBE)
+	areaJsonSvc := areajson.GetAreaJsonService(utils.DBE)
+	//customerSvc := svccustomer.GetCustomerService(utils.DBE)
+	dictList["UnitRelation"] = dictSvc.GetKeyValueItems("UnitRelation")
+	dictList["CompanyType"] = dictSvc.GetKeyValueItems("CompanyType")
+	var userEntity userRole.Base_User
+	userSvc.GetEntityById(this.User.Id, &userEntity)
+	dictList["Supervisers"] = userSvc.GetUserListByDepartmentId(this.User.AccCode, userEntity.Departmentid)
+	dictList["GaodeMapChinaAreas"] = areaJsonSvc.GetGaodeMapChinaAreas()
+	//获取我创建的所有公司
+	var list []supplier.OilSupplier
+	if this.User.IsCompanyUser == 1 {
+		svcSupplier := supplier.GetOilSupplierService(utils.DBE)
+		supplierWhere := " CreateUserId = '" + this.User.Id + "'"
+		svcSupplier.GetEntitysByWhere(OilSupplierName, supplierWhere, &list)
+		dictList["CompanyNames"] = list
+	} else { //二级单位不用获取
+		dictList["CompanyNames"] = list
+	}
+
+	// 部门
+	orgsvc := organize.GetOrganizeService(utils.DBE)
+	dictList["Organizes"] = orgsvc.GetCollectionDetailviewlist("'"+this.User.AccCode+"'")
+	//var dictCustomer []svccustomer.Customer
+	//customerSvc.GetEntitysByWhere(this.User.AccCode + CustomerName, "", &dictCustomer)
+	//dictList["EntrustCorp"] = &dictCustomer
+
+	//获得有审核权限的人员
+	var users []userRole.Base_RoleList
+	var auditWorkflow auditsetting.Base_OilAuditSetting
+	rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
+	if status == "1" {
+		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, this.User.DepartmentId, workflow.SECOND_TRIAL, &auditWorkflow)
+		users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), this.User.AccCode) //
+		dictList["Auditer"] = users
+	} else if status == "3" {
+		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, "100000172", workflow.PROF_AUDIT, &auditWorkflow)
+		users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), "")
+		dictList["Auditer"] = users
+	} else if status == "4" {
+		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, "100000172", workflow.PROF_AUDIT, &auditWorkflow)
+		users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), "")
+		dictList["Auditer"] = users
+	}
+
 
 	var datainfo DataInfo
 	datainfo.Items = dictList

+ 43 - 11
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -719,10 +719,8 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 	status := ""
 	if supplierCertEntity.Status == "1" {
 		status = suppliercert.SECOND_TRIAL_STATUS
-		//remarks = "提交给二级单位复审"
 		step = 2
 	} else if supplierCertEntity.Status == "2" {
-		//remarks = "提交给专业处"
 		status = suppliercert.THIRD_TRIAL_STATUS
 		step = 2
 		//获得有专业审核接收权限的人员
@@ -736,21 +734,34 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 		}
 		auditer = strings.Trim(auditer, ",")
 	} else if supplierCertEntity.Status == "3" {
-
+		status = suppliercert.PROF_AUDIT_STATUS
+		step = 2
 	} else if supplierCertEntity.Status == "4" {
-
+		status = suppliercert.CENT_AUDIT_STATUS
+		step = 2
+		//获得有专业审核接收权限的人员
+		var users1 []userRole.Base_RoleList
+		rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
+		users1 = rsvc.GetUserByRole("10000204", this.User.AccCode)
+		for _, tmpUser := range users1 {
+			auditer += strconv.FormatInt(tmpUser.Id, 10) + ","
+		}
+		auditer = strings.Trim(auditer, ",")
+	} else if supplierCertEntity.Status == "5" {
+		status = suppliercert.PAYING_AUDIT_STATUS
+		step = 3
 	}
 
 	svcActiviti := workflow.GetActivitiService(utils.DBE)
+	var ActiComplete workflow.ActiCompleteVM
+	ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_APPLY
+	ActiComplete.BusinessKey = certId
+	ActiComplete.UserNames = auditer
+	ActiComplete.UserId = this.User.Id
+	ActiComplete.Remarks = dataother.AuditorRemark
+	ActiComplete.CallbackUrl = ""
 	if dataother.SuccessStatus == 1 {
-		var ActiComplete workflow.ActiCompleteVM
-		ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_APPLY
-		ActiComplete.BusinessKey = certId
-		ActiComplete.UserNames = auditer
-		ActiComplete.UserId = this.User.Id
 		ActiComplete.Result = "1"
-		ActiComplete.Remarks = dataother.AuditorRemark
-		ActiComplete.CallbackUrl = ""
 		receiveVal := svcActiviti.TaskComplete(ActiComplete)
 
 		if receiveVal == "true" {
@@ -773,7 +784,28 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 			return
 		}
 	} else {
+		ActiComplete.Result = "0"
+		receiveVal := svcActiviti.TaskComplete(ActiComplete)
 
+		if receiveVal == "true" {
+			supplierCertEntity.Status = "0"
+			supplierCertEntity.Step = step
+			cols := []string{
+				"Status",
+				"Step",
+			}
+			certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
+			errinfo.Message = "提交成功!"
+			errinfo.Code = 0
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+		} else {
+			errinfo.Message = "工作流异常,请联系管理员!"
+			errinfo.Code = -1
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+			return
+		}
 	}
 }
 

+ 6 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/supplier.js

@@ -26,6 +26,12 @@ export default {
       method: 'GET'
     })
   },
+  getDictListByStatus (status, myAxios) {
+    return myAxios({
+      url: '/supplier/dictlistbystatus/' + status,
+      method: 'GET'
+    })
+  },
   getEntity (entityId, myAxios) {
     return myAxios({
       url: '/supplier/get/' + entityId,

+ 117 - 91
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/basisedit.vue

@@ -178,7 +178,7 @@
 
         <el-tab-pane label="企业资质" :disabled="!certId">
           <business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId" :SupplierId="formData.Id"
-            :SupplierTypeCode="classId" :canadd="add_flat" @close="AuditEntity" height="360px" style="margin-top: 20px">
+            :SupplierTypeCode="classId" :canadd="add_flat" @close="selectAuditOrg" height="360px" style="margin-top: 20px">
           </business-list>
         </el-tab-pane>
 
@@ -200,6 +200,29 @@
         </el-tab-pane>
       </el-tabs>
     </el-card>
+    <el-dialog title="选择审批单位" :visible.sync="dialogVisible" width="520px">
+      <el-form ref="searchForm" label-width="110px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="单位名称">
+              <el-select ref="selectauditOrg" v-model="firstAudit" placeholder="请选择"
+                         style="width: 90%" filterable allow-create default-first-option>
+                <el-option
+                  v-for="item in organizeOption"
+                  :key="item.Id"
+                  :label="item.Fullname"
+                  :value="item.Id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="AuditEntity">确定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -227,12 +250,12 @@
       WfHistory,
       SupplierCertEdit,
 
-      EquipmentList, //企业主要装备情况
-      PerformanceList, //近三年主要工程业绩列表
-      PatentList, //拥有专利、专有技术及工法列表
-      WinningList, //近三年获得省部级及以上主要技术、管理成果、获奖项目列表
-      BusinessList, //选择准入范围
-      BasisInfo,
+      EquipmentList, // 企业主要装备情况
+      PerformanceList, // 近三年主要工程业绩列表
+      PatentList, // 拥有专利、专有技术及工法列表
+      WinningList, // 近三年获得省部级及以上主要技术、管理成果、获奖项目列表
+      BusinessList, // 选择准入范围
+      BasisInfo
     },
     computed: {
       ...mapGetters({
@@ -241,16 +264,19 @@
     },
     name: 'oilsupplierEdit',
 
-    data() {
+    data () {
       return {
+        dialogVisible: false,
         canUpdateSupplier: true,
         dictData: null,
         applyLoading: false,
-        equipmentList: [], //企业主要装备情况
-        performanceList: [], //近三年主要工程业绩
-        patentList: [], //拥有专利、专有技术及工法
-        winningList: [], //近三年获得省部级及以上主要技术、管理成果、获奖项目
-        businessList: [], //准入业务
+        equipmentList: [], // 企业主要装备情况
+        performanceList: [], // 近三年主要工程业绩
+        patentList: [], // 拥有专利、专有技术及工法
+        winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
+        businessList: [], // 准入业务
+        organizeOption: [], // 审批部门
+        firstAudit: '',
         serviceId: '',
         certId: '',
         classId: '02',
@@ -333,7 +359,7 @@
           SupplierTypeCode: '02',
           SupplierTypeName: '基建类',
           Step: 0,
-          HseTraining: 0,
+          HseTraining: 0
         },
 
         formDataCert: {
@@ -352,10 +378,10 @@
         },
         add_flat: true,
         entrydetail: {
-          process: 'oil_supplier_apply',
+          process: 'oil_supplier_apply_1',
           business: '',
           instance: ''
-        },
+        }
       }
     },
     mounted () {
@@ -364,7 +390,7 @@
         this.certId = this.$route.query.certid + ''
       }
     },
-    created() {
+    created () {
       this.serviceId = this.$route.params.opera + ''
       if (this.$route.query.certid) {
         this.certId = this.$route.query.certid + ''
@@ -378,8 +404,8 @@
       this.initDatas()
     },
     methods: {
-      inputCompany(val) {
-        if (!this.certId) { //已经关联到子表了,就不能再切换主表ID了
+      inputCompany (val) {
+        if (!this.certId) { // 已经关联到子表了,就不能再切换主表ID了
           api.getEntityByName(val, this.$axios).then(res => {
             if (res.data && res.data.Id) {
               this.SetFormData(res.data)
@@ -389,12 +415,12 @@
           })
         }
       },
-      changeFormData(fdata) {
-        if (!this.certId) { //已经关联到子表了,就不能再切换主表ID了
+      changeFormData (fdata) {
+        if (!this.certId) { // 已经关联到子表了,就不能再切换主表ID了
           this.SetFormData(fdata)
         }
       },
-      SetFormData(fdata) {
+      SetFormData (fdata) {
         this.isCanUpdateSupplier(fdata.Id)
         this.formData.Id = fdata.Id
         this.formData.SupplierName = fdata.SupplierName
@@ -452,31 +478,31 @@
         this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkStreet)
         /*this.$refs["BasisInfo"].UnitRelationAry = []
         if (this.formData.SpecTypeCode.length > 0) {
-          this.$refs["BasisInfo"].UnitRelationAry = this.formData.SpecTypeCode.split(',')
+          this.$refs['BasisInfo'].UnitRelationAry = this.formData.SpecTypeCode.split(',')
         }*/
       },
 
-      isCanUpdateSupplier(supplierId) {
+      isCanUpdateSupplier (supplierId) {
         api.isCanUpdateSupplier(supplierId, this.$axios).then(res => {
           this.canUpdateSupplier = (res.data.code === 0)
         }).catch(err => {
           console.error(err)
         })
       },
-      equipmentdialog() {
-        this.$refs["equipmentList"].showDialog()
+      equipmentdialog () {
+        this.$refs['equipmentList'].showDialog()
       },
-      performancedialog() {
-        this.$refs["performanceList"].showDialog()
+      performancedialog () {
+        this.$refs['performanceList'].showDialog()
       },
-      patentdialog() {
-        this.$refs["patentList"].showDialog()
+      patentdialog () {
+        this.$refs['patentList'].showDialog()
       },
-      winningdialog() {
-        this.$refs["winningList"].showDialog()
+      winningdialog () {
+        this.$refs['winningList'].showDialog()
       },
 
-      initDatas() {
+      initDatas () {
         this.isCanUpdateSupplier(this.formData.Id)
         if (this.formData.Id) {
           api.getEntityAndCert(this.certId, this.$axios).then(res => {
@@ -503,44 +529,45 @@
             this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkStreet)
             /*this.$refs["BasisInfo"].UnitRelationAry = []
             if (this.formData.SpecTypeCode.length > 0) {
-              this.$refs["BasisInfo"].UnitRelationAry = this.formData.SpecTypeCode.split(',')
+              this.$refs['BasisInfo'].UnitRelationAry = this.formData.SpecTypeCode.split(',')
             }*/
 
             this.entrydetail.business = this.certId
             this.entrydetail.instance = this.formDataCert.WorkflowId
             if (this.certId && this.formDataCert.WorkflowId) {
-              this.$refs['WfHistory'].getHistoryTask() /*刷新工作流*/
+              this.$refs['WfHistory'].getHistoryTask() /* 刷新工作流 */
             }
-            this.$refs["equipmentList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.$refs["performanceList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.$refs["patentList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.$refs["winningList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.$refs["businessList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs['equipmentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs['performanceList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs['patentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs['winningList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs['businessList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
           }).catch(err => {
             console.error(err)
-          });
+          })
         }
       },
 
-      getDictOptions() {
+      getDictOptions () {
         api.getDictList(this.$axios).then(res => {
           this.dictData = res.data.items
-          /*this.UnitRelationOptions = res.data.items['UnitRelation']
+          this.organizeOption = res.data.items['Organizes']
+          /* this.UnitRelationOptions = res.data.items['UnitRelation']
            this.getCityList(res.data.items['GaodeMapChinaAreas'])
-           this.CompanyTypeOptions = res.data.items['CompanyType']*/
+           this.CompanyTypeOptions = res.data.items['CompanyType'] */
         }).catch(err => {
           console.error(err)
         })
       },
-      /*getCityList(val) {
+      /* getCityList(val) {
        let resultData = JSON.parse(val)
        let countstr = JSON.stringify(resultData.districts[0].districts)
        countstr = countstr.replace(/\,\"districts\"\:\[\]/g, '')
        this.countryoptions = JSON.parse(countstr)
-       },*/
+       }, */
 
-      //保存信息
-      saveEntity() {
+      // 保存信息
+      saveEntity () {
         this.$refs['BasisInfo'].$refs['EntityForm'].validate((valid) => {
           if (valid) {
             if (!this.formData.SetupTime) {
@@ -548,71 +575,68 @@
             } else {
               this.formData.SetupTime = new Date(this.formData.SetupTime)
             }
-            //this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
+            // this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
             if (!this.formData.Id || !this.certId) {
               this.addEntity()
             } else {
               this.updateEntity()
             }
-
           } else {
             return false
           }
         })
       },
 
-      //保存信息
-      saveCertEntity() {
+      // 保存信息
+      saveCertEntity () {
         this.$refs['SupplierCertEditCompoment'].saveEntity()
       },
 
-      addEntity() {
+      addEntity () {
         this.formData.SupplierTypeCode = '02'
         this.formData.SupplierTypeName = '基建类'
         api.addEntity(this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
+            // 保存成功后,初始化数据,变成修改
             this.formData.Id = res.data.item.split('_')[0]
             this.certId = res.data.item.split('_')[1]
             this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
-            });
-
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
 
-      updateEntity() {
+      updateEntity () {
         api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
+            // 保存成功后,初始化数据,变成修改
             this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
-            });
-
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
 
-      CheckCompanyBase() {
+      CheckCompanyBase () {
         if (!this.formData.Id) {
           this.$message({
             type: 'error',
@@ -629,58 +653,61 @@
         }
         return true
       },
-      //企业人员结构情况
-      updateNumberEntity() {
+      // 企业人员结构情况
+      updateNumberEntity () {
         if (!this.CheckCompanyBase()) {
           return false
         }
         api.updateNumberEntity(this.formData.Id + '_' + this.certId, this.formDataCert, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
+            // 保存成功后,初始化数据,变成修改
             this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
-            });
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
 
-      AuditEntity() {
+      selectAuditOrg () {
+        this.dialogVisible = true
+      },
+      AuditEntity () {
         this.applyLoading = true
-        apiCert.auditEntity(this.certId, this.$axios).then(res => {
+        apiCert.auditEntity(this.certId, this.firstAudit, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
+            // 保存成功后,初始化数据,变成修改
             this.initDatas()
+            this.dialogVisible = false
             this.$message({
               type: 'success',
               message: res.data.message
-            });
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
           this.applyLoading = false
-
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
 
-      nexStepCB() {
+      nexStepCB () {
         this.formData.Step += 1
       },
 
-      jstimehandle(val) {
+      jstimehandle (val) {
         if (val === '') {
           return '----'
         } else if (val === '0001-01-01T08:00:00+08:00') {
@@ -693,20 +720,19 @@
         }
       },
 
-      formatDateTime(date) {
-        var y = date.getFullYear();
-        var m = date.getMonth() + 1;
-        m = m < 10 ? ('0' + m) : m;
-        var d = date.getDate();
-        d = d < 10 ? ('0' + d) : d;
-        var h = date.getHours();
-        var minute = date.getMinutes();
-        minute = minute < 10 ? ('0' + minute) : minute;
-        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      formatDateTime (date) {
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? ('0' + m) : m
+        var d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        var h = date.getHours()
+        var minute = date.getMinutes()
+        minute = minute < 10 ? ('0' + minute) : minute
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
       }
     }
   }
-
 </script>
 
 <style lang="scss">

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

@@ -377,7 +377,7 @@
         },
         add_flat: true,
         entrydetail: {
-          process: 'oil_supplier_apply',
+          process: 'oil_supplier_apply_1',
           business: '',
           instance: ''
         }

+ 114 - 89
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -178,7 +178,7 @@
 
         <el-tab-pane label="企业资质" :disabled="!certId">
           <business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId" :SupplierId="formData.Id"
-            :SupplierTypeCode="classId" :canadd="add_flat" @close="AuditEntity" height="360px" style="margin-top: 20px">
+            :SupplierTypeCode="classId" :canadd="add_flat" @close="selectAuditOrg" height="360px" style="margin-top: 20px">
           </business-list>
         </el-tab-pane>
 
@@ -199,6 +199,29 @@
         </el-tab-pane>
       </el-tabs>
     </el-card>
+    <el-dialog title="选择审批单位" :visible.sync="dialogVisible" width="520px">
+      <el-form ref="searchForm" label-width="110px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="单位名称">
+              <el-select ref="selectauditOrg" v-model="firstAudit" placeholder="请选择"
+                         style="width: 90%" filterable allow-create default-first-option>
+                <el-option
+                  v-for="item in organizeOption"
+                  :key="item.Id"
+                  :label="item.Fullname"
+                  :value="item.Id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="AuditEntity">确定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -226,12 +249,12 @@
       WfHistory,
       SupplierCertEdit,
 
-      EquipmentList, //企业主要装备情况
-      PerformanceList, //近三年主要工程业绩列表
-      PatentList, //拥有专利、专有技术及工法列表
-      WinningList, //近三年获得省部级及以上主要技术、管理成果、获奖项目列表
-      BusinessList, //选择准入范围
-      TechInfo,
+      EquipmentList, // 企业主要装备情况
+      PerformanceList, // 近三年主要工程业绩列表
+      PatentList, // 拥有专利、专有技术及工法列表
+      WinningList, // 近三年获得省部级及以上主要技术、管理成果、获奖项目列表
+      BusinessList, // 选择准入范围
+      TechInfo
     },
     computed: {
       ...mapGetters({
@@ -240,16 +263,19 @@
     },
     name: 'oilsupplierEdit',
 
-    data() {
+    data () {
       return {
+        dialogVisible: false,
         canUpdateSupplier: true,
         dictData: null,
         applyLoading: false,
-        equipmentList: [], //企业主要装备情况
-        performanceList: [], //近三年主要工程业绩
-        patentList: [], //拥有专利、专有技术及工法
-        winningList: [], //近三年获得省部级及以上主要技术、管理成果、获奖项目
-        businessList: [], //准入业务
+        equipmentList: [], // 企业主要装备情况
+        performanceList: [], // 近三年主要工程业绩
+        patentList: [], // 拥有专利、专有技术及工法
+        winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
+        businessList: [], // 准入业务
+        organizeOption: [], // 审批部门
+        firstAudit: '',
         serviceId: '',
         certId: '',
         classId: '03',
@@ -332,7 +358,7 @@
           SupplierTypeCode: '03',
           SupplierTypeName: '技术服务类',
           Step: 0,
-          HseTraining: 0,
+          HseTraining: 0
         },
 
         formDataCert: {
@@ -351,10 +377,10 @@
         },
         add_flat: true,
         entrydetail: {
-          process: 'oil_supplier_apply',
+          process: 'oil_supplier_apply_1',
           business: '',
           instance: ''
-        },
+        }
       }
     },
     mounted () {
@@ -363,7 +389,7 @@
         this.certId = this.$route.query.certid + ''
       }
     },
-    created() {
+    created () {
       this.serviceId = this.$route.params.opera + ''
       if (this.$route.query.certid) {
         this.certId = this.$route.query.certid + ''
@@ -377,7 +403,7 @@
       this.initDatas()
     },
     methods: {
-      inputCompany(val) {
+      inputCompany (val) {
         if (!this.certId) {
           api.getEntityByName(val, this.$axios).then(res => {
             if (res.data && res.data.Id) {
@@ -388,12 +414,12 @@
           })
         }
       },
-      changeFormData(fdata) {
+      changeFormData (fdata) {
         if (!this.certId) {
           this.SetFormData(fdata)
         }
       },
-      SetFormData(fdata) {
+      SetFormData (fdata) {
         this.isCanUpdateSupplier(fdata.Id)
         this.formData.Id = fdata.Id
         this.formData.SupplierName = fdata.SupplierName
@@ -451,31 +477,31 @@
         this.$refs["TechInfo"].LinkCityAry.push(this.formData.LinkStreet)
         /*this.$refs["TechInfo"].UnitRelationAry = []
         if (this.formData.SpecTypeCode.length > 0) {
-          this.$refs["TechInfo"].UnitRelationAry = this.formData.SpecTypeCode.split(',')
+          this.$refs['TechInfo'].UnitRelationAry = this.formData.SpecTypeCode.split(',')
         }*/
       },
 
-      isCanUpdateSupplier(supplierId) {
+      isCanUpdateSupplier (supplierId) {
         api.isCanUpdateSupplier(supplierId, this.$axios).then(res => {
           this.canUpdateSupplier = (res.data.code === 0)
         }).catch(err => {
           console.error(err)
         })
       },
-      equipmentdialog() {
-        this.$refs["equipmentList"].showDialog()
+      equipmentdialog () {
+        this.$refs['equipmentList'].showDialog()
       },
-      performancedialog() {
-        this.$refs["performanceList"].showDialog()
+      performancedialog () {
+        this.$refs['performanceList'].showDialog()
       },
-      patentdialog() {
-        this.$refs["patentList"].showDialog()
+      patentdialog () {
+        this.$refs['patentList'].showDialog()
       },
-      winningdialog() {
-        this.$refs["winningList"].showDialog()
+      winningdialog () {
+        this.$refs['winningList'].showDialog()
       },
 
-      initDatas() {
+      initDatas () {
         this.isCanUpdateSupplier(this.formData.Id)
         if (this.formData.Id) {
           api.getEntityAndCert(this.certId, this.$axios).then(res => {
@@ -506,44 +532,45 @@
             /*this.$refs["TechInfo"].UnitRelationAry = []
 
             if (this.formData.SpecTypeCode.length > 0) {
-              this.$refs["TechInfo"].UnitRelationAry = this.formData.SpecTypeCode.split(',')
+              this.$refs['TechInfo'].UnitRelationAry = this.formData.SpecTypeCode.split(',')
             }*/
 
             this.entrydetail.business = this.certId
             this.entrydetail.instance = this.formDataCert.WorkflowId
             if (this.certId && this.formDataCert.WorkflowId) {
-              this.$refs['WfHistory'].getHistoryTask() /*刷新工作流*/
+              this.$refs['WfHistory'].getHistoryTask() /* 刷新工作流 */
             }
-            this.$refs["equipmentList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.$refs["performanceList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.$refs["patentList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.$refs["winningList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.$refs["businessList"].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs['equipmentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs['performanceList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs['patentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs['winningList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs['businessList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
           }).catch(err => {
             console.error(err)
-          });
+          })
         }
       },
 
-      getDictOptions() {
+      getDictOptions () {
         api.getDictList(this.$axios).then(res => {
           this.dictData = res.data.items
-          /*this.UnitRelationOptions = res.data.items['UnitRelation']
+          this.organizeOption = res.data.items['Organizes']
+          /* this.UnitRelationOptions = res.data.items['UnitRelation']
           this.getCityList(res.data.items['GaodeMapChinaAreas'])
-          this.CompanyTypeOptions = res.data.items['CompanyType']*/
+          this.CompanyTypeOptions = res.data.items['CompanyType'] */
         }).catch(err => {
           console.error(err)
         })
       },
-      /*getCityList(val) {
+      /* getCityList(val) {
         let resultData = JSON.parse(val)
         let countstr = JSON.stringify(resultData.districts[0].districts)
         countstr = countstr.replace(/\,\"districts\"\:\[\]/g, '')
         this.countryoptions = JSON.parse(countstr)
-      },*/
+      }, */
 
-      //保存信息
-      saveEntity() {
+      // 保存信息
+      saveEntity () {
         this.$refs['TechInfo'].$refs['EntityForm'].validate((valid) => {
           if (valid) {
             if (!this.formData.SetupTime) {
@@ -551,71 +578,68 @@
             } else {
               this.formData.SetupTime = new Date(this.formData.SetupTime)
             }
-            //this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
+            // this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
             if (!this.formData.Id || !this.certId) {
               this.addEntity()
             } else {
               this.updateEntity()
             }
-
           } else {
             return false
           }
         })
       },
 
-      //保存信息
-      saveCertEntity() {
+      // 保存信息
+      saveCertEntity () {
         this.$refs['SupplierCertEditCompoment'].saveEntity()
       },
 
-      addEntity() {
+      addEntity () {
         this.formData.SupplierTypeCode = '03'
         this.formData.SupplierTypeName = '技术服务类'
         api.addEntity(this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
+            // 保存成功后,初始化数据,变成修改
             this.formData.Id = res.data.item.split('_')[0]
             this.certId = res.data.item.split('_')[1]
             this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
-            });
-
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
 
-      updateEntity() {
+      updateEntity () {
         api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
+            // 保存成功后,初始化数据,变成修改
             this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
-            });
-
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
 
-      CheckCompanyBase() {
+      CheckCompanyBase () {
         if (!this.formData.Id) {
           this.$message({
             type: 'error',
@@ -632,54 +656,56 @@
         }
         return true
       },
-      //企业人员结构情况
-      updateNumberEntity() {
+      // 企业人员结构情况
+      updateNumberEntity () {
         if (!this.CheckCompanyBase()) {
           return false
         }
         api.updateNumberEntity(this.formData.Id + '_' + this.certId, this.formDataCert, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
+            // 保存成功后,初始化数据,变成修改
             this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
-            });
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
-
-      AuditEntity() {
+      selectAuditOrg () {
+        this.dialogVisible = true
+      },
+      AuditEntity () {
         this.applyLoading = true
-        apiCert.auditEntity(this.certId, this.$axios).then(res => {
+        apiCert.auditEntity(this.certId, this.firstAudit, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
+            // 保存成功后,初始化数据,变成修改
             this.initDatas()
+            this.dialogVisible = false
             this.$message({
               type: 'success',
               message: res.data.message
-            });
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
           this.applyLoading = false
-
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
 
-      jstimehandle(val) {
+      jstimehandle (val) {
         if (val === '') {
           return '----'
         } else if (val === '0001-01-01T08:00:00+08:00') {
@@ -692,20 +718,19 @@
         }
       },
 
-      formatDateTime(date) {
-        var y = date.getFullYear();
-        var m = date.getMonth() + 1;
-        m = m < 10 ? ('0' + m) : m;
-        var d = date.getDate();
-        d = d < 10 ? ('0' + d) : d;
-        var h = date.getHours();
-        var minute = date.getMinutes();
-        minute = minute < 10 ? ('0' + minute) : minute;
-        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      formatDateTime (date) {
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? ('0' + m) : m
+        var d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        var h = date.getHours()
+        var minute = date.getMinutes()
+        minute = minute < 10 ? ('0' + minute) : minute
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
       }
     }
   }
-
 </script>
 
 <style lang="scss">

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/basisedit.vue

@@ -300,7 +300,7 @@
           WorkflowId: ''
         },
         entrydetail: {
-          process: 'oil_supplier_apply',
+          process: 'oil_supplier_apply_1',
           business: '',
           instance: ''
         }

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

@@ -11,7 +11,8 @@
           <i class="icon icon-table2"></i> 审批
         </span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity">审批</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">分配</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>
           <router-link :to="'/oilsupplier/supplieraudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -162,7 +163,7 @@
     </el-card>
     <el-dialog title="审核" :visible.sync="dialogMakeSure">
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
-        <el-form-item :label="aduitlabel" v-if="this.formData.Status != '2'">
+        <el-form-item :label="aduitlabel" v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
           <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择"
                      style="width: 90%" filterable allow-create default-first-option>
             <el-option
@@ -180,7 +181,7 @@
           </template>
         </el-form-item>
         <el-form-item label="意见">
-          <el-input type="textarea" v-model="formData.AuditorRemark" placeholder="请输入审核说明"></el-input>
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核说明"></el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer" style="margin-top: -25px">
@@ -188,6 +189,25 @@
         <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
       </div>
     </el-dialog>
+    <el-dialog title="分配" :visible.sync="dialogAllocation">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <el-form-item label="审批人">
+          <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择"
+                     style="width: 90%" filterable allow-create default-first-option>
+            <el-option
+              v-for="item in auditerOptions"
+              :key="item.id"
+              :label="item.realname"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogAllocation = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -241,7 +261,8 @@
         classId: '01',
         dictData: null,
         dialogMakeSure: false,
-        aduitlabel: '审核人员',
+        dialogAllocation: false,
+        aduitlabel: '审核人',
         auditer: '',
         shenheForm: {
           SuccessStatus: 1,
@@ -352,7 +373,7 @@
       } else {
         this.formData.Id = 0
       }
-      this.getDictOptions()
+      // this.getDictOptions()
       this.initDatas()
     },
     methods: {
@@ -390,9 +411,8 @@
             this.entrydetail.instance = this.formDataCert.WorkflowId
             if (this.formData.Status === '1') {
               this.aduitlabel = '复审人员'
-            } else if (this.formData.Status === '3') {
-              this.aduitlabel = '审批人'
             }
+            this.getDictOptions()
           }).catch(err => {
             console.error(err)
           })
@@ -400,9 +420,9 @@
       },
 
       getDictOptions () {
-        api.getDictList(this.$axios).then(res => {
+        api.getDictListByStatus(this.formData.Status, this.$axios).then(res => {
           this.dictData = res.data.items
-          this.auditerOptions = res.data.items['SecondAudit']
+          this.auditerOptions = res.data.items['Auditer']
           console.log(this.auditerOptions, 'this.auditerOptions')
         }).catch(err => {
           console.error(err)
@@ -535,12 +555,14 @@
         // });
         this.dialogMakeSure = true
       },
-
+      allocationBtn () {
+        this.dialogAllocation = true
+      },
       // 审核通过
       makeSure () {
         console.log(this.auditer)
         if (this.shenheForm.SuccessStatus === 1) {
-          if ((!this.auditer || this.auditer === 0) && this.formData.Status !== '2') {
+          if ((!this.auditer || this.auditer === 0) && this.formData.Status !== '2' && this.formData.Status !== '4' && this.formData.Status !== '5') {
             this.$message({
               type: 'warning',
               message: '请选择审核人!'
@@ -548,7 +570,6 @@
             return
           }
         }
-        this.dialogMakeSure = false
         this.checkstatus()
       },
 
@@ -558,6 +579,8 @@
         apiCert.auditEntityFir(this.certId, this.auditer, params, this.$axios).then(res => {
           if (res.data.code === 0) {
             this.initDatas()
+            this.dialogMakeSure = false
+            this.dialogAllocation = false
             this.$message({
               type: 'success',
               message: res.data.message

+ 171 - 72
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/techedit.vue

@@ -11,6 +11,8 @@
           <i class="icon icon-table2"></i> 审批
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">分配</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>
           <router-link :to="'/oilsupplier/supplieraudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -145,7 +147,7 @@
 
         <el-tab-pane label="审批意见">
           <auditbus-list ref="auditbusList" :data="auditbusList" :SupplierCertId="certId" :SupplierId="serviceId"
-            :SupplierTypeCode="classId" height="360px" style="margin-top: 20px"></auditbus-list>
+            :SupplierTypeCode="classId" :Visiblebtn="this.formData.Status" height="360px" style="margin-top: 20px"></auditbus-list>
         </el-tab-pane>
 
         <el-tab-pane label="流程查看">
@@ -158,6 +160,53 @@
         </el-tab-pane>
       </el-tabs>
     </el-card>
+    <el-dialog title="审核" :visible.sync="dialogMakeSure">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <el-form-item :label="aduitlabel" v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
+          <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择"
+                     style="width: 90%" filterable allow-create default-first-option>
+            <el-option
+              v-for="item in auditerOptions"
+              :key="item.id"
+              :label="item.realname"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <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>
+          </template>
+        </el-form-item>
+        <el-form-item label="意见">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核说明"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogMakeSure = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="分配" :visible.sync="dialogAllocation">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <el-form-item label="审批人">
+          <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择"
+                     style="width: 90%" filterable allow-create default-first-option>
+            <el-option
+              v-for="item in auditerOptions"
+              :key="item.id"
+              :label="item.realname"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogAllocation = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -184,11 +233,11 @@
       WfHistory,
       SupplierCertEdit,
 
-      EquipmentList, //企业主要装备情况
-      PerformanceList, //近三年主要工程业绩列表
-      PatentList, //拥有专利、专有技术及工法列表
-      WinningList, //近三年获得省部级及以上主要技术、管理成果、获奖项目列表
-      AuditbusList, //待审核业务
+      EquipmentList, // 企业主要装备情况
+      PerformanceList, // 近三年主要工程业绩列表
+      PatentList, // 拥有专利、专有技术及工法列表
+      WinningList, // 近三年获得省部级及以上主要技术、管理成果、获奖项目列表
+      AuditbusList, // 待审核业务
       TechInfo
     },
     computed: {
@@ -198,14 +247,18 @@
     },
     name: 'oilsupplierEdit',
 
-    data() {
+    data () {
       return {
-        equipmentList: [], //企业主要装备情况
-        performanceList: [], //近三年主要工程业绩
-        patentList: [], //拥有专利、专有技术及工法
-        winningList: [], //近三年获得省部级及以上主要技术、管理成果、获奖项目
-        auditbusList: [], //待审核业务
-
+        equipmentList: [], // 企业主要装备情况
+        performanceList: [], // 近三年主要工程业绩
+        patentList: [], // 拥有专利、专有技术及工法
+        winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
+        auditbusList: [], // 待审核业务
+        auditerOptions: [], // 审核人员
+        dialogMakeSure: false,
+        dialogAllocation: false,
+        aduitlabel: '审核人',
+        auditer: '',
         serviceId: '',
         certId: '',
         classId: '03',
@@ -299,15 +352,19 @@
           Status: 0,
           WorkflowId: ''
         },
+        shenheForm: {
+          SuccessStatus: 1,
+          AuditorRemark: '',
+          AnnualId: 0
+        },
         entrydetail: {
-          process: 'oil_supplier_apply',
+          process: 'oil_supplier_apply_1',
           business: '',
           instance: ''
         }
       }
     },
-    created() {
-
+    created () {
       this.serviceId = this.$route.params.opera + ''
       this.certId = this.$route.query.certid + ''
       if (this.serviceId !== 'add' && this.serviceId > 0) {
@@ -315,21 +372,21 @@
       } else {
         this.formData.Id = 0
       }
-      this.getDictOptions()
+      // this.getDictOptions()
       this.initDatas()
     },
     methods: {
-      equipmentdialog() {
-        this.$refs["equipmentList"].showDialog()
+      equipmentdialog () {
+        this.$refs['equipmentList'].showDialog()
       },
-      performancedialog() {
-        this.$refs["performanceList"].showDialog()
+      performancedialog () {
+        this.$refs['performanceList'].showDialog()
       },
-      patentdialog() {
-        this.$refs["patentList"].showDialog()
+      patentdialog () {
+        this.$refs['patentList'].showDialog()
       },
-      winningdialog() {
-        this.$refs["winningList"].showDialog()
+      winningdialog () {
+        this.$refs['winningList'].showDialog()
       },
 
       initDatas () {
@@ -351,89 +408,89 @@
 
             this.entrydetail.business = this.certId
             this.entrydetail.instance = this.formDataCert.WorkflowId
+            this.getDictOptions()
           }).catch(err => {
             console.error(err)
-          });
+          })
         }
       },
 
       getDictOptions () {
-        api.getDictList(this.$axios).then(res => {
+        api.getDictListByStatus(this.formData.Status, this.$axios).then(res => {
           this.dictData = res.data.items
+          this.auditerOptions = res.data.items['Auditer']
+          console.log(this.auditerOptions, 'this.auditerOptions')
         }).catch(err => {
-         console.error(err)
-         })
+          console.error(err)
+        })
       },
 
-      //保存信息
-      saveEntity() {
+      // 保存信息
+      saveEntity () {
         this.$refs['EntityForm'].validate((valid) => {
           if (valid) {
-            //this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
+            // this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
             if (!this.formData.Id) {
               this.addEntity()
             } else {
               this.updateEntity()
             }
-
           } else {
             return false
           }
         })
       },
 
-      //保存信息
-      saveCertEntity() {
+      // 保存信息
+      saveCertEntity  () {
         this.$refs['SupplierCertEditCompoment'].saveEntity()
       },
 
-      addEntity() {
+      addEntity () {
         this.formData.SupplierTypeCode = '03'
         this.formData.SupplierTypeName = '技术服务类'
         api.addEntity(this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
+            // 保存成功后,初始化数据,变成修改
             this.formData.Id = res.data.item.split('_')[0]
             this.certId = res.data.item.split('_')[1]
             this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
-            });
-
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
 
-      updateEntity() {
+      updateEntity () {
         api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
+            // 保存成功后,初始化数据,变成修改
             this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
-            });
-
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
 
-      CheckCompanyBase() {
+      CheckCompanyBase () {
         if (!this.formData.Id) {
           this.$message({
             type: 'error',
@@ -450,51 +507,94 @@
         }
         return true
       },
-      //企业人员结构情况
-      updateNumberEntity() {
+      // 企业人员结构情况
+      updateNumberEntity () {
         if (!this.CheckCompanyBase()) {
           return false
         }
         api.updateNumberEntity(this.formData.Id + '_' + this.certId, this.formDataCert, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
+            // 保存成功后,初始化数据,变成修改
             this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
-            });
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
+      },
+
+      AuditEntity () {
+        // apiCert.auditEntity(this.certId, this.$axios).then(res => {
+        //   if (res.data.code === 0) {
+        //     // 保存成功后,初始化数据,变成修改
+        //     this.initDatas()
+        //     this.$message({
+        //       type: 'success',
+        //       message: res.data.message
+        //     })
+        //   } else {
+        //     this.$message({
+        //       type: 'warning',
+        //       message: res.data.message
+        //     })
+        //   }
+        // }).catch(err => {
+        //   console.error(err)
+        // })
+        this.dialogMakeSure = true
+      },
+
+      allocationBtn () {
+        this.dialogAllocation = true
+      },
+      // 审核通过
+      makeSure () {
+        console.log(this.auditer)
+        if (this.shenheForm.SuccessStatus === 1) {
+          if ((!this.auditer || this.auditer === 0) && this.formData.Status !== '2' && this.formData.Status !== '4' && this.formData.Status !== '5') {
+            this.$message({
+              type: 'warning',
+              message: '请选择审核人!'
+            })
+            return
+          }
+        }
+        this.checkstatus()
       },
 
-      AuditEntity() {
-        apiCert.auditEntity(this.certId, this.$axios).then(res => {
+      checkstatus () {
+        let params = this.shenheForm
+        console.log(this.shenheForm, '---this.shenheForm----')
+        apiCert.auditEntityFir(this.certId, this.auditer, params, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
             this.initDatas()
+            this.dialogMakeSure = false
+            this.dialogAllocation = false
             this.$message({
               type: 'success',
               message: res.data.message
-            });
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
+          this.applyLoading = false
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
 
-      jstimehandle(val) {
+      jstimehandle (val) {
         if (val === '') {
           return '----'
         } else if (val === '0001-01-01T08:00:00+08:00') {
@@ -507,20 +607,19 @@
         }
       },
 
-      formatDateTime(date) {
-        var y = date.getFullYear();
-        var m = date.getMonth() + 1;
-        m = m < 10 ? ('0' + m) : m;
-        var d = date.getDate();
-        d = d < 10 ? ('0' + d) : d;
-        var h = date.getHours();
-        var minute = date.getMinutes();
-        minute = minute < 10 ? ('0' + minute) : minute;
-        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      formatDateTime (date) {
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? ('0' + m) : m
+        var d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        var h = date.getHours()
+        var minute = date.getMinutes()
+        minute = minute < 10 ? ('0' + minute) : minute
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
       }
     }
   }
-
 </script>
 
 <style lang="scss">

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

@@ -35,7 +35,8 @@
         <el-table-column label="操作" min-width="90" align="center" fixed>
           <template slot-scope="scope">
             <router-link :to="'/oilsupplier/supplieraudit/' + scope.row.Id + '/' + (scope.row.SupplierTypeCode === '01' ? 'goodsedit' : (scope.row.SupplierTypeCode === '02' ? 'basisedit' : 'techedit')) + '?certid=' + scope.row.CertId">
-              <el-button type="primary" plain size="mini" title="审核">审核</el-button>
+              <el-button type="primary" plain size="mini" title="分配" v-if="scope.row.Status == '3'">分配</el-button>
+              <el-button type="primary" plain size="mini" title="审核" v-else>审核</el-button>
             </router-link>
 
             <!--<el-popover placement="top" title="提示">