Sfoglia il codice sorgente

增项提交审批初审修改

huahaiyan 6 anni fa
parent
commit
ac4a170846

+ 128 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappend.go

@@ -457,4 +457,132 @@ func (this *OilSupplierCertAppendController) AuditEntity() {
 		"Status",
 	}
 	certSrv.UpdateEntityByIdCols(certappendId, model, cols)
+}
+
+// @Title 审批
+// @Description 审批
+// @Param 	body body suppliercert.OilSupplierCert
+// @Success	200	{object} controllers.Request
+// @router /auditEntityFir/:id [post]
+func (this *OilSupplierCertAppendController) AuditEntityFir() {
+	certId := this.Ctx.Input.Param(":id")
+	auditer := this.GetString("auditer")
+
+	//取出审批列表
+	certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
+	var supplierCertEntity suppliercert.OilSupplierCert
+	certSrv.GetEntityById(certId, &supplierCertEntity)
+
+	var jsonblob = this.Ctx.Input.RequestBody
+	var dataother ShenHeModel
+	json.Unmarshal(jsonblob, &dataother)
+	var errinfo ErrorDataInfo
+	defer func() { //finally处理失败的异常
+		if err := recover(); err != nil {
+			errinfo.Message = "提交失败," + err.(string)
+			errinfo.Code = -1
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+		} else {
+			//返回正确结果
+			errinfo.Message = "审核提交成功"
+			errinfo.Code = 0
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+		}
+	}()
+
+	//remarks := ""
+	step := 2
+	status := ""
+	if supplierCertEntity.Status == "1" {
+		status = suppliercert.SECOND_TRIAL_STATUS
+		step = 2
+	} else if supplierCertEntity.Status == "2" {
+		status = suppliercert.THIRD_TRIAL_STATUS
+		step = 2
+		//获得有专业审核接收权限的人员
+		var users1 []userRole.Base_RoleList
+		var auditWorkflow1 auditsetting.Base_OilAuditSetting
+		rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
+		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, "100000172", workflow.PROF_RECE, &auditWorkflow1)
+		users1 = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow1.RoleId), this.User.AccCode)
+		for _, tmpUser := range users1 {
+			auditer += strconv.FormatInt(tmpUser.Id, 10) + ","
+		}
+		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_APPEND_APPLY
+	ActiComplete.BusinessKey = certId
+	ActiComplete.UserNames = auditer
+	ActiComplete.UserId = this.User.Id
+	ActiComplete.Remarks = dataother.AuditorRemark
+	ActiComplete.CallbackUrl = ""
+	if dataother.SuccessStatus == 1 {
+		ActiComplete.Result = "1"
+		receiveVal := svcActiviti.TaskComplete(ActiComplete)
+
+		if receiveVal == "true" {
+			supplierCertEntity.Status = status
+			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
+		}
+	} 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
+		}
+	}
 }

+ 7 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/supplierappend.js

@@ -46,4 +46,11 @@ export default {
       method: 'post'
     })
   },
+  auditEntityFir (entityId, auditer, params, myAxios) {
+    return myAxios({
+      url: '/suppliercertappend/auditEntityFir/' + entityId + '?auditer=' + auditer,
+      method: 'post',
+      data: params
+    })
+  }
 }

+ 120 - 7
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/basisdataopera.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/addtionaudit/techlist'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -113,6 +115,46 @@
       </span>
     </el-dialog>
 
+    <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>
 
@@ -120,6 +162,7 @@
   import {
     mapGetters
   } from 'vuex'
+  import suppapi from '@/api/oilsupplier/supplier'
   import api from '@/api/oilsupplier/supplierappendsub'
   import api2 from '@/api/oilsupplier/supplierappend'
 
@@ -154,6 +197,13 @@
         }
       }
       return {
+        auditbusList: [], // 待审核业务
+        auditerOptions: [], // 审核人员
+        dialogMakeSure: false,
+        dialogAllocation: false,
+        aduitlabel: '审核人',
+        auditer: '',
+        dictData: null,
         supplierList: [], //供应方公司列表
         supplierOptions: '', //已选择的供应方公司列表
         // serviceType: '', //服务类型()
@@ -234,7 +284,12 @@
             trigger: 'blur'
           }],
         },
-        AnnualId: '', //传的参数
+        shenheForm: {
+          SuccessStatus: 1,
+          AuditorRemark: '',
+          AppendId: 0
+        },
+        AppendId: '', //传的参数
         serviceId: '',
         editFlag: '', //编辑操作标记
       }
@@ -244,9 +299,9 @@
       this.serviceId = this.$route.params.opera
       console.log("---this.serviceId----", this.serviceId)
       this.editFlag = this.$route.query.editFlag
-      this.AnnualId = this.serviceId
+      this.AppendId = this.serviceId
       this.getEntityById()
-      this.dialogFormData.SupplierCertAppendId = this.AnnualId
+      this.dialogFormData.SupplierCertAppendId = this.AppendId
       this.getSortList()
       this.getOrgTreeList() //获取推荐单位层级列表
       this.getTechTreeList() //获取技术服务类层级列表
@@ -333,9 +388,10 @@
       //获取需要修改的增项信息
       getEntityById() {
         let _this = this
-        api2.getEntityById(_this.AnnualId, _this.$axios).then(res => {
+        api2.getEntityById(_this.AppendId, _this.$axios).then(res => {
           _this.formData = res.data
-          console.log("--_this.formData---",_this.formData)
+          this.getDictOptions()
+          console.log("--_this.formData---", _this.formData)
           //显示原推荐单位
           if (_this.formData.RecUnitFlag != null) {
             let arr = _this.formData.RecUnitFlag.split(',')
@@ -359,7 +415,7 @@
           if (valid) {
             let arr = _this.$refs['tjdwCascader'].currentLabels
             _this.formData.RecUnitName = arr[arr.length - 1] //获取推荐单位名
-            if (_this.editFlag == '1' && _this.AnnualId !== '') {
+            if (_this.editFlag == '1' && _this.AppendId !== '') {
               _this.updateData()
             } else {
               _this.addAppend()
@@ -373,7 +429,7 @@
       //更新增项信息
       updateData() {
         let _this = this
-        api2.updateEntity(_this.AnnualId, _this.formData, _this.$axios).then(res => {
+        api2.updateEntity(_this.AppendId, _this.formData, _this.$axios).then(res => {
           if (res.data.code === 0) {
             this.$message({
               type: 'success',
@@ -581,6 +637,63 @@
           .catch(() => {})
       },
 
+      getDictOptions() {
+        console.log("---this.formData----", this.formData)
+        suppapi.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)
+        })
+      },
+
+      allocationBtn() {
+        this.dialogAllocation = true
+      },
+      AuditEntity() {
+        this.dialogMakeSure = 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()
+      },
+
+      checkstatus() {
+        let params = this.shenheForm
+        console.log(this.shenheForm, '---this.shenheForm----')
+        api2.auditEntityFir(this.AppendId, this.auditer, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.getEntityById()
+            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)
+        })
+      },
+
       //列表排序功能
       orderby(column) {
         if (column.order == 'ascending') {

+ 130 - 10
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/goodsdataopera.vue

@@ -2,8 +2,8 @@
   <div>
     <el-breadcrumb class="heading">
       <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
-      <el-breadcrumb-item :to="{ path: '/oilsupplier/addtionaudit/techlist' }">物资类列表</el-breadcrumb-item>
-      <el-breadcrumb-item>编辑</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/addtionaudit/techlist' }">准入审核列表</el-breadcrumb-item>
+      <el-breadcrumb-item>物资-准入审核</el-breadcrumb-item>
     </el-breadcrumb>
     <el-card class="box-card">
       <div slot="header">
@@ -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/addtionaudit/techlist'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -102,6 +104,54 @@
       </span>
     </el-dialog>
 
+    <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>
 
@@ -109,6 +159,7 @@
   import {
     mapGetters
   } from 'vuex'
+  import suppapi from '@/api/oilsupplier/supplier'
   import api from '@/api/oilsupplier/supplierappendsub'
   import api2 from '@/api/oilsupplier/supplierappend'
 
@@ -143,6 +194,13 @@
         }
       }
       return {
+        auditbusList: [], // 待审核业务
+        auditerOptions: [], // 审核人员
+        dialogMakeSure: false,
+        dialogAllocation: false,
+        aduitlabel: '审核人',
+        auditer: '',
+        dictData: null,
         supplierList: [], //供应方公司列表
         supplierOptions: '', //已选择的供应方公司列表
         // serviceType: '', //服务类型()
@@ -223,7 +281,12 @@
             trigger: 'blur'
           }],
         },
-        AnnualId: '', //传的参数
+        shenheForm: {
+          SuccessStatus: 1,
+          AuditorRemark: '',
+          AppendId: 0
+        },
+        AppendId: '', //传的参数
         serviceId: '',
         editFlag: '', //编辑操作标记
       }
@@ -231,10 +294,10 @@
     created() {
       // this.serviceType = this.$route.params.opera //获取服务类型
       this.serviceId = this.$route.params.opera
-      this.AnnualId = this.serviceId
+      this.AppendId = this.serviceId
       this.editFlag = '1'
-      this.getEntityById()
-      this.dialogFormData.SupplierCertAppendId = this.AnnualId
+      this.getEntityById()  
+      this.dialogFormData.SupplierCertAppendId = this.AppendId
       this.getSortList()
       this.getOrgTreeList() //获取推荐单位层级列表
       this.getTechTreeList() //获取技术服务类层级列表
@@ -321,9 +384,9 @@
       //获取需要修改的增项信息
       getEntityById() {
         let _this = this
-        api2.getEntityById(_this.AnnualId, _this.$axios).then(res => {
+        api2.getEntityById(_this.AppendId, _this.$axios).then(res => {
           _this.formData = res.data
-          console.log("---_this.formData--",_this.formData)
+          this.getDictOptions()
           //显示原推荐单位
           if (_this.formData.RecUnitFlag != null) {
             let arr = _this.formData.RecUnitFlag.split(',')
@@ -347,7 +410,7 @@
           if (valid) {
             let arr = _this.$refs['tjdwCascader'].currentLabels
             _this.formData.RecUnitName = arr[arr.length - 1] //获取推荐单位名
-            if (_this.editFlag == '1' && _this.AnnualId !== '') {
+            if (_this.editFlag == '1' && _this.AppendId !== '') {
               _this.updateData()
             } else {
               _this.addAppend()
@@ -361,7 +424,7 @@
       //更新增项信息
       updateData() {
         let _this = this
-        api2.updateEntity(_this.AnnualId, _this.formData, _this.$axios).then(res => {
+        api2.updateEntity(_this.AppendId, _this.formData, _this.$axios).then(res => {
           if (res.data.code === 0) {
             this.$message({
               type: 'success',
@@ -569,6 +632,63 @@
           .catch(() => {})
       },
 
+      getDictOptions () {
+        console.log("---this.formData----",this.formData)
+        suppapi.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)
+        })
+      },
+
+      allocationBtn () {
+        this.dialogAllocation = true
+      },
+      AuditEntity () {
+        this.dialogMakeSure = 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()
+      },
+
+      checkstatus () {
+        let params = this.shenheForm
+        console.log(this.shenheForm, '---this.shenheForm----')
+        api2.auditEntityFir(this.AppendId, this.auditer, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.getEntityById()
+            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)
+        })
+      },
+
+
       //列表排序功能
       orderby(column) {
         if (column.order == 'ascending') {

+ 184 - 87
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/techdataopera.vue

@@ -11,7 +11,8 @@
           <i class="icon icon-table2"></i> 编辑
         </span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" @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/addtionaudit/techlist'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -27,18 +28,17 @@
             <el-row>
               <el-col :span="12">
                 <el-form-item label="推荐单位名称" prop="checkSelectedRecUnitName">
-                  <el-cascader ref="tjdwCascader" :options="organizeTreeList" :props="organizeTreeProps" change-on-select :show-all-levels="false" 
-                                v-model="selectedOrgList" @change="getCode2" placeholder="请选择推荐单位" style="width: 100%">
+                  <el-cascader ref="tjdwCascader" :options="organizeTreeList" :props="organizeTreeProps"
+                    change-on-select :show-all-levels="false" v-model="selectedOrgList" @change="getCode2"
+                    placeholder="请选择推荐单位" style="width: 100%">
                   </el-cascader>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="供应方公司名称" prop="checkSelectedSupplier">
-                  <el-select v-model="supplierOptions" filterable @change="getInfo" placeholder="请选择供应方公司" style="width: 100%">
-                    <el-option
-                      v-for="item in supplierList"
-                      :key="item.SupplierId"
-                      :label="item.SupplierName"
+                  <el-select v-model="supplierOptions" filterable @change="getInfo" placeholder="请选择供应方公司"
+                    style="width: 100%">
+                    <el-option v-for="item in supplierList" :key="item.SupplierId" :label="item.SupplierName"
                       :value="item.SupplierId">
                     </el-option>
                   </el-select>
@@ -66,8 +66,10 @@
           <el-table :data="entityList" border height="calc(100vh - 345px)" style="width: 100%" @sort-change="orderby">
             <el-table-column label="操作" min-width="100" align="center" fixed>
               <template slot-scope="scope">
-                <el-button type="text" title="编辑" size="medium" icon="el-icon-edit" @click="editSortData(scope.row)"></el-button>
-                <el-button type="text" title="删除" size="medium" icon="el-icon-delete" @click="deleteData(scope.row.Id)"></el-button>
+                <el-button type="text" title="编辑" size="medium" icon="el-icon-edit" @click="editSortData(scope.row)">
+                </el-button>
+                <el-button type="text" title="删除" size="medium" icon="el-icon-delete" @click="deleteData(scope.row.Id)">
+                </el-button>
               </template>
             </el-table-column>
             <el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column>
@@ -75,20 +77,22 @@
             <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
             <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
           </el-table>
-          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-                        :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+            :current-page="currentPage" :page-sizes="[10, 15, 20, 25]" :page-size="size"
+            layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
           </el-pagination>
         </el-card>
       </div>
     </el-card>
     <!-- 增项分类添加、修改 -->
     <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="800px">
-      <el-form label-width="150px" ref="dialogFormData" :rules="sortEntityFormRules" :model="dialogFormData" >
+      <el-form label-width="150px" ref="dialogFormData" :rules="sortEntityFormRules" :model="dialogFormData">
         <el-row>
           <el-col :span="12">
             <el-form-item label="分类名称" prop="checkSelectedOptList">
-              <el-cascader ref="cascader" :options="optionsList" style="width:100%" :props="orgtreeprops" change-on-select :show-all-levels="false" 
-                v-model="selectedOptList" @change="getCode" placeholder="请选择分类">
+              <el-cascader ref="cascader" :options="optionsList" style="width:100%" :props="orgtreeprops"
+                change-on-select :show-all-levels="false" v-model="selectedOptList" @change="getCode"
+                placeholder="请选择分类">
               </el-cascader>
             </el-form-item>
           </el-col>
@@ -98,8 +102,9 @@
             </el-form-item>
           </el-col>
           <el-col :span="24">
-            <el-form-item label="备注"  prop="Remark">
-              <el-input type="textarea" v-model="dialogFormData.Remark" placeholder="请输入备注"  style="width: 100%"></el-input>
+            <el-form-item label="备注" prop="Remark">
+              <el-input type="textarea" v-model="dialogFormData.Remark" placeholder="请输入备注" style="width: 100%">
+              </el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -109,6 +114,46 @@
         <el-button size="mini" type="primary" @click="ensureOption()">确 定</el-button>
       </span>
     </el-dialog>
+    <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>
@@ -117,6 +162,7 @@
   import {
     mapGetters
   } from 'vuex'
+  import suppapi from '@/api/oilsupplier/supplier'
   import api from '@/api/oilsupplier/supplierappendsub'
   import api2 from '@/api/oilsupplier/supplierappend'
   import apiCert from '@/api/oilsupplier/suppliercert'
@@ -152,6 +198,13 @@
         }
       }
       return {
+        auditbusList: [], // 待审核业务
+        auditerOptions: [], // 审核人员
+        dialogMakeSure: false,
+        dialogAllocation: false,
+        aduitlabel: '审核人',
+        auditer: '',
+        dictData: null,
         supplierList: [], //供应方公司列表
         supplierOptions: '', //已选择的供应方公司列表
         // serviceType: '', //服务类型()
@@ -181,24 +234,24 @@
           Id: '',
           SupplierId: 1,
           SupplierCertId: 1,
-          RecUnitFlag: '',//推荐单位的级联Id标记
+          RecUnitFlag: '', //推荐单位的级联Id标记
           RecUnitId: '', //推荐单位编码
           RecUnitName: '', //推荐单位名称
           AppendType: '', //增项类别(1 物资类,2 基建类,3 技术服务类)
-          Remark: '',//备注
+          Remark: '', //备注
         },
-        dialogVisible: false,//增项分类dialog
+        dialogVisible: false, //增项分类dialog
         dialogTitle: '',
         dialogFormData: {
           Id: '',
-          SupplierId: 1,//供方表ID
-          SupplierCertId: 1,//供方证书表ID
-          SupplierCertAppendId: '',//增项信息表ID
-          SubClassId: 2,//分类表主键(物资类或基建类或技术服务类)
-          SortFlag: '',//分类标记
-          Code: '',//分类编码
-          Name: '',//分类名称
-          Remark: '',//备注
+          SupplierId: 1, //供方表ID
+          SupplierCertId: 1, //供方证书表ID
+          SupplierCertAppendId: '', //增项信息表ID
+          SubClassId: 2, //分类表主键(物资类或基建类或技术服务类)
+          SortFlag: '', //分类标记
+          Code: '', //分类编码
+          Name: '', //分类名称
+          Remark: '', //备注
         },
         //列表数据
         entityList: [],
@@ -232,6 +285,13 @@
             trigger: 'blur'
           }],
         },
+        shenheForm: {
+          SuccessStatus: 1,
+          AuditorRemark: '',
+          AppendId: 0
+        },
+        AppendId: '', //传的参数
+        serviceId: '',
         Id: '', //传的参数
         editFlag: '', //编辑操作标记
       }
@@ -240,11 +300,9 @@
       // this.serviceType = this.$route.params.opera //获取服务类型
       this.Id = this.$route.query.Id
       this.editFlag = this.$route.query.editFlag
-      if(this.editFlag == '1' && this.Id !== '') {
-        this.getEntityById()
-        this.dialogFormData.SupplierCertAppendId = this.Id
-        this.getSortList()
-      }
+      this.getEntityById()
+      this.dialogFormData.SupplierCertAppendId = this.Id
+      this.getSortList()
       this.getOrgTreeList() //获取推荐单位层级列表
       this.getTechTreeList() //获取技术服务类层级列表
       this.getSupplierList() //获取供应方公司列表
@@ -279,25 +337,6 @@
             console.error(err)
           })
       },
-      //提交审批
-      AuditEntity() {
-        apiCert.auditEntityappend(this.Id, this.$axios).then(res => {
-          if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            });
-          } else {
-            this.$message({
-              type: 'warning',
-              message: res.data.message
-            });
-          }
-        }).catch(err => {
-          console.error(err)
-        });
-      },
 
       //获取技术服务类层级列表
       getTechTreeList() {
@@ -312,10 +351,10 @@
       },
 
       //获取SupplierId和SupplierCertId
-      getInfo(vId) {//这个vId也就是value值
+      getInfo(vId) { //这个vId也就是value值
         let obj = {}
-        obj = this.supplierList.find((item)=>{
-          return item.SupplierId === vId;//筛选出匹配数据
+        obj = this.supplierList.find((item) => {
+          return item.SupplierId === vId; //筛选出匹配数据
         })
         this.formData.SupplierId = parseInt(obj.SupplierId)
         this.formData.SupplierCertId = parseInt(obj.SupplierCertId)
@@ -325,7 +364,7 @@
       getCode(item) {
         let sortFlagStr = item.toString()
         this.dialogFormData.SortFlag = sortFlagStr
-        this.getCodeById(item[item.length-1]) //根据分类Id获取Code
+        this.getCodeById(item[item.length - 1]) //根据分类Id获取Code
       },
 
       //根据分类Id获取Code
@@ -351,12 +390,13 @@
         let _this = this
         api2.getEntityById(_this.Id, _this.$axios).then(res => {
           _this.formData = res.data
+          this.getDictOptions()
           //显示原推荐单位
           if (_this.formData.RecUnitFlag != null) {
             let arr = _this.formData.RecUnitFlag.split(',')
             let arr2 = []
             for (let i = 0; i < arr.length; i++) {
-               arr2.push(parseInt(arr[i]))
+              arr2.push(parseInt(arr[i]))
             }
             _this.selectedOrgList = arr2
           }
@@ -373,8 +413,8 @@
         this.$refs['EntityForm'].validate((valid) => {
           if (valid) {
             let arr = _this.$refs['tjdwCascader'].currentLabels
-            _this.formData.RecUnitName = arr[arr.length - 1]  //获取推荐单位名
-            if(_this.editFlag == '1' && _this.Id !== '') {
+            _this.formData.RecUnitName = arr[arr.length - 1] //获取推荐单位名
+            if (_this.editFlag == '1' && _this.Id !== '') {
               _this.updateData()
             } else {
               _this.addAppend()
@@ -443,16 +483,16 @@
               })
             }
           })
-        .catch(err => {
-          console.error(err)
-        })
+          .catch(err => {
+            console.error(err)
+          })
       },
 
       //添加增项分类
       addSortData() {
         let _this = this
         //先判断是否保存了增项信息
-        if(this.checkAppendSave()) {
+        if (this.checkAppendSave()) {
           _this.dialogTitle = '添加'
           _this.dialogVisible = true
           _this.selectedOptList = [] //置空,防止先修改再添加时的已选分类信息保留
@@ -474,7 +514,7 @@
           let arr = _this.dialogFormData.SortFlag.split(',')
           let arr2 = []
           for (let i = 0; i < arr.length; i++) {
-              arr2.push(parseInt(arr[i]))
+            arr2.push(parseInt(arr[i]))
           }
           _this.selectedOptList = arr2
         }
@@ -539,7 +579,7 @@
         }
         return true
       },
-      
+
       //添加增项分类信息
       addSortAppend() {
         let _this = this
@@ -570,30 +610,87 @@
       deleteData(Id) {
         let _this = this
         _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          api.deleteEntity(Id, _this.$axios)
-            .then(res => {
-              // response
-              if (res.data.code === 0) {
-                _this.$message({
-                  type: 'success',
-                  message: res.data.message
-                })
-                // 更新列表
-                this.getSortList()
-              } else {
-                _this.$message({
-                  type: 'warning',
-                  message: res.data.message
-                })
-              }
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            api.deleteEntity(Id, _this.$axios)
+              .then(res => {
+                // response
+                if (res.data.code === 0) {
+                  _this.$message({
+                    type: 'success',
+                    message: res.data.message
+                  })
+                  // 更新列表
+                  this.getSortList()
+                } else {
+                  _this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  })
+                }
+              })
+              .catch(() => {})
+          })
+          .catch(() => {})
+      },
+
+      getDictOptions() {
+        console.log("---this.formData----", this.formData)
+        suppapi.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)
+        })
+      },
+
+      allocationBtn() {
+        this.dialogAllocation = true
+      },
+      AuditEntity() {
+        this.dialogMakeSure = 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: '请选择审核人!'
             })
-            .catch(() => {})
+            return
+          }
+        }
+        this.checkstatus()
+      },
+
+      checkstatus() {
+        let params = this.shenheForm
+        console.log(this.shenheForm, '---this.shenheForm----')
+        api2.auditEntityFir(this.AppendId, this.auditer, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.getEntityById()
+            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)
         })
-        .catch(() => {})
       },
 
       //列表排序功能

+ 66 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/basisdataopera.vue

@@ -11,6 +11,8 @@
           <i class="icon icon-table2"></i> 编辑
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-right: 3px" @click="AuditdialogShow = true" v-if="formData.Id !='' && formData.Status == ''">提交审批
+          </el-button>
           <router-link :to="'/oilsupplier/supplierappend/basislist'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -132,6 +134,30 @@
       </el-pagination>
     </el-dialog>
 
+     <el-dialog title="选择审批单位" :visible.sync="AuditdialogShow" 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="AuditdialogShow = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="AuditEntity">确定</el-button>
+      </span>
+    </el-dialog>
+
   </div>
 </template>
 
@@ -139,6 +165,7 @@
   import {
     mapGetters
   } from 'vuex'
+  import suppapi from '@/api/oilsupplier/supplier'
   import api from '@/api/oilsupplier/supplierappendsub'
   import api2 from '@/api/oilsupplier/supplierappend'
 
@@ -166,6 +193,9 @@
         }
       }
       return {
+        AuditdialogShow: false,//提交审核弹框
+        organizeOption: [], // 审批部门
+        FirstAudit: '',
         supplierList: [], //供应方公司列表
         supplierOptions: '', //已选择的供应方公司列表
         // serviceType: '', //服务类型()
@@ -268,6 +298,7 @@
       this.getOrgTreeList() //获取推荐单位层级列表
       this.getBasisList() //获取基建类层级列表
       this.getSupplierList() //获取供应方公司列表
+      this.getDictOptions()
     },
     methods: {
 
@@ -588,6 +619,41 @@
         .catch(() => {})
       },
 
+      //提交审批
+       AuditEntity () {
+        api2.auditEntity(this.formData.Id, this.FirstAudit, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            this.getEntityById()
+            this.AuditdialogShow = false
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      getDictOptions () {
+        suppapi.getDictList(this.$axios).then(res => {
+          this.dictData = res.data.items
+          this.organizeOption = res.data.items['Organizes']
+          console.log("---this.organizeOption---",this.organizeOption)
+          /* this.UnitRelationOptions = res.data.items['UnitRelation']
+           this.getCityList(res.data.items['GaodeMapChinaAreas'])
+           this.CompanyTypeOptions = res.data.items['CompanyType'] */
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
       //列表排序功能
       orderby(column) {
         if (column.order == 'ascending') {

+ 66 - 20
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue

@@ -11,7 +11,8 @@
           <i class="icon icon-table2"></i> 编辑
         </span>
         <span style="float: right;">
-            <el-button type="primary" size="mini" @click="AuditEntity">提交审批</el-button>
+            <el-button type="primary" size="mini" style="margin-right: 3px" @click="AuditdialogShow = true" v-if="formData.Id !='' && formData.Status == ''">提交审批
+          </el-button>
           <router-link :to="'/oilsupplier/supplierappend/techlist'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -110,6 +111,30 @@
       </span>
     </el-dialog>
 
+     <el-dialog title="选择审批单位" :visible.sync="AuditdialogShow" 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="AuditdialogShow = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="AuditEntity">确定</el-button>
+      </span>
+    </el-dialog>
+
   </div>
 </template>
 
@@ -117,6 +142,7 @@
   import {
     mapGetters
   } from 'vuex'
+  import suppapi from '@/api/oilsupplier/supplier'
   import api from '@/api/oilsupplier/supplierappendsub'
   import api2 from '@/api/oilsupplier/supplierappend'
   import apiCert from '@/api/oilsupplier/suppliercert'
@@ -152,6 +178,9 @@
         }
       }
       return {
+        AuditdialogShow: false,//提交审核弹框
+        organizeOption: [], // 审批部门
+        FirstAudit: '',
         supplierList: [], //供应方公司列表
         supplierOptions: '', //已选择的供应方公司列表
         // serviceType: '', //服务类型()
@@ -248,6 +277,7 @@
       this.getOrgTreeList() //获取推荐单位层级列表
       this.getTechTreeList() //获取技术服务类层级列表
       this.getSupplierList() //获取供应方公司列表
+      this.getDictOptions()
     },
     methods: {
 
@@ -346,25 +376,6 @@
         }).catch(err => {
           console.error(err)
         })
-      },
-       //提交审批
-      AuditEntity() {
-        apiCert.auditEntityappend(this.Id, this.$axios).then(res => {
-          if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            });
-          } else {
-            this.$message({
-              type: 'warning',
-              message: res.data.message
-            });
-          }
-        }).catch(err => {
-          console.error(err)
-        });
       },
       //保存增项信息
       saveEntity() {
@@ -597,6 +608,41 @@
         .catch(() => {})
       },
 
+      //提交审批
+       AuditEntity () {
+        api2.auditEntity(this.formData.Id, this.FirstAudit, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            this.getEntityById()
+            this.AuditdialogShow = false
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      getDictOptions () {
+        suppapi.getDictList(this.$axios).then(res => {
+          this.dictData = res.data.items
+          this.organizeOption = res.data.items['Organizes']
+          console.log("---this.organizeOption---",this.organizeOption)
+          /* this.UnitRelationOptions = res.data.items['UnitRelation']
+           this.getCityList(res.data.items['GaodeMapChinaAreas'])
+           this.CompanyTypeOptions = res.data.items['CompanyType'] */
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
       //列表排序功能
       orderby(column) {
         if (column.order == 'ascending') {