Sfoglia il codice sorgente

日常管理-不良记录

yuedefeng 6 anni fa
parent
commit
ddfea4445c

+ 20 - 0
src/dashoo.cn/backend/api/business/oilsupplier/supplierpausereason/oilsupplierpausereason.go

@@ -0,0 +1,20 @@
+package supplierpausereason
+
+import (
+	"time"
+)
+
+type OilSupplierPauseReason struct {
+	Id             int       `json:"Id" xorm:"not null pk autoincr INT(11) 'Id'"`
+	SupplierId     int       `json:"SupplierId" xorm:"not null default 0 comment('供方基本信息表主键') INT(11) 'SupplierId'"`
+	SupplierCertId int       `json:"SupplierCertId" xorm:"not null default 0 comment('供方准入证书信息表主键') INT(11) 'SupplierCertId'"`
+	CertSubId      int       `json:"CertSubId" xorm:"not null comment('准入范围表主键') INT(11) 'CertSubId'"`
+	CertSubStatus  string    `json:"CertSubStatus" xorm:"comment('修改后的状态') VARCHAR(50) 'CertSubStatus'"`
+	BackReason     string    `json:"BackReason" xorm:"comment('退回原因') VARCHAR(500) 'BackReason'"`
+	CreateOn       time.Time `json:"CreateOn" xorm:"DATETIME 'CreateOn'"`
+	CreateUserId   int       `json:"CreateUserId" xorm:"INT(11) 'CreateUserId'"`
+	CreateBy       string    `json:"CreateBy" xorm:"VARCHAR(50) 'CreateBy'"`
+	ModifiedOn     time.Time `json:"ModifiedOn" xorm:"DATETIME 'ModifiedOn'"`
+	ModifiedUserId int       `json:"ModifiedUserId" xorm:"INT(11) 'ModifiedUserId'"`
+	ModifiedBy     string    `json:"ModifiedBy" xorm:"VARCHAR(50) 'ModifiedBy'"`
+}

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

@@ -0,0 +1,16 @@
+package supplierpausereason
+
+import (
+	. "dashoo.cn/backend/api/mydb"
+	"github.com/go-xorm/xorm"
+)
+
+type OilSupplierPauseReasonService struct {
+	MyServiceBase
+}
+
+func GetOilSupplierPauseReasonService(xormEngine *xorm.Engine) *OilSupplierPauseReasonService {
+	s := new(OilSupplierPauseReasonService)
+	s.DBE = xormEngine
+	return s
+}

+ 1 - 0
src/dashoo.cn/backend/api/controllers/base.go

@@ -256,6 +256,7 @@ var (
 	BaseBadRecord                            string = "BadRecord"                   //不良记录表
 	OilSupplierCert2FileName                 string = "OilSupplierCert2File"        // 准入与资质对应关系表
 	OilCorporateInfoName                     string = "OilCorporateInfo"            //企业用户注册临时表
+	OilSupplierPauseReasonName				 string = "OilSupplierPauseReason"
 	OilPaymentInfoName                       string = "OilPaymentInfo"              //缴费信息
 )
 

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

@@ -320,7 +320,7 @@ func (this *AnnualAuditController) GetSupplier() {
 		//	where = where + " and b.CreateUserId = '" + this.User.Id + "'"
 	}
 
-	sqlStr := "SELECT b.Id AS SupplierId, a.Id AS SupplierCertId, b.SupplierName AS SupplierName FROM OilSupplierCert AS a LEFT JOIN OilSupplier AS b ON a.SupplierId = b.Id "
+	sqlStr := "SELECT b.Id AS SupplierId, a.Id AS SupplierCertId, b.SupplierName AS SupplierName FROM OilSupplierCert a LEFT JOIN OilSupplier b ON a.SupplierId = b.Id "
 	sqlStr = sqlStr + where
 
 	model, _ := svc.DBE.QueryString(sqlStr)

+ 3 - 3
src/dashoo.cn/backend/api/controllers/oilsupplier/badrecord.go

@@ -477,7 +477,7 @@ func (this *BadRecordController) SerachGoodsCertByCompany() {
 
 	sqlAdd:=""
 	if certName!=""{
-		sqlAdd=sqlAdd+"and Name like '%"+certName+"%'"
+		sqlAdd="and (Name like '%"+certName+"%' or Code like '%"+certName+"%')"
 	}
 	sizeIntPage,_:=strconv.Atoi(size)
 	currentIntPage,_:=strconv.Atoi(currentPage)
@@ -511,7 +511,7 @@ func (this *BadRecordController) SerachBasisCertByCompany() {
 	certName := this.GetString("_certName")
 	sqlAdd:=""
 	if certName!=""{
-		sqlAdd="and Name like '%"+certName+"%'"
+		sqlAdd="and (Name like '%"+certName+"%' or Code like '%"+certName+"%')"
 	}
 
 	sizeIntPage,_:=strconv.Atoi(size)
@@ -546,7 +546,7 @@ func (this *BadRecordController) SerachTCCertByCompany() {
 
 	sqlAdd:=""
 	if certName!=""{
-		sqlAdd="and Name like '%"+certName+"%'"
+		sqlAdd="and (Name like '%"+certName+"%' or Code like '%"+certName+"%')"
 	}
 	sizeIntPage,_:=strconv.Atoi(size)
 	currentIntPage,_:=strconv.Atoi(currentPage)

+ 51 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertsub.go

@@ -4,6 +4,7 @@ import (
 	"dashoo.cn/backend/api/business/oilsupplier/goodsaptitudeclass"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
+	"dashoo.cn/backend/api/business/oilsupplier/supplierpausereason"
 	"dashoo.cn/business2/parameter"
 	"encoding/json"
 
@@ -141,7 +142,7 @@ func (this *OilSupplierCertSubController) ListCert2019() {
 	page := this.GetPageInfoForm()
 	where := " 1=1 "
 	orderby := "Id"
-	asc := false
+	asc := true
 	Order := this.GetString("Order")
 	Prop := this.GetString("Prop")
 	if Order != "" && Prop != "" {
@@ -154,7 +155,7 @@ func (this *OilSupplierCertSubController) ListCert2019() {
 
 
 	if Name != "" {
-		where = where + " and Name like '%" + Name + "%'"
+		where = where + " and (Name like '%" + Name + "%' or Code like '%" + Name + "%')"
 	}
 	where = where + " and Edition = '2'"
 
@@ -881,6 +882,54 @@ func (this *OilSupplierCertSubController) UpdateStatus() {
 		_,error=svc.DBE.Exec("update "+ OilSupplierCertSubName+" set CertSubStatus='1' where Id="+Id+"")
 	}
 
+	var errinfo ErrorDataInfo
+	if error == nil {
+		errinfo.Message = "操作成功!"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "操作失败!"
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
+type OilSupplierCert2File struct {
+	Id              int       `json:"not null pk autoincr INT(10)"`
+	certSubId       int       `json:"not null default 0 comment('供方基本信息表主键') INT(10)"`
+	certSubStatus   int       `json:"not null default 0 comment('供方准入证书信息表主键') INT(10)"`
+	stopReason 		string    `json:"not null default '0' comment('准入类别代码(1 物资类,2 基建类,3 技术服务类)') VARCHAR(5)"`
+}
+
+// @Title 记录准入项状态更改日志
+// @Description
+// @router /updatestatuswithlog/:Id [post]
+func (this *OilSupplierCertSubController) UpdateStatusWithLog() {
+	Id := this.Ctx.Input.Param(":Id")
+
+	reasonSvc := supplierpausereason.GetOilSupplierPauseReasonService(utils.DBE)
+	var pauseModel supplierpausereason.OilSupplierPauseReason
+	var jsonblob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonblob, &pauseModel)
+	Status := pauseModel.CertSubStatus
+
+	svc := suppliercertsub.GetOilSupplierCertSubService(utils.DBE)
+	var error error
+	if Status =="1"{
+		_,error=svc.DBE.Exec("update "+ OilSupplierCertSubName+" set CertSubStatus='2' where Id="+Id+"")
+		pauseModel.CertSubStatus = "2"
+	}else{
+		_,error=svc.DBE.Exec("update "+ OilSupplierCertSubName+" set CertSubStatus='1' where Id="+Id+"")
+		pauseModel.CertSubStatus = "1"
+	}
+
+	pauseModel.CreateOn = time.Now()
+	pauseModel.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+	pauseModel.CreateBy = this.User.Realname
+	reasonSvc.InsertEntity(pauseModel)
+
 	var errinfo ErrorDataInfo
 	if error == nil {
 		errinfo.Message = "操作成功!"

+ 390 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/supplierpausereason.go

@@ -0,0 +1,390 @@
+package oilsupplier
+
+import (
+"dashoo.cn/business/userRole"
+"dashoo.cn/backend/api/business/baseUser"
+"dashoo.cn/backend/api/business/oilsupplier/supplierpausereason"
+. "dashoo.cn/backend/api/controllers"
+"dashoo.cn/utils"
+"encoding/json"
+"strings"
+"time"
+)
+
+type OilSupplierPauseReasonController struct {
+	BaseController
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []supplierpausereason.OilSupplierPauseReason
+// @router /list [get]
+func (this *OilSupplierPauseReasonController) GetEntityList() {
+
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	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
+		}
+	}
+	Id := this.GetString("Id")
+	SupplierId := this.GetString("SupplierId")
+	SupplierCertId := this.GetString("SupplierCertId")
+	CertSubId := this.GetString("CertSubId")
+	CertSubStatus := this.GetString("CertSubStatus")
+	BackReason := this.GetString("BackReason")
+	CreateOn := this.GetString("CreateOn")
+	CreateUserId := this.GetString("CreateUserId")
+	CreateBy := this.GetString("CreateBy")
+	ModifiedOn := this.GetString("ModifiedOn")
+	ModifiedUserId := this.GetString("ModifiedUserId")
+	ModifiedBy := this.GetString("ModifiedBy")
+
+	if Id != "" {
+		where = where + " and Id like '%" + Id + "%'"
+	}
+
+
+	if SupplierId != "" {
+		where = where + " and SupplierId like '%" + SupplierId + "%'"
+	}
+
+
+	if SupplierCertId != "" {
+		where = where + " and SupplierCertId like '%" + SupplierCertId + "%'"
+	}
+
+
+	if CertSubId != "" {
+		where = where + " and CertSubId like '%" + CertSubId + "%'"
+	}
+
+
+	if CertSubStatus != "" {
+		where = where + " and CertSubStatus like '%" + CertSubStatus + "%'"
+	}
+
+
+	if BackReason != "" {
+		where = where + " and BackReason like '%" + BackReason + "%'"
+	}
+
+
+	if CreateOn != "" {
+		where = where + " and CreateOn like '%" + CreateOn + "%'"
+	}
+
+
+	if CreateUserId != "" {
+		where = where + " and CreateUserId like '%" + CreateUserId + "%'"
+	}
+
+
+	if CreateBy != "" {
+		where = where + " and CreateBy like '%" + CreateBy + "%'"
+	}
+
+
+	if ModifiedOn != "" {
+		where = where + " and ModifiedOn like '%" + ModifiedOn + "%'"
+	}
+
+
+	if ModifiedUserId != "" {
+		where = where + " and ModifiedUserId like '%" + ModifiedUserId + "%'"
+	}
+
+
+	if ModifiedBy != "" {
+		where = where + " and ModifiedBy like '%" + ModifiedBy + "%'"
+	}
+
+
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
+		}
+	}
+
+	svc := supplierpausereason.GetOilSupplierPauseReasonService(utils.DBE)
+	var list []supplierpausereason.OilSupplierPauseReason
+	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []supplierpausereason.OilSupplierPauseReason
+// @router /listnopage [get]
+func (this *OilSupplierPauseReasonController) GetEntityListNoPage() {
+
+
+	where := " 1=1 "
+	Id := this.GetString("Id")
+	SupplierId := this.GetString("SupplierId")
+	SupplierCertId := this.GetString("SupplierCertId")
+	CertSubId := this.GetString("CertSubId")
+	CertSubStatus := this.GetString("CertSubStatus")
+	BackReason := this.GetString("BackReason")
+	CreateOn := this.GetString("CreateOn")
+	CreateUserId := this.GetString("CreateUserId")
+	CreateBy := this.GetString("CreateBy")
+	ModifiedOn := this.GetString("ModifiedOn")
+	ModifiedUserId := this.GetString("ModifiedUserId")
+	ModifiedBy := this.GetString("ModifiedBy")
+
+	if Id != "" {
+		where = where + " and Id like '%" + Id + "%'"
+	}
+
+
+	if SupplierId != "" {
+		where = where + " and SupplierId like '%" + SupplierId + "%'"
+	}
+
+
+	if SupplierCertId != "" {
+		where = where + " and SupplierCertId like '%" + SupplierCertId + "%'"
+	}
+
+
+	if CertSubId != "" {
+		where = where + " and CertSubId like '%" + CertSubId + "%'"
+	}
+
+
+	if CertSubStatus != "" {
+		where = where + " and CertSubStatus like '%" + CertSubStatus + "%'"
+	}
+
+
+	if BackReason != "" {
+		where = where + " and BackReason like '%" + BackReason + "%'"
+	}
+
+
+	if CreateOn != "" {
+		where = where + " and CreateOn like '%" + CreateOn + "%'"
+	}
+
+
+	if CreateUserId != "" {
+		where = where + " and CreateUserId like '%" + CreateUserId + "%'"
+	}
+
+
+	if CreateBy != "" {
+		where = where + " and CreateBy like '%" + CreateBy + "%'"
+	}
+
+
+	if ModifiedOn != "" {
+		where = where + " and ModifiedOn like '%" + ModifiedOn + "%'"
+	}
+
+
+	if ModifiedUserId != "" {
+		where = where + " and ModifiedUserId like '%" + ModifiedUserId + "%'"
+	}
+
+
+	if ModifiedBy != "" {
+		where = where + " and ModifiedBy like '%" + ModifiedBy + "%'"
+	}
+
+	svc := supplierpausereason.GetOilSupplierPauseReasonService(utils.DBE)
+	var list []supplierpausereason.OilSupplierPauseReason
+	svc.GetEntitysByWhere(OilSupplierPauseReasonName, where, &list)
+	var datainfo DataInfo
+	datainfo.Items = list
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取字典列表
+// @Description get user by token
+// @Success 200 {object} map[string]interface{}
+// @router /dictlist [get]
+func (this *OilSupplierPauseReasonController) 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} supplierpausereason.OilSupplierPauseReason
+// @router /get/:id [get]
+func (this *OilSupplierPauseReasonController) GetEntity() {
+	Id := this.Ctx.Input.Param(":id")
+
+	var model supplierpausereason.OilSupplierPauseReason
+	svc := supplierpausereason.GetOilSupplierPauseReasonService(utils.DBE)
+	svc.GetEntityByIdBytbl(OilSupplierPauseReasonName, Id, &model)
+
+	this.Data["json"] = &model
+	this.ServeJSON()
+}
+
+// @Title 添加
+// @Description 新增
+// @Param 	body body supplierpausereason.OilSupplierPauseReason
+// @Success	200	{object} controllers.Request
+// @router /add [post]
+func (this *OilSupplierPauseReasonController) AddEntity() {
+	var model supplierpausereason.OilSupplierPauseReason
+	var jsonBlob = this.Ctx.Input.RequestBody
+	svc := supplierpausereason.GetOilSupplierPauseReasonService(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(OilSupplierPauseReasonName, &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()
+	}
+}
+
+// @Title 修改实体
+// @Description 修改实体
+// @Param 	body body supplierpausereason.OilSupplierPauseReason
+// @Success	200	{object} controllers.Request
+// @router /update/:id [post]
+func (this *OilSupplierPauseReasonController) 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 supplierpausereason.OilSupplierPauseReason
+	svc := supplierpausereason.GetOilSupplierPauseReasonService(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",
+
+		"SupplierId",
+
+		"SupplierCertId",
+
+		"CertSubId",
+
+		"CertSubStatus",
+
+		"BackReason",
+
+		"CreateOn",
+
+		"CreateUserId",
+
+		"CreateBy",
+
+		"ModifiedOn",
+
+		"ModifiedUserId",
+
+		"ModifiedBy",
+
+
+	}
+	err := svc.UpdateEntityBytbl(OilSupplierPauseReasonName, 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
+// @Failure 403 :id 为空
+// @router /delete/:Id [delete]
+func (this *OilSupplierPauseReasonController) DeleteEntity() {
+	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 supplierpausereason.OilSupplierPauseReason
+	var entityempty supplierpausereason.OilSupplierPauseReason
+	svc := supplierpausereason.GetOilSupplierPauseReasonService(utils.DBE)
+	opdesc := "删除-" + Id
+	err := svc.DeleteOperationAndWriteLogBytbl(OilSupplierPauseReasonName, BaseOperationLogName, Id, &model, &entityempty, utils.ToStr(this.User.Id), this.User.Username, opdesc, "", "钻井日报")
+	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()
+	}
+}

+ 5 - 0
src/dashoo.cn/backend/api/routers/router.go

@@ -259,6 +259,11 @@ func init() {
 				&oilsupplier.OilSupplierCertSubController{},
 			),
 		),
+		beego.NSNamespace("/supplierpausereason",
+			beego.NSInclude(
+				&oilsupplier.OilSupplierPauseReasonController{},
+			),
+		),
 		beego.NSNamespace("/suppliercertappend",
 			beego.NSInclude(
 				&oilsupplier.OilSupplierCertAppendController{},

+ 48 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/supplierpausereason.js

@@ -0,0 +1,48 @@
+export default {
+  getList(CreateOn, params, myAxios) {
+    return myAxios({
+      url: '/supplierpausereason/list?CreateOn='+ CreateOn,
+      method: 'GET',
+      params: params
+    });
+  },
+  getNoPageList (params, myAxios) {
+    return myAxios({
+      url: '/supplierpausereason/listnopage',
+      method: 'GET',
+      params: params
+    });
+  },
+  getDictList(myAxios) {
+    return myAxios({
+      url: '/supplierpausereason/dictlist/',
+      method: 'GET'
+    });
+  },
+  getEntity(entityId, myAxios) {
+    return myAxios({
+      url: '/supplierpausereason/get/'+entityId,
+      method: 'GET',
+    })
+  },
+  addEntity(formData, myAxios) {
+    return myAxios({
+      url: '/supplierpausereason/add',
+      method: 'post',
+      data: formData
+    })
+  },
+  updateEntity(entityId, formData, myAxios) {
+    return myAxios({
+      url: '/supplierpausereason/update/'+entityId,
+      method: 'post',
+      data: formData
+    })
+  },
+  deleteEntity(entityId, myAxios) {
+    return myAxios({
+      url: '/supplierpausereason/delete/'+entityId,
+      method: 'delete'
+    })
+  },
+}

+ 14 - 13
src/dashoo.cn/frontend_web/src/components/oilsupplier/goodslist.vue

@@ -77,7 +77,7 @@
                top="5vh">
       <el-tabs v-model="tabIdx"
                style="margin-top: -30px;">
-        <el-tab-pane label="2018修正版"
+        <el-tab-pane label="准入编码"
                      name="1">
           <el-row>
             <el-col :span="12">
@@ -137,9 +137,19 @@
           </el-row>
         </el-tab-pane>
 
-        <el-tab-pane label="2019版"
+        <el-tab-pane label="顶级编码"
                      name="2">
-          <span style="float: right">
+          <el-form ref="form"
+                   :inline="true"
+                   style="float: left;margin-top:-7px">
+            <el-form-item label="">
+              <el-input size="mini"
+                        style="width: 245px;"
+                        v-model="keyword"
+                        placeholder="请输入名称或代码"></el-input>
+            </el-form-item>
+          </el-form>
+          <span style="float: left">
             <el-button type="primary"
                        size="mini"
                        style="margin-left:10px;"
@@ -151,16 +161,7 @@
                        @click="goodsDialog = false">
               取消</el-button>
           </span>
-          <el-form ref="form"
-                   :inline="true"
-                   style="float: right;margin-top:-7px">
-            <el-form-item label="业务名称">
-              <el-input size="mini"
-                        style="width: 165px;"
-                        v-model="keyword"
-                        placeholder="请输入业务名称"></el-input>
-            </el-form-item>
-          </el-form>
+
           <el-table :data="goodsList2019"
                     border
                     size="mini"

+ 122 - 276
src/dashoo.cn/frontend_web/src/pages/oilsupplier/badrecord/index.vue

@@ -83,7 +83,7 @@
         <el-table-column label="物资类不良行为"
                          align="center"
                          prop="Wzrecord"
-                         show-overflow-tooltip="true">
+                         :show-overflow-tooltip="true">
         </el-table-column>
           <el-table-column label="基建类状态"
                          align="center"
@@ -99,7 +99,7 @@
         <el-table-column label="基建类不良行为"
                          align="center"
                          prop="Jjrecord"
-                         show-overflow-tooltip="true">
+                         :show-overflow-tooltip="true">
         </el-table-column>
           <el-table-column label="技术服务类状态"
                          align="center"
@@ -115,12 +115,12 @@
         <el-table-column label="技术服务类不良行为"
                          align="center"
                          prop="Jfrecord"
-                         show-overflow-tooltip="true">
+                         :show-overflow-tooltip="true">
         </el-table-column>
          <el-table-column label="准入范围不良行为"
                          align="center"
                          prop="Certrecord"
-                         show-overflow-tooltip="true">
+                         :show-overflow-tooltip="true">
         </el-table-column>
         <!-- <el-table-column label="类别名称" prop="Categoryname" align="center" width="100px"></el-table-column> -->
 
@@ -426,19 +426,31 @@
           </div>
         </el-tab-pane>
         <el-tab-pane label="准入范围">
+          <el-form label-width="80px"
+                   label-position="top"
+                   class="certForm">
+            <el-form-item label="请先填写,不良记录原因">
+              <el-input type="textarea" :rows="4"
+                        v-model="entityForm.CertRecord"></el-input>
+            </el-form-item>
+          </el-form>
+
+          <el-divider></el-divider>
+
           <div style="width:100%;height:50px;margin-top:-15px">
-            <el-button type="primary"
+            <el-button type="plain"
                        style="float:right;margin-top:6.5px"
+                       plain
                        size="mini"
                        @click="initCert($event)">查询</el-button>
             <el-form :inline="true"
                      style="float:right">
-              <el-form-item label="准入范围名称">
+              <el-form-item label="">
                 <el-input size="mini"
-                          style="width: 165px;"
+                          style="width: 225px;"
                           v-model="certChooseName"
                           clearable
-                          placeholder="请输入准入范围名称"></el-input>
+                          placeholder="请输入准入范围编码或名称"></el-input>
               </el-form-item>
             </el-form>
           </div>
@@ -451,8 +463,7 @@
               <el-table size="mini"
                         :data="goodsList"
                         border
-                        height="300px"
-                        @cell-click="changeCertSubStatus">
+                        height="300px">
                 <el-table-column prop="Code"
                                  label="编码"
                                  width="120px"
@@ -464,14 +475,21 @@
                                  show-overflow-tooltip></el-table-column>
                 <el-table-column prop="CertSubStatus"
                                  label="状态"
+                                 width="160px"
                                  align="center"
                                  show-overflow-tooltip>
                   <template slot-scope="scope">
-                    <span v-if="scope.row.CertSubStatus=='1'"
+                    <el-button type="success" size="mini" v-if="scope.row.CertSubStatus=='1'" @click="changeCertSubStatus(scope.row)">准入</el-button>
+                    <el-button type="warning" size="mini" v-else-if="scope.row.CertSubStatus>'1'" @click="changeCertSubStatus(scope.row)">暂停</el-button>
+                    <el-button type="plain" size="mini" plain v-else @click="changeCertSubStatus(scope.row)">——</el-button>
+
+                    <el-button type="plain" plain size="mini" icon="el-icon-star-off" circle @click="showBackReasonList(scope.row)"></el-button>
+
+                    <!--<span v-if="scope.row.CertSubStatus=='1'"
                           style="color:#67C23A">准入</span>
                     <span v-else-if="scope.row.CertSubStatus>'1'"
                           style="color:#E6A23C">暂停</span>
-                    <span v-else>——</span>
+                    <span v-else>——</span>-->
                   </template>
                 </el-table-column>
               </el-table>
@@ -488,27 +506,29 @@
               <el-table size="mini"
                         :data="basisList"
                         border
-                        height="300px"
-                        @cell-click="changeCertSubStatus">
+                        height="300px">
                 <el-table-column prop="Code"
                                  label="编码"
                                  width="120px"
-                                 align="center"
-                                 show-overflow-tooltip></el-table-column>
+                                 :show-overflow-tooltip="true"
+                                 align="center"></el-table-column>
                 <el-table-column prop="Name"
                                  label="名称"
-                                 align="center"
-                                 show-overflow-tooltip></el-table-column>
+                                 :show-overflow-tooltip="true"
+                                 align="center"></el-table-column>
                 <el-table-column prop="CertSubStatus"
                                  label="状态"
-                                 align="center"
-                                 show-overflow-tooltip>
+                                 align="center">
                   <template slot-scope="scope">
-                    <span v-if="scope.row.CertSubStatus=='1'"
+                    <el-button type="success" size="mini" v-if="scope.row.CertSubStatus=='1'" @click="changeCertSubStatus(scope.row)">准入</el-button>
+                    <el-button type="warning" size="mini" v-else-if="scope.row.CertSubStatus>'1'" @click="changeCertSubStatus(scope.row)">暂停</el-button>
+                    <el-button type="plain" size="mini" plain v-else @click="changeCertSubStatus(scope.row)">——</el-button>
+                    <!--<span v-if="scope.row.CertSubStatus=='1'"
                           style="color:#67C23A">准入</span>
                     <span v-else-if="scope.row.CertSubStatus>'1'"
                           style="color:#E6A23C">暂停</span>
-                    <span v-else>——</span>
+                    <span v-else>——</span>-->
+                    <el-button type="plain" plain size="mini" icon="el-icon-star-off" circle @click="showBackReasonList(scope.row)"></el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -525,8 +545,7 @@
               <el-table size="mini"
                         :data="tcList"
                         border
-                        height="300px"
-                        @cell-click="changeCertSubStatus">
+                        height="300px">
                 <el-table-column prop="Code"
                                  label="编码"
                                  width="120px"
@@ -541,11 +560,16 @@
                                  align="center"
                                  show-overflow-tooltip>
                   <template slot-scope="scope">
-                    <span v-if="scope.row.CertSubStatus=='1'"
+                    <el-button type="success" size="mini" v-if="scope.row.CertSubStatus=='1'" @click="changeCertSubStatus(scope.row)">准入</el-button>
+                    <el-button type="warning" size="mini" v-else-if="scope.row.CertSubStatus>'1'" @click="changeCertSubStatus(scope.row)">暂停</el-button>
+                    <el-button type="plain" size="mini" plain v-else @click="changeCertSubStatus(scope.row)">——</el-button>
+
+                    <!--<span v-if="scope.row.CertSubStatus=='1'"
                           style="color:#67C23A">准入</span>
                     <span v-else-if="scope.row.CertSubStatus>'1'"
                           style="color:#E6A23C">暂停</span>
-                    <span v-else>——</span>
+                    <span v-else>——</span>-->
+                    <el-button type="plain" plain size="mini" icon="el-icon-star-off" circle @click="showBackReasonList(scope.row)"></el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -558,14 +582,7 @@
                              :total="currentTCItemCount"></el-pagination>
             </el-tab-pane>
           </el-tabs>
-          <el-form label-width="80px"
-                   label-position="top"
-                   class="certForm">
-            <el-form-item label="不良记录">
-              <el-input type="textarea"
-                        v-model="entityForm.CertRecord"></el-input>
-            </el-form-item>
-          </el-form>
+
           <div style="margin-top:5px;float:right">
             <el-button size="small"
                        @click="addshow = false">取 消</el-button>
@@ -577,101 +594,28 @@
       </el-tabs>
     </el-dialog>
 
-    <!-- 编辑框(默认隐藏) -->
-    <!-- <el-dialog title="企业不良行为编辑"
-               :visible.sync="editshow"
-               width="400px">
-      <el-form :model="editForm"
-               :rules="rules"
-               ref="EditFormref"> -->
-    <!-- 第一行 -->
-    <!-- <el-row>
-          <el-col :span="24">
-            <el-form-item label="企业名称"
-                          required
-                          prop="Companyname">
-              <el-input v-model="editForm.Companyname"
-                        disabled></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row v-if="editForm.Bak1==='1'">
-          <el-col :span="24">
-            <el-form-item label="准入范围">
-              <el-input placeholder="请选择准入范围"
-                        v-model="certNames"
-                        readonly
-                        style="width:100%">
-                <el-button type="primary"
-                           style="width:30%"
-                           @click="certDialog = true"
-                           slot="append">选择</el-button>
-              </el-input>
-            </el-form-item>
-          </el-col>
-        </el-row> -->
-    <!-- 第二行 -->
-    <!-- <el-row>
-          <el-col :span="24">
-            <el-form-item label="准入类别" required prop="Categorycode">
-              <el-select style="width: 100%" v-model="editForm.Categorycode" disabled>
-                <el-option label="物资类" value="01"></el-option>
-                <el-option label="基建类" value="02"></el-option>
-                <el-option label="技术服务类" value="03"></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row> -->
-
-    <!-- <el-row>
-          <el-form-item label="不良行为时间"> -->
-    <!-- <el-date-picker v-model="editForm.Bak2"
-                            type="date"
-                            format="yyyy 年 MM 月 dd 日"
-                            value-format="yyyy-MM-dd"
-                            placeholder="选择日期"
-                            style="width: 100%"></el-date-picker> -->
-    <!-- <el-date-picker v-model="Bak22"
-                            type="daterange"
-                            range-separator="至"
-                            start-placeholder="开始日期"
-                            end-placeholder="结束日期">
-            </el-date-picker>
-          </el-form-item>
-        </el-row>
-        <el-form-item label="状态">
-          <el-select v-model="editForm.Bak3"
-                     placeholder="请选择"
-                     style="width:100%">
-            <el-option v-for="item in options"
-                       :key="item.value"
-                       :label="item.label"
-                       :value="item.value">
-            </el-option>
-          </el-select>
-        </el-form-item> -->
-
-    <!-- 第三行 -->
-    <!-- <el-row>
-          <el-col :span="24">
-            <el-form-item label="不良记录"
-                          required
-                          prop="Record">
-              <el-input style="width: 100%"
-                        type="textarea"
-                        v-model="editForm.Record"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-      <span style="float: right;margin-top:-10px;">
-        <el-button size="small"
-                   @click="editshow = false">取 消</el-button>
-        <el-button type="primary"
-                   size="small"
-                   @click="EditSubmit()">确 定</el-button>
-      </span>
-    </el-dialog> -->
+    <el-dialog title="准入变化历史"
+               stripe
+               :visible.sync="showBackReason"
+               width="800px">
+      <el-table :data="backReasonList">
+        <el-table-column width="80" property="CertSubStatus" label="状态">
+          <template slot-scope="scope">
+            <span v-if="scope.row.CertSubStatus=='1'"
+                  style="color:#67C23A">准入</span>
+            <span v-else-if="scope.row.CertSubStatus>'1'"
+                  style="color:#E6A23C">暂停</span>
+            <span v-else>——</span>
+          </template>
+        </el-table-column>
+        <el-table-column width="150" property="CreateOn" label="操作时间">
+          <template slot-scope="scope">
+            {{ jstimehandle(scope.row.CreateOn+'') }}
+          </template>
+        </el-table-column>
+        <el-table-column mini-width="120" property="BackReason" label="原因"></el-table-column>
+      </el-table>
+    </el-dialog>
 
     <el-dialog title="企业列表"
                :visible.sync="companyDialog"
@@ -729,132 +673,6 @@
                      :total="currentItemCount1"></el-pagination>
     </el-dialog>
 
-    <!-- <el-dialog :title="certTitle"
-               :visible.sync="certDialog"
-               top="5vh"
-               style="z-index:99;">
-      <span style="float: right;">
-        <el-button type="primary"
-                   size="mini"
-                   style="margin-left:10px; margin-top: -4px;"
-                   @click="initCert($event)">查询</el-button>
-        <el-button type="primary"
-                   size="mini"
-                   style="margin-left:10px; margin-top: -4px;"
-                   @click="certDialog = false">取消</el-button>
-      </span>
-      <el-form ref="form"
-               :inline="true"
-               style="float: right; margin-top: -10px">
-        <el-form-item label="准入范围名称">
-          <el-input size="mini"
-                    style="width: 165px;"
-                    v-model="certChooseName"
-                    placeholder="请输入准入范围名称"></el-input>
-        </el-form-item>
-      </el-form>
-      <el-tabs type="border-card"
-               style="margin-top: 50px"
-               @tab-click="handleClick"
-               v-model="activeName">
-        <el-tab-pane label="物资类"
-                     name="first">
-          <el-table size="mini"
-                    :data="goodsList"
-                    border
-                    height="300px"
-                    @selection-change="handleGoodsSelectionChange">
-            <el-table-column type="selection"
-                             width="55">
-            </el-table-column>
-
-            <el-table-column prop="Code"
-                             label="编码"
-                             width="120px"
-                             align="center"
-                             show-overflow-tooltip></el-table-column>
-            <el-table-column prop="Name"
-                             label="名称"
-                             align="center"
-                             show-overflow-tooltip></el-table-column>
-          </el-table>
-          <el-pagination @size-change="handleGoodsSizeChange"
-                         @current-change="handleGoodsCurrentChange"
-                         :current-page="currentGoodsPage"
-                         :page-sizes="[10, 15, 20, 25]"
-                         :page-size="goodsSize"
-                         layout="total, sizes, prev, pager, next, jumper"
-                         :total="currentGoodsItemCount"></el-pagination>
-        </el-tab-pane>
-        <el-tab-pane label="基建类"
-                     name="second">
-          <el-table size="mini"
-                    :data="basisList"
-                    border
-                    height="300px"
-                    @selection-change="handleBasisSelectionChange">
-            <el-table-column type="selection"
-                             width="55">
-            </el-table-column>
-
-            <el-table-column prop="Code"
-                             label="编码"
-                             width="120px"
-                             align="center"
-                             show-overflow-tooltip></el-table-column>
-            <el-table-column prop="Name"
-                             label="名称"
-                             align="center"
-                             show-overflow-tooltip></el-table-column>
-          </el-table>
-          <el-pagination @size-change="handleBasisSizeChange"
-                         @current-change="handleBasisCurrentChange"
-                         :current-page="currentBasisPage"
-                         :page-sizes="[10, 15, 20, 25]"
-                         :page-size="basisSize"
-                         layout="total, sizes, prev, pager, next, jumper"
-                         :total="currentBasisItemCount"></el-pagination>
-        </el-tab-pane>
-        <el-tab-pane label="技术服务类"
-                     name="third">
-          <el-table size="mini"
-                    :data="tcList"
-                    border
-                    height="300px"
-                    @selection-change="handleTCSelectionChange">
-            <el-table-column type="selection"
-                             width="55">
-            </el-table-column>
-
-            <el-table-column prop="Code"
-                             label="编码"
-                             width="120px"
-                             align="center"
-                             show-overflow-tooltip></el-table-column>
-            <el-table-column prop="Name"
-                             label="名称"
-                             align="center"
-                             show-overflow-tooltip></el-table-column>
-          </el-table>
-          <el-pagination @size-change="handleTCSizeChange"
-                         @current-change="handleTCCurrentChange"
-                         :current-page="currentTCPage"
-                         :page-sizes="[10, 15, 20, 25]"
-                         :page-size="tcSize"
-                         layout="total, sizes, prev, pager, next, jumper"
-                         :total="currentTCItemCount"></el-pagination>
-        </el-tab-pane>
-      </el-tabs>
-      <el-input style="width:100%;margin-top:10px"
-                type="textarea"
-                readonly
-                v-model="yChooseCert"></el-input>
-      <div style="width:100%;text-align:right;margin-top:10px">
-        <el-button type="primary"
-                   size="mini"
-                   @click="savedata()">确 定</el-button>
-      </div>
-    </el-dialog> -->
   </div>
 </template>
 
@@ -864,6 +682,7 @@
 
 <script>
 import setapi from '@/api/oilsupplier/oilclassorgset'
+import backReasonApi from '@/api/oilsupplier/supplierpausereason'
 export default {
   created () {
     // 执行初始化方法
@@ -872,6 +691,8 @@ export default {
   },
   data () {
     return {
+      showBackReason: false,
+      backReasonList: [],
       isChooseDisable: false,
       addShowTitle: '不良行为添加',
       wzFlag: false,
@@ -1014,29 +835,40 @@ export default {
 
       return temp
     },
-    changeCertSubStatus (row, column, cell, event) {
-      if (column.property === 'CertSubStatus') {
-        this.$confirm('确定更改此准入范围状态吗?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then((res) => {
-          this.$axios.get('suppliercertsub/updatestatus/' + row.Id + '/' + row.CertSubStatus + '', {}).then(res => {
-            if (res.data.code === 0) {
-              this.$message({
-                type: 'success',
-                message: '更改成功'
-              })
-              this.initCert()
-            }
-          }).catch(err => {
-            console.error(err)
-          })
-        }).catch(() => {
+    changeCertSubStatus (row) {
+      this.$confirm('确定更改此准入范围状态吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then((res) => {
+        let certSubStatus = row.CertSubStatus
+        if (!row.CertSubStatus) {
+          certSubStatus = 0
+        }
+        let params = {
+          Id: 0,
+          SupplierId: parseInt(row.SupplierId),
+          SupplierCertId: parseInt(row.SupplierCertId),
+          certSubId: parseInt(row.Id),
+          certSubStatus: certSubStatus,
+          backReason: this.entityForm.CertRecord
+        }
+        this.$axios.post('/suppliercertsub/updatestatuswithlog/' + row.Id, params).then(res => {
+          if (res.data.code === 0) {
+            this.$message({
+              type: 'success',
+              message: '更改成功'
+            })
+            this.initCert()
+          }
+        }).catch(err => {
+          console.error(err)
         })
-      } else {
-      }
+      }).catch(() => {
+      })
+
     },
+
     savedata () {
       if (this.goodsSelection.length === 0 && this.basisSelection.length === 0 && this.tcSelection.length === 0) {
         this.$message({
@@ -1520,6 +1352,20 @@ export default {
           console.error(err)
         })
     },
+
+    showBackReasonList (row) {
+      //分页及列表条件
+      let params = {
+        CertSubId: row.Id
+      }
+      //访问接口
+      backReasonApi.getNoPageList(params, this.$axios).then(res => {
+        this.backReasonList = res.data.items
+        this.showBackReason = true
+      }).catch(err => {
+        console.error(err)
+      })
+    },
     // 初始化列表方法
     initDatas (event) {
       if (event != null) {

+ 6 - 6
src/dashoo.cn/frontend_web/src/pages/select/badrecordselect/index.vue

@@ -83,7 +83,7 @@
         <el-table-column label="物资类不良行为"
                          align="center"
                          prop="Wzrecord"
-                         show-overflow-tooltip="true">
+                         :show-overflow-tooltip="true">
         </el-table-column>
           <el-table-column label="基建类状态"
                          align="center"
@@ -99,7 +99,7 @@
         <el-table-column label="基建类不良行为"
                          align="center"
                          prop="Jjrecord"
-                         show-overflow-tooltip="true">
+                         :show-overflow-tooltip="true">
         </el-table-column>
           <el-table-column label="技术服务类状态"
                          align="center"
@@ -115,12 +115,12 @@
         <el-table-column label="技术服务类不良行为"
                          align="center"
                          prop="Jfrecord"
-                         show-overflow-tooltip="true">
+                         :show-overflow-tooltip="true">
         </el-table-column>
          <el-table-column label="准入范围不良行为"
                          align="center"
                          prop="Certrecord"
-                         show-overflow-tooltip="true">
+                         :show-overflow-tooltip="true">
         </el-table-column>
         <!-- <el-table-column label="类别名称" prop="Categoryname" align="center" width="100px"></el-table-column> -->
 
@@ -1137,7 +1137,7 @@ export default {
         .backCompanyBadRecord(val, this.$axios)
         .then(res => {
           if (res.data.items.Id !== 0) {
-            this.addShowTitle = '编辑不良行为'
+            this.addShowTitle = '查看不良行为'
             this.entityForm.WZStatus = res.data.items.Wzstatus
             this.entityForm.WZRecord = res.data.items.Wzrecord
             this.entityForm.JJStatus = res.data.items.Jjstatus
@@ -1329,7 +1329,7 @@ export default {
       })
     },
     edit (row) {
-      this.addShowTitle = '编辑不良行为'
+      this.addShowTitle = '查看不良行为'
       this.isChooseDisable = true
       this.entityForm.CompanyCode = row.Companycode
       this.entityForm.CompanyName = row.Companyname

+ 2 - 2
src/dashoo.cn/frontend_web/src/pages/select/companyselect/index.vue

@@ -3,14 +3,14 @@
     <!--顶部显示-->
     <el-breadcrumb class="heading">
       <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
-      <el-breadcrumb-item>供方情况查询</el-breadcrumb-item>
+      <el-breadcrumb-item>供方信息查询</el-breadcrumb-item>
     </el-breadcrumb>
 
     <!--内框顶部显示-->
     <el-card class="box-card" style="height: calc(100vh - 115px);position:relative">
       <div slot="header">
         <span>
-          <i class="icon icon-table2"></i> 供方情况查询
+          <i class="icon icon-table2"></i> 供方信息查询
         </span>
 
         <el-form

+ 2 - 2
src/dashoo.cn/frontend_web/src/pages/select/specialselect/index.vue

@@ -3,14 +3,14 @@
     <!--顶部显示-->
     <el-breadcrumb class="heading">
       <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
-      <el-breadcrumb-item>特殊业务供方情况查询</el-breadcrumb-item>
+      <el-breadcrumb-item>特殊业务供方信息查询</el-breadcrumb-item>
     </el-breadcrumb>
 
     <!--内框顶部显示-->
     <el-card class="box-card" style="height: calc(100vh - 115px);position:relative">
       <div slot="header">
         <span>
-          <i class="icon icon-table2"></i> 特殊业务供方情况查询
+          <i class="icon icon-table2"></i> 特殊业务供方信息查询
         </span>
 
         <el-form