Explorar o código

位置检验所-钻杆

lining %!s(int64=6) %!d(string=hai) anos
pai
achega
55525641d6

+ 14 - 7
src/dashoo.cn/backend/api/business/limsdataentry/limsdataentry.go

@@ -171,13 +171,20 @@ type LimsDateEntry struct {
 	TestDepart         string    `xorm:"VARCHAR(100)"` //受检单位
 	PositionCheckId    int       `xorm:"INT(11)"`      //检测地点
 	PositionCheck      string    `xorm:"VARCHAR(100)"`
-	Instrument1        string    `xorm:"VARCHAR(255)"` //设备1
-	Instrument2        string    `xorm:"VARCHAR(255)"`
-	Instrument3        string    `xorm:"VARCHAR(255)"`
-	Temperature        string    `xorm:"VARCHAR(50)"`
-	DetectBasis        string    `xorm:"VARCHAR(500)"`
-	StandardDesc       string    `xorm:"VARCHAR(500)"`
-	CheckDate          time.Time `xorm:"DATETIME"`
+	Product            string    `xorm:"VARCHAR(50)"` // 产品名称
+	Spec               string    `xorm:"VARCHAR(50)"` // 产品名称
+	SamplingBase       int       `xorm:"INT(10)"`      // 抽样基数
+	SampleQty          int       `xorm:"INT(10)"`      // 样品数量
+	Appearance      string `xorm:"VARCHAR(100)"`  //外观检验
+	MRemark         string  `xorm:"VARCHAR(255)"` // 主信息备注
+	InspectionDate  time.Time `xorm:"DATETIME"` //  检验日期
+	Instrument1  string    `xorm:"VARCHAR(255)"` //设备1
+	Instrument2  string    `xorm:"VARCHAR(255)"`
+	Instrument3  string    `xorm:"VARCHAR(255)"`
+	Temperature  string    `xorm:"VARCHAR(50)"`
+	DetectBasis  string    `xorm:"VARCHAR(500)"`
+	StandardDesc string    `xorm:"VARCHAR(500)"`
+	CheckDate    time.Time `xorm:"DATETIME"`
 
 	CheckBy        string    `xorm:"VARCHAR(50)"`
 	CreatedTime    time.Time `xorm:"DATETIME created"` //创建时间

+ 47 - 0
src/dashoo.cn/backend/api/business/limspipedrillpipe/limspipedrillpipe.go

@@ -0,0 +1,47 @@
+package limspipedrillpipe
+
+import "time"
+
+type LimsPipeDrillPipe struct {
+	Id                int       `xorm:"not null pk autoincr INT(10)"`
+	Product           string    `xorm:"comment('产品名称') VARCHAR(50)"`
+	Specifications    string    `xorm:"comment('规格型号') VARCHAR(50)"`
+	SamplingBase      int       `xorm:"comment('抽样基数') INT(10)"`
+	SampleQuantity    int       `xorm:"comment('样品数量') INT(10)"`
+	SampleNumber      string    `xorm:"comment('样品编号') VARCHAR(50)"`
+	CloseDistanceOut  float64   `xorm:"comment('紧密距外螺纹') DECIMAL(10,2)"`
+	CloseDistanceIn   float64   `xorm:"comment('紧密距内螺纹') DECIMAL(10,2)"`
+	TaperToleranceOut float64   `xorm:"comment('锥度公差外螺纹') DECIMAL(10,2)"`
+	TaperToleranceIn  float64   `xorm:"comment('锥度公差内螺纹') DECIMAL(10,2)"`
+	PitchToleranceOut float64   `xorm:"comment('螺距公差外螺纹') DECIMAL(10,2)"`
+	PitchToleranceIn  float64   `xorm:"comment('螺距公差内螺纹') DECIMAL(10,2)"`
+	ShoulderSurface   float64   `xorm:"comment('螺纹轴线与台肩面垂直度') DECIMAL(10,2)"`
+	EndFace           float64   `xorm:"comment('螺纹轴线与端面垂直度') DECIMAL(10,2)"`
+	TubeDiameter      float64   `xorm:"comment('管体外径') DECIMAL(10,2)"`
+	LPC               float64   `xorm:"comment('LPC') DECIMAL(10,2)"`
+	DF                float64   `xorm:"comment('DF') DECIMAL(10,2)"`
+	QC                float64   `xorm:"comment('QC') DECIMAL(10,2)"`
+	LPB               float64   `xorm:"comment('LPB') DECIMAL(10,2)"`
+	LB                float64   `xorm:"comment('LB') DECIMAL(10,2)"`
+	WallDif           float64   `xorm:"comment('LB') DECIMAL(10,2)"`
+	TubeLength        float64   `xorm:"comment('管体长度') DECIMAL(10,2)"`
+	InnerDiameter     float64   `xorm:"comment('接头内径') DECIMAL(10,2)"`
+	WallThickness     float64   `xorm:"comment('壁厚') DECIMAL(10,2)"`
+	JointDiameterM    float64   `xorm:"comment('接头外径公端') DECIMAL(10,2)"`
+	JointDiameterF    float64   `xorm:"comment('接头外径母端') DECIMAL(10,2)"`
+	WallDifF          float64   `xorm:"comment('焊接不同轴度公端') DECIMAL(10,2)"`
+	WallDifM          float64   `xorm:"comment('焊接不同轴度母端') DECIMAL(10,2)"`
+	OuterDiameterF    float64   `xorm:"comment('外径偏心度公端') DECIMAL(10,2)"`
+	OuterDiameterM    float64   `xorm:"comment('外径偏心度母端') DECIMAL(10,2)"`
+	Appearance        string    `xorm:"comment('外观检验') VARCHAR(255)"`
+	Inspector         string    `xorm:"comment('检验员') VARCHAR(50)"`
+	Audit             string    `xorm:"comment('审核') VARCHAR(255)"`
+	InspectionDate    time.Time `xorm:"comment('检验日期') DATETIME"`
+	Remark            string    `xorm:"comment('备注') VARCHAR(255)"`
+	CreateUserId      int       `xorm:"INT(11)"`
+	CreateOn          time.Time `xorm:"DATETIME"`
+	CreateBy          string    `xorm:"VARCHAR(50)"`
+	ModifiedOn        time.Time `xorm:"DATETIME"`
+	ModifiedUserId    int       `xorm:"INT(11)"`
+	ModifiedBy        string    `xorm:"VARCHAR(50)"`
+}

+ 16 - 0
src/dashoo.cn/backend/api/business/limspipedrillpipe/limspipedrillpipeService.go

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

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

@@ -250,6 +250,7 @@ var (
 	LimsReportSpecialFieldName               string = "LimsReportSpecialField" // 油田专用变压器运行数据现场测试记录
 	LimsReportHeatingFurnaceName             string = "LimsReportHeatingFurnace" // 加 热 炉 节 能 监 测 原 始 记 录 表
 	LimsHeatingFurnaceItemsName              string = "LimsHeatingFurnaceItems" // 加 热 炉 节 能 -- 从表
+	LimsPipeDrillPipeName                    string = "LimsPipeDrillPipe" //  石油专用管材钻杆检验记录
 )
 
 //分页信息及数据

+ 7 - 0
src/dashoo.cn/backend/api/controllers/lims/limsdataentry.go

@@ -4193,6 +4193,13 @@ func (this *LimsDataEntryController) UpdateEntity() {
 		"DetectBasis",
 		"StandardDesc",
 		"CheckDate",
+		"Product",
+		"Spec",
+		"SamplingBase",
+		"SampleQty",
+		"Appearance",
+		"MRemark",
+		"InspectionDate",
 	}
 	err := svc.UpdateEntityBytbl(this.User.AccCode+LimsDateEntryName, id, &model, cols)
 	if err == nil {

+ 490 - 0
src/dashoo.cn/backend/api/controllers/lims/limspipedrillpipe.go

@@ -0,0 +1,490 @@
+package lims
+
+import (
+	"dashoo.cn/business/userRole"
+	"dashoo.cn/backend/api/business/baseUser"
+	"dashoo.cn/backend/api/business/limspipedrillpipe"
+	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/utils"
+	"encoding/json"
+	"strings"
+	"time"
+)
+
+type LimsPipeDrillPipeController struct {
+	BaseController
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []limspipedrillpipe.LimsPipeDrillPipe
+// @router /list [get]
+func (this *LimsPipeDrillPipeController) 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")
+	Product := this.GetString("Product")
+	Specifications := this.GetString("Specifications")
+	SamplingBase := this.GetString("SamplingBase")
+	SampleQuantity := this.GetString("SampleQuantity")
+	SampleNumber := this.GetString("SampleNumber")
+	CloseDistanceOut := this.GetString("CloseDistanceOut")
+	CloseDistanceIn := this.GetString("CloseDistanceIn")
+	TaperToleranceOut := this.GetString("TaperToleranceOut")
+	TaperToleranceIn := this.GetString("TaperToleranceIn")
+	PitchToleranceOut := this.GetString("PitchToleranceOut")
+	PitchToleranceIn := this.GetString("PitchToleranceIn")
+	ShoulderSurface := this.GetString("ShoulderSurface")
+	EndFace := this.GetString("EndFace")
+	TubeDiameter := this.GetString("TubeDiameter")
+	LPC := this.GetString("LPC")
+	DF := this.GetString("DF")
+	QC := this.GetString("QC")
+	LB := this.GetString("LB")
+	LPB := this.GetString("LPB")
+	WallDif := this.GetString("WallDif")
+	TubeLength := this.GetString("TubeLength")
+	InnerDiameter := this.GetString("InnerDiameter")
+	WallThickness := this.GetString("WallThickness")
+	JointDiameterM := this.GetString("JointDiameterM")
+	JointDiameterF := this.GetString("JointDiameterF")
+	WallDifF := this.GetString("WallDifF")
+	WallDifM := this.GetString("WallDifM")
+	OuterDiameterF := this.GetString("OuterDiameterF")
+	OuterDiameterM := this.GetString("OuterDiameterM")
+	Appearance := this.GetString("Appearance")
+	Inspector := this.GetString("Inspector")
+	Audit := this.GetString("Audit")
+	InspectionDate := this.GetString("InspectionDate")
+	Remark := this.GetString("Remark")
+	CreateUserId := this.GetString("CreateUserId")
+	CreateOn := this.GetString("CreateOn")
+	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 Product != "" {
+		where = where + " and Product like '%" + Product + "%'"
+	}
+
+
+	if Specifications != "" {
+		where = where + " and Specifications like '%" + Specifications + "%'"
+	}
+
+
+	if SamplingBase != "" {
+		where = where + " and SamplingBase like '%" + SamplingBase + "%'"
+	}
+
+
+	if SampleQuantity != "" {
+		where = where + " and SampleQuantity like '%" + SampleQuantity + "%'"
+	}
+
+
+	if SampleNumber != "" {
+		where = where + " and SampleNumber like '%" + SampleNumber + "%'"
+	}
+
+
+	if CloseDistanceOut != "" {
+		where = where + " and CloseDistanceOut like '%" + CloseDistanceOut + "%'"
+	}
+
+
+	if CloseDistanceIn != "" {
+		where = where + " and CloseDistanceIn like '%" + CloseDistanceIn + "%'"
+	}
+
+
+	if TaperToleranceOut != "" {
+		where = where + " and TaperToleranceOut like '%" + TaperToleranceOut + "%'"
+	}
+
+
+	if TaperToleranceIn != "" {
+		where = where + " and TaperToleranceIn like '%" + TaperToleranceIn + "%'"
+	}
+
+
+	if PitchToleranceOut != "" {
+		where = where + " and PitchToleranceOut like '%" + PitchToleranceOut + "%'"
+	}
+
+
+	if PitchToleranceIn != "" {
+		where = where + " and PitchToleranceIn like '%" + PitchToleranceIn + "%'"
+	}
+
+
+	if ShoulderSurface != "" {
+		where = where + " and ShoulderSurface like '%" + ShoulderSurface + "%'"
+	}
+
+
+	if EndFace != "" {
+		where = where + " and EndFace like '%" + EndFace + "%'"
+	}
+
+
+	if TubeDiameter != "" {
+		where = where + " and TubeDiameter like '%" + TubeDiameter + "%'"
+	}
+
+
+	if DF != "" {
+		where = where + " and DF like '%" + DF + "%'"
+	}
+
+
+	if QC != "" {
+		where = where + " and QC like '%" + QC + "%'"
+	}
+
+
+	if LB != "" {
+		where = where + " and DRG like '%" + LB + "%'"
+	}
+
+
+	if LPC != "" {
+		where = where + " and LPC like '%" + LPC + "%'"
+	}
+
+	if LPB != "" {
+		where = where + " and LPB like '%" + LPB + "%'"
+	}
+
+	if WallDif != "" {
+		where = where + " and WallDif like '%" + WallDif + "%'"
+	}
+
+	if TubeLength != "" {
+		where = where + " and TubeLength like '%" + TubeLength + "%'"
+	}
+
+
+	if InnerDiameter != "" {
+		where = where + " and InnerDiameter like '%" + InnerDiameter + "%'"
+	}
+
+
+	if WallThickness != "" {
+		where = where + " and WallThickness like '%" + WallThickness + "%'"
+	}
+
+
+	if JointDiameterM != "" {
+		where = where + " and JointDiameterM like '%" + JointDiameterM + "%'"
+	}
+
+
+	if JointDiameterF != "" {
+		where = where + " and JointDiameterF like '%" + JointDiameterF + "%'"
+	}
+
+
+	if WallDifF != "" {
+		where = where + " and WallDifF like '%" + WallDifF + "%'"
+	}
+
+
+	if WallDifM != "" {
+		where = where + " and WallDifM like '%" + WallDifM + "%'"
+	}
+
+
+	if OuterDiameterF != "" {
+		where = where + " and OuterDiameterF like '%" + OuterDiameterF + "%'"
+	}
+
+
+	if OuterDiameterM != "" {
+		where = where + " and OuterDiameterM like '%" + OuterDiameterM + "%'"
+	}
+
+
+	if Appearance != "" {
+		where = where + " and Appearance like '%" + Appearance + "%'"
+	}
+
+
+	if Inspector != "" {
+		where = where + " and Inspector like '%" + Inspector + "%'"
+	}
+
+
+	if Audit != "" {
+		where = where + " and Audit like '%" + Audit + "%'"
+	}
+
+
+	if InspectionDate != "" {
+		where = where + " and InspectionDate like '%" + InspectionDate + "%'"
+	}
+
+
+	if Remark != "" {
+		where = where + " and Remark like '%" + Remark + "%'"
+	}
+
+
+	if CreateUserId != "" {
+		where = where + " and CreateUserId like '%" + CreateUserId + "%'"
+	}
+
+
+	if CreateOn != "" {
+		where = where + " and CreateOn like '%" + CreateOn + "%'"
+	}
+
+
+	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 := limspipedrillpipe.GetLimsPipeDrillPipeService(utils.DBE)
+	var list []limspipedrillpipe.LimsPipeDrillPipe
+	total := svc.GetPagingEntitiesWithOrderBytbl(this.User.AccCode, 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} map[string]interface{}
+// @router /dictlist [get]
+func (this *LimsPipeDrillPipeController) 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", this.User.AccCode)
+	var userEntity userRole.Base_User
+	userSvc.GetEntityById(this.User.Id, &userEntity)
+	dictList["Supervisers"] = userSvc.GetUserListByDepartmentId(this.User.AccCode, userEntity.Departmentid)
+
+	//var dictCustomer []svccustomer.Customer
+	//customerSvc.GetEntitysByWhere(this.User.AccCode + CustomerName, "", &dictCustomer)
+	//dictList["EntrustCorp"] = &dictCustomer
+
+	var datainfo DataInfo
+	datainfo.Items = dictList
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} limspipedrillpipe.LimsPipeDrillPipe
+// @router /get/:id [get]
+func (this *LimsPipeDrillPipeController) GetEntity() {
+	Id := this.Ctx.Input.Param(":id")
+
+	var model limspipedrillpipe.LimsPipeDrillPipe
+	svc := limspipedrillpipe.GetLimsPipeDrillPipeService(utils.DBE)
+	svc.GetEntityByIdBytbl(this.User.AccCode+LimsPipeDrillPipeName, Id, &model)
+
+	this.Data["json"] = &model
+	this.ServeJSON()
+}
+
+// @Title 添加
+// @Description 新增
+// @Param 	body body limspipedrillpipe.LimsPipeDrillPipe
+// @Success	200	{object} controllers.Request
+// @router /add [post]
+func (this *LimsPipeDrillPipeController) AddEntity() {
+	var model limspipedrillpipe.LimsPipeDrillPipe
+	var jsonBlob = this.Ctx.Input.RequestBody
+	svc := limspipedrillpipe.GetLimsPipeDrillPipeService(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(this.User.AccCode+LimsPipeDrillPipeName, &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 limspipedrillpipe.LimsPipeDrillPipe
+// @Success	200	{object} controllers.Request
+// @router /update/:id [post]
+func (this *LimsPipeDrillPipeController) 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 limspipedrillpipe.LimsPipeDrillPipe
+	svc := limspipedrillpipe.GetLimsPipeDrillPipeService(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",
+		"Product",
+		"Specifications",
+		"SamplingBase",
+		"SampleQuantity",
+		"SampleNumber",
+		"CloseDistanceOut",
+		"CloseDistanceIn",
+		"TaperToleranceOut",
+		"TaperToleranceIn",
+		"PitchToleranceOut",
+		"PitchToleranceIn",
+		"ShoulderSurface",
+		"EndFace",
+		"TubeDiameter",
+		"DF",
+		"QC",
+		"LPB",
+		"LPC",
+		"LB",
+		"WallDif",
+		"TubeLength",
+		"InnerDiameter",
+		"WallThickness",
+		"JointDiameterM",
+		"JointDiameterF",
+		"WallDifF",
+		"WallDifM",
+		"OuterDiameterF",
+		"OuterDiameterM",
+		"Appearance",
+		"Inspector",
+		"Audit",
+		"InspectionDate",
+		"Remark",
+		"CreateUserId",
+		"CreateOn",
+		"CreateBy",
+		"ModifiedOn",
+		"ModifiedUserId",
+		"ModifiedBy",
+	}
+	err := svc.UpdateEntityBytbl(this.User.AccCode+LimsPipeDrillPipeName, 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 *LimsPipeDrillPipeController) 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 limspipedrillpipe.LimsPipeDrillPipe
+	var entityempty limspipedrillpipe.LimsPipeDrillPipe
+	svc := limspipedrillpipe.GetLimsPipeDrillPipeService(utils.DBE)
+	opdesc := "删除-" + Id
+	err := svc.DeleteOperationAndWriteLogBytbl(this.User.AccCode+LimsPipeDrillPipeName, BaseOperationLogName, Id, &model, &entityempty, utils.ToStr(this.User.Id), this.User.Username, opdesc, this.User.AccCode, "钻井日报")
+	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()
+	}
+}
+
+ 

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

@@ -524,6 +524,12 @@ func init() {
 				&lims.LimsReportHeatingFurnaceSessionController{},
 			),
 		),
+		// 石油专用管材钻杆检验记录
+		beego.NSNamespace("/limspipedrillpipe",
+			beego.NSInclude(
+				&lims.LimsPipeDrillPipeController{},
+			),
+		),
 	)
 	beego.AddNamespace(ns)
 }

+ 41 - 0
src/dashoo.cn/frontend_web/src/api/lims/limspipedrillpipe.js

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

+ 7 - 0
src/dashoo.cn/frontend_web/src/pages/lims/dataentry/alltask.vue

@@ -851,6 +851,13 @@
               query: queryParams
             })
             break
+          // 石油专用管材钻杆检验记录
+          case 'DAYT.PipeDrillPipe.Detail':
+            this.$router.push({
+              path: '/lims/reportpipedrillpipe/datalist',
+              query: queryParams
+            })
+            break
           default:
             this.$message.warning('无模板类型相匹配,请重试');
         }

+ 733 - 0
src/dashoo.cn/frontend_web/src/pages/lims/reportpipedrillpipe/_opera/datalist.vue

@@ -0,0 +1,733 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/lims/limspipedrillpipe' }">石油专用管材钻杆检验记录</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;">
+          <el-button type="primary" size="mini" v-if="this.ischeck===1" @click="jiaoheshowdialog">校核</el-button>
+          <el-button type="primary" size="mini" v-if="this.DataStatus==0||this.DataStatus==5||this.DataStatus==3" @click="setProoFreadShow">提交校核</el-button>
+          <el-button type="plain" size="mini" style="margin-left:10px; margin-top: -4px;"  v-if="this.DataStatus==0||this.DataStatus==5||this.DataStatus==3" @click="addDataEntity">添加明细</el-button>
+          <!--<el-button type="plain" @click="searchCommand('search')" size="mini"-->
+          <!--style="margin-left:10px; margin-top: -4px;">查询</el-button>-->
+
+          <router-link v-if="this.sign == '1'" :to="'/lims/dataentry/tacktodo'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+           <router-link v-else-if="this.sign == '2'" :to="'/lims/dataentry'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+           <router-link v-else-if="this.sign == '3'" :to="'/lims/dataentry/alltask'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+          <router-link v-else :to="'/lims/dataentry'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+        </span>
+        <el-form ref="form" :inline="true" style="float: right; margin-top: -7px">
+          <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-input size="mini" v-model="searchForm.SampleNumber" style="width:100%" placeholder="请输入"></el-input>
+          </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>
+
+      <!--<data-main :DataEntryId="DataEntryId + ''" :EId="EId + ''" :DataDocId="DataDocId+''" :TaskBalanceId="TaskBalanceId+''"-->
+                 <!--:DataStatus="DataStatus" @init-data-main="initDatas"></data-main>-->
+
+      <el-card>
+        <div slot="header" class="clearfix">
+          <span>数据录入</span>
+        </div>
+        <el-form label-width="120px" ref="formDataMain" :model="formDataMain">
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="产品名称" prop="Product" :rules="{ required: true, message: '产品名称不能为空!'}">
+                <el-input v-model="formDataMain.Product" placeholder="请输入" style="width: 100%" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="规格型号">
+                <el-input v-model="formDataMain.Spec" placeholder="请输入" style="width: 100%" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="抽样基数" prop="SamplingBase" :rules="[{ type: 'number', message: '必须为数字值'}]">
+                <el-input v-model.number="formDataMain.SamplingBase" placeholder="请输入" style="width: 100%" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="样品数量" prop="SampleQty" :rules="[{ type: 'number', message: '必须为数字值'}]">
+                <el-input v-model="formDataMain.SampleQty" placeholder="请输入" style="width: 100%" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="外观检验" prop="Appearance">
+                <el-input v-model="formDataMain.Appearance" placeholder="请输入" style="width: 100%" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="检验日期" prop="InspectionDate">
+                <el-date-picker v-model="formDataMain.InspectionDate" type="date"
+                  placeholder="选择日期" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="备注">
+                <el-input type="textarea" v-model="formDataMain.MRemark" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" align="center">
+              <el-button type="primary" size="mini" @click="saveMainInfo" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">保存</el-button>
+              <el-button type="primary" size="mini" @click="getDataHistory" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">选择历史记录</el-button>
+            </el-col>
+          </el-row>
+        </el-form>
+      </el-card>
+      <el-card>
+        <el-table :data="entityList" border height="calc(100vh - 250px)" highlight-current-row style="width: 100%" @sort-change="orderby">
+          <el-table-column  v-if="this.DataStatus==0||this.DataStatus==5||this.DataStatus==3" label="操作" min-width="190" align="center" fixed>
+            <template slot-scope="scope">
+              <el-button type="primary" plain size="mini" title="编辑"  @click="EditEntity(scope.row)">编辑</el-button>
+              <el-popover placement="top" title="提示">
+                <el-alert title="" description="确认要删除吗?" type="warning" :closable="false">
+                </el-alert>
+                <br />
+                <div style="text-align: right; margin: 0">
+                  <el-button type="primary" size="mini" @click="deleteEntity(scope.row)">删除</el-button>
+                </div>
+                <el-button slot="reference" type="primary" plain size="mini" title="删除" style="margin-left:3px">
+                  删除
+                </el-button>
+              </el-popover>
+            </template>
+          </el-table-column>
+          <el-table-column prop="SampleNumber" sortable min-width="110" label="样品编号" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.SampleNumber"
+                        style="width: 100%"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column  label="紧密距(mm)" align="center">
+            <el-table-column prop="CloseDistanceOut" sortable min-width="90" label="外螺纹" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.CloseDistanceOut"
+                          style="width: 100%"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column prop="CloseDistanceIn" sortable min-width="90" label="内螺纹" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.CloseDistanceIn"
+                          style="width: 100%"></el-input>
+              </template>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column label="锥度公差·10-3(in/in)" align="center">
+            <el-table-column prop="TaperToleranceOut" sortable min-width="100" label="外螺纹" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.TaperToleranceOut"
+                          style="width: 100%"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column prop="TaperToleranceIn" sortable min-width="100" label="内螺纹" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.TaperToleranceIn"
+                          style="width: 100%"></el-input>
+              </template>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column label="螺距公差·10-3(in/in)" align="center">
+            <el-table-column prop="PitchToleranceOut" sortable min-width="100" label="外螺纹" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.PitchToleranceOut"
+                          style="width: 100%"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column prop="PitchToleranceIn" sortable min-width="100" label="内螺纹" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.PitchToleranceIn"
+                          style="width: 100%"></el-input>
+              </template>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column prop="ShoulderSurface" label="螺纹轴线(mm)" align="center">
+            <el-table-column sortable min-width="150" label="与台肩面垂直度" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.ShoulderSurface"
+                          style="width: 100%"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column prop="EndFace" sortable min-width="150" label="与端面垂直度" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.EndFace"
+                          style="width: 100%"></el-input>
+              </template>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column prop="TubeDiameter" sortable min-width="160" label="管体外径(mm)" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.TubeDiameter"
+                        style="width: 100%"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column prop="LPC" sortable min-width="130" label="LPC(mm)" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.LPC"
+                        style="width: 100%"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column prop="DF" sortable min-width="120" label="DF(mm)" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.DF"
+                        style="width: 100%"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column prop="QC" sortable min-width="125" label="QC(mm)" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.QC"
+                        style="width: 100%"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column prop="LPB" sortable min-width="140" label="LPB(mm)" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.LPB"
+                        style="width: 100%"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column prop="LB" sortable min-width="120" label="LB(mm)" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.LB"
+                        style="width: 100%"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column prop="TubeLength" sortable min-width="150" label="管体长度(m)" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.TubeLength"
+                        style="width: 100%"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column prop="InnerDiameter" sortable min-width="160" label="接头内径(mm)" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.InnerDiameter"
+                        style="width: 100%"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column prop="WallThickness" sortable min-width="130" label="壁厚(mm)" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.WallThickness"
+                        style="width: 100%"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column label="接头外径(mm)" align="center">
+            <el-table-column prop="JointDiameterM" sortable min-width="100" label="公端" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.JointDiameterM"
+                          style="width: 100%"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column prop="JointDiameterF" sortable min-width="100" label="母端" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.JointDiameterF"
+                          style="width: 100%"></el-input>
+              </template>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column label="焊接不同轴度(mm)" align="center">
+            <el-table-column prop="WallDifF" sortable min-width="100" label="公端" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.WallDifF"
+                          style="width: 100%"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column prop="WallDifM" sortable min-width="100" label="母端" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.WallDifM"
+                          style="width: 100%"></el-input>
+              </template>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column label="外径偏心度(mm)" align="center">
+            <el-table-column prop="OuterDiameterF" sortable min-width="100" label="公端" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.OuterDiameterF"
+                          style="width: 100%"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column prop="OuterDiameterM" sortable min-width="100" label="母端" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3" v-model="scope.row.OuterDiameterM"
+                          style="width: 100%"></el-input>
+              </template>
+            </el-table-column>
+          </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-card>
+
+    <el-dialog title="高级查询" :visible.sync="dialogVisible" width="720px">
+      <el-form ref="advancedsearchForm" label-width="110px">
+        <el-row>
+
+          <el-col :span="12">
+            <el-form-item label="样品编号">
+              <el-input size="mini" v-model="searchForm.SampleNumber" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="紧密距外螺纹" label-width="120px">
+              <el-input size="mini" v-model="searchForm.CloseDistanceOut" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="紧密距内螺纹" label-width="120px">
+              <el-input size="mini" v-model="searchForm.CloseDistanceIn" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="锥度公差外螺纹" label-width="140px">
+              <el-input size="mini" v-model="searchForm.TaperToleranceOut" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="锥度公差内螺纹" label-width="140px">
+              <el-input size="mini" v-model="searchForm.TaperToleranceIn" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="螺距公差外螺纹" label-width="140px">
+              <el-input size="mini" v-model="searchForm.PitchToleranceOut" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="螺距公差内螺纹" label-width="140px">
+              <el-input size="mini" v-model="searchForm.PitchToleranceIn" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="螺纹轴线与台肩面垂直度" label-width="170px">
+              <el-input size="mini" v-model="searchForm.ShoulderSurface" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="螺纹轴线与端面垂直度" label-width="170px">
+              <el-input size="mini" v-model="searchForm.EndFace" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="管体外径" label-width="120px">
+              <el-input size="mini" v-model="searchForm.TubeDiameter" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="LPC">
+              <el-input size="mini" v-model="searchForm.DF" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="DF">
+              <el-input size="mini" v-model="searchForm.QC" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="QC">
+              <el-input size="mini" v-model="searchForm.DRG" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="LPB">
+              <el-input size="mini" v-model="searchForm.LPC" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="LB">
+              <el-input size="mini" v-model="searchForm.WallDif" 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.TubeLength" 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.InnerDiameter" 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.WallThickness" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="接头外径公端" label-width="130px">
+              <el-input size="mini" v-model="searchForm.JointDiameterM" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="接头外径母端" label-width="130px">
+              <el-input size="mini" v-model="searchForm.JointDiameterF" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="焊接不同轴度公端" label-width="140px">
+              <el-input size="mini" v-model="searchForm.WallDifF" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="焊接不同轴度母端" label-width="140px">
+              <el-input size="mini" v-model="searchForm.WallDifM" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="外径偏心度公端" label-width="130px">
+              <el-input size="mini" v-model="searchForm.OuterDiameterF" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="外径偏心度母端" label-width="130px">
+              <el-input size="mini" v-model="searchForm.OuterDiameterM" 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.Appearance" 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>
+
+    <data-opera ref="DataoperaCompoment" :DataEntryId="DataEntryId+''" :TaskBalanceId="TaskBalanceId+''" :EId="EId+''"  @init-data="initDatas"></data-opera>
+
+  </div>
+</template>
+<script>
+  import { mapGetters } from 'vuex'
+  import api from '@/api/lims/limspipedrillpipe'
+  import DataOpera from './operation.vue'
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'limspipedrillpipe',
+    components: {
+      DataOpera
+    },
+    data () {
+      return {
+        dialogVisible: false,
+        activeName: '1',
+        DataStatus: 0,
+        // 列表数据
+        entityList: [],
+        // 分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+        // 列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        formDataMain: {
+          Product: '',
+          Spec: '',
+          SamplingBase: '',
+          SampleQty: '',
+          Appearance: '',
+          InspectionDate: new Date(),
+          MRemark: ''
+        },
+        // 查询时间
+        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        // 查询项
+        searchFormReset: {},
+        searchForm: {
+          Id: '',
+          Product: '',
+          Specifications: '',
+          SamplingBase: '',
+          SampleQuantity: '',
+          SampleNumber: '',
+          CloseDistanceOut: '',
+          CloseDistanceIn: '',
+          TaperToleranceOut: '',
+          TaperToleranceIn: '',
+          PitchToleranceOut: '',
+          PitchToleranceIn: '',
+          ShoulderSurface: '',
+          EndFace: '',
+          TubeDiameter: '',
+          DF: '',
+          QC: '',
+          DRG: '',
+          LPC: '',
+          WallDif: '',
+          TubeLength: '',
+          InnerDiameter: '',
+          WallThickness: '',
+          JointDiameterM: '',
+          JointDiameterF: '',
+          WallDifF: '',
+          WallDifM: '',
+          OuterDiameterF: '',
+          OuterDiameterM: '',
+          Appearance: '',
+          Inspector: '',
+          Audit: '',
+          InspectionDate: '',
+          Remark: '',
+          CreateUserId: '',
+          CreateOn: '',
+          CreateBy: '',
+          ModifiedOn: '',
+          ModifiedUserId: '',
+          ModifiedBy: ''
+        }
+      }
+    },
+    created () {
+      this.EId = this.$route.query.eid
+      this.TaskBalanceId = this.$route.query.tbid
+      this.DataEntryId = this.$route.query.deid
+      this.DataStatus = 0 // parseInt(this.$route.query.datastatus)
+      this.DataDocId = this.$route.query.datadocId
+      this.sign = this.$route.query.sign
+      this.ischeck = this.$route.query.ischeck
+      // 查询条件初始值备份
+      Object.assign(this.searchFormReset, this.searchForm)
+      // 查询列表
+      this.getDataEntry()
+      this.initDatas()
+      // this.getDictOptions()
+    },
+    methods: {
+      saveMainInfo () {
+        this.$refs['formDataMain'].validate((valid) => {
+          if (valid) {
+            this.$axios.post('/limsdataentry/updateEntity/' + this.DataEntryId, this.formDataMain).then(res => {
+              if (res.data.code === 0) {
+                this.getDataEntry()
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            }).catch(error => {
+              console.log(error)
+            })
+          }
+        })
+      },
+      getDataEntry () {
+        this.$axios.get('/limsdataentry/getdataentry/' + this.DataEntryId).then(res => {
+          this.formDataMain = res.data
+          // this.params.Id = res.data.Id
+        }).catch(error => {
+          console.log(error)
+        })
+      },
+      getDataHistory () {
+
+      },
+      initDatas () {
+        // 分页及列表条件
+        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)
+        })
+      },
+      addDataEntity () {
+        // 刷新子列表
+        this.$refs['DataoperaCompoment'].resetFormData()
+        this.$refs['DataoperaCompoment'].dialogVisible = true
+      },
+
+      setProoFreadShow () {
+
+      },
+
+      getDictOptions () {
+        api.getDictList(this.$axios).then(res => {
+
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      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.initDatas()
+      },
+      clearSearch () {
+        Object.assign(this.searchForm, this.searchFormReset)
+        // this.searchForm = this.searchFormReset;
+        this.CreateOn = ''
+        this.initDatas()
+      },
+      handleSearch () {
+        this.currentPage = 1
+        this.dialogVisible = false
+        this.initDatas()
+      },
+      handleCurrentChange (value) {
+        this.currentPage = value
+        this.initDatas()
+      },
+      handleSizeChange (value) {
+        this.size = value
+        this.currentPage = 1
+        this.initDatas()
+      },
+      deleteEntity (row) {
+        row.deleteConfirmFlag = false
+        api.deleteEntity(row.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)
+        })
+      },
+      EditEntity (row) {
+        this.$refs['DataoperaCompoment'].subListEditEntity(row.Id)
+        this.$refs['DataoperaCompoment'].dialogVisible = true
+      },
+
+      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)
+        }
+      },
+
+      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">
+
+</style>
+

+ 399 - 0
src/dashoo.cn/frontend_web/src/pages/lims/reportpipedrillpipe/_opera/operation.vue

@@ -0,0 +1,399 @@
+<template>
+  <div>
+    <!--<el-breadcrumb class="heading">-->
+      <!--<el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>-->
+      <!--<el-breadcrumb-item :to="{ path: '/lims/s5ovelimspipedrillpipe' }">石油专用管材钻杆检验记录</el-breadcrumb-item>-->
+      <!--<el-breadcrumb-item>编辑</el-breadcrumb-item>-->
+    <!--</el-breadcrumb>-->
+    <el-dialog
+      title="漏电保护信息"
+      :visible.sync="dialogVisible"
+      width="80%">
+      <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="saveEntity">保存</el-button>
+            <router-link :to="'/lims/reportpipedrillpipe/datalist'">
+              <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+            </router-link>
+          </span>
+        </div>
+        <el-form label-width="110px" ref="EntityForm" :model="formData">
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="样品编号">
+                <el-input v-model="formData.SampleNumber" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="紧密距外螺纹">
+                <el-input type="number" step="0.01" v-model.number="formData.CloseDistanceOut" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="紧密距内螺纹">
+                <el-input type="number" step="0.01" v-model.number="formData.CloseDistanceIn" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="锥度公差外螺纹" label-width="120px">
+                <el-input type="number" step="0.01" v-model.number="formData.TaperToleranceOut" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="锥度公差内螺纹">
+                <el-input type="number" step="0.01" v-model.number="formData.TaperToleranceIn" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="螺距公差外螺纹" label-width="120px">
+                <el-input type="number" step="0.01" v-model.number="formData.PitchToleranceOut" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="螺距公差内螺纹" label-width="120px">
+                <el-input type="number" step="0.01" v-model.number="formData.PitchToleranceIn" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="螺纹轴线与台肩面垂直度" label-width="170px">
+                <el-input type="number" step="0.01" v-model.number="formData.ShoulderSurface" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="螺纹轴线与端面垂直度" label-width="160px">
+                <el-input type="number" step="0.01" v-model.number="formData.EndFace" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="管体外径">
+                <el-input type="number" step="0.01" v-model.number="formData.TubeDiameter" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="LPC">
+                <el-input type="number" step="0.01" v-model.number="formData.LPC" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="DF">
+                <el-input type="number" step="0.01" v-model.number="formData.DF" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="QC">
+                <el-input type="number" step="0.01" v-model.number="formData.QC" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="LPB">
+                <el-input type="number" step="0.01" v-model.number="formData.LPB" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="LB">
+                <el-input type="number" step="0.01" v-model.number="formData.LB" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="管体长度">
+                <el-input type="number" step="0.01" v-model.number="formData.TubeLength" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="接头内径">
+                <el-input type="number" step="0.01" v-model.number="formData.InnerDiameter" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="壁厚">
+                <el-input type="number" step="0.01" v-model.number="formData.WallThickness" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="接头外径公端">
+                <el-input type="number" step="0.01" v-model.number="formData.JointDiameterM" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="接头外径母端">
+                <el-input type="number" step="0.01" v-model.number="formData.JointDiameterF" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="焊接不同轴度公端" label-width="130px">
+                <el-input type="number" step="0.01" v-model.number="formData.WallDifF" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="焊接不同轴度母端" label-width="130px">
+                <el-input type="number" step="0.01" v-model.number="formData.WallDifM" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="外径偏心度公端" label-width="130px">
+                <el-input type="number" step="0.01" v-model.number="formData.OuterDiameterF" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="6">
+              <el-form-item label="外径偏心度母端" label-width="130px">
+                <el-input type="number" step="0.01" v-model.number="formData.OuterDiameterM" placeholder="请输入"  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="24">
+              <el-form-item :span="24" style="text-align: center;">
+                <el-button type="primary" size="small" @click="saveEntity"><i class="el-icon-circle-check"></i> {{ this.saveBtnName }}</el-button>
+                <el-checkbox style="margin-left: 10px;" v-model="continueInsertChecked" label="连续新增?" size="small" @change="continueInsertChange"></el-checkbox>
+                <el-button type="plain" size="small" @click="resetFormData"><i class="el-icon-refresh"></i> 重置</el-button>
+              </el-form-item>
+            </el-col>
+
+          </el-row>
+        </el-form>
+      </el-card>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  import api from '@/api/lims/limspipedrillpipe'
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'limspipedrillpipeEdit',
+    props: {
+      EId: String,
+      TaskBalanceId: String,
+      DataEntryId: String
+    },
+
+    data () {
+      return {
+        saveBtnName: '新增',
+        continueInsertChecked: false,
+        dialogVisible: false,
+        serviceId: '',
+        historyData: {},
+        formData: {
+          Id: '',
+          Product: '',
+          Specifications: '',
+          SamplingBase: '',
+          SampleQuantity: '',
+          SampleNumber: '',
+          CloseDistanceOut: '',
+          CloseDistanceIn: '',
+          TaperToleranceOut: '',
+          TaperToleranceIn: '',
+          PitchToleranceOut: '',
+          PitchToleranceIn: '',
+          ShoulderSurface: '',
+          EndFace: '',
+          TubeDiameter: '',
+          DF: '',
+          QC: '',
+          LPB: '',
+          LPC: '',
+          LB: '',
+          WallDif: '',
+          TubeLength: '',
+          InnerDiameter: '',
+          WallThickness: '',
+          JointDiameterM: '',
+          JointDiameterF: '',
+          WallDifF: '',
+          WallDifM: '',
+          OuterDiameterF: '',
+          OuterDiameterM: '',
+          Appearance: '',
+          Inspector: '',
+          Audit: '',
+          InspectionDate: '',
+          Remark: '',
+          CreateUserId: '',
+          CreateOn: '',
+          CreateBy: '',
+          ModifiedOn: '',
+          ModifiedUserId: '',
+          ModifiedBy: ''
+        }
+      }
+    },
+    created () {
+      this.getDictOptions()
+
+      if (this.serviceId > 0) {
+        this.formData.Id = this.serviceId
+        this.initDatas()
+      } else {
+        this.formData.Id = 0
+        this.formData.EId = this.EId
+        this.formData.TaskBalanceId = this.TaskBalanceId
+        this.formData.DataEntryId = this.DataEntryId
+        // this.getEntrustInfo(this.EId)
+      }
+      // 初始值备份
+      Object.assign(this.historyData, this.formData)
+    },
+    methods: {
+      initDatas () {
+        if (this.formData.Id) {
+          api.getEntity(this.formData.Id, this.$axios).then(res => {
+            console.log('initDatas')
+            this.formData = res.data
+            this.$emit('init-data')
+            if (this.continueInsertChecked) {
+              this.continueInsertChange()
+            }
+          }).catch(err => {
+            console.error(err)
+          })
+        }
+      },
+      resetFormData () {
+        Object.assign(this.formData, this.historyData)
+        this.saveBtnName = '新增'
+        this.formData.Id = 0
+        this.formData.EId = this.EId
+        this.formData.TaskBalanceId = this.TaskBalanceId
+        this.formData.DataEntryId = this.DataEntryId
+      },
+      subListEditEntity (entityId) {
+        this.serviceId = entityId
+        this.formData.Id = this.serviceId
+        this.saveBtnName = '修改' // 修改
+        this.continueInsertChecked = false
+        this.initDatas()
+      },
+
+      getDictOptions () {
+        api.getDictList(this.$axios).then(res => {
+
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      // 保存信息
+      saveEntity () {
+        console.log(this.formData, '===========')
+        this.$refs['EntityForm'].validate((valid) => {
+          if (valid) {
+            if (!this.formData.Id) {
+              this.addEntity()
+            } else {
+              this.updateEntity()
+            }
+          } else {
+            return false
+          }
+        })
+      },
+      addEntity () {
+        api.addEntity(this.formData, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            this.formData.Id = res.data.item
+            this.saveBtnName = '修改'
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      updateEntity () {
+        api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      continueInsertChange () {
+        this.formData.Id = 0
+        this.saveBtnName = '新增'
+      },
+      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)
+        }
+      },
+
+      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">
+
+</style>