瀏覽代碼

准入申请

lining 6 年之前
父節點
當前提交
a573b65520

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

@@ -1071,7 +1071,7 @@ func (this *OilSupplierController) GetDictListByStatus() {
 		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)
+		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, "100000172", workflow.PROF_RECE, &auditWorkflow)
 		users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), "")
 		dictList["Auditer"] = users
 	} else if status == "4" {

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

@@ -177,7 +177,7 @@
         </el-tab-pane>
 
         <el-tab-pane label="企业资质" :disabled="!certId">
-          <business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId" :SupplierId="formData.Id"
+          <business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId" :SupplierId="formData.Id+''"
             :SupplierTypeCode="classId" :canadd="add_flat" @close="selectAuditOrg" height="360px" style="margin-top: 20px">
           </business-list>
         </el-tab-pane>
@@ -468,18 +468,18 @@
         this.formData.HseTraining = fdata.HseTraining
         this.formData.SpecTypeCode = fdata.SpecTypeCode
 
-        this.$refs["BasisInfo"].CityAry = []
-        this.$refs["BasisInfo"].CityAry.push(this.formData.Province)
-        this.$refs["BasisInfo"].CityAry.push(this.formData.City)
-        this.$refs["BasisInfo"].CityAry.push(this.formData.Street)
-        this.$refs["BasisInfo"].LinkCityAry = []
-        this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkProvince)
-        this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkCity)
-        this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkStreet)
-        /*this.$refs["BasisInfo"].UnitRelationAry = []
+        this.$refs['BasisInfo'].CityAry = []
+        this.$refs['BasisInfo'].CityAry.push(this.formData.Province)
+        this.$refs['BasisInfo'].CityAry.push(this.formData.City)
+        this.$refs['BasisInfo'].CityAry.push(this.formData.Street)
+        this.$refs['BasisInfo'].LinkCityAry = []
+        this.$refs['BasisInfo'].LinkCityAry.push(this.formData.LinkProvince)
+        this.$refs['BasisInfo'].LinkCityAry.push(this.formData.LinkCity)
+        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(',')
-        }*/
+        } */
       },
 
       isCanUpdateSupplier (supplierId) {
@@ -519,18 +519,18 @@
             this.formDataCert.SkillerTotal = this.formData.SkillerTotal
             this.formDataCert.Status = this.formData.Status
             this.formDataCert.WorkflowId = this.formData.WorkflowId
-            this.$refs["BasisInfo"].CityAry = []
-            this.$refs["BasisInfo"].CityAry.push(this.formData.Province)
-            this.$refs["BasisInfo"].CityAry.push(this.formData.City)
-            this.$refs["BasisInfo"].CityAry.push(this.formData.Street)
-            this.$refs["BasisInfo"].LinkCityAry = []
-            this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkProvince)
-            this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkCity)
-            this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkStreet)
-            /*this.$refs["BasisInfo"].UnitRelationAry = []
+            this.$refs['BasisInfo'].CityAry = []
+            this.$refs['BasisInfo'].CityAry.push(this.formData.Province)
+            this.$refs['BasisInfo'].CityAry.push(this.formData.City)
+            this.$refs['BasisInfo'].CityAry.push(this.formData.Street)
+            this.$refs['BasisInfo'].LinkCityAry = []
+            this.$refs['BasisInfo'].LinkCityAry.push(this.formData.LinkProvince)
+            this.$refs['BasisInfo'].LinkCityAry.push(this.formData.LinkCity)
+            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.entrydetail.business = this.certId
             this.entrydetail.instance = this.formDataCert.WorkflowId

+ 168 - 71
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/basisedit.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>
@@ -144,8 +146,8 @@
         </el-tab-pane>
 
         <el-tab-pane label="企业资质">
-          <auditbus-list ref="auditbusList" :data="auditbusList" :SupplierCertId="certId" :SupplierId="serviceId"
-                         :SupplierTypeCode="classId" height="360px" style="margin-top: 20px"></auditbus-list>
+          <auditbus-list ref="auditbusList" :data="auditbusList" :SupplierCertId="certId + ''" :SupplierId="serviceId+''"
+                         :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, // 待审核业务
       BasisInfo
     },
     computed: {
@@ -198,19 +247,27 @@
     },
     name: 'oilsupplierEdit',
 
-    data() {
+    data () {
       return {
-        equipmentList: [], //企业主要装备情况
-        performanceList: [], //近三年主要工程业绩
-        patentList: [], //拥有专利、专有技术及工法
-        winningList: [], //近三年获得省部级及以上主要技术、管理成果、获奖项目
-        auditbusList: [], //待审核业务
-
+        equipmentList: [], // 企业主要装备情况
+        performanceList: [], // 近三年主要工程业绩
+        patentList: [], // 拥有专利、专有技术及工法
+        winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
+        auditbusList: [], // 待审核业务
+        auditerOptions: [], // 审核人员
         serviceId: '',
         certId: '',
         classId: '02',
         dictData: null,
-
+        dialogMakeSure: false,
+        dialogAllocation: false,
+        aduitlabel: '审核人',
+        auditer: '',
+        shenheForm: {
+          SuccessStatus: 1,
+          AuditorRemark: '',
+          AnnualId: 0
+        },
         formData: {
           Id: '',
           SupplierName: '',
@@ -306,8 +363,7 @@
         }
       }
     },
-    created() {
-
+    created () {
       this.serviceId = this.$route.params.opera + ''
       this.certId = this.$route.query.certid + ''
       if (this.serviceId !== 'add' && this.serviceId > 0) {
@@ -315,21 +371,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 +407,88 @@
 
             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']
         }).catch(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 = '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',
@@ -450,51 +505,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 +605,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">