Browse Source

信息变更

huahaiyan 6 years ago
parent
commit
de399bc762

+ 16 - 0
src/dashoo.cn/backend/api/business/oilsupplier/infochange/infochange.go

@@ -77,3 +77,19 @@ type OilInfoChange struct {
 	LinkZipCode        string    `xorm:"comment('通信地址-邮编') VARCHAR(20)"`
 	HseTraining        string    `xorm:"default '0' comment('是否需要进行HSE审查培训') VARCHAR(2)"`
 }
+
+type OilInfoChangeItem struct {
+	Id             int       `xorm:"not null pk autoincr INT(10)"`
+	SupplierId     int       `xorm:"comment('供方Id') INT(10)"`
+	SelectItem     string    `xorm:"comment('变更字段名') VARCHAR(50)"`
+	SelectItemName string    `xorm:"comment('变更字段名') VARCHAR(255)"`
+	BeChangeInfo   string    `xorm:"comment('变更前内容') VARCHAR(255)"`
+	ChangeInfo     string    `xorm:"comment('变更后内容') VARCHAR(255)"`
+	ChangeStatus   int       `xorm:"comment('变更状态') INT(10)"`
+	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)"`
+}

+ 13 - 3
src/dashoo.cn/backend/api/business/oilsupplier/infochange/infochangeService.go

@@ -1,6 +1,9 @@
 package infochange
 
 import (
+	"strconv"
+	"strings"
+
 	"dashoo.cn/backend/api/business/auditsetting"
 	"dashoo.cn/backend/api/business/oilsupplier/classorgsetting"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
@@ -8,9 +11,8 @@ import (
 	"dashoo.cn/backend/api/business/workflow"
 	. "dashoo.cn/backend/api/mydb"
 	"dashoo.cn/business2/userRole"
+	"dashoo.cn/utils"
 	"github.com/go-xorm/xorm"
-	"strconv"
-	"strings"
 )
 
 type InfoChangeService struct {
@@ -23,6 +25,14 @@ func GetInfoChangeService(xormEngine *xorm.Engine) *InfoChangeService {
 	return s
 }
 
+func (s *InfoChangeService) GetInfoforItem(supname, item, where string) string {
+	var sql string
+	sql = `select ` + item + ` from  ` + supname + ` where ` + where
+	var itemselected string
+	utils.DBE.Sql(sql).Get(&itemselected)
+	return itemselected
+}
+
 //func (s *InfoChangeService) GetSupplierList(supname, auditname string) []Suppliername {
 //	var sql string
 //	//sql = `select * from  `+ supname +` where Id not in ( select SupplierId  from `+ auditname +` where  YEAR(CreateOn)=YEAR(NOW()))`
@@ -117,4 +127,4 @@ func (s *InfoChangeService) SubmitOrgAudit(workflowid, certId, annualId, wfName,
 	ActiComplete.CallbackUrl = ""
 	svcActiviti.MultiTaskComplete(ActiComplete)
 	return processInstanceId
-}
+}

+ 3 - 2
src/dashoo.cn/backend/api/controllers/base.go

@@ -244,7 +244,8 @@ var (
 	OilGoodsAptDetailViewName                string = "oil_goodsapt_detail_view"    //物資类视图
 	OilClassOrgSettingName                   string = "OilClassOrgSetting"          //分类部门审批配置表
 	OilAnnualAuditName                       string = "OilAnnualAudit"              //年审表
-	OilSupplierOpinionName                   string = "OilSupplierOpinion"              //追加意见表
+	OilSupplierOpinionName                   string = "OilSupplierOpinion"          //追加意见表
+	OilInfoChangeItemName                    string = "OilInfoChangeItem"           //信息变更表
 )
 
 //分页信息及数据
@@ -272,7 +273,7 @@ func (this *BaseController) Prepare() {
 		"/api/webinterface/preparelist", "/api/webinterface/prepareinfo",
 		"/api/sampletest_v/sampletest", "/api/sampletest_v/getpass", "/api/sampletest_v/editpass/",
 		"/api/sampletest_v/donorsdetail", "/api/sampletest_v/testdetail", "/api/uploads/samplesinput", "/api/doctemplate_onlyoffice/callback", "/api/doctemplate_onlyoffice/viewcallback", "/api/limsupload/usersignimg",
-		"/api/uploads/samplestypeimg", "/api/workflow/historyimg/", "/api/document/getdocumentnameandtime", "/api/annualaudit/auditcallback","/api/suppliercert/auditcallback"}
+		"/api/uploads/samplestypeimg", "/api/workflow/historyimg/", "/api/document/getdocumentnameandtime", "/api/annualaudit/auditcallback", "/api/suppliercert/auditcallback"}
 	for _, v := range urls {
 		fmt.Println("**this.Ctx.Input.URL()**", this.Ctx.Input.URL())
 		if this.Ctx.Input.URL() == v {

+ 61 - 236
src/dashoo.cn/backend/api/controllers/oilsupplier/infochange.go

@@ -7,12 +7,8 @@ import (
 	"time"
 
 	"dashoo.cn/backend/api/business/oilsupplier/annualaudit"
-	"dashoo.cn/backend/api/business/oilsupplier/supplier"
 	"dashoo.cn/backend/api/business/workflow"
 
-	"dashoo.cn/backend/api/business/baseUser"
-	"dashoo.cn/business/userRole"
-
 	. "dashoo.cn/backend/api/controllers"
 	"dashoo.cn/utils"
 )
@@ -21,12 +17,27 @@ type InfoChangeController struct {
 	BaseController
 }
 
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} annualaudit.OilAnnualAudit
+// @router /get/:id [get]
+func (this *InfoChangeController) GetEntity() {
+	CertId := this.Ctx.Input.Param(":id")
+	var model []infochange.OilInfoChangeItem
+	svc := infochange.GetInfoChangeService(utils.DBE)
+	where := " SupplierId = "+CertId
+	svc.GetEntitysByWhere(OilInfoChangeItemName,where,&model)
+	var datainfo DataInfo
+	datainfo.Items = model
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
 // @Title 获取列表
 // @Description get user by token
 // @Success 200 {object} []infochange.OilInfoChange
 // @router /list [get]
 func (this *InfoChangeController) GetEntityList() {
-
 	//获取分页信息
 	page := this.GetPageInfoForm()
 	where := " 1=1 "
@@ -83,6 +94,20 @@ func (this *InfoChangeController) GetEntityList() {
 	this.ServeJSON()
 }
 
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} annualaudit.OilAnnualAudit
+// @router /getinfoforitem [get]
+func (this *InfoChangeController) GetInfoForItem() {
+	certId := this.GetString("certId")
+	selctitem := this.GetString("selctitem")
+	svc := infochange.GetInfoChangeService(utils.DBE)
+	where := "Id ="+ utils.ToStr(certId)
+	var selecteditem = svc.GetInfoforItem(""+OilSupplierName, selctitem, where)
+	this.Data["json"] = &selecteditem
+	this.ServeJSON()
+}
+
 // @Title 获取列表
 // @Description get user by token
 // @Success 200 {object} []annualaudit.OilAnnualAudit
@@ -153,205 +178,6 @@ func (this *InfoChangeController) GetMyTaskEntityList() {
 	this.ServeJSON()
 }
 
-// @Title 获取年审企业名称
-// @Description 获取实体
-// @Success 200 {object} annualaudit.OilAnnualAudit
-// @router /supplierlist [get]
-func (this *InfoChangeController) GetSupplierList() {
-	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
-	var supplierlist []annualaudit.Suppliername
-	supplierlist = svc.GetSupplierList(""+OilSupplierName, ""+OilAnnualAuditName)
-	var datainfo DataInfo
-	datainfo.Items = supplierlist
-	this.Data["json"] = &datainfo
-	this.ServeJSON()
-}
-
-// @Title 获取字典列表
-// @Description get user by token
-// @Success 200 {object} map[string]interface{}
-// @router /dictlist [get]
-func (this *InfoChangeController) GetDictList() {
-	dictList := make(map[string]interface{})
-	//dictSvc := items.GetItemsService(utils.DBE)
-	userSvc := baseUser.GetBaseUserService(utils.DBE)
-	//customerSvc := svccustomer.GetCustomerService(utils.DBE)
-	//dictList["WellNo"] = dictSvc.GetKeyValueItems("WellNo", "")
-	var userEntity userRole.Base_User
-	userSvc.GetEntityById(this.User.Id, &userEntity)
-	dictList["Supervisers"] = userSvc.GetUserListByDepartmentId("", userEntity.Departmentid)
-
-	//var dictCustomer []svccustomer.Customer
-	//customerSvc.GetEntitysByWhere("" + CustomerName, "", &dictCustomer)
-	//dictList["EntrustCorp"] = &dictCustomer
-
-	var datainfo DataInfo
-	datainfo.Items = dictList
-	this.Data["json"] = &datainfo
-	this.ServeJSON()
-}
-
-// @Title 获取实体
-// @Description 获取实体
-// @Success 200 {object} annualaudit.OilAnnualAudit
-// @router /get/:id [get]
-func (this *InfoChangeController) GetEntity() {
-	Id := this.Ctx.Input.Param(":id")
-
-	var model annualaudit.OilAnnualAudit
-	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
-	svc.GetEntityByIdBytbl(""+OilAnnualAuditName, Id, &model)
-
-	this.Data["json"] = &model
-	this.ServeJSON()
-}
-
-// @Title 添加
-// @Description 新增
-// @Success	200	{object} controllers.Request
-// @router /add [post]
-func (this *InfoChangeController) AddEntity() {
-	var model annualaudit.OilAnnualAudit
-	var errinfo ErrorDataInfo
-	var jsonBlob = this.Ctx.Input.RequestBody
-	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
-	json.Unmarshal(jsonBlob, &model)
-	where := "SupplierId = " + utils.ToStr(model.SupplierId) + " and SupplierTypeName = " + model.SupplierTypeName
-	var auditentity []annualaudit.OilAnnualAudit
-	svc.GetEntitysByWhere(""+OilAnnualAuditName, where, &auditentity)
-	if len(auditentity) == 1 {
-		errinfo.Message = "已提交年审,请勿重复提交!"
-		errinfo.Code = -1
-		this.Data["json"] = &errinfo
-		this.ServeJSON()
-		return
-	}
-	supwhere := "a.Id = " + utils.ToStr(model.SupplierId) + " and b.SupplierTypeCode = " + model.SupplierTypeName
-	supsvc := supplier.GetOilSupplierService(utils.DBE)
-	var list []supplier.OilSupplierView
-	total := supsvc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, 1, 1, "a.Id", true, &list, supwhere)
-	if total == 0 {
-		errinfo.Message = "请先提交准入申请再提交年审!"
-		errinfo.Code = -1
-		this.Data["json"] = &errinfo
-		this.ServeJSON()
-		return
-	}
-	var suppliermodel supplier.OilSupplierView
-	suppliermodel = list[0]
-	model.RecUnitId = suppliermodel.RecUnitId
-	model.CerId = suppliermodel.CertId
-	model.Status = 0
-	model.BackReason = suppliermodel.BackReason
-	//svc.GetEntitysByWhere(""+OilSupplierName, supwhere, &supplierlist)
-	model.CreateOn = time.Now()
-	model.CreateBy = this.User.Realname
-	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
-	//model.OrganizeId, _ = utils.StrTo(this.User.DepartmentId).Int()
-	_, err := svc.InsertEntityBytbl(""+OilAnnualAuditName, &model)
-	annualId := model.Id
-	//工作流开始
-	processInstanceId,_ := svc.SubmitOrgAudit("",model.WorkflowId, utils.ToStr(model.CerId), utils.ToStr(model.Id), workflow.OIL_AUDIT_APPLY, workflow.FIRST_TRIAL, this.User.Id, "1", "提交给二级单位初审", OilSupplierCertSubName, OilClassOrgSettingName)
-	var auditmodel annualaudit.OilAnnualAudit
-	auditmodel.WorkflowId = processInstanceId
-	cols := []string{
-		"Id",
-		"WorkflowId",
-	}
-	svc.UpdateEntityByIdCols(annualId, auditmodel, cols)
-	if err == nil {
-		//新增
-		errinfo.Message = "添加成功!"
-		errinfo.Code = 0
-		errinfo.Item = model.Id
-		this.Data["json"] = &errinfo
-		this.ServeJSON()
-	} else {
-		errinfo.Message = "添加失败!" + utils.AlertProcess(err.Error())
-		errinfo.Code = -1
-		this.Data["json"] = &errinfo
-		this.ServeJSON()
-	}
-}
-
-// @Title 修改实体
-// @Description 修改实体
-// @Success	200	{object} controllers.Request
-// @router /update/:id [post]
-func (this *InfoChangeController) UpdateEntity() {
-	id := this.Ctx.Input.Param(":id")
-	var errinfo ErrorInfo
-	if id == "" {
-		errinfo.Message = "操作失败!请求信息不完整"
-		errinfo.Code = -2
-		this.Data["json"] = &errinfo
-		this.ServeJSON()
-		return
-	}
-
-	var model annualaudit.OilAnnualAudit
-	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
-
-	var jsonBlob = this.Ctx.Input.RequestBody
-	json.Unmarshal(jsonBlob, &model)
-	model.ModifiedOn = time.Now()
-	model.ModifiedBy = this.User.Realname
-	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
-
-	cols := []string{
-
-		"Id",
-
-		"Code",
-
-		"Name",
-
-		"F01",
-
-		"F02",
-
-		"F03",
-
-		"F04",
-
-		"F05",
-
-		"F06",
-
-		"F07",
-
-		"F25",
-
-		"Remark",
-
-		"DeletionStateCode",
-
-		"CreateOn",
-
-		"CreateUserId",
-
-		"CreateBy",
-
-		"ModifiedOn",
-
-		"ModifiedUserId",
-
-		"ModifiedBy",
-	}
-	err := svc.UpdateEntityBytbl(""+OilAnnualAuditName, id, &model, cols)
-	if err == nil {
-		errinfo.Message = "修改成功!"
-		errinfo.Code = 0
-		this.Data["json"] = &errinfo
-		this.ServeJSON()
-	} else {
-		errinfo.Message = "修改失败!" + utils.AlertProcess(err.Error())
-		errinfo.Code = -1
-		this.Data["json"] = &errinfo
-		this.ServeJSON()
-	}
-}
-
 // @Title 删除单条信息
 // @Description
 // @Success 200 {object} ErrorInfo
@@ -367,11 +193,11 @@ func (this *InfoChangeController) DeleteEntity() {
 		this.ServeJSON()
 		return
 	}
-	var model annualaudit.OilAnnualAudit
-	var entityempty annualaudit.OilAnnualAudit
-	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	var model infochange.OilInfoChangeItem
+	var entityempty infochange.OilInfoChangeItem
+	svc := infochange.GetInfoChangeService(utils.DBE)
 	opdesc := "删除-" + Id
-	err := svc.DeleteOperationAndWriteLogBytbl(""+OilAnnualAuditName, BaseOperationLogName, Id, &model, &entityempty, utils.ToStr(this.User.Id), this.User.Username, opdesc, "", "钻井日报")
+	err := svc.DeleteOperationAndWriteLogBytbl(""+OilInfoChangeItemName, BaseOperationLogName, Id, &model, &entityempty, utils.ToStr(this.User.Id), this.User.Username, opdesc, "", "信息变更")
 	if err == nil {
 		errinfo.Message = "删除成功"
 		errinfo.Code = 0
@@ -385,33 +211,32 @@ func (this *InfoChangeController) DeleteEntity() {
 	}
 }
 
-// @Title 基建类业务
-// @Description get user by token
-// @Success 200 {object} models.Userblood
-// @router /basiclist [get]
-func (this *InfoChangeController) BasicList() {
-	page := this.GetPageInfoForm()
-	var list []annualaudit.OilAnnualAudit
-	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
-	where := " 1=1"
-	orderby := "Id"
-	asc := false
-	Order := this.GetString("Order")
-	Prop := this.GetString("Prop")
-	if Order != "" && Prop != "" {
-		orderby = Prop
-		if Order == "asc" {
-			asc = true
-		}
-	}
-	keyword := this.GetString("keyword")
-	if keyword != "" {
-		where = where + " and Name like '%" + keyword + "%'"
+// @Title 添加
+// @Description 新增
+// @Success	200	{object} controllers.Request
+// @router /addinfochangeitem [post]
+func (this *InfoChangeController) AddInfoChangeItem() {
+	var model infochange.OilInfoChangeItem
+	var jsonBlob= this.Ctx.Input.RequestBody
+	svc := infochange.GetInfoChangeService(utils.DBE)
+	json.Unmarshal(jsonBlob, &model)
+	model.CreateOn = time.Now()
+	model.CreateBy = this.User.Realname
+	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+	_, err := svc.InsertEntityBytbl(""+OilInfoChangeItemName, &model)
+
+	var errinfo ErrorDataInfo
+	if err == nil {
+		//新增
+		errinfo.Message = "添加成功!"
+		errinfo.Code = 0
+		errinfo.Item = model.Id
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "添加失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
 	}
-	total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
-	var datainfo DataInfo
-	datainfo.Items = list
-	datainfo.CurrentItemCount = total
-	this.Data["json"] = &datainfo
-	this.ServeJSON()
 }

+ 4 - 17
src/dashoo.cn/frontend_web/src/api/oilsupplier/infochange.js

@@ -6,15 +6,9 @@ export default {
       params: params
     })
   },
-  getDictList (myAxios) {
+  getinfoforitem(certId,selctitem,myAxios){
     return myAxios({
-      url: '/infochange/dictlist/',
-      method: 'GET'
-    })
-  },
-  getEntityByCreatorAndType (typeCode, myAxios) {
-    return myAxios({
-      url: '/infochange/getbycreatorandtype/' + typeCode,
+      url: '/infochange/getinfoforitem?certId=' + certId +'&selctitem='+ selctitem,
       method: 'GET'
     })
   },
@@ -24,16 +18,9 @@ export default {
       method: 'GET'
     })
   },
-  addEntity (formData, myAxios) {
-    return myAxios({
-      url: '/infochange/add',
-      method: 'post',
-      data: formData
-    })
-  },
-  updateEntity (entityId, formData, myAxios) {
+  addInfoChangeItem (formData, myAxios) {
     return myAxios({
-      url: '/infochange/update/' + entityId,
+      url: '/infochange/addinfochangeitem',
       method: 'post',
       data: formData
     })

+ 153 - 174
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochange/_opera/operation.vue

@@ -17,7 +17,7 @@
           </router-link>
         </span>
       </div>
-      <el-form label-width="240px" ref="EntityForm" :model="formData">
+      <!-- <el-form label-width="240px" ref="EntityForm" :model="formData">
         <div slot="header" class="clearfix">
           <span>供方基本信息表</span>
           <span style="float: right;">
@@ -26,7 +26,6 @@
         </div>
         <el-form label-width="140px" ref="EntityForm" :model="formData">
           <el-row>
-
             <el-col :span="12">
               <el-form-item label="曾用供方名称">
                 <el-input v-model="formData.SupplierName" placeholder="请输入" style="width: 100%" :disabled = "true"></el-input>
@@ -459,10 +458,59 @@
               </el-form-item>
             </el-col>
           </el-row>
-
         </el-form>
-      </el-form>
+      </el-form> -->
+      <el-card>
+        <div slot="header" class="clearfix" style="height:10px">
+          <span style="font-weight:bold;">信息变更</span>
+          <el-button style="float: right;" size="mini" type="primary" @click="AddChangeShow = true">添加变更</el-button>
+        </div>
+        <el-table :data="InfoData" border style="width: 100%">
+          <el-table-column label="操作" min-width="90" align="center" fixed>
+            <template slot-scope="scope">
+              <el-button type="primary" size="mini" @click="deleteEntity(scope.row)">删除</el-button>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="SelectItemName" label="变更项目">
+          </el-table-column>
+          <el-table-column align="center" prop="BeChangeInfo" label="变更前内容">
+          </el-table-column>
+          <el-table-column prop="ChangeInfo" align="center" label="变更后内容">
+          </el-table-column>
+        </el-table>
+      </el-card>
     </el-card>
+    <el-dialog title="添加变更" :visible.sync="AddChangeShow" top="5vh">
+      <el-form :model="infochangeForm" label-width="130px" ref="infochangeForm">
+        <el-row>
+          <el-form-item label="变更项目" prop="Changeitems">
+            <el-select ref="infochangeCorp" v-model="infochangeForm.Selectitem" placeholder="请选择" @change="additems">
+              <el-option v-for="item in selectuserlist" :key="item.value" :label="item.label" :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-row>
+        <el-row>
+          <el-form-item label="变更前内容">
+            <el-input v-model="infochangeForm.BeChangeInfo" placeholder="请输入" :disabled="true">
+            </el-input>
+          </el-form-item>
+          <el-form-item label="变更后内容">
+            <el-input v-model="infochangeForm.ChangeInfo" placeholder="请输入">
+            </el-input>
+          </el-form-item>
+        </el-row>
+        <!-- <el-row>
+          <el-form-item label="说明">
+            <el-input type="textarea" v-model="shenhesubmitForm.AuditorRemark" placeholder="请输入说明"></el-input>
+          </el-form-item>
+        </el-row> -->
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="AddChangeShow = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="saveitemschange()">确 定</el-button>
+      </div>
+    </el-dialog>
 
   </div>
 </template>
@@ -472,196 +520,123 @@
     mapGetters
   } from 'vuex'
   import supplierapi from '@/api/oilsupplier/supplier';
-  import api from '@/api/oilsupplier/technologyservice';
+  import api from '@/api/oilsupplier/infochange';
   export default {
     computed: {
       ...mapGetters({
         authUser: 'authUser'
       })
     },
-    name: 'oiltechnologyserviceEdit',
+    name: 'oilinfochangeEdit',
 
     data() {
       return {
+        infoitemsoptions: [{
+          value: 'SupplierName',
+          label: '企业名称'
+        }, {
+          value: 'OilCertificateNo',
+          label: '中石油供应商证书号'
+        }, {
+          value: 'Grade',
+          label: '级别'
+        }, {
+          value: 'MgrUnit',
+          label: '管理单位'
+        }, {
+          value: 'OperType',
+          label: '经营方式'
+        }],
+        InfoData: [],
+        AddChangeShow: false,
         UnitRelationOptions: [],
         UnitRelationAry: [],
         countryoptions: [],
+        selectuserlist: [],
         countryprops: {
           value: 'adcode',
           label: 'name',
           children: 'districts'
         },
-        CityAry: [],
-        LinkCityAry: [],
-        serviceId: '',
-        certId: '',
-        classId: '03',
-        formData: {
+        infochangeForm: {
           Id: '',
-          SupplierName: '',
-          OilCertificateNo: '',
-          Grade: '',
-          MgrUnit: '',
-          OperType: '',
-          Country: '',
-          MaunAgent: '',
-          ConstructTeam: '',
-          CommercialNo: '',
-          OrganCode: '',
-          CountryTaxNo: '',
-          LocalTaxNo: '',
-          Address: '',
-          Province: '',
-          City: '',
-          Street: '',
-          HouseNo: '',
-          ZipCode: '',
-          QualitySystemCert: '',
-          ProductQualityCert: '',
-          MaunLicense: '',
-          QualifCert: '',
-          QualifCertLevel: '',
-          SafetyLicense: '',
-          TechServiceLic: '',
-          TJInNotify: '',
-          SpecIndustryCert: '',
-          LegalPerson: '',
-          CategoryCode: '',
-          CategoryName: '',
-          RegCapital: '',
-          Currency: '',
-          ContactName: '',
-          CompanyType: '',
-          SetupTime: '',
-          DepositBank: '',
-          BankAccount: '',
-          EMail: '',
-          BankCreditRating: '',
-          Mobile: '',
-          Telphone: '',
-          Fax: '',
-          CompanyTel: '',
-          QQ: '',
-          CompanyUrl: '',
-          SpecSupplier: '',
-          SpecTypeCode: '',
-          SpecTypeName: '',
-          WorkerTotal: 0,
-          ContractNum: 0,
-          UniversityNum: 0,
-          TechnicalNum: 0,
-          AboveProfNum: 0,
-          MiddleProfNum: 0,
-          NationalRegNum: 0,
-          NationalCertTotal: 0,
-          DesignerTotal: 0,
-          SkillerTotal: 0,
-          Remark: '',
-          IsDelete: '',
-          CreateOn: '',
-          CreateUserId: '',
-          CreateBy: '',
-          ModifiedOn: '',
-          ModifiedUserId: '',
-          ModifiedBy: '',
-          CertId: 0,
-          SupplierTypeCode: '',
-          SupplierTypeName: '',
-          Step: 0
-        },
-        formDataCert: {
-          WorkerTotal: 0,
-          ContractNum: 0,
-          UniversityNum: 0,
-          TechnicalNum: 0,
-          AboveProfNum: 0,
-          MiddleProfNum: 0,
-          NationalRegNum: 0,
-          NationalCertTotal: 0,
-          DesignerTotal: 0,
-          SkillerTotal: 0,
-          Status: 0,
-          WorkflowId: ''
+          SupplierId: '',
+          SelectItem: '',
+          SelectItemName: '',
+          BeChangeInfo: '',
+          ChangeInfo: '',
+          ChangeStatus: '',
         },
+        serviceId: '',
+        certId: '',
       }
     },
     created() {
-      this.serviceId = this.$route.params.opera;
-      this.getDictOptions();
-      console.log(this.serviceId);
-      if (this.serviceId != 'add' && this.serviceId > 0) {
-        this.formData.Id = this.serviceId;
-        this.initDatas();
-      } else {
-        this.formData.Id = 0;
-      }
+      this.serviceId = this.$route.params.opera
+      this.initDatas()
     },
     methods: {
-      getDictOptions() {
-        supplierapi.getDictList(this.$axios).then(res => {
-          this.dictData = res.data.items
-          // if (this.dictData) {
-          //   this.UnitRelationOptions = this.dictData['UnitRelation']
-          //   this.getCityList(this.dictData['GaodeMapChinaAreas'])
-          //   this.CompanyTypeOptions = this.dictData['CompanyType']
-          //   let suppliers = this.dictData['CompanyNames']
-          //   for (let idx in suppliers) {
-          //     suppliers[idx]['value'] = suppliers[idx].SupplierName
-          //     this.companynames.push(suppliers[idx])
-          //   }
-          //   if (this.authUser && this.authUser.Profile.IsCompanyUser === 1 && this.companynames.length > 0) {
-          //     if (!this.formData.Id) {
-          //       this.formData.SupplierName = ''
-          //     }
-          //     this.companyReadonly = true
-          //   }
-          // }
-          this.UnitRelationOptions = res.data.items['UnitRelation']
-          this.getCityList(res.data.items['GaodeMapChinaAreas'])
-          this.CompanyTypeOptions = res.data.items['CompanyType']
-        }).catch(err => {
-          console.error(err)
-        })
-      },
       initDatas() {
-        console.log("----this.formData.Id---", this.formData.Id)
-        if (this.formData.Id) {
-          supplierapi.getEntityAndCert(this.formData.Id, this.$axios).then(res => {
-            this.formData = res.data
-
+        console.log("----this.formData.Id---", this.serviceId)
+        if (this.serviceId) {
+          api.getEntity(this.serviceId, this.$axios).then(res => {
+            this.InfoData = res.data.items
+            this.itemsfilter()
+            console.log("---res.data.items---", res.data.items)
           }).catch(err => {
             console.error(err)
           });
         }
       },
-
-      getDictOptions() {
-        api.getDictList(this.$axios).then(res => {}).catch(err => {
-          console.error(err)
-        })
-      },
-
-      //保存信息
-      saveEntity() {
-        this.$refs['EntityForm'].validate((valid) => {
-          if (valid) {
-            if (!this.formData.Id) {
-              this.addEntity();
-            } else {
-              this.updateEntity();
-            }
-
-          } else {
+      itemsfilter() {
+        try {
+          let entityArray = this.InfoData
+          let arr = this.infoitemsoptions
+          if (entityArray == null) {
+            this.selectuserlist = arr
             return false
           }
-        })
+          this.selectuserlist = []
+          for (var i = 0; i < entityArray.length; i++) {
+            for (var j = 0; j < arr.length; j++) {
+              if (entityArray[i].SelectItem === arr[j].value) {
+                this.selectuserlist.push(arr[j])
+                arr.splice(j, 1)
+                j--
+              }
+            }
+          }
+          this.selectuserlist = arr
+        } catch (e) {
+          console.log(e)
+        }
       },
+      //添加变更项目
+      additems() {
+        console.log(this.$refs.infochangeCorp.selectedLabel)
+        api.getinfoforitem(this.serviceId, this.infochangeForm.Selectitem, this.$axios).then(res => {
+          // var selectvalue = res.data
+          // var list = {
+          //   Value: selectvalue,
+          //   ChangeItem: this.$refs.infochangeCorp.selectedLabel + ''
+          // }
+          // this.InfoData.unshift(list)
+          this.infochangeForm.BeChangeInfo = res.data
+          this.infochangeForm.SelectItemName = this.$refs.infochangeCorp.selectedLabel + ''
+          //this.AddChangeShow = false
+        }).catch(err => {
+          console.error(err)
+        });
 
-      addEntity() {
-        supplierapi.addEntity(this.formData, this.$axios).then(res => {
+      },
+      //保存信息变更数据
+      saveitemschange() {
+        this.infochangeForm.SupplierId = parseInt(this.serviceId)
+        console.log(this.infochangeForm)
+        api.addInfoChangeItem(this.infochangeForm, this.$axios).then(res => {
           if (res.data.code === 0) {
             //保存成功后,初始化数据,变成修改
-            this.formData.Id = res.data.item;
+            this.infochangeForm.Id = res.data.item;
             this.initDatas();
             this.$message({
               type: 'success',
@@ -678,12 +653,15 @@
           console.error(err)
         });
       },
+      //提交信息变更审核
+      submitInfoChange() {
 
-      updateEntity() {
-        api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
+      },
+      //删除信息变更项
+      deleteEntity(row) {
+        api.deleteEntity(row.Id, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
-            this.initDatas()
+            this.initDatas();
             this.$message({
               type: 'success',
               message: res.data.message
@@ -699,18 +677,19 @@
           console.error(err)
         });
       },
-      handleAreaChange(value) {
-        this.formData.Province = value[0]
-        this.formData.City = value[1]
-        this.formData.Street = value[2]
-        //this.formData.ZipCode = value[2]
-      },
-      handleLinkAreaChange (value) {
-        this.formData.LinkProvince = value[0]
-        this.formData.LinkCity = value[1]
-        this.formData.LinkStreet = value[2]
-        //this.formData.LinkZipCode = value[2]
-      },
+
+      // handleAreaChange(value) {
+      //   this.formData.Province = value[0]
+      //   this.formData.City = value[1]
+      //   this.formData.Street = value[2]
+      //   //this.formData.ZipCode = value[2]
+      // },
+      // handleLinkAreaChange(value) {
+      //   this.formData.LinkProvince = value[0]
+      //   this.formData.LinkCity = value[1]
+      //   this.formData.LinkStreet = value[2]
+      //   //this.formData.LinkZipCode = value[2]
+      // },
       getCityList(val) {
         let resultData = JSON.parse(val)
         let countstr = JSON.stringify(resultData.districts[0].districts)