浏览代码

增项初审

herozyw1 6 年之前
父节点
当前提交
e42702f457

+ 5 - 4
src/dashoo.cn/backend/api/business/oilsupplier/suppliercert/oilsuppliercertService.go

@@ -1,6 +1,9 @@
 package suppliercert
 
 import (
+	"strconv"
+	"strings"
+
 	"dashoo.cn/backend/api/business/auditsetting"
 	"dashoo.cn/backend/api/business/oilsupplier/classorgsetting"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
@@ -8,8 +11,6 @@ import (
 	. "dashoo.cn/backend/api/mydb"
 	"dashoo.cn/business2/userRole"
 	"github.com/go-xorm/xorm"
-	"strconv"
-	"strings"
 )
 
 type OilSupplierCertService struct {
@@ -100,13 +101,13 @@ func (s *OilSupplierCertService) SubmitOrgAudit(certId, wfName, wfNodeCode, user
 }
 
 //查询已经申请的准入记录
-func (s *OilSupplierCertService) IsCanApplyByExtOrganizeUser(applyType, departmentId, userId string, isCompanyUser int) (bool){
+func (s *OilSupplierCertService) IsCanApplyByExtOrganizeUser(applyType, departmentId, userId string, isCompanyUser int) bool {
 
 	/*parameterSvc := baseparameter.GetBaseparameterService(s.DBE) //取出外部门ID
 	extOrganizeId := parameterSvc.GetBaseparameterMessage("GFGL", "paramset", "ExtOrganizeId")
 	if extOrganizeId == departmentId {*/
 	if isCompanyUser == 1 {
-		where := " SupplierTypeCode = '" + applyType +"'"
+		where := " SupplierTypeCode = '" + applyType + "'"
 		where += " and CreateUserId = '" + userId + "'"
 		var model OilSupplierCert
 		count, _ := s.GetCount(&model, where)

+ 55 - 0
src/dashoo.cn/backend/api/business/oilsupplier/suppliercertappend/oilsuppliercertappend.go

@@ -21,6 +21,7 @@ type OilSupplierCertAppend struct {
 	CreateOn       time.Time `xorm:"DATETIME"`
 	CreateUserId   int       `xorm:"INT(10)"`
 	CreateBy       string    `xorm:"VARCHAR(50)"`
+	WorkflowId     string    `xorm:"VARCHAR(50)"` //工作流id
 	ModifiedOn     time.Time `xorm:"DATETIME"`
 	ModifiedUserId int       `xorm:"INT(10)"`
 	ModifiedBy     string    `xorm:"VARCHAR(50)"`
@@ -31,3 +32,57 @@ type Supplier struct {
 	SupplierCertId int
 	SupplierName   string
 }
+
+//11111
+type OilSupplierCert struct {
+	Id                int       `xorm:"not null pk autoincr INT(10)"`
+	SupplierId        int       `xorm:"not null comment('供方基本信息表主键') INT(10)"`
+	AccessCardNo      string    `xorm:"comment('准入证号') VARCHAR(20)"`
+	SupplierTypeCode  string    `xorm:"comment('准入类别代码(1 物资类,2 基建类,3 技术服务类)') VARCHAR(5)"`
+	SupplierTypeName  string    `xorm:"comment('准入类别名称(1 物资类,2 基建类,3 技术服务类)') VARCHAR(50)"`
+	RecUnitReason     string    `xorm:"comment('推荐单位的推荐意见') VARCHAR(800)"`
+	RecUnitPerson     string    `xorm:"comment('推荐单位负责人') VARCHAR(20)"`
+	RecDate           time.Time `xorm:"comment('推荐日期') DATETIME"`
+	RecUnitId         string    `xorm:"comment('推荐单位编码') VARCHAR(10)"`
+	RecUnitName       string    `xorm:"comment('推荐单位名称') VARCHAR(50)"`
+	Status            string    `xorm:"not null default '0' comment('状态标识(0未申请,1办理完毕)') VARCHAR(10)"`
+	BackReason        string    `xorm:"comment('退回原因') VARCHAR(50)"`
+	InFlag            string    `xorm:"default '0' comment('准入标识') VARCHAR(10)"`
+	EffectStartTime   time.Time `xorm:"comment('有效期起') DATETIME"`
+	EffectEndTime     time.Time `xorm:"comment('有效期止') DATETIME"`
+	AuditProcessNote  string    `xorm:"comment('办理过程备注') VARCHAR(100)"`
+	AuditDate         time.Time `xorm:"comment('审核日期') DATETIME"`
+	PayNotice         string    `xorm:"default '0' comment('交费通知') VARCHAR(2)"`
+	SupplierStatus    string    `xorm:"comment('供应商状态(null:正常,1中止,2终止)') VARCHAR(255)"`
+	MgrType           string    `xorm:"comment('供应商管理类型') VARCHAR(255)"`
+	Type              string    `xorm:"comment('供应商类型') VARCHAR(255)"`
+	MgrUnit           string    `xorm:"comment('管理单位') VARCHAR(255)"`
+	AddinTime         string    `xorm:"comment('准入日期') VARCHAR(255)"`
+	EffectTime        string    `xorm:"comment('生效日期') VARCHAR(255)"`
+	ApplyTime         string    `xorm:"comment('年审到期日期') VARCHAR(255)"`
+	SupplierNo        string    `xorm:"comment('供应商准入证编号') VARCHAR(255)"`
+	MdmFlag           string    `xorm:"default '0' comment('MDM标志') VARCHAR(2)"`
+	InternalFlag      string    `xorm:"comment('国内采购') VARCHAR(255)"`
+	ImportFlag        string    `xorm:"comment('进口采购') VARCHAR(255)"`
+	OutsideFlog       string    `xorm:"comment('境外项目') VARCHAR(255)"`
+	Step              int       `xorm:"comment('页面上第几步') INT(10)"`
+	Remark            string    `xorm:"comment('备注') VARCHAR(500)"`
+	IsDelete          int       `xorm:"default 0 comment('删除状态,0正常,1已删除') INT(10)"`
+	WorkerTotal       int       `xorm:"default 0 comment('企业员工总数') INT(10)"`
+	ContractNum       int       `xorm:"default 0 comment('合同化用工数量') INT(10)"`
+	UniversityNum     int       `xorm:"default 0 comment('大学及以上学历人员数量') INT(10)"`
+	TechnicalNum      int       `xorm:"default 0 comment('技术、管理人员数量') INT(10)"`
+	AboveProfNum      int       `xorm:"default 0 comment('高级及以上职称人员数量') INT(10)"`
+	MiddleProfNum     int       `xorm:"default 0 comment('中级职称人员数量') INT(10)"`
+	NationalRegNum    int       `xorm:"default 0 comment('具有国家注册执业资格人员数量') INT(10)"`
+	NationalCertTotal int       `xorm:"default 0 comment('具有国家注册执业资格证书总数') INT(10)"`
+	DesignerTotal     int       `xorm:"default 0 comment('设计人员总数') INT(10)"`
+	SkillerTotal      int       `xorm:"default 0 comment('技术工人总数') INT(10)"`
+	WorkflowId        string    `xorm:"default '0' comment('工作流的ID') VARCHAR(255)"`
+	CreateOn          time.Time `xorm:"DATETIME"`
+	CreateUserId      int       `xorm:"INT(10)"`
+	CreateBy          string    `xorm:"VARCHAR(50)"`
+	ModifiedOn        time.Time `xorm:"DATETIME"`
+	ModifiedUserId    int       `xorm:"INT(10)"`
+	ModifiedBy        string    `xorm:"VARCHAR(50)"`
+}

+ 88 - 0
src/dashoo.cn/backend/api/business/oilsupplier/suppliercertappend/oilsuppliercertappendService.go

@@ -1,7 +1,17 @@
 package suppliercertappend
 
 import (
+	"fmt"
+	"strconv"
+	"strings"
+
+	"dashoo.cn/backend/api/business/auditsetting"
+	"dashoo.cn/backend/api/business/oilsupplier/classorgsetting"
+	"dashoo.cn/backend/api/business/oilsupplier/suppliercertappendsub"
+	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
+	"dashoo.cn/backend/api/business/workflow"
 	. "dashoo.cn/backend/api/mydb"
+	"dashoo.cn/business2/userRole"
 	"github.com/go-xorm/xorm"
 )
 
@@ -14,3 +24,81 @@ func GetOilSupplierCertAppendService(xormEngine *xorm.Engine) *OilSupplierCertAp
 	s.DBE = xormEngine
 	return s
 }
+
+//通用多部门多实例审核方法
+func (s *OilSupplierCertAppendService) SubmitOrgAudit(certId, wfName, wfNodeCode, userId, result, remarks, OilSupplierCertSubName, OilClassOrgSettingName string) (processInstanceId string) {
+	//取出审批列表
+	var supplierCert OilSupplierCertAppend
+	s.GetEntityById(certId, &supplierCert)
+
+	//取出准入分类列表
+	var subList []suppliercertappendsub.OilSupplierCertAppendSub
+	certSubSrv := suppliercertsub.GetOilSupplierCertSubService(s.DBE)
+	subWhere := " 1=1 "
+	subWhere += " and SupplierCertAppendId='" + certId + "'"
+	certSubSrv.GetEntitysByWhere(OilSupplierCertSubName, subWhere, &subList)
+	var subClassIds string
+	for _, certSub := range subList {
+		subClassIds += strconv.Itoa(certSub.SubClassId) + ","
+	}
+	subClassIds = strings.Trim(subClassIds, ",")
+	if len(subClassIds) <= 0 {
+		panic("没有选择准入分类")
+	}
+
+	//取出审核部门
+	classorgSrv := classorgsetting.GetOilClassOrgSettingService(s.DBE)
+	var list []classorgsetting.OilClassOrgSetting
+	var orgListStr string
+	var where string
+	where += " 1=1 "
+	subWhere += " and SupplierTypeCode='" + supplierCert.AppendType + "'"
+	where += " and ClassId in (" + subClassIds + ")"
+	where += " and AuditStepCode = '" + wfNodeCode + "'"
+	classorgSrv.GetEntitysByWhere(OilClassOrgSettingName, where, &list)
+	if len(list) <= 0 {
+		panic("未配置准入分类审批部门")
+	}
+
+	subClassIdsCheck := subClassIds + ","
+	//拼接工作流的需要审批的部门及部门相关的审核人员信息
+	var orgAudits []workflow.MultiOrgAuditVM
+	userSvc := userRole.GetUserService(s.DBE)
+	auditSrv := auditsetting.GetOilAuditSettingService(s.DBE)
+	for _, certsetting := range list {
+		var auditSetting auditsetting.Base_OilAuditSetting
+		var orgAudit workflow.MultiOrgAuditVM
+		orgAudit.OrgId = strconv.Itoa(certsetting.OrganizeId)
+		orgAudit.OrgName = certsetting.OrganizeName
+
+		auditWhere := " 1=1 "
+		auditWhere += " and OrganizeId = '" + strconv.Itoa(certsetting.OrganizeId) + "'"
+		auditWhere += " and AuditStepCode = '" + wfNodeCode + "'"
+		auditSrv.GetEntity(&auditSetting, auditWhere)
+		userIds := userSvc.GetUserIdsByRoleId(strconv.Itoa(auditSetting.RoleId))
+		tempstr := strings.Join(userIds, ",")
+		orgAudit.UserIds = strings.Replace(tempstr, "uid_", "", -1)
+		orgAudits = append(orgAudits, orgAudit)
+
+		orgListStr += "org_" + strconv.Itoa(certsetting.OrganizeId) + ","
+		//排除未设置部门的分类
+		subClassIdsCheck = strings.Replace(subClassIdsCheck, strconv.Itoa(certsetting.ClassId)+",", "", 1)
+	}
+	orgListStr = strings.Trim(orgListStr, ",")
+	if len(subClassIdsCheck) > 0 {
+		panic("存在准入分类 " + subClassIdsCheck + " 未设置审核部门")
+	}
+	if len(orgListStr) <= 0 {
+		panic("未找到审核部门")
+	}
+	//多实例工作流
+	svcActiviti := workflow.GetActivitiService(s.DBE)
+	if supplierCert.WorkflowId == "0" || len(supplierCert.WorkflowId) <= 0 {
+		//启动工作流
+		fmt.Println("-=========certId=========", certId)
+		processInstanceId = svcActiviti.StartProcess(wfName, certId, userId)
+	}
+	//多实例提交给下一步
+	svcActiviti.MultiTaskComplete(wfName, certId, "", orgAudits, userId, result, remarks)
+	return processInstanceId
+}

+ 1 - 1
src/dashoo.cn/backend/api/business/oilsupplier/suppliercertappendsub/oilsuppliercertappendsub.go

@@ -9,7 +9,7 @@ type OilSupplierCertAppendSub struct {
 	SupplierId           int       `xorm:"not null comment('供方基本信息表主键') INT(10)"`
 	SupplierCertId       int       `xorm:"not null comment('供方准入证书信息表主键') INT(10)"`
 	SupplierCertAppendId int       `xorm:"not null comment('增项信息表ID') INT(10)"`
-	SubclassId           int       `xorm:"not null comment('分类表主键(物资类或基建类或技术服务类)') INT(10)"`
+	SubClassId           int       `xorm:"not null comment('分类表主键(物资类或基建类或技术服务类)') INT(10)"`
 	SortFlag             string    `xorm:"not null default '' comment('分类标记') VARCHAR(100)"`
 	Code                 string    `xorm:"not null default '' comment('分类编码') VARCHAR(50)"`
 	Name                 string    `xorm:"not null default '' comment('分类名称') VARCHAR(50)"`

+ 17 - 0
src/dashoo.cn/backend/api/business/oilsupplier/suppliercertsub/oilsuppliercertsub.go

@@ -22,6 +22,23 @@ type OilSupplierCertSub struct {
 	ModifiedBy       string    `xorm:"VARCHAR(50)"`
 }
 
+type OilSupplierCertAppendSub struct {
+	Id             int       `xorm:"not null pk autoincr INT(10)"`
+	SupplierId     int       `xorm:"not null comment('供方基本信息表主键') INT(10)"`
+	SupplierCertId int       `xorm:"not null comment('供方准入证书信息表主键') INT(10)"`
+	SubClassId     int       `xorm:"not null comment('分类表主键(物资类或基建类或技术服务类)') INT(10)"`
+	Code           string    `xorm:"not null default '' comment('分类编码') VARCHAR(8)"`
+	Name           string    `xorm:"not null default '' comment('分类名称') VARCHAR(50)"`
+	Remark         string    `xorm:"comment('备注') VARCHAR(500)"`
+	IsDelete       int       `xorm:"default 0 comment('删除状态,0正常,1已删除') INT(10)"`
+	CreateOn       time.Time `xorm:"DATETIME created"`
+	CreateUserId   int       `xorm:"INT(10)"`
+	CreateBy       string    `xorm:"VARCHAR(50)"`
+	ModifiedOn     time.Time `xorm:"DATETIME"`
+	ModifiedUserId int       `xorm:"INT(10)"`
+	ModifiedBy     string    `xorm:"VARCHAR(50)"`
+}
+
 type OilSupplierOpinion struct {
 	Id                int       `xorm:"not null pk autoincr INT(10)"`
 	SupplierId        int       `xorm:"not null comment('供方基本信息表主键') INT(10)"`

+ 13 - 12
src/dashoo.cn/backend/api/business/workflow/workflow.go

@@ -47,25 +47,26 @@ type WordTemplateVM struct {
 }
 
 type MultiActiCompleteVM struct {
-	ProcessKey  	string 				`json:"processKey"`
-	BusinessKey 	string 				`json:"businessKey"`
-	UserNames   	string 				`json:"userNames"`
-	UserId      	string 				`json:"userId"`
-	Result      	string 				`json:"result"`
-	Remarks     	string 				`json:"remarks"`
-	MultiOrgAudits 	[]MultiOrgAuditVM 	`json:"multiOrgAudits"`
+	ProcessKey     string            `json:"processKey"`
+	BusinessKey    string            `json:"businessKey"`
+	UserNames      string            `json:"userNames"`
+	UserId         string            `json:"userId"`
+	Result         string            `json:"result"`
+	Remarks        string            `json:"remarks"`
+	MultiOrgAudits []MultiOrgAuditVM `json:"multiOrgAudits"`
 }
 
 type MultiOrgAuditVM struct {
-	OrgId     string    `json:"orgId"`
-	OrgName   string    `json:"orgName"`
-	UserIds   string   `json:"userIds"`
+	OrgId   string `json:"orgId"`
+	OrgName string `json:"orgName"`
+	UserIds string `json:"userIds"`
 }
 
 const (
-	//供方准入、增项业务流程图
+	//供方准入流程图
 	OIL_SUPPLIER_APPLY string = "oil_supplier_apply"
-
+	//增项业务
+	OIL_SUPPLIER_APPEND string = "oil_supplier_append"
 	//业务步骤编码
 	FIRST_TRIAL string = "FIRST_TRIAL"
 

+ 48 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -2,6 +2,7 @@ package oilsupplier
 
 import (
 	"encoding/json"
+	"fmt"
 	"strings"
 	"time"
 
@@ -9,6 +10,7 @@ import (
 
 	"dashoo.cn/backend/api/business/baseUser"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
+	"dashoo.cn/backend/api/business/oilsupplier/suppliercertappend"
 	. "dashoo.cn/backend/api/controllers"
 	"dashoo.cn/business2/userRole"
 	"dashoo.cn/utils"
@@ -513,7 +515,7 @@ func (this *OilSupplierCertController) AuditEntity() {
 	//取出审批列表
 	certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
 	processInstanceId := certSrv.SubmitOrgAudit(certId, workflow.OIL_SUPPLIER_APPLY, workflow.FIRST_TRIAL, this.User.Id, "1", "提交给二级单位初审", OilSupplierCertSubName, OilClassOrgSettingName)
-
+	fmt.Println("-----------processInstanceId------------", processInstanceId)
 	//记下workflowID(首次提交时才会记录,中间状态请忽略) 及审批状态
 	var supplierCertEntity suppliercert.OilSupplierCert
 	certSrv.GetEntityById(certId, supplierCertEntity)
@@ -529,7 +531,7 @@ func (this *OilSupplierCertController) AuditEntity() {
 	certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
 }
 
-// @Title 准入初审提交审批
+// @Title 专业审批
 // @Description 准入初审提交审批
 // @Success	200	{object} controllers.Request
 // @router /admission/:id [post]
@@ -564,6 +566,50 @@ func (this *OilSupplierCertController) AuditEntityadmission() {
 	certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
 }
 
+// @Title 增项审批
+// @Description 提交审批
+// @Success	200	{object} controllers.Request
+// @router /auditappend/:id [post]
+func (this *OilSupplierCertController) AuditEntityappend() {
+	certId := this.Ctx.Input.Param(":id")
+	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()
+		}
+	}()
+	var IsCompanyU string
+	if this.User.IsCompanyUser == 1 {
+		IsCompanyU = "0"
+	} else if this.User.IsCompanyUser == 0 {
+		IsCompanyU = "1"
+	}
+	//取出审批列表
+	certSrv := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
+	processInstanceId := certSrv.SubmitOrgAudit(certId, workflow.OIL_SUPPLIER_APPEND, workflow.FIRST_TRIAL, this.User.Id, IsCompanyU, "提交增项初审", OilSupplierCertAppendSubName, OilClassOrgSettingName)
+	fmt.Println("--------processInstanceId--------", processInstanceId)
+	//记下workflowID(首次提交时才会记录,中间状态请忽略) 及审批状态
+	var supplierCertAppendEntity suppliercertappend.OilSupplierCertAppend
+	certSrv.GetEntityById(certId, supplierCertAppendEntity)
+	supplierCertAppendEntity.WorkflowId = processInstanceId + ""
+	supplierCertAppendEntity.Status = suppliercert.FIRST_TRIAL_STATUS //二级单位初审
+	cols := []string{
+		"Id",
+		"WorkflowId",
+		"Status",
+	}
+	certSrv.UpdateEntityByIdCols(certId, supplierCertAppendEntity, cols)
+}
+
 //// @Title 提交二级审批
 //// @Description 提交二级审批
 //// @Param 	body body suppliercert.OilSupplierCert

+ 8 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/suppliercert.js

@@ -50,10 +50,18 @@ export default {
       method: 'post'
     })
   },
+  // 专业审批
   auditEntityadmission (entityId, myAxios) {
     return myAxios({
       url: '/suppliercert/admission/' + entityId,
       method: 'post'
     })
+  },
+  // 增项审批
+  auditEntityappend (entityId, myAxios) {
+    return myAxios({
+      url: '/suppliercert/auditappend/' + entityId,
+      method: 'post'
+    })
   }
 }

+ 614 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/basisdataopera.vue

@@ -0,0 +1,614 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/supplierappend/basislist' }">基建类列表</el-breadcrumb-item>
+      <el-breadcrumb-item>编辑</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 编辑
+        </span>
+        <span style="float: right;">
+          <router-link :to="'/oilsupplier/supplierappend/basislist'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+        </span>
+      </div>
+      <div>
+        <el-card class="box-card">
+          <div slot="header">
+            <span><i class="icon icon-table2"></i> 增项信息</span>
+            <el-button style="float: right; padding: 3px 0" type="text" @click="saveEntity()">保存信息</el-button>
+          </div>
+          <el-form label-width="150px" ref="EntityForm" :rules="appendRules" :model="formData">
+            <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>
+                </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"
+                      :value="item.SupplierId">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <!-- <el-col :span="12">
+                <el-form-item label="推荐单位编码" prop="RecUnitId">
+                  <el-input v-model="formData.RecUnitId" placeholder="请输入推荐单位编码"></el-input>
+                </el-form-item>
+              </el-col> -->
+              <el-col :span="24">
+                <el-form-item label="备注" prop="Remark">
+                  <el-input type="textarea" v-model="formData.Remark" placeholder="请输入"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </el-card>
+        <!-- 增项分类列表 -->
+        <el-card class="box-card" style="margin-top: 10px;">
+          <div slot="header">
+            <span><i class="icon icon-table2"></i> 增项分类</span>
+            <el-button style="float: right; padding: 3px 0" type="text" @click="addSortData()">添加</el-button>
+          </div>
+          <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>
+              </template>
+            </el-table-column>
+            <el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
+            <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>
+        </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-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>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="分类编码" prop="Code">
+              <el-input v-model="dialogFormData.Code" placeholder="请输入分类编码" disabled></el-input>
+            </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>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="cancelOption()">取 消</el-button>
+        <el-button size="mini" type="primary" @click="ensureOption()">确 定</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  import api from '@/api/oilsupplier/supplierappendsub'
+  import api2 from '@/api/oilsupplier/supplierappend'
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'oilsuppliercertappendsub',
+
+    data() {
+      var CheckSelectedOption = (rule, value, callback) => {
+        if (this.selectedOrgList && this.selectedOrgList.length < 1) {
+          callback(new Error('请选择推荐单位'))
+        } else {
+          callback()
+        }
+      }
+      var CheckSelectedOption2 = (rule, value, callback) => {
+        if (this.selectedOptList && this.selectedOptList.length < 1) {
+          callback(new Error('请选择增项'))
+        } else {
+          callback()
+        }
+      }
+      var CheckSelectedOption3 = (rule, value, callback) => {
+        if (this.supplierOptions === '') {
+          callback(new Error('请选择供应方公司'))
+        } else {
+          callback()
+        }
+      }
+      return {
+        supplierList: [], //供应方公司列表
+        supplierOptions: '', //已选择的供应方公司列表
+        // serviceType: '', //服务类型()
+        optionsList: [], //增项分类层级列表
+        selectedOptList: [], //已选择的增项分类列表
+        orgtreeprops: {
+          value: 'id',
+          label: 'Name',
+          children: 'children'
+        },
+        organizeTreeList: [], //推荐单位层级列表
+        selectedOrgList: [], //已选择的单位列表
+        organizeTreeProps: {
+          value: 'id',
+          label: 'Fullname',
+          children: 'children'
+        },
+        organizeform: {
+          IsInnerOrganize: 1,
+          parentid: 0,
+          fullname: '',
+          description: '',
+          id: 0
+        },
+        //增项信息表
+        formData: {
+          Id: '',
+          SupplierId: 1,
+          SupplierCertId: 1,
+          RecUnitFlag: '',//推荐单位的级联Id标记
+          RecUnitId: '', //推荐单位编码
+          RecUnitName: '', //推荐单位名称
+          AppendType: '', //增项类别(1 物资类,2 基建类,3 技术服务类)
+          Remark: '',//备注
+        },
+        dialogVisible: false,//增项分类dialog
+        dialogTitle: '',
+        dialogFormData: {
+          Id: '',
+          SupplierId: 1,//供方表ID
+          SupplierCertId: 1,//供方证书表ID
+          SupplierCertAppendId: '',//增项信息表ID
+          SubClassId: 2,//分类表主键(物资类或基建类或技术服务类)
+          SortFlag: '',//分类标记
+          Code: '',//分类编码
+          Name: '',//分类名称
+          Remark: '',//备注
+        },
+        //列表数据
+        entityList: [],
+        //分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+        //列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        //增项表单规则
+        appendRules: {
+          checkSelectedRecUnitName: [{
+            required: true,
+            validator: CheckSelectedOption,
+            trigger: 'blur'
+          }],
+          checkSelectedSupplier: [{
+            required: true,
+            validator: CheckSelectedOption3,
+            trigger: 'blur'
+          }],
+        },
+        //增项分类表单规则
+        sortEntityFormRules: {
+          checkSelectedOptList: [{
+            required: true,
+            validator: CheckSelectedOption2,
+            trigger: 'blur'
+          }],
+        },
+        Id: '', //传的参数
+        editFlag: '', //编辑操作标记
+      }
+    },
+    created() {
+      // 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.getOrgTreeList() //获取推荐单位层级列表
+      this.getTechTreeList() //获取技术服务类层级列表
+      this.getSupplierList() //获取供应方公司列表
+    },
+    methods: {
+
+      //获取推荐单位列表
+      getOrgTreeList() {
+        let _this = this
+        let params = {
+          IsInnerOrganize: this.organizeform.IsInnerOrganize
+        }
+        _this.$axios.get('organizes/list', {
+            params
+          })
+          .then(res => {
+            _this.organizeTreeList = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //获取供应方公司列表
+      getSupplierList() {
+        let _this = this
+        _this.$axios.get('/suppliercertappend/getsupplier/' + '2', {})
+          .then(res => {
+            _this.supplierList = res.data
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //获取技术服务类层级列表
+      getTechTreeList() {
+        let _this = this
+        this.$axios.get('technologyservice/businesslist', {})
+          .then(res => {
+            _this.optionsList = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId', 'Id,Name')
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //获取SupplierId和SupplierCertId
+      getInfo(vId) {//这个vId也就是value值
+        let obj = {}
+        obj = this.supplierList.find((item)=>{
+          return item.SupplierId === vId;//筛选出匹配数据
+        })
+        this.formData.SupplierId = parseInt(obj.SupplierId)
+        this.formData.SupplierCertId = parseInt(obj.SupplierCertId)
+      },
+
+      //获取分类级联Id
+      getCode(item) {
+        let sortFlagStr = item.toString()
+        this.dialogFormData.SortFlag = sortFlagStr
+        this.getCodeById(item[item.length-1]) //根据分类Id获取Code
+      },
+
+      //根据分类Id获取Code
+      getCodeById(Id) {
+        let _this = this
+        this.$axios.get('technologyservice/getcode/' + Id, {})
+          .then(res => {
+            _this.dialogFormData.Code = res.data.items[0].Code
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //获取推荐单位级联Id
+      getCode2(item) {
+        let codeStr = item.toString()
+        this.formData.RecUnitFlag = codeStr
+      },
+
+      //获取需要修改的增项信息
+      getEntityById() {
+        let _this = this
+        api2.getEntityById(_this.Id, _this.$axios).then(res => {
+          _this.formData = res.data
+          //显示原推荐单位
+          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]))
+            }
+            _this.selectedOrgList = arr2
+          }
+          //显示公司名
+          _this.supplierOptions = _this.formData.SupplierId.toString()
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      //保存增项信息
+      saveEntity() {
+        let _this = this
+        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.updateData()
+            } else {
+              _this.addAppend()
+            }
+          } else {
+            return false
+          }
+        })
+      },
+
+      //更新增项信息
+      updateData() {
+        let _this = this
+        api2.updateEntity(_this.Id, _this.formData, _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)
+        })
+      },
+
+      //获取增项分类表
+      getSortList() {
+        //分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+          SupplierCertAppendId: this.dialogFormData.SupplierCertAppendId,
+        };
+        //访问接口
+        api.getList(params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      //添加增项信息
+      addAppend() {
+        let _this = this
+        _this.formData.AppendType = '2'
+        _this.$axios.post('/suppliercertappend/addappend/', _this.formData)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.dialogFormData.SupplierCertAppendId = res.data.item //接收插入数据后返回的Id
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+        .catch(err => {
+          console.error(err)
+        })
+      },
+
+      //添加增项分类
+      addSortData() {
+        let _this = this
+        //先判断是否保存了增项信息
+        if(this.checkAppendSave()) {
+          _this.dialogTitle = '添加'
+          _this.dialogVisible = true
+          _this.selectedOptList = [] //置空,防止先修改再添加时的已选分类信息保留
+          _this.dialogFormData.Id = ''
+          _this.dialogFormData.SortFlag = ''
+          _this.dialogFormData.Code = ''
+          _this.dialogFormData.Remark = ''
+        }
+      },
+
+      //编辑增项分类
+      editSortData(row) {
+        let _this = this
+        _this.dialogTitle = '编辑'
+        _this.dialogVisible = true
+        _this.dialogFormData = row
+        //显示原增项结构
+        if (_this.dialogFormData.SortFlag != null) {
+          let arr = _this.dialogFormData.SortFlag.split(',')
+          let arr2 = []
+          for (let i = 0; i < arr.length; i++) {
+              arr2.push(parseInt(arr[i]))
+          }
+          _this.selectedOptList = arr2
+        }
+      },
+
+      //取消
+      cancelOption() {
+        let _this = this
+        _this.dialogVisible = false
+      },
+
+      //确定
+      ensureOption() {
+        this.$refs['dialogFormData'].validate((valid) => {
+          if (valid) {
+            let _this = this
+            if (_this.dialogTitle == '添加') {
+              let arr = []
+              arr = _this.$refs['cascader'].currentLabels //_this.$refs['cascader'].currentLabels获取当前级联选项的id对应的value
+              _this.dialogFormData.Name = arr[arr.length - 1]
+              _this.dialogFormData.SupplierCertAppendId = parseInt(_this.dialogFormData.SupplierCertAppendId)
+              _this.addSortAppend()
+            }
+            if (_this.dialogTitle == '编辑') {
+              let arr = []
+              arr = _this.$refs['cascader'].currentLabels
+              _this.dialogFormData.Name = arr[arr.length - 1]
+              api.updateEntity(_this.dialogFormData.Id, _this.dialogFormData, _this.$axios).then(res => {
+                if (res.data.code === 0) {
+                  this.$message({
+                    type: 'success',
+                    message: res.data.message
+                  });
+                  //关闭dialog
+                  _this.dialogVisible = false
+                  //更新列表
+                  this.getSortList()
+                } else {
+                  this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  });
+                }
+              }).catch(err => {
+                console.error(err)
+              })
+            }
+          } else {
+            return false
+          }
+        })
+      },
+
+      //判断是否保存了增项信息
+      checkAppendSave() {
+        if (this.dialogFormData.SupplierCertAppendId == '' && this.editFlag == null) {
+          this.$message({
+            type: 'error',
+            message: '无法执行该命令,请先保存增项信息!'
+          })
+          return false
+        }
+        return true
+      },
+      
+      //添加增项分类信息
+      addSortAppend() {
+        let _this = this
+        _this.$axios.post('/suppliercertappendsub/addappendsub/', _this.dialogFormData)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+              //关闭dialog
+              _this.dialogVisible = false
+              //更新增项分类表
+              _this.getSortList()
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //删除增项分类信息
+      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
+                })
+              }
+            })
+            .catch(() => {})
+        })
+        .catch(() => {})
+      },
+
+      //列表排序功能
+      orderby(column) {
+        if (column.order == 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order == 'descending') {
+          this.Column.Order = 'desc'
+        }
+        this.Column.Prop = column.prop
+        this.initData()
+      },
+      //分页功能
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.initData()
+      },
+      handleSizeChange(value) {
+        this.size = value
+        this.currentPage = 1
+        this.initData()
+      },
+
+      jstimehandle(val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+    }
+  }
+
+</script>

+ 614 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/goodsdataopera.vue

@@ -0,0 +1,614 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/supplierappend/goodslist' }">物资类列表</el-breadcrumb-item>
+      <el-breadcrumb-item>编辑</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 编辑
+        </span>
+        <span style="float: right;">
+          <router-link :to="'/oilsupplier/supplierappend/goodslist'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+        </span>
+      </div>
+      <div>
+        <el-card class="box-card">
+          <div slot="header">
+            <span><i class="icon icon-table2"></i> 增项信息</span>
+            <el-button style="float: right; padding: 3px 0" type="text" @click="saveEntity()">保存信息</el-button>
+          </div>
+          <el-form label-width="150px" ref="EntityForm" :rules="appendRules" :model="formData">
+            <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>
+                </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"
+                      :value="item.SupplierId">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <!-- <el-col :span="12">
+                <el-form-item label="推荐单位编码" prop="RecUnitId">
+                  <el-input v-model="formData.RecUnitId" placeholder="请输入推荐单位编码"></el-input>
+                </el-form-item>
+              </el-col> -->
+              <el-col :span="24">
+                <el-form-item label="备注" prop="Remark">
+                  <el-input type="textarea" v-model="formData.Remark" placeholder="请输入"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </el-card>
+        <!-- 增项分类列表 -->
+        <el-card class="box-card" style="margin-top: 10px;">
+          <div slot="header">
+            <span><i class="icon icon-table2"></i> 增项分类</span>
+            <el-button style="float: right; padding: 3px 0" type="text" @click="addSortData()">添加</el-button>
+          </div>
+          <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>
+              </template>
+            </el-table-column>
+            <el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
+            <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>
+        </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-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>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="分类编码" prop="Code">
+              <el-input v-model="dialogFormData.Code" placeholder="请输入分类编码" disabled></el-input>
+            </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>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="cancelOption()">取 消</el-button>
+        <el-button size="mini" type="primary" @click="ensureOption()">确 定</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  import api from '@/api/oilsupplier/supplierappendsub'
+  import api2 from '@/api/oilsupplier/supplierappend'
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'oilsuppliercertappendsub',
+
+    data() {
+      var CheckSelectedOption = (rule, value, callback) => {
+        if (this.selectedOrgList && this.selectedOrgList.length < 1) {
+          callback(new Error('请选择推荐单位'))
+        } else {
+          callback()
+        }
+      }
+      var CheckSelectedOption2 = (rule, value, callback) => {
+        if (this.selectedOptList && this.selectedOptList.length < 1) {
+          callback(new Error('请选择增项'))
+        } else {
+          callback()
+        }
+      }
+      var CheckSelectedOption3 = (rule, value, callback) => {
+        if (this.supplierOptions === '') {
+          callback(new Error('请选择供应方公司'))
+        } else {
+          callback()
+        }
+      }
+      return {
+        supplierList: [], //供应方公司列表
+        supplierOptions: '', //已选择的供应方公司列表
+        // serviceType: '', //服务类型()
+        optionsList: [], //增项分类层级列表
+        selectedOptList: [], //已选择的增项分类列表
+        orgtreeprops: {
+          value: 'id',
+          label: 'Name',
+          children: 'children'
+        },
+        organizeTreeList: [], //推荐单位层级列表
+        selectedOrgList: [], //已选择的单位列表
+        organizeTreeProps: {
+          value: 'id',
+          label: 'Fullname',
+          children: 'children'
+        },
+        organizeform: {
+          IsInnerOrganize: 1,
+          parentid: 0,
+          fullname: '',
+          description: '',
+          id: 0
+        },
+        //增项信息表
+        formData: {
+          Id: '',
+          SupplierId: 1,
+          SupplierCertId: 1,
+          RecUnitFlag: '',//推荐单位的级联Id标记
+          RecUnitId: '', //推荐单位编码
+          RecUnitName: '', //推荐单位名称
+          AppendType: '', //增项类别(1 物资类,2 基建类,3 技术服务类)
+          Remark: '',//备注
+        },
+        dialogVisible: false,//增项分类dialog
+        dialogTitle: '',
+        dialogFormData: {
+          Id: '',
+          SupplierId: 1,//供方表ID
+          SupplierCertId: 1,//供方证书表ID
+          SupplierCertAppendId: '',//增项信息表ID
+          SubClassId: 2,//分类表主键(物资类或基建类或技术服务类)
+          SortFlag: '',//分类标记
+          Code: '',//分类编码
+          Name: '',//分类名称
+          Remark: '',//备注
+        },
+        //列表数据
+        entityList: [],
+        //分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+        //列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        //增项表单规则
+        appendRules: {
+          checkSelectedRecUnitName: [{
+            required: true,
+            validator: CheckSelectedOption,
+            trigger: 'blur'
+          }],
+          checkSelectedSupplier: [{
+            required: true,
+            validator: CheckSelectedOption3,
+            trigger: 'blur'
+          }],
+        },
+        //增项分类表单规则
+        sortEntityFormRules: {
+          checkSelectedOptList: [{
+            required: true,
+            validator: CheckSelectedOption2,
+            trigger: 'blur'
+          }],
+        },
+        Id: '', //传的参数
+        editFlag: '', //编辑操作标记
+      }
+    },
+    created() {
+      // 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.getOrgTreeList() //获取推荐单位层级列表
+      this.getTechTreeList() //获取技术服务类层级列表
+      this.getSupplierList() //获取供应方公司列表
+    },
+    methods: {
+
+      //获取推荐单位列表
+      getOrgTreeList() {
+        let _this = this
+        let params = {
+          IsInnerOrganize: this.organizeform.IsInnerOrganize
+        }
+        _this.$axios.get('organizes/list', {
+            params
+          })
+          .then(res => {
+            _this.organizeTreeList = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //获取供应方公司列表
+      getSupplierList() {
+        let _this = this
+        _this.$axios.get('/suppliercertappend/getsupplier/' + '1', {})
+          .then(res => {
+            _this.supplierList = res.data
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //获取技术服务类层级列表
+      getTechTreeList() {
+        let _this = this
+        this.$axios.get('technologyservice/businesslist', {})
+          .then(res => {
+            _this.optionsList = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId', 'Id,Name')
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //获取SupplierId和SupplierCertId
+      getInfo(vId) {//这个vId也就是value值
+        let obj = {}
+        obj = this.supplierList.find((item)=>{
+          return item.SupplierId === vId;//筛选出匹配数据
+        })
+        this.formData.SupplierId = parseInt(obj.SupplierId)
+        this.formData.SupplierCertId = parseInt(obj.SupplierCertId)
+      },
+
+      //获取分类级联Id
+      getCode(item) {
+        let sortFlagStr = item.toString()
+        this.dialogFormData.SortFlag = sortFlagStr
+        this.getCodeById(item[item.length-1]) //根据分类Id获取Code
+      },
+
+      //根据分类Id获取Code
+      getCodeById(Id) {
+        let _this = this
+        this.$axios.get('technologyservice/getcode/' + Id, {})
+          .then(res => {
+            _this.dialogFormData.Code = res.data.items[0].Code
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //获取推荐单位级联Id
+      getCode2(item) {
+        let codeStr = item.toString()
+        this.formData.RecUnitFlag = codeStr
+      },
+
+      //获取需要修改的增项信息
+      getEntityById() {
+        let _this = this
+        api2.getEntityById(_this.Id, _this.$axios).then(res => {
+          _this.formData = res.data
+          //显示原推荐单位
+          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]))
+            }
+            _this.selectedOrgList = arr2
+          }
+          //显示公司名
+          _this.supplierOptions = _this.formData.SupplierId.toString()
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      //保存增项信息
+      saveEntity() {
+        let _this = this
+        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.updateData()
+            } else {
+              _this.addAppend()
+            }
+          } else {
+            return false
+          }
+        })
+      },
+
+      //更新增项信息
+      updateData() {
+        let _this = this
+        api2.updateEntity(_this.Id, _this.formData, _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)
+        })
+      },
+
+      //获取增项分类表
+      getSortList() {
+        //分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+          SupplierCertAppendId: this.dialogFormData.SupplierCertAppendId,
+        };
+        //访问接口
+        api.getList(params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      //添加增项信息
+      addAppend() {
+        let _this = this
+        _this.formData.AppendType = '1'
+        _this.$axios.post('/suppliercertappend/addappend/', _this.formData)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.dialogFormData.SupplierCertAppendId = res.data.item //接收插入数据后返回的Id
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+        .catch(err => {
+          console.error(err)
+        })
+      },
+
+      //添加增项分类
+      addSortData() {
+        let _this = this
+        //先判断是否保存了增项信息
+        if(this.checkAppendSave()) {
+          _this.dialogTitle = '添加'
+          _this.dialogVisible = true
+          _this.selectedOptList = [] //置空,防止先修改再添加时的已选分类信息保留
+          _this.dialogFormData.Id = ''
+          _this.dialogFormData.SortFlag = ''
+          _this.dialogFormData.Code = ''
+          _this.dialogFormData.Remark = ''
+        }
+      },
+
+      //编辑增项分类
+      editSortData(row) {
+        let _this = this
+        _this.dialogTitle = '编辑'
+        _this.dialogVisible = true
+        _this.dialogFormData = row
+        //显示原增项结构
+        if (_this.dialogFormData.SortFlag != null) {
+          let arr = _this.dialogFormData.SortFlag.split(',')
+          let arr2 = []
+          for (let i = 0; i < arr.length; i++) {
+              arr2.push(parseInt(arr[i]))
+          }
+          _this.selectedOptList = arr2
+        }
+      },
+
+      //取消
+      cancelOption() {
+        let _this = this
+        _this.dialogVisible = false
+      },
+
+      //确定
+      ensureOption() {
+        this.$refs['dialogFormData'].validate((valid) => {
+          if (valid) {
+            let _this = this
+            if (_this.dialogTitle == '添加') {
+              let arr = []
+              arr = _this.$refs['cascader'].currentLabels //_this.$refs['cascader'].currentLabels获取当前级联选项的id对应的value
+              _this.dialogFormData.Name = arr[arr.length - 1]
+              _this.dialogFormData.SupplierCertAppendId = parseInt(_this.dialogFormData.SupplierCertAppendId)
+              _this.addSortAppend()
+            }
+            if (_this.dialogTitle == '编辑') {
+              let arr = []
+              arr = _this.$refs['cascader'].currentLabels
+              _this.dialogFormData.Name = arr[arr.length - 1]
+              api.updateEntity(_this.dialogFormData.Id, _this.dialogFormData, _this.$axios).then(res => {
+                if (res.data.code === 0) {
+                  this.$message({
+                    type: 'success',
+                    message: res.data.message
+                  });
+                  //关闭dialog
+                  _this.dialogVisible = false
+                  //更新列表
+                  this.getSortList()
+                } else {
+                  this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  });
+                }
+              }).catch(err => {
+                console.error(err)
+              })
+            }
+          } else {
+            return false
+          }
+        })
+      },
+
+      //判断是否保存了增项信息
+      checkAppendSave() {
+        if (this.dialogFormData.SupplierCertAppendId == '' && this.editFlag == null) {
+          this.$message({
+            type: 'error',
+            message: '无法执行该命令,请先保存增项信息!'
+          })
+          return false
+        }
+        return true
+      },
+      
+      //添加增项分类信息
+      addSortAppend() {
+        let _this = this
+        _this.$axios.post('/suppliercertappendsub/addappendsub/', _this.dialogFormData)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+              //关闭dialog
+              _this.dialogVisible = false
+              //更新增项分类表
+              _this.getSortList()
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //删除增项分类信息
+      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
+                })
+              }
+            })
+            .catch(() => {})
+        })
+        .catch(() => {})
+      },
+
+      //列表排序功能
+      orderby(column) {
+        if (column.order == 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order == 'descending') {
+          this.Column.Order = 'desc'
+        }
+        this.Column.Prop = column.prop
+        this.initData()
+      },
+      //分页功能
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.initData()
+      },
+      handleSizeChange(value) {
+        this.size = value
+        this.currentPage = 1
+        this.initData()
+      },
+
+      jstimehandle(val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+    }
+  }
+
+</script>

+ 636 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/techdataopera.vue

@@ -0,0 +1,636 @@
+<template>
+  <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>
+    <el-card class="box-card">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 编辑
+        </span>
+        <span style="float: right;">
+          <el-button type="primary" size="mini" @click="AuditEntity">提交审批</el-button>
+          <router-link :to="'/oilsupplier/addtionaudit/techlist'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+        </span>
+      </div>
+      <div>
+        <el-card class="box-card">
+          <div slot="header">
+            <span><i class="icon icon-table2"></i> 增项信息</span>
+            <el-button style="float: right; padding: 3px 0" type="text" @click="saveEntity()">保存信息</el-button>
+          </div>
+          <el-form label-width="150px" ref="EntityForm" :rules="appendRules" :model="formData">
+            <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>
+                </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"
+                      :value="item.SupplierId">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <!-- <el-col :span="12">
+                <el-form-item label="推荐单位编码" prop="RecUnitId">
+                  <el-input v-model="formData.RecUnitId" placeholder="请输入推荐单位编码"></el-input>
+                </el-form-item>
+              </el-col> -->
+              <el-col :span="24">
+                <el-form-item label="备注" prop="Remark">
+                  <el-input type="textarea" v-model="formData.Remark" placeholder="请输入"></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </el-card>
+        <!-- 增项分类列表 -->
+        <el-card class="box-card" style="margin-top: 10px;">
+          <div slot="header">
+            <span><i class="icon icon-table2"></i> 增项分类</span>
+            <el-button style="float: right; padding: 3px 0" type="text" @click="addSortData()">添加</el-button>
+          </div>
+          <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>
+              </template>
+            </el-table-column>
+            <el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
+            <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>
+        </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-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>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="分类编码" prop="Code">
+              <el-input v-model="dialogFormData.Code" placeholder="请输入分类编码" disabled></el-input>
+            </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>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="cancelOption()">取 消</el-button>
+        <el-button size="mini" type="primary" @click="ensureOption()">确 定</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  import api from '@/api/oilsupplier/supplierappendsub'
+  import api2 from '@/api/oilsupplier/supplierappend'
+  import apiCert from '@/api/oilsupplier/suppliercert'
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'oilsuppliercertappendsub',
+
+    data() {
+      var CheckSelectedOption = (rule, value, callback) => {
+        if (this.selectedOrgList && this.selectedOrgList.length < 1) {
+          callback(new Error('请选择推荐单位'))
+        } else {
+          callback()
+        }
+      }
+      var CheckSelectedOption2 = (rule, value, callback) => {
+        if (this.selectedOptList && this.selectedOptList.length < 1) {
+          callback(new Error('请选择增项'))
+        } else {
+          callback()
+        }
+      }
+      var CheckSelectedOption3 = (rule, value, callback) => {
+        if (this.supplierOptions === '') {
+          callback(new Error('请选择供应方公司'))
+        } else {
+          callback()
+        }
+      }
+      return {
+        supplierList: [], //供应方公司列表
+        supplierOptions: '', //已选择的供应方公司列表
+        // serviceType: '', //服务类型()
+        optionsList: [], //增项分类层级列表
+        selectedOptList: [], //已选择的增项分类列表
+        orgtreeprops: {
+          value: 'id',
+          label: 'Name',
+          children: 'children'
+        },
+        organizeTreeList: [], //推荐单位层级列表
+        selectedOrgList: [], //已选择的单位列表
+        organizeTreeProps: {
+          value: 'id',
+          label: 'Fullname',
+          children: 'children'
+        },
+        organizeform: {
+          IsInnerOrganize: 1,
+          parentid: 0,
+          fullname: '',
+          description: '',
+          id: 0
+        },
+        //增项信息表
+        formData: {
+          Id: '',
+          SupplierId: 1,
+          SupplierCertId: 1,
+          RecUnitFlag: '',//推荐单位的级联Id标记
+          RecUnitId: '', //推荐单位编码
+          RecUnitName: '', //推荐单位名称
+          AppendType: '', //增项类别(1 物资类,2 基建类,3 技术服务类)
+          Remark: '',//备注
+        },
+        dialogVisible: false,//增项分类dialog
+        dialogTitle: '',
+        dialogFormData: {
+          Id: '',
+          SupplierId: 1,//供方表ID
+          SupplierCertId: 1,//供方证书表ID
+          SupplierCertAppendId: '',//增项信息表ID
+          SubClassId: 2,//分类表主键(物资类或基建类或技术服务类)
+          SortFlag: '',//分类标记
+          Code: '',//分类编码
+          Name: '',//分类名称
+          Remark: '',//备注
+        },
+        //列表数据
+        entityList: [],
+        //分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+        //列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        //增项表单规则
+        appendRules: {
+          checkSelectedRecUnitName: [{
+            required: true,
+            validator: CheckSelectedOption,
+            trigger: 'blur'
+          }],
+          checkSelectedSupplier: [{
+            required: true,
+            validator: CheckSelectedOption3,
+            trigger: 'blur'
+          }],
+        },
+        //增项分类表单规则
+        sortEntityFormRules: {
+          checkSelectedOptList: [{
+            required: true,
+            validator: CheckSelectedOption2,
+            trigger: 'blur'
+          }],
+        },
+        Id: '', //传的参数
+        editFlag: '', //编辑操作标记
+      }
+    },
+    created() {
+      // 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.getOrgTreeList() //获取推荐单位层级列表
+      this.getTechTreeList() //获取技术服务类层级列表
+      this.getSupplierList() //获取供应方公司列表
+    },
+    methods: {
+
+      //获取推荐单位列表
+      getOrgTreeList() {
+        let _this = this
+        let params = {
+          IsInnerOrganize: this.organizeform.IsInnerOrganize
+        }
+        _this.$axios.get('organizes/list', {
+            params
+          })
+          .then(res => {
+            _this.organizeTreeList = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //获取供应方公司列表
+      getSupplierList() {
+        let _this = this
+        _this.$axios.get('/suppliercertappend/getsupplier/' + '3', {})
+          .then(res => {
+            _this.supplierList = res.data
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      //提交审批
+      AuditEntity() {
+        apiCert.auditEntityappend(this.Id, 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)
+        });
+      },
+
+      //获取技术服务类层级列表
+      getTechTreeList() {
+        let _this = this
+        this.$axios.get('technologyservice/businesslist', {})
+          .then(res => {
+            _this.optionsList = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId', 'Id,Name')
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //获取SupplierId和SupplierCertId
+      getInfo(vId) {//这个vId也就是value值
+        let obj = {}
+        obj = this.supplierList.find((item)=>{
+          return item.SupplierId === vId;//筛选出匹配数据
+        })
+        this.formData.SupplierId = parseInt(obj.SupplierId)
+        this.formData.SupplierCertId = parseInt(obj.SupplierCertId)
+      },
+
+      //获取分类级联Id
+      getCode(item) {
+        let sortFlagStr = item.toString()
+        this.dialogFormData.SortFlag = sortFlagStr
+        this.getCodeById(item[item.length-1]) //根据分类Id获取Code
+      },
+
+      //根据分类Id获取Code
+      getCodeById(Id) {
+        let _this = this
+        this.$axios.get('technologyservice/getcode/' + Id, {})
+          .then(res => {
+            _this.dialogFormData.Code = res.data.items[0].Code
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //获取推荐单位级联Id
+      getCode2(item) {
+        let codeStr = item.toString()
+        this.formData.RecUnitFlag = codeStr
+      },
+
+      //获取需要修改的增项信息
+      getEntityById() {
+        let _this = this
+        api2.getEntityById(_this.Id, _this.$axios).then(res => {
+          _this.formData = res.data
+          //显示原推荐单位
+          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]))
+            }
+            _this.selectedOrgList = arr2
+          }
+          //显示公司名
+          _this.supplierOptions = _this.formData.SupplierId.toString()
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      //保存增项信息
+      saveEntity() {
+        let _this = this
+        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.updateData()
+            } else {
+              _this.addAppend()
+            }
+          } else {
+            return false
+          }
+        })
+      },
+
+      //更新增项信息
+      updateData() {
+        let _this = this
+        api2.updateEntity(_this.Id, _this.formData, _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)
+        })
+      },
+
+      //获取增项分类表
+      getSortList() {
+        //分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+          SupplierCertAppendId: this.dialogFormData.SupplierCertAppendId,
+        };
+        //访问接口
+        api.getList(params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      //添加增项信息
+      addAppend() {
+        let _this = this
+        _this.formData.AppendType = '3'
+        _this.$axios.post('/suppliercertappend/addappend/', _this.formData)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.dialogFormData.SupplierCertAppendId = res.data.item //接收插入数据后返回的Id
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+        .catch(err => {
+          console.error(err)
+        })
+      },
+
+      //添加增项分类
+      addSortData() {
+        let _this = this
+        //先判断是否保存了增项信息
+        if(this.checkAppendSave()) {
+          _this.dialogTitle = '添加'
+          _this.dialogVisible = true
+          _this.selectedOptList = [] //置空,防止先修改再添加时的已选分类信息保留
+          _this.dialogFormData.Id = ''
+          _this.dialogFormData.SortFlag = ''
+          _this.dialogFormData.Code = ''
+          _this.dialogFormData.Remark = ''
+        }
+      },
+
+      //编辑增项分类
+      editSortData(row) {
+        let _this = this
+        _this.dialogTitle = '编辑'
+        _this.dialogVisible = true
+        _this.dialogFormData = row
+        //显示原增项结构
+        if (_this.dialogFormData.SortFlag != null) {
+          let arr = _this.dialogFormData.SortFlag.split(',')
+          let arr2 = []
+          for (let i = 0; i < arr.length; i++) {
+              arr2.push(parseInt(arr[i]))
+          }
+          _this.selectedOptList = arr2
+        }
+      },
+
+      //取消
+      cancelOption() {
+        let _this = this
+        _this.dialogVisible = false
+      },
+
+      //确定
+      ensureOption() {
+        this.$refs['dialogFormData'].validate((valid) => {
+          if (valid) {
+            let _this = this
+            if (_this.dialogTitle == '添加') {
+              let arr = []
+              arr = _this.$refs['cascader'].currentLabels //_this.$refs['cascader'].currentLabels获取当前级联选项的id对应的value
+              _this.dialogFormData.Name = arr[arr.length - 1]
+              _this.dialogFormData.SupplierCertAppendId = parseInt(_this.dialogFormData.SupplierCertAppendId)
+              _this.addSortAppend()
+            }
+            if (_this.dialogTitle == '编辑') {
+              let arr = []
+              arr = _this.$refs['cascader'].currentLabels
+              _this.dialogFormData.Name = arr[arr.length - 1]
+              api.updateEntity(_this.dialogFormData.Id, _this.dialogFormData, _this.$axios).then(res => {
+                if (res.data.code === 0) {
+                  this.$message({
+                    type: 'success',
+                    message: res.data.message
+                  });
+                  //关闭dialog
+                  _this.dialogVisible = false
+                  //更新列表
+                  this.getSortList()
+                } else {
+                  this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  });
+                }
+              }).catch(err => {
+                console.error(err)
+              })
+            }
+          } else {
+            return false
+          }
+        })
+      },
+
+      //判断是否保存了增项信息
+      checkAppendSave() {
+        if (this.dialogFormData.SupplierCertAppendId == '' && this.editFlag == null) {
+          this.$message({
+            type: 'error',
+            message: '无法执行该命令,请先保存增项信息!'
+          })
+          return false
+        }
+        return true
+      },
+      
+      //添加增项分类信息
+      addSortAppend() {
+        let _this = this
+        _this.$axios.post('/suppliercertappendsub/addappendsub/', _this.dialogFormData)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+              //关闭dialog
+              _this.dialogVisible = false
+              //更新增项分类表
+              _this.getSortList()
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //删除增项分类信息
+      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
+                })
+              }
+            })
+            .catch(() => {})
+        })
+        .catch(() => {})
+      },
+
+      //列表排序功能
+      orderby(column) {
+        if (column.order == 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order == 'descending') {
+          this.Column.Order = 'desc'
+        }
+        this.Column.Prop = column.prop
+        this.initData()
+      },
+      //分页功能
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.initData()
+      },
+      handleSizeChange(value) {
+        this.size = value
+        this.currentPage = 1
+        this.initData()
+      },
+
+      jstimehandle(val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+    }
+  }
+
+</script>

+ 364 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/basislist.vue

@@ -0,0 +1,364 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/supplierappend/basislist' }">基建类列表</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card" style="height: calc(100vh - 115px);">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 基建类列表
+        </span>
+        <span style="float: right;">
+          <router-link :to="'/oilsupplier/supplierappend/2/basisdataopera'">
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">添加</el-button>
+          </router-link>
+        </span>
+        <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+          <el-form-item label="上报时间">
+            <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
+                            start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
+          </el-form-item>
+          <el-form-item>
+            <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
+              查询
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item command="search">高级查询</el-dropdown-item>
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </el-form-item>
+        </el-form>
+      </div>
+      <el-table :data="entityList" border height="calc(100vh - 243px)" 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="editData(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="ApplyDate" label="申请日期" sortable min-width="130" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ jstimehandle(scope.row.ApplyDate) }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="RecUnitName" label="推荐单位名称" sortable min-width="130" align="center" show-overflow-tooltip></el-table-column>
+        <!-- <el-table-column prop="RecUnitId" label="推荐单位编码" sortable min-width="130" align="center" show-overflow-tooltip></el-table-column> -->
+        <el-table-column prop="AppendType" label="增项类别" sortable min-width="130" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ checkAppendType(scope.row.AppendType) }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="DenyReason" label="退回原因" sortable min-width="130" align="center" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="AuditDate" label="审核日期" sortable min-width="130" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ jstimehandle(scope.row.AuditDate) }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="Status" label="状态标识" sortable min-width="130" align="center" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="Remark" label="备注" sortable min-width="130" align="center" 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>
+    </el-card>
+
+    <el-dialog title="高级查询" :visible.sync="dialogVisible" width="720px">
+      <el-form ref="advancedsearchForm" label-width="110px">
+        <el-row>
+
+          <el-col :span="24">
+            <el-form-item label="时间范围">
+              <el-date-picker size="mini" v-model="CreateOn" type="daterange" style="width:100%" range-separator="至"
+                              start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="申请日期">
+              <el-input size="mini" v-model="searchForm.ApplyDate" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="推荐单位名称">
+              <el-input size="mini" v-model="searchForm.RecUnitName" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="推荐单位编码">
+              <el-input size="mini" v-model="searchForm.RecUnitId" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="退回原因">
+              <el-input size="mini" v-model="searchForm.DenyReason" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="审核日期">
+              <el-input size="mini" v-model="searchForm.AuditDate" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="状态标识">
+              <el-input size="mini" v-model="searchForm.Status" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="备注">
+              <el-input size="mini" v-model="searchForm.Remark" style="width:100%" placeholder="请输入"></el-input>
+            </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="handleSearch">查 询</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+<script>
+  import { mapGetters } from 'vuex';
+  import api from '@/api/oilsupplier/supplierappend';
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'oilsuppliercertappend',
+
+    data() {
+      return {
+        dialogVisible: false,//高级查询
+        //列表数据
+        entityList: [],
+        //分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+        //列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        //查询起始时间(一月前开始)
+        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        //查询项
+        searchFormReset: {},
+        searchForm: {
+          Id: '',
+          SupplierId: '',
+          SupplierCertId: '',
+          ApplyDate: '',
+          RecUnitId: '',
+          RecUnitName: '',
+          AppendType: '2', //增项类别(1 物资类,2 基建类,3 技术服务类)
+          DenyReason: '',
+          AuditDate: '',
+          Status: '',
+          Remark: '',
+          IsDelete: '',
+          CreateOn: '',
+          CreateUserId: '',
+          CreateBy: '',
+          ModifiedOn: '',
+          ModifiedUserId: '',
+          ModifiedBy: '',
+        },
+        //修改
+        optionsList: [], //技术服务类层级选择列表
+        orgtreeprops: {
+          value: 'id',
+          label: 'Name',
+          children: 'children'
+        },
+      }
+    },
+    created() {
+      //查询条件初始值备份
+      Object.assign(this.searchFormReset, this.searchForm)
+      //查询列表
+      this.initData()
+    },
+    methods: {
+      initData() {
+        //分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+        }
+        let myCreateOn = []
+        // 解析时间
+        if (this.CreateOn.length == 2) {
+          this.CreateOn[1].setHours(23)
+          this.CreateOn[1].setMinutes(59)
+          this.CreateOn[1].setSeconds(59)
+          myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+          myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+        }
+        //查询条件
+        Object.assign(params, this.searchForm)
+        //访问接口
+        api.getList(myCreateOn.join(','), params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      //获取技术服务类层级列表
+      getTechTreeList() {
+        let _this = this
+        this.$axios.get('technologyservice/businesslist', {})
+          .then(res => {
+            _this.optionsList = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId', 'Id,Name')
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //编辑
+      editData(row) {
+        let _this = this
+        _this.$router.push({
+          path: `/oilsupplier/supplierappend/2/basisdataopera`,
+          query: {
+            Id: row.Id,
+            editFlag: 1 //编辑标记: 1 修改,0 不修改
+          }
+        })
+      },
+
+      //删除
+      deleteData(Id) {
+        let _this = this
+        _this.$confirm('此操作将彻底删除该数据, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+            api.deleteEntity(Id, _this.$axios)
+            .then(res => {
+              if (res.data.code === 0) {
+                _this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+                // 更新
+                this.initData()
+              } else {
+                _this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            })
+            .catch(() => {})
+          })
+          .catch(() => {})
+      },
+
+      searchCommand(command) {
+        if (command == 'search') {
+          this.dialogVisible = true
+        } else if (command == 'clear') {
+          this.clearSearch()
+        }
+      },
+
+      //列表排序功能
+      orderby(column) {
+        if (column.order == 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order == 'descending') {
+          this.Column.Order = 'desc'
+        }
+        this.Column.Prop = column.prop
+        this.initData()
+      },
+      clearSearch() {
+        Object.assign(this.searchForm, this.searchFormReset);
+        //this.searchForm = this.searchFormReset;
+        this.CreateOn = ''
+        this.initData()
+      },
+      handleSearch() {
+        this.currentPage = 1;
+        this.dialogVisible = false;
+        this.initData();
+      },
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.initData()
+      },
+      handleSizeChange(value) {
+        this.size = value
+        this.currentPage = 1
+        this.initData()
+      },
+
+      //判断增项类别,(1 物资类,2 基建类,3 技术服务类)
+      checkAppendType(val) {
+        if (val == '1') {
+          return '物资类'
+        } else if (val == '2') {
+          return '基建类'
+        } else if (val == '3') {
+          return '技术服务类'
+        }
+      },
+
+      jstimehandle(val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '0001-01-01T00:00:00Z') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 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;
+      }
+    }
+  }
+
+</script>
+
+<style lang="scss">
+  .el-pagination {
+    margin: 1rem 0 2rem;
+    text-align: right;
+  }
+</style>

+ 364 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/goodslist.vue

@@ -0,0 +1,364 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/supplierappend/goodslist' }">物资类列表</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card" style="height: calc(100vh - 115px);">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 物资类列表
+        </span>
+        <span style="float: right;">
+          <router-link :to="'/oilsupplier/supplierappend/1/goodsdataopera'">
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">添加</el-button>
+          </router-link>
+        </span>
+        <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+          <el-form-item label="上报时间">
+            <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
+                            start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
+          </el-form-item>
+          <el-form-item>
+            <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
+              查询
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item command="search">高级查询</el-dropdown-item>
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </el-form-item>
+        </el-form>
+      </div>
+      <el-table :data="entityList" border height="calc(100vh - 243px)" 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="editData(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="ApplyDate" label="申请日期" sortable min-width="130" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ jstimehandle(scope.row.ApplyDate) }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="RecUnitName" label="推荐单位名称" sortable min-width="130" align="center" show-overflow-tooltip></el-table-column>
+        <!-- <el-table-column prop="RecUnitId" label="推荐单位编码" sortable min-width="130" align="center" show-overflow-tooltip></el-table-column> -->
+        <el-table-column prop="AppendType" label="增项类别" sortable min-width="130" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ checkAppendType(scope.row.AppendType) }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="DenyReason" label="退回原因" sortable min-width="130" align="center" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="AuditDate" label="审核日期" sortable min-width="130" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ jstimehandle(scope.row.AuditDate) }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="Status" label="状态标识" sortable min-width="130" align="center" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="Remark" label="备注" sortable min-width="130" align="center" 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>
+    </el-card>
+
+    <el-dialog title="高级查询" :visible.sync="dialogVisible" width="720px">
+      <el-form ref="advancedsearchForm" label-width="110px">
+        <el-row>
+
+          <el-col :span="24">
+            <el-form-item label="时间范围">
+              <el-date-picker size="mini" v-model="CreateOn" type="daterange" style="width:100%" range-separator="至"
+                              start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="申请日期">
+              <el-input size="mini" v-model="searchForm.ApplyDate" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="推荐单位名称">
+              <el-input size="mini" v-model="searchForm.RecUnitName" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="推荐单位编码">
+              <el-input size="mini" v-model="searchForm.RecUnitId" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="退回原因">
+              <el-input size="mini" v-model="searchForm.DenyReason" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="审核日期">
+              <el-input size="mini" v-model="searchForm.AuditDate" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="状态标识">
+              <el-input size="mini" v-model="searchForm.Status" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="备注">
+              <el-input size="mini" v-model="searchForm.Remark" style="width:100%" placeholder="请输入"></el-input>
+            </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="handleSearch">查 询</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+<script>
+  import { mapGetters } from 'vuex';
+  import api from '@/api/oilsupplier/supplierappend';
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'oilsuppliercertappend',
+
+    data() {
+      return {
+        dialogVisible: false,//高级查询
+        //列表数据
+        entityList: [],
+        //分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+        //列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        //查询起始时间(一月前开始)
+        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        //查询项
+        searchFormReset: {},
+        searchForm: {
+          Id: '',
+          SupplierId: '',
+          SupplierCertId: '',
+          ApplyDate: '',
+          RecUnitId: '',
+          RecUnitName: '',
+          AppendType: '1', //增项类别(1 物资类,2 基建类,3 技术服务类)
+          DenyReason: '',
+          AuditDate: '',
+          Status: '',
+          Remark: '',
+          IsDelete: '',
+          CreateOn: '',
+          CreateUserId: '',
+          CreateBy: '',
+          ModifiedOn: '',
+          ModifiedUserId: '',
+          ModifiedBy: '',
+        },
+        //修改
+        optionsList: [], //技术服务类层级选择列表
+        orgtreeprops: {
+          value: 'id',
+          label: 'Name',
+          children: 'children'
+        },
+      }
+    },
+    created() {
+      //查询条件初始值备份
+      Object.assign(this.searchFormReset, this.searchForm)
+      //查询列表
+      this.initData()
+    },
+    methods: {
+      initData() {
+        //分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+        }
+        let myCreateOn = []
+        // 解析时间
+        if (this.CreateOn.length == 2) {
+          this.CreateOn[1].setHours(23)
+          this.CreateOn[1].setMinutes(59)
+          this.CreateOn[1].setSeconds(59)
+          myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+          myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+        }
+        //查询条件
+        Object.assign(params, this.searchForm)
+        //访问接口
+        api.getList(myCreateOn.join(','), params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      //获取技术服务类层级列表
+      getTechTreeList() {
+        let _this = this
+        this.$axios.get('technologyservice/businesslist', {})
+          .then(res => {
+            _this.optionsList = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId', 'Id,Name')
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //编辑
+      editData(row) {
+        let _this = this
+        _this.$router.push({
+          path: `/oilsupplier/supplierappend/1/goodsdataopera`,
+          query: {
+            Id: row.Id,
+            editFlag: 1 //编辑标记: 1 修改,0 不修改
+          }
+        })
+      },
+
+      //删除
+      deleteData(Id) {
+        let _this = this
+        _this.$confirm('此操作将彻底删除该数据, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+            api.deleteEntity(Id, _this.$axios)
+            .then(res => {
+              if (res.data.code === 0) {
+                _this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+                // 更新
+                this.initData()
+              } else {
+                _this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            })
+            .catch(() => {})
+          })
+          .catch(() => {})
+      },
+
+      searchCommand(command) {
+        if (command == 'search') {
+          this.dialogVisible = true
+        } else if (command == 'clear') {
+          this.clearSearch()
+        }
+      },
+
+      //列表排序功能
+      orderby(column) {
+        if (column.order == 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order == 'descending') {
+          this.Column.Order = 'desc'
+        }
+        this.Column.Prop = column.prop
+        this.initData()
+      },
+      clearSearch() {
+        Object.assign(this.searchForm, this.searchFormReset);
+        //this.searchForm = this.searchFormReset;
+        this.CreateOn = ''
+        this.initData()
+      },
+      handleSearch() {
+        this.currentPage = 1;
+        this.dialogVisible = false;
+        this.initData();
+      },
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.initData()
+      },
+      handleSizeChange(value) {
+        this.size = value
+        this.currentPage = 1
+        this.initData()
+      },
+
+      //判断增项类别,(1 物资类,2 基建类,3 技术服务类)
+      checkAppendType(val) {
+        if (val == '1') {
+          return '物资类'
+        } else if (val == '2') {
+          return '基建类'
+        } else if (val == '3') {
+          return '技术服务类'
+        }
+      },
+
+      jstimehandle(val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '0001-01-01T00:00:00Z') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 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;
+      }
+    }
+  }
+
+</script>
+
+<style lang="scss">
+  .el-pagination {
+    margin: 1rem 0 2rem;
+    text-align: right;
+  }
+</style>

+ 377 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/techlist.vue

@@ -0,0 +1,377 @@
+<template>
+  <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>
+    <el-card class="box-card" style="height: calc(100vh - 115px);">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 增项初审
+        </span>
+        <span style="float: right;">
+          <router-link :to="'/oilsupplier/supplierappend/3/techdataopera'">
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">添加</el-button>
+          </router-link>
+        </span>
+        <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+          <el-form-item label="上报时间">
+            <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
+              start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
+          </el-form-item>
+          <el-form-item>
+            <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
+              查询
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item command="search">高级查询</el-dropdown-item>
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </el-form-item>
+        </el-form>
+      </div>
+      <el-table :data="entityList" border height="calc(100vh - 243px)" 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="editData(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="ApplyDate" label="申请日期" sortable min-width="130" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ jstimehandle(scope.row.ApplyDate) }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="RecUnitName" label="推荐单位名称" sortable min-width="130" align="center"
+          show-overflow-tooltip></el-table-column>
+        <!-- <el-table-column prop="RecUnitId" label="推荐单位编码" sortable min-width="130" align="center" show-overflow-tooltip></el-table-column> -->
+        <el-table-column prop="AppendType" label="增项类别" sortable min-width="130" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ checkAppendType(scope.row.AppendType) }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="DenyReason" label="退回原因" sortable min-width="130" align="center" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column prop="AuditDate" label="审核日期" sortable min-width="130" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ jstimehandle(scope.row.AuditDate) }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="Status" label="状态标识" sortable min-width="130" align="center" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column prop="Remark" label="备注" sortable min-width="130" align="center" 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>
+    </el-card>
+
+    <el-dialog title="高级查询" :visible.sync="dialogVisible" width="720px">
+      <el-form ref="advancedsearchForm" label-width="110px">
+        <el-row>
+
+          <el-col :span="24">
+            <el-form-item label="时间范围">
+              <el-date-picker size="mini" v-model="CreateOn" type="daterange" style="width:100%" range-separator="至"
+                start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="申请日期">
+              <el-input size="mini" v-model="searchForm.ApplyDate" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="推荐单位名称">
+              <el-input size="mini" v-model="searchForm.RecUnitName" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="推荐单位编码">
+              <el-input size="mini" v-model="searchForm.RecUnitId" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="退回原因">
+              <el-input size="mini" v-model="searchForm.DenyReason" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="审核日期">
+              <el-input size="mini" v-model="searchForm.AuditDate" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="状态标识">
+              <el-input size="mini" v-model="searchForm.Status" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="备注">
+              <el-input size="mini" v-model="searchForm.Remark" style="width:100%" placeholder="请输入"></el-input>
+            </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="handleSearch">查 询</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+<script>
+  import {
+    mapGetters
+  } from 'vuex';
+  import api from '@/api/oilsupplier/supplierappend';
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'oilsuppliercertappend',
+
+    data() {
+      return {
+        dialogVisible: false, //高级查询
+        //列表数据
+        entityList: [],
+        //分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+        //列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        //查询起始时间(一月前开始)
+        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        //查询项
+        searchFormReset: {},
+        searchForm: {
+          Id: '',
+          SupplierId: '',
+          SupplierCertId: '',
+          ApplyDate: '',
+          RecUnitId: '',
+          RecUnitName: '',
+          AppendType: '3', //增项类别(1 物资类,2 基建类,3 技术服务类)
+          DenyReason: '',
+          AuditDate: '',
+          Status: '',
+          Remark: '',
+          IsDelete: '',
+          CreateOn: '',
+          CreateUserId: '',
+          CreateBy: '',
+          ModifiedOn: '',
+          ModifiedUserId: '',
+          ModifiedBy: '',
+        },
+        //修改
+        optionsList: [], //技术服务类层级选择列表
+        orgtreeprops: {
+          value: 'id',
+          label: 'Name',
+          children: 'children'
+        },
+      }
+    },
+    created() {
+      //查询条件初始值备份
+      Object.assign(this.searchFormReset, this.searchForm)
+      //查询列表
+      this.initData()
+    },
+    methods: {
+      initData() {
+        //分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+        }
+        let myCreateOn = []
+        // 解析时间
+        if (this.CreateOn) {
+          if (this.CreateOn.length == 2) {
+            this.CreateOn[1].setHours(23)
+            this.CreateOn[1].setMinutes(59)
+            this.CreateOn[1].setSeconds(59)
+            myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+            myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+          }
+        }
+
+        //查询条件
+        Object.assign(params, this.searchForm)
+        //访问接口
+        api.getList(myCreateOn.join(','), params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      //获取技术服务类层级列表
+      getTechTreeList() {
+        let _this = this
+        this.$axios.get('technologyservice/businesslist', {})
+          .then(res => {
+            _this.optionsList = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId', 'Id,Name')
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      //编辑
+      editData(row) {
+        let _this = this
+        _this.$router.push({
+          path: `/oilsupplier/addtionaudit/3/techdataopera`,
+          query: {
+            Id: row.Id,
+            editFlag: 1 //编辑标记: 1 修改,0 不修改
+          }
+        })
+      },
+
+      //删除
+      deleteData(Id) {
+        let _this = this
+        _this.$confirm('此操作将彻底删除该数据, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+            api.deleteEntity(Id, _this.$axios)
+              .then(res => {
+                if (res.data.code === 0) {
+                  _this.$message({
+                    type: 'success',
+                    message: res.data.message
+                  })
+                  // 更新
+                  this.initData()
+                } else {
+                  _this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  })
+                }
+              })
+              .catch(() => {})
+          })
+          .catch(() => {})
+      },
+
+      searchCommand(command) {
+        if (command == 'search') {
+          this.dialogVisible = true
+        } else if (command == 'clear') {
+          this.clearSearch()
+        }
+      },
+
+      //列表排序功能
+      orderby(column) {
+        if (column.order == 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order == 'descending') {
+          this.Column.Order = 'desc'
+        }
+        this.Column.Prop = column.prop
+        this.initData()
+      },
+      clearSearch() {
+        Object.assign(this.searchForm, this.searchFormReset);
+        //this.searchForm = this.searchFormReset;
+        this.CreateOn = ''
+        this.initData()
+      },
+      handleSearch() {
+        this.currentPage = 1;
+        this.dialogVisible = false;
+        this.initData();
+      },
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.initData()
+      },
+      handleSizeChange(value) {
+        this.size = value
+        this.currentPage = 1
+        this.initData()
+      },
+
+      //判断增项类别,(1 物资类,2 基建类,3 技术服务类)
+      checkAppendType(val) {
+        if (val == '1') {
+          return '物资类'
+        } else if (val == '2') {
+          return '基建类'
+        } else if (val == '3') {
+          return '技术服务类'
+        }
+      },
+
+      jstimehandle(val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '0001-01-01T00:00:00Z') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 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;
+      }
+    }
+  }
+
+</script>
+
+<style lang="scss">
+  .el-pagination {
+    margin: 1rem 0 2rem;
+    text-align: right;
+  }
+
+</style>